Re: How much do we close over?

2005-06-13 Thread Chip Salzenberg
On Sun, Jun 12, 2005 at 11:26:49PM +0100, Piers Cawley wrote: sub foo { my $x = 1; return sub { eval $^codestring } } say foo()($x); I'm pretty sure you meant single-quoted, and you perhaps might maybe need a dot there: sub foo { my $x = 1; return sub { eval $^codestring } }

Re: How much do we close over?

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 12:57:32AM +0200, Chip Salzenberg wrote: On Sun, Jun 12, 2005 at 11:26:49PM +0100, Piers Cawley wrote: sub foo { my $x = 1; return sub { eval $^codestring } } say foo()($x); I'm pretty sure you meant single-quoted, and you perhaps might maybe need a dot

Re: How much do we close over?

2005-06-13 Thread Piers Cawley
Rob Kinyon [EMAIL PROTECTED] writes: Piers Cawley said: in other words, some way of declaring that a subroutine wants to hang onto every lexical it can see in its lexical stack, not matter what static analysis may say. I'm not arguing with the idea, in general. I just want to point out

Re: How much do we close over?

2005-06-13 Thread Piers Cawley
Rod Adams [EMAIL PROTECTED] writes: Piers Cawley wrote: Chip and I have been having a discussion. I want to write: sub foo { my $x = 1; return sub { eval $^codestring } } say foo()($x); I claim that that should print 1. Chip claims it should throw a warning about because of timely

[perl #36266] [BUG] perldoc -d

2005-06-13 Thread via RT
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #36266] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36266 perldoc -ud packfile-c.pod ../src/packfile.c Unknow option -d leo

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Nicholas Clark
On Sun, Jun 12, 2005 at 03:03:24PM -0400, Matt Fowles wrote: 3) Chip is right, Piers is right. The two of you have are working from a different base set of definitions/axioms or misunderstood each other in some other way. Historically, (pre Perl 6 actually) I think that this scenario was the

Re: How much do we close over?

2005-06-13 Thread Luke Palmer
On 6/12/05, Piers Cawley [EMAIL PROTECTED] wrote: Chip and I have been having a discussion. I want to write: sub foo { my $x = 1; return sub { eval $^codestring } } say foo()($x); I claim that that should print 1. Chip claims it should throw a warning about because of timely

[RELEASE] Pugs 6.2.6 is released!

2005-06-13 Thread Autrijus Tang
I'm happy to announce Pugs 6.2.7, with much improved parser speed and error reporting, as well as rudimentary (source filter style) macro support: http://pugscode.org/dist/Perl6-Pugs-6.2.7.tar.gz SIZE = 1157780 SHA1 = fc8d80c05a5c896693e395f830d10e85a62f2747 Most of this release's

Optimisations (was Re: How much do we close over?)

2005-06-13 Thread Paul Johnson
On Mon, Jun 13, 2005 at 11:24:07AM +, Luke Palmer wrote: I just have to say that it's really annoying running into optimizations when I don't want them. Isn't the whole point of optimisations that you shouldn't have to worry about whether you hit one or not, otherwise the optimisation

[RELEASE] Pugs 6.2.7 is released!

2005-06-13 Thread Autrijus Tang
(Sorry. Wrong subject last time...) I'm happy to announce Pugs 6.2.7, with much improved parser speed and error reporting, as well as rudimentary (source filter style) macro support: http://pugscode.org/dist/Perl6-Pugs-6.2.7.tar.gz SIZE = 1157780 SHA1 =

Re: [RELEASE] Pugs 6.2.6 is released!

2005-06-13 Thread Ingo Blechschmidt
Hi, Autrijus Tang autrijus at autrijus.org writes: I'm happy to announce Pugs 6.2.7, with much improved parser speed and error reporting, as well as rudimentary (source filter style) macro support: and, as usual, here's the Subversion revision graph, showing the growth of the number

Re: Optimisations (was Re: How much do we close over?)

2005-06-13 Thread Luke Palmer
On 6/13/05, Paul Johnson [EMAIL PROTECTED] wrote: On Mon, Jun 13, 2005 at 11:24:07AM +, Luke Palmer wrote: Back when I wrote an back-chaining system in perl, I used tied variables in order to determine when I needed to solve for something. A

Re: [RELEASE] Pugs 6.2.7 is released!

2005-06-13 Thread vadim
... Most of this release's development happened without my direct input, since I was busily writing a talk and a paper about Pugs: http://pugscode.org/talks/apw/slide1.html interesting read, thank you a lot. But few questions however. A following page:

Re: [RELEASE] Pugs 6.2.7 is released!

2005-06-13 Thread vadim
, 13.06.2005, 09:23, Autrijus Tang : On Mon, Jun 13, 2005 at 05:18:38PM -0400, vadim wrote: interesting read, thank you a lot. But few questions however. A following page: http://pugscode.org/talks/apw/slide14b.html#end states that Faster: JIT compiled; run in embedded machines Is

Parrot and features (was Re: [RELEASE] Pugs 6.2.7 is released!)

2005-06-13 Thread Rob Kinyon
That statement talks about Parrot. As soon as Pugs targets Parrot -- which is what I'm working on right now -- you can run cross-compiled Perl 6 program s on PocketPC. Question: Given that Parrot isn't complete, will there be a time where certain Pugs features are available when targeting

BEGIN {...} and IO

2005-06-13 Thread Ingo Blechschmidt
Hi, # No problem: my $data = BEGIN { my $fh = open some_file err...; =$fh; }; # Problem; my $fh = BEGIN { open some_file err... }; # Compile-time filehandle leaked into runtime! say =$fh; In Perl 5, this wasn't a problem, as compilation and execution happended (most of the

Anonymous macros?

2005-06-13 Thread Ingo Blechschmidt
Hi, just checking: Are anonymous macros allowed? my $macro = macro ($x) { 100$x }; say $macro(3); # 1003 Of course, anonymous macros can't be called at compile-time, like normal macros: my $macro = rand 0.5 ?? macro ($x) { 100$x } :: macro ($x) { 200$x }; say $macro(3); # 1003

Re: Parrot and features (was Re: [RELEASE] Pugs 6.2.7 is released!)

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 10:32:05AM -0400, Rob Kinyon wrote: That statement talks about Parrot. As soon as Pugs targets Parrot -- which is what I'm working on right now -- you can run cross-compiled Perl 6 program s on PocketPC. Question: Given that Parrot isn't complete, will there be a

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Chip Salzenberg
On Sun, Jun 12, 2005 at 09:41:05PM -0700, Bill Coffman wrote: Continuations can be taken from within any sub, and possibly even when appending to a list, if you're using lazy list eval. Oh no ... it's even worse than you think. Almost *any* opcode that operates on a PMC can trigger a

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Brent 'Dax' Royal-Gordon
On 6/13/05, Chip Salzenberg [EMAIL PROTECTED] wrote: Oh no ... it's even worse than you think. Almost *any* opcode that operates on a PMC can trigger a continuation. And I only need two words to prove it: Tied variables. Isn't this *exactly* why Perl 6 is requiring you to mark tied

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 09:21:00AM -0700, Brent 'Dax' Royal-Gordon wrote: On 6/13/05, Chip Salzenberg [EMAIL PROTECTED] wrote: Oh no ... it's even worse than you think. Almost *any* opcode that operates on a PMC can trigger a continuation. And I only need two words to prove it: Tied

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Chip Salzenberg
On Mon, Jun 13, 2005 at 09:21:00AM -0700, Brent 'Dax' Royal-Gordon wrote: On 6/13/05, Chip Salzenberg [EMAIL PROTECTED] wrote: Oh no ... it's even worse than you think. Almost *any* opcode that operates on a PMC can trigger a continuation. And I only need two words to prove it: Tied

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Chip Salzenberg
On Tue, Jun 14, 2005 at 12:37:52AM +0800, Autrijus Tang wrote: On Mon, Jun 13, 2005 at 09:21:00AM -0700, Brent 'Dax' Royal-Gordon wrote: On 6/13/05, Chip Salzenberg [EMAIL PROTECTED] wrote: Oh no ... it's even worse than you think. Almost *any* opcode that operates on a PMC can trigger a

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 06:52:35PM +0200, Chip Salzenberg wrote: Isn't this *exactly* why Perl 6 is requiring you to mark tied variables when they're declared? Yes. Um: my $x is tied; tied $x, SomePackage; unsuspecting_victim(\$x); # ??? Hmm, you can't say is tied;

[perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread via RT
# New Ticket Created by Andy Dougherty # Please include the string: [perl #36269] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36269 As discussed in http://www.nntp.perl.org/group/perl.perl6.internals/29984 a

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Leopold Toetsch
Andy Dougherty (via RT) wrote: ... On SPARC, doubles should be aligned on 8-bit boundaries. The speculation is that the _num_val part of the UnionVal in the PMC ends up unaligned. However, I couldn't follow where that happened, so I can't suggest a patch. It happends directly in the PMC

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Chip Salzenberg
On Mon, Jun 13, 2005 at 07:12:48PM +0200, Leopold Toetsch wrote: Andy Dougherty (via RT) wrote: ... On SPARC, doubles should be aligned on 8-bit boundaries. The speculation is that the _num_val part of the UnionVal in the PMC ends up unaligned. However, I couldn't follow where that happened,

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Leopold Toetsch
Chip Salzenberg wrote: On Mon, Jun 13, 2005 at 07:12:48PM +0200, Leopold Toetsch wrote: Andy Dougherty (via RT) wrote: ... On SPARC, doubles should be aligned on 8-bit boundaries. The speculation is that the _num_val part of the UnionVal in the PMC ends up unaligned. However, I couldn't

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Chip Salzenberg
On Mon, Jun 13, 2005 at 07:29:53PM +0200, Leopold Toetsch wrote: The PMC allocation area is a big bunch of memory, where PMC-sized pieces are carved out by the memory allocation system. There is no union or compiler bug involved. But PMC-sized is defined in terms of the C sizeof operator,

Re: BEGIN {...} and IO

2005-06-13 Thread chromatic
On Mon, 2005-06-13 at 17:07 +0200, Ingo Blechschmidt wrote: # No problem: my $data = BEGIN { my $fh = open some_file err...; =$fh; }; # Problem; my $fh = BEGIN { open some_file err... }; # Compile-time filehandle leaked into runtime! say =$fh; Perhaps I'm being

Re: BEGIN {...} and IO

2005-06-13 Thread Ingo Blechschmidt
Hi, chromatic wrote: On Mon, 2005-06-13 at 17:07 +0200, Ingo Blechschmidt wrote: # No problem: my $data = BEGIN { my $fh = open some_file err...; =$fh; }; # Problem; my $fh = BEGIN { open some_file err... }; # Compile-time filehandle leaked into runtime! say

Re: BEGIN {...} and IO

2005-06-13 Thread Autrijus Tang
On Mon, Jun 13, 2005 at 10:48:47AM -0700, chromatic wrote: # Problem; my $fh = BEGIN { open some_file err... }; # Compile-time filehandle leaked into runtime! say =$fh; Perhaps I'm being very naive, but why is this a problem? Maybe it's not the best way to do something, but I

Re: Anonymous macros?

2005-06-13 Thread Larry Wall
On Mon, Jun 13, 2005 at 05:25:59PM +0200, Ingo Blechschmidt wrote: : just checking: Are anonymous macros allowed? I have no problem with macros being first-class objects during the compile. Though the macro itself may have a problem with your passing it '3' when it is likely expecting an AST.

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Leopold Toetsch
Chip Salzenberg wrote: On Mon, Jun 13, 2005 at 07:29:53PM +0200, Leopold Toetsch wrote: The PMC allocation area is a big bunch of memory, where PMC-sized pieces are carved out by the memory allocation system. There is no union or compiler bug involved. But PMC-sized is defined in terms of

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Andy Dougherty
On Mon, 13 Jun 2005, Leopold Toetsch via RT wrote: Chip Salzenberg wrote: On Mon, Jun 13, 2005 at 07:12:48PM +0200, Leopold Toetsch wrote: Andy Dougherty (via RT) wrote: ... On SPARC, doubles should be aligned on 8-bit boundaries. The speculation is that the _num_val part of the

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Chip Salzenberg
On Mon, Jun 13, 2005 at 08:38:30PM +0200, Leopold Toetsch wrote: Chip Salzenberg wrote: On Mon, Jun 13, 2005 at 07:29:53PM +0200, Leopold Toetsch wrote: The PMC allocation area is a big bunch of memory, where PMC-sized pieces are carved out by the memory allocation system. There is no union

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Chip Salzenberg
On Mon, Jun 13, 2005 at 02:57:09PM -0400, Andy Dougherty wrote: On Mon, 13 Jun 2005, Chip Salzenberg via RT wrote: On Mon, Jun 13, 2005 at 08:38:30PM +0200, Leopold Toetsch wrote: Chip Salzenberg wrote: On Mon, Jun 13, 2005 at 07:29:53PM +0200, Leopold Toetsch wrote: The PMC

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Leopold Toetsch
Chip Salzenberg wrote: On Mon, Jun 13, 2005 at 02:57:09PM -0400, Andy Dougherty wrote: Yes. The compiler does the right thing. It sensibly reports that sizeof(PMC) = 24 for SPARC. Then I remain puzzled how Parrot could ever misalign a double. Yes. So I am. Could somone please run this

Re: State of Design Documents

2005-06-13 Thread Patrick R. Michaud
On Fri, Jun 10, 2005 at 02:36:52PM -0400, Joshua Gatcomb wrote: Ok, are there any guidelines for what should and should not be put forward as a patch. I can see 3 key areas of concern: 1. Framework for unwritten Synopses (so we know what goes where) 2. Heading placeholders for written

Re: [perl #36269] Alignment problems with doubles on SPARC.

2005-06-13 Thread Andy Dougherty
On Mon, 13 Jun 2005, Leopold Toetsch via RT wrote: Chip Salzenberg wrote: On Mon, Jun 13, 2005 at 02:57:09PM -0400, Andy Dougherty wrote: Yes. The compiler does the right thing. It sensibly reports that sizeof(PMC) = 24 for SPARC. Then I remain puzzled how Parrot could ever

Re: State of Design Documents

2005-06-13 Thread Patrick R. Michaud
On Mon, Jun 13, 2005 at 02:22:59PM -0500, Patrick R. Michaud wrote: On Fri, Jun 10, 2005 at 02:36:52PM -0400, Joshua Gatcomb wrote: I have included a sample framework for chapter 17. Theoretically, someone could then go search the archives for decision points in any of those headings and

Hackathon Day 2+3 Report

2005-06-13 Thread Chip Salzenberg
I've posted a report on the Hackathon Days 2+3 as a journal entry on use.perl.org: http://use.perl.org/~chip/journal/25182 I'm not going to copy it here, but you probably want to read it, if only because it will point you to AN UPDATED PDD. Really. -- Chip Salzenberg [EMAIL PROTECTED]

Perl defined Object, Array, Hash classes

2005-06-13 Thread Eric
Hey, Found out this morning that wizard.p6 suddenly stopped wondering and I was stumped as to why. The autrijus came along and pointed out that i was defineing an Object class of my own. This was obliterating the built in class causing all other classes to fail to work at all. It would seem

Re: Perl defined Object, Array, Hash classes

2005-06-13 Thread Larry Wall
You shouldn't be able to reopen/clobber an existing class/module unless you specify class Object is augmented {...} class Object is replaced {...} or some such (the trait names are still negotiable). In general, private classes should start with my or our, though I don't know if Pugs

Re: Hackathon Day 2+3 Report

2005-06-13 Thread Bill Coffman
On 6/13/05, Chip Salzenberg [EMAIL PROTECTED] wrote: I've posted a report on the Hackathon Days 2+3 as a journal entry on use.perl.org http://use.perl.org: http://use.perl.org/~chip/journal/25182 I'm not going to copy it here, but you probably want to read it, if only because it will

PDD03: The new boss

2005-06-13 Thread Bob Rogers
From: Chip Salzenberg [EMAIL PROTECTED] Date: Tue, 14 Jun 2005 00:04:54 +0200 . . . you probably want to read it, if only because it will point you to AN UPDATED PDD. Really. Great! Pardon the typing; it's hard when my head is spinning . . . FWIW, there is one thing that jumps