Re: slurpy scalar parameter?

2008-04-11 Thread Ryan Richter
On Sat, Apr 12, 2008 at 05:06:53AM -, John M. Dlugosz wrote: > What is the difference between: > > sub head(*$head, [EMAIL PROTECTED]) > > and > > sub head($head?, [EMAIL PROTECTED]) > If you call head(@foo), in the first $head gets @foo[0] and in the second it gets nothing (you didn't p

slurpy scalar parameter?

2008-04-11 Thread John M. Dlugosz
What is the difference between: sub head(*$head, [EMAIL PROTECTED]) and sub head($head?, [EMAIL PROTECTED]) ? The example calls it with head( 1,2,3,4 ); I'm thinking that there are differences that are not apparent in this example. --John

quick ones on subs

2008-04-11 Thread John M. Dlugosz
In S06, a wrong word: "Alternately, optional fields may be marked by supplying a default value. " should be parameters, not fields. Now here is my question: Params are bound in declaration order, not call order, and may refer to previous parameters. But what if a multi makes use of your intenti

What is the "self pragma"?

2008-04-11 Thread John M. Dlugosz
In S06, "A method's invocant always has the alias self. Other styles of self can be declared with the self pragma." What is the self pragma, and what are other styles of self, prey tell? --John

The Big Three Rakudo (and Parrot OO) Bottlenecks

2008-04-11 Thread Bob Rogers
From: chromatic <[EMAIL PROTECTED]> Date: Fri, 11 Apr 2008 17:27:34 -0700 1) The Garbage Collector is algorithmically inefficient . . . The free object list is the reason that compacting/copying collectors are popular, specifically that all you have to do to find the next free o

Re: The Big Three Rakudo (and Parrot OO) Bottlenecks

2008-04-11 Thread chromatic
On Friday 11 April 2008 17:27:34 chromatic wrote: > 1) The Garbage Collector is algorithmically inefficient. There are various > potential optimization strategies here which don't require us walking every > allocated header in the system multiple times (yes, it's that bad in at > least two places

The Big Three Rakudo (and Parrot OO) Bottlenecks

2008-04-11 Thread chromatic
I've committed a couple of minor optimizations which speed up Rakudo and Perl OO in general by about 35%. There may be a few more lurking, but I keep running into three spots which dominate most of the other optimization strategies I might pursue. 1) The Garbage Collector is algorithmically in

Symbolic references and OUTER

2008-04-11 Thread Bob Rogers
From: "John M. Dlugosz" <[EMAIL PROTECTED]> Date: 11 Apr 2008 20:12:41 - . . . What happens? The OUTER scope no longer exists at CALL 3. Does a symbolic reference to OUTER require that the entire scope be retained, just in case? If "OUTER" itself (or OUTER::OUTER::...) is

Re: parrot benchmarking

2008-04-11 Thread Patrick R. Michaud
On Fri, Apr 11, 2008 at 08:56:32PM +0100, Nuno 'smash' Carvalho wrote: > On Fri, Apr 11, 2008 at 8:38 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > > On Fri, Apr 11, 2008 at 08:02:23PM +0100, Nuno 'smash' Carvalho wrote: > > > Greetings all, > > > > > > I just posted a little Parrot bench

Symbolic references and OUTER

2008-04-11 Thread John M. Dlugosz
OUTER::<$varname> (S06, "Out-of-scope names") $OUTER::varname (S02, "Names") specifies the $varname declared in the lexical scope surrounding the current lexical scope (i.e. the scope in which the current block was defined). sub outersub () { my $a; my $b; my $closure = sub { say $a; #

Re: parrot benchmarking

2008-04-11 Thread Nuno 'smash' Carvalho
On Fri, Apr 11, 2008 at 8:38 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Fri, Apr 11, 2008 at 08:02:23PM +0100, Nuno 'smash' Carvalho wrote: > > Greetings all, > > > > I just posted a little Parrot benchmark in my use.perl's journal that > > i think it would be interesting for every

Re: parrot benchmarking

2008-04-11 Thread Nuno 'smash' Carvalho
On Fri, Apr 11, 2008 at 8:18 PM, chromatic <[EMAIL PROTECTED]> wrote: > On Friday 11 April 2008 12:02:23 Nuno 'smash' Carvalho wrote: > > > I just posted a little Parrot benchmark in my use.perl's journal that > > i think it would be interesting for everyone to take a look. From my > > point of

Re: default parameters in methods

2008-04-11 Thread John M. Dlugosz
Larry Wall larry-at-wall.org |Perl 6| wrote: All default expressions to any parameter are defined to run in the context that assumes any parameters to their left are already bound, so you may safely depend on self already being set. OK, so there is no technical reason why it can't work tha

Re: parrot benchmarking

2008-04-11 Thread Patrick R. Michaud
On Fri, Apr 11, 2008 at 08:02:23PM +0100, Nuno 'smash' Carvalho wrote: > Greetings all, > > I just posted a little Parrot benchmark in my use.perl's journal that > i think it would be interesting for everyone to take a look. Excellent! Is this benchmark pure PIR, or coming from a HLL language

Re: parrot benchmarking

2008-04-11 Thread chromatic
On Friday 11 April 2008 12:02:23 Nuno 'smash' Carvalho wrote: > I just posted a little Parrot benchmark in my use.perl's journal that > i think it would be interesting for everyone to take a look. From my > point of view Parrot finished in a very comfortable place between > compiled and interpret

Re: Code with BSD-like license in Parrot repository?

2008-04-11 Thread Andreas Rottmann
Bernhard Schmalhofer <[EMAIL PROTECTED]> writes: > Hi, > > it was suggested by Andreas Rottmanm, rotty, to use 'riaxpander' in > the implementation > of 'Eclectus'. riaxpander is a macro expander for Scheme. It is > licensed in a BSD-like way, > http://mumble.net/~campbell/darcs/riaxpander/LICENCE

parrot benchmarking

2008-04-11 Thread Nuno 'smash' Carvalho
Greetings all, I just posted a little Parrot benchmark in my use.perl's journal that i think it would be interesting for everyone to take a look. From my point of view Parrot finished in a very comfortable place between compiled and interpreted languages. I've made the benchmarking very easy to r

Code with BSD-like license in Parrot repository?

2008-04-11 Thread Bernhard Schmalhofer
Hi, it was suggested by Andreas Rottmanm, rotty, to use 'riaxpander' in the implementation of 'Eclectus'. riaxpander is a macro expander for Scheme. It is licensed in a BSD-like way, http://mumble.net/~campbell/darcs/riaxpander/LICENCE. Can this code be added to 'languages/eclectus' in the Pa

Re: [svn:parrot] r26920 - trunk/src/pmc

2008-04-11 Thread Will Coleda
On Thu, Apr 10, 2008 at 9:47 PM, chromatic <[EMAIL PROTECTED]> wrote: > On Thursday 10 April 2008 18:35:00 Patrick R. Michaud wrote: > > > > [OO] Optimized isa() vtable entry for Class. Instead of delegating > > > most of its work to isa_pmc(), this entry now performs its work > > > directly.

Re: PCT tutorial update suggestions

2008-04-11 Thread Klaas-Jan Stol
Hi, these are good improvements! It will also improve performance a bit I think. currently I don't really have much time to work on it, but I will in maybe a week or so (or 2 weeks, possibly) If people are looking for additional Exercises I suggest these are nice :-) kjs On Fri, Apr 11, 2008 at

Re: Nomenclature Question - BEGIN etc.

2008-04-11 Thread TSa
HaloO, Larry Wall wrote: Hmm, maybe "control event blocks" and "control events", then... I would call them flow blocks because this is where they are called and what they influence: the flow of execution. This nicely matches the flow charts used to describe the control flow. The other term I