Jarkko Hietaniemi wrote:
The bootstrapping may take several rounds as Parrot learns
...
- execute (collect output) (note that execution may not be native)
I don't think these two (cross-compile and build-own-tools) are
strictly compatible goals.
If you are going to build your own tools and
http://cobolforgcc.sourceforge.net/cobol_14.html
Hong Zhang wrote:
How do you define the currently loaded? If things are lazy loaded,
the stuff you expect has been loaded may not have been loaded.
We could load placeholders that go and load the bigger methods
as needed, for instance.
--
David
Damian Conway wrote:
proper lexically-scoped modules.
sub foo { print outer foo\n};
{
local *foo = sub {print inner foo\n};
foo();
};
foo();
did what I wanted it to. Should I extend Pollute:: to make
this possible:
in file
Dave Mitchell wrote:
Here's a list of what any Perl 6 implementation of lexicals must be able to
cope with (barring additions from future apocalyses). Can anyone think of
anything else?
I would like
perl -le 'my $Q = 3; {local $Q = 4; print $Q}'
to print 4 instead of crashing in
Dan Sugalski wrote:
It'll probably be something like Here's the function name. Here's the
parameters. Do The Right Thing. I don't think there's much need for
cleverness on the part of the interface. The actual dispatch code could be
nasty, but that's someone else's problem. :)
Me wrote:
I can imagine plausibly useful dispatch rulesets that do not involve
comparing sums of inheritance distances. (Though this *is* all
imagining as I haven't used multimethods/clos in about 10 years.)
I would also imagine that others see that summing inheritance
distances may not
Hong Zhang wrote:
3) The multi dispatch is generally slow and complicated. Since it does
not fit well with OO concept, it will just cause more confusion. Typically
we use different solution for OO language vs procedure language.
In other words, how much do we want our language to set up for
This arrived as part of a mailing list that I suppose I opted into
at some point:
==
More ++, Less C
Standard template libraries, abstract classes and multiparadigm programming
are keys to
high-performance
==
Too much C++ code is just C.
Michael G Schwern wrote:
If you *really* wanted to write an optimized redirector, you'd
have the redirector eliminate itself.
sub foo {
my $method = $_[0]-{_foo} || $_[0]-can(_foo);
{
no warnings 'redefine';
*foo = $method;
}
goto $method;
}
:)
Michael G Schwern wrote:
The idea that a class is either 'perfect' or 'complete' has to be the
silliest, most arrogant thing I've ever heard!
So, subsequent refinements have to use a has-a
instead of an is-a relation in re: objects of the final class.
Maybe the inclusion of this feature
http://www.jwz.org/doc/java.html includes the following gripe
about Java:
I sure miss multi-dispatch. (The CLOS notion of doing
method lookup based on the types of all of the arguments,
rather than just on the type of the implicit zero'th
argument, this).
CLOS is of course the Common
Garrett Goebel wrote:
Any word from on high whether subroutine signatures will apply to methods in
Perl6? There's RFC128 and RFC97... but they both mostly dodge the issue of
methods.
The absense of method signatures for specifying required, optional, and
named parameters... not to
Matt Youell wrote:
Is there a standard? No. Does there need to be one? I don't see a need
for it.
What's wrong with something simple, like saying all classes have an implicit
new() method that is overloadable? Is this really *that* complicated? Maybe
I'm not getting the Big Picture.
Benjamin Stuhl wrote:
(eg. I solemnly swear to never use symbolic
references, count on specific op patterns, or
use any number large enough to require
bignums.)
These are things (aside from the number limit, but overflow catching
is needed
Matt Youell wrote:
MI thing, but now it's sounding like a constructor bubbling scheme, like
Ah, yes. I've had to deal with that problem several times in the past. The
terminology was new to me, however.
Has there been a proposed solution?
Thanks,
- Matt
What's the problem
Hong Zhang wrote:
Say if you want Thread can be easily inserted into LinkedList,
you can write
public Thread extends Object implements Node {
...
}
or
public Thread extends Object, Node {
...
}
and don't bother to implement classic linked list node.
Hong
You could use
Matt Youell wrote:
Forgive my woeful ignorance Could someone define data aggregation by
inheritance? From John's original mention I thought this was some oblique
MI thing, but now it's sounding like a constructor bubbling scheme, like in
C++, etc.
I understood it to mean automatic
Stephen Zander wrote:
OpenSource. Try writing a second Perl implementation from scratch.
Well it's a dicier proposition that writing a Fortran or COBOL
implementation from scratch, but it's Not Intractable. The next
assertion might come as a small shock to you but Larry isn't god.
Topaz
John Porter wrote:
Michael G Schwern wrote:
Give me data aggregation by inheritance
Oooh, now that would be useful.
Of course it would. That's why nearly every OO language (beside Perl)
has it.
package circular_list_node;
... # defines how the list_nodes do their
David Whipp wrote:
The other standard solution is to
add a Person has-a Employment_Status relationship,
but that doesn't feel much better.
It feels fine to me. Person has-a gender, person has-a job,
it's more politically correct, even, than pigeonholing. You
can even do dynamic multiple
Mark J. Reed wrote:
If I wanted to make a variable read-only, I would expect to do it
by setting the read-only attribute on that variable, which I would
further expect to do the same way I would set any other attribute at
any other time. Orthogonality has its good points, even in Perl;
you
Dave Mitchell wrote:
some sort of clone method
With tree strings, at clone time they get reorged into minimal number
of nodes: back to one big block if they are all the same type, or
back to one block for each type transition if it is tagged data.
Having the basic string type support
Now look at eval. When acting on a string, it compiles and runs it as
code. When acting on a block, it traps any errors and prevents dying.
You may be able to come up with some weak analogies between the two,
but they're two different functionalities.
i have nothing to add. you
Dan Sugalski wrote:
Hong Zhang wrote:
I don't see the core should support language/locale in this detail.
I deal a lot of mix chinese/english text file. There is no way to represent
it using plain string, unless you want to make string be rich-format-text
-buffer. Current locale or
Dan Sugalski wrote:
If the internal string API is a tree instead of a contiguous memory block,
the tagging could be done at the node or branch level.
Besides, you get nondestructive inserts.
Yup. The only problem is that it makes the string data significantly more
complex. I don't think
I had imagined the way things like
$R = 0 but true
would work is that the scalar would grow another couple of slots
in it, which would be the conversion operators. Everything defaults
to how it has worked in the past, but could be overridden. So the
boolean value starts as default
Dan Sugalski wrote:
At 04:39 PM 6/12/2001 -0500, David L. Nicol wrote:
I appear to be suggesting that deferability be an add-on that causes some
rewriting to support itself, rather than an optimization to parse away
bothering with silly calculations that we will never see the results
Dan Sugalski wrote:
I'm still trying to formulate a good set of rules on how I think active
data should perform under optimization to pass on to Larry.
Dan
How about, Active data doesn't get optimized. Static data doesn't
care if you access ir or
Damian Conway wrote:
Graham wrote:
Now I may be wrong here, but I thought I remembered something about
.foo being the same as $_.foo
It's certainly a possibility.
In which case you could do
for (%database.$accountnumber) {
I think I'm repeating what has been said already but here goes.
After sending this I'm breaking for a sandwich. :)
for database data, the problem domain is limited sensibly. We want
to defer as many lookups as possible, so they can be sent as a bunch
rather than sent one by one, and we would
Since I just proposed a new paradigm I'll try to apply it, before
darting down the hill and getting my sandwich.
Dan Sugalski wrote:
David L. Nicol [made an akward metaphor with data as summer campers]
That's less easy than you might think. Quick:
$bar = bar();
is $bar active
Vijay Singh wrote:
Just how much $foo can dance on the head of a dot operator
The current Annals Of Improbable Research (http://www.improb.com)
has a piece on applying modern physics to the age-old question, you
know, about the boogieing angels.
--
[EMAIL PROTECTED] wrote:
You may wish to read this thread about lazy arrays and object
persistence to get an idea of what you're getting into.
http://www.geocrawler.com/archives/3/3024/2001/3/0/5427925/
Taking lazy as far as we can, has anyone been thinking about
a compilation mode in which
Damian Conway wrote:
Graham asked:
IIRC there was some suggestion of a class being able to declare
elements to be accessable as methods in this was.
So if $ref is of a known type and 'a' was declared in that way,
the parser would take $ref.a and turn it into $ref.{a}
Coming to Perl 5 from a C++ background, I was greatly
disappointed, while writing a persistent object base
class and consulting my new, flat-lying Blue Camel (Second
edition, this was 1996), that the following kind of thing
did not do what I wanted:
sub argle($){
print
~/perl/perl-5.7.1$ ./perl -le '%a=(1..10); print it; exists $a{1} and print
it'
2
--
David Nicol 816.235.1187
The toad doesn't know it has ten toes.
John Porter wrote:
Huh? What did I say?::
you said there would be no performance hit in rewriting
defined|exists to store the pointer to the thing that was
found to be defined or exist somewhere.
After looking at the source code for what might have been the
wrong part of
John Porter wrote:
David L. Nicol wrote:
I really don't know enough about perl 5 internals to go on; I
am certain that this feature is a no-brainer though
Besides the fact which, how it might be added to perl5
does not say much about how it might be implemented in
perl6
Dan Sugalski wrote:
I've been
assuming that an Anything-Unicode translation will be lossless, but this
makes me wonder whether that assumption is correct.
I seem to recall from reading articles on this issue that the issue is
encoding of arrangement: Even with an unlimited number of
Russ Allbery wrote:
a caseless character wouldn't show up in
either IsLower or IsUpper.
maybe an IsCaseless is warrented -- or Is[Upper|Lower]
could return UNKNOWN instead of TRUE|FALSE, if the
extended boolean attributes allow transbinary truth values.
Damian Conway wrote:
$ref.{a}can be $ref{a}
which can also be
$ref.a
can it not?
Me wrote:
[strict typing]
Not a negative, but realize that many people find it
of less value than the annoyances it brings with it
(myself included)
Michael, I don't know which is more impressive; the
fact that use of a strictly typed language implies that
a copy of you would
Me wrote:
I.Found your notion of a sealed off namespace
intriguing. I have no idea what it meant just yet;
I'm going to go read and think about it now.
I'll pitch some syntax:
# prevent modification to %reflexive:: like so:
package reflexive is closed;
# allow it
Me wrote:
Question 1:
Afaict, even with use strict at its most strict, perl 6
can't (in practice) complain, at compile time, if
$foo.Foun
refers to an undeclared Foun.
Right?
it is already detectable. from perldoc perlref:
Perl will raise an exception if you
Simon Cozens wrote:
Please don't try defending it or $^d in terms of efficiency;
any variable that Perl has to keep track of magically takes a
performance hit. Remember $`, $', and $?
No, this datum is already known by defined() and exists() all I
am suggesting is a name for the Perl API
Graham Barr wrote:
I think there are a lot of benefits to the re engine not to be
separate from the core perl ops.
So does it start with a split(//,$bound_thing) or does it use
substr(...) with explicit offsets?
Larry Wall wrote:
Sure, you can download the object code for this 5 line Perl program
into your toaster...but you'll also have to download this 5 gigabyte
regex interpreter before it'll run.
That's a scenario I'd love to avoid. And if we can manage to store
regex opcodes and state
Hong Zhang wrote:
based scheme itself. For example, an local variable is not used by
any of the code, however an eval($s) may refer to it. So should optimizer
eliminate the local?
Hong
mark blocks that have closures in them, in those, you can't throw any
locals out. Otherwise, you can
Jarkko Hietaniemi wrote:
Err...a regex that isn't a regex, is this a Zen koan...? Ahhh, you
want to emulate the state machine in Pure Perl. Okay... next thing
you want to do is to write symbolic assembler in C...? :-)
I have my reasons :)
Actually, I want to write a c into perl compiler
having wantarray return the number of items needed, or -1 for
all of them, would work very nicely for user-written partial returners.
Did anyone RFC that?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
DWIM before autovivify unless strict
Me wrote:
It was an informal finger-in-the-wind thing I sent to
a perl beginners list. Nothing special, just a quick
survey.
http://www.self-reference.com/cgi-bin/perl6plurals.pl
I certainly do not see that many people on the
list agreeing with you.
And that means I should be
Michael G Schwern wrote:
That aside, could you put together a code example of what this wins?
some expressiveness is gained, and a creation of a temporary variable
can be avoided.
...
defined $thing and return $thing
...
is my working idiom for checking which case
Buddha Buck wrote:
Why is [...] better than
1 until defined($foo=getvalue()); return $foo;
small incremental improvement to [read|writ]ability
writability:
one less thing to write
one less variable name to have to remember not to collide with
readability:
keyword it means look at very
Simon Cozens wrote:
On Wed, May 30, 2001 at 06:48:53PM +0100, Simon Cozens wrote:
*Nice*, but potentially a bugger to implement.
Of course, 'sub it():lvalue{$_}' gets you *most* of the benefit.
um, no.
foreach(@foods){
# okay, I'll try...
exists
while pseudocoding something I realized that it would be really
cool if there was another magical default shelf, like $_ or _ but
subtly different, that stores, if lexically used, the object of the
most recent defined or exists --
or maybe even the most recently referred to scalar, just
Larry Wall wrote:
Why should it be deprecated?
Oh, are you wondering because I said ...
What about array and hash accesses starting with scalar-indicators?
I guess it is easy to misread A2 to mean that not only will
scalar(@trucks[5])
return the sixth truck, but
John Porter wrote:
Larry Wall wrote:
: do you think conflating @ and % would be a perl6 design win?
Nope, I still think most ordinary people want different operators for
strings than for numbers.
Different operators, conflated data type.
That's what we have for scalars already.
Uri Guttman wrote:
multiple timers
This means something like there is this array of sets of events,
and a thread that shifts off the front one every second and
feeds everythin in it into the event queue. Right?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
how to pull the next four lines out of a file handle in
way new syntax,
Larry Wall wrote:
Dave Storrs writes:
: QUOTE LARRY
: Dave Storrs writes:
: @foo = $STDIN * 4;
:
: Larry
What's wrong with old-fashioned autoextending array slices that
now DWIM
splice
I've just put this into a program:
warn about to unlink @{[$FRname*]};
unlink $FRname*;
(wow, the MUA is a lot less vivid than a colorful code editor --
does mutt or emacs color-code code in e-mails?)
Demonstrating, the p5 cast can be performed. I guess p6 will
optimize any
Bart Lateur wrote:
So what you're saying is that references aren't really scalars,
but their own type. Thus they need their own prefix.
But we've sort of run out of possible prefixes.
that is my interpretation of the p4-p5 decision to make references
fit within the scalar type; which
David Grove wrote:
...
This is frightening me too. I really don't like the thought of
$i = 1.0;
$i += 0.1 if $INC;
$i .= Foo, Inc.;
(or more specifically a one line version that converts several times for a
single statement)
becoming
my str $i = 1.0;
if($INC) {
Larry Wall wrote:
there seems to be a shortage of three-humped camels.
At last! the unencumbered image for the mascot! Could
O'Reilly really claim a three-humped camel was an image of
a camel, with a straight face?
Nathan Wiger wrote:
I think Uri's qh() suggestion is the cleanest:
me too
And it would make hash declarations cleaner:
%hash = qh(
foo
bar
jim = 'bob'
var
);
Plus maybe even a pragma to set the default value:
use default hashval =
Jonathan Scott Duff wrote:
(*%a, %b) = (%c,%d);# %a slurps, %b gets nothing
(%a, *%b) = (%c,%d);# %a = %c, %b gets the rest
I'm sure your imaginations can twiddle the cardinality knob
appropriate for generalization :-)
-Scott
so if you don't know exactly what
I like the lisp-associative-array alternating keys,values nature
of the perl5 %hash=@array semantics, and the way it can be used to
set defaults in hashref argument lists. The replacement must
provide an equivalent but less hacky replacement.
--
David Nicol
Larry Wall wrote:
Syntactically speaking it's too ambiguous to have both a unary and a
bracketing .
Cool. Do we get a operator to use as an l-value, instead of print?
$log = join localtime, 'difficult cramigudgeo';
It's possible we're thinking of iterators wrong here. Perhaps
Larry Wall wrote:
all arrays are iterators of some sort
BZZT! HSSS! CLANG! DANGER, WILL ROBINSON! DANGER, WILL ROBINSON
John Porter wrote:
Pardon me if someone has already suggested this, but...
Couldn't labels really be (aliases to) iterator objects?
So that
next FOO
really *does* mean
FOO.next
Marvelous! That also wraps up the for should have an explicit
iterator access method thread
Johan Vromans wrote:
[Quoting Michael G Schwern, on May 6 2001, 22:58, in Re: Apo2: \Q ambigui]
Hmmm, maybe you can point out the compose key on my keyboard, I
can't find it. ;)
Pick whatever you find convenient. I use the right control key.
From my .Xmodmap:
! Compose key
John Porter wrote:
[EMAIL PROTECTED] writes:
:
: why should a reader expect that a declarative description
: of foo would be followed by the body of foo?
Isn't the functional definition of a sub
just another one of its attributes, anyway?
I'm a little bit disappointed that p6
I know it is an annoying and bad habit but I'm still young enough so
at first glance I think I know it all.
[billions and billions of]
SYN_A # Return one element regardless of context.
SYN_B # Return number of element wanted by context.
SYN_C #
Nathan Wiger wrote:
Truthfully, I've always liked the 's (and personally don't think we need a
qw alternative), so I'd rather we stay with:
$a = $b; # same as next $b or $b.next
we could generalize the other direction and have angles be a standard
shortcut for the next method:
Simon Cozens wrote:
On Tue, May 08, 2001 at 01:59:47PM -0400, John Porter wrote:
Perl is a highly dynamic language
An object with exactly one and only one method doesn't sound that
dynamic to me.
nonsense! It's got accessor methods too, for everyone who
wanted to magicalize $index
Larry Wall wrote:
The ~~ is a cute hack though.
Credit is due to Steve Lane [EMAIL PROTECTED] who posted it to funwithperl.
...
I'm sorry, my eyes go crossed when I look at that, and the two \Q's
merge into one, which confuses me, in a stereoscopic sort of way.
I was wrong about \Q\E
Not a problem. \Q means quotemeta, except immediately following
a interpolated identifier. You want to start metaquoting immediately
after a curious interpolation? use \Q\Q.
I have been regularly, since I fingured out how, doing things like
print the time is now
if we kept with their current meaning but added it
as a handier whitespace quoter I would like that.
p5:
@things = one two three four five;
_is_ currently a syntax error. In my mind. Not in my 5.005_03.
however, where it appears to behave just like qw does,
except that it does
It also reminds me of mjd's mention of: my($first) = sort {...} @list;
being O(n) if Perl were really Lazy.
But it would need a completely different algorithm. Which is not too
bad. And even
my ($first, $second, $third) = sort {...} @list;
is kind-of plausible. So we'd
I am going to miss doublequoting being the default quoting for
here strings. I find that to be a very nice optimization and
would like to know more about the reasoning behind taking it
away. I worry that official standard p6 will be more difficult
to use than official standard p5.
--
Graham Barr wrote:
How this cooperates with lazy is a different matter entirely.
Graham.
http://dev.perl.org/rfc/123.html#Assigning_from_lazy_lists
suggests that assigning to a sized busy array from a lazy array will
fill it and stop.
--
David Nicol 816.235.1187
Damien Neil wrote:
sub foo {
my Dog $spot = shift;
my $fh = IO::File-new(file);
$spot-eat_homework($fh);
}
Even with the object type declared, the compiler can make no
assumptions about whether a reference to $fh will be held or not.
Perhaps the Poodle subclass of Dog
David L. Nicol wrote:
i'm swearing off sort-by-subject. Sorry.
Dan Sugalski wrote:
We don't have continuations yet...
But there's nothing at the lowest levels of the interpreter that prevent
that. You could, if you chose, get a stream of bytecode that would do you
continuations. Slowly and awkwardly, perhaps, but still do them. (I'm all
up for doing
Bart Lateur wrote:
Yeah. But no cheers then. The problem still remains: you can access a
hash in the normal way in plain code, but inside a sub, you can mainly
only access a passed hash through a reference.
...
Are you going to provide a simpler aliasing mechanism to turn a hash
Jonathan Scott Duff wrote:
I'd rather it be cc or _ (I didn't like the underscore at first,
but it's grown on me a little)
Comparing ~ and _ to available editors markup marks, _ is closer
to the sideways () that an editor might use to indicate that two words
should be joined together. Tilde
John Porter wrote:
We could y/$@%/@%$/ ...
... and create an alternate parser able to handle the full
internal internals API.
I have finally figured out the main motivation behind the
whole perl6 effort: the obfuscated perl contests were
getting repetitive.
Good night.
Dan Sugalski wrote:
2) Anyway, even resizing vtables we would need some more indirection to
determine in which position of the vtable is which operator.
No. Each operator goes in a fixed position in the vtable, and it's the same
for each table. Anything else is nasty, error prone, and
Eric Roode wrote:
What is it about . that seems to inspire allergic reactions in people?
Surely it's not the . itself, but the requirement that you fit everything
into that one syntactic mold. Perl's not going to do that.
No, more like . is already used for something. The only reason I
Uri Guttman wrote:
i was looking at dan's PMC arena allocator struct and it reminded me of
something an older language can do (which MJD has likened to an early
perl :). ever heard of AREA in PL/I? it was a large chunk of ram
dedicated to allocate memory from. what was special is that all
Larry Wall wrote:
(And juxtaposition is out because we're not going to destroy indirect
object syntax
How often is indirect object syntax used without some whitespace? Having
the perl5-perl6 converter locate it and insert a space shouldn't be too
very tricky.
1: use adjacency w/o white space for string cat.
2: allow, as in C, consecutive double-quoted strings
with no intervening tokens (i.e. just whitespace and comments) to
be considered as one string
3: as Uri pointed out, it's all syntactic sugar for convolutions
of Cjoin
That
Ah.. I knew I'd find the thread in here somewhere.
The problems go away if you allow white space to signify.
[...] Consider
print Foo
foo(bar);
Did the author forget a semi-colon, or did they intend to concatinate
there? Also, consider this...
they forgot a
Dan Sugalski wrote:
I'm not a parser guy by any means (unfortunately) but we have
the distinct possibility of completely replacing all of the
parser rules after token X appears, whatever that token might
be. (Heck, we may have the possibility of replacing the entire
parser) There's no
Larry Wall wrote:
David L. Nicol writes:
:
: [this parser switch thing]
: sounds a lot like an exec system call: there are some things
: which remain in effect (open file handles, current directory,
: environment) but there are many others which do not. Maybe
: switching parsers is best
Brent Dax wrote:
Yes, that is exactly what I had in mind, thanks for
the validation. Only the comment syntax would have to
come back to a designated module, with another hashbang.
#!comment
yadda yadda yadda
blah blah blah
foo bar baz
#!VB6
James Mastros wrote:
Ahh, bingo. That's what a number of people (inculding me) are suggesting --
a :functional / :pure / :stateless / :somthingelseIdontrecall attribute
attachable to a sub.
:memoizable
:clean
:nosideeffects
Bart Lateur wrote:
Er... may I suggest ratio's as a data format? It won't work for sqrt(2)
or PI, but it can easily store 1/3 as two (long) integers. You can
postpone doing integer divisions until you need a result, at which time
^to
Dan Sugalski wrote:
At 02:52 PM 3/29/2001 -0800, Russ Allbery wrote:
James Mastros [EMAIL PROTECTED] writes:
Ahh, bingo. That's what a number of people (inculding me) are
suggesting -- a :functional / :pure / :stateless /
:somthingelseIdontrecall attribute attachable to a sub.
Nick Ing-Simmons wrote:
Perhaps we could teach pod that /* was alias for =pod
and */ an alias for =cut ?
that won't work because pod/cut is strictly line-based and C-style
comments are strictly stream-based.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
He who
1 - 100 of 260 matches
Mail list logo