Re: [Pugs] Writing tests that run pugs ($^X or equivalent would seem handy)

2005-03-25 Thread Nicholas Clark
On Fri, Mar 25, 2005 at 11:08:11AM +1100, Andrew Savige wrote: Running 'perl test.pl', where test.pl is: print exe_name='$^X'\n; produces, on Windows and Linux at least, the absolute path of the perl executable, for example: exe_name='C:\Perl\bin\perl.exe' exe_name='/usr/bin/perl'

Re: BEGIN {}

2005-03-25 Thread Rafael Garcia-Suarez
Autrijus Tang wrote in perl.perl6.compiler : Consider this program, example.p6: use v6; my $var = BEGIN { say I'm compiling, man; time() } say Compiled at { time() - $var } seconds ago!; Is this behaviour correct? % pugscc --parrot example.p6 I'm compiling, man %

Re: what namespace for (future|new) module ?

2005-03-25 Thread Adam Kennedy
You've seen ab right? Was written for benchmarking Apache? OK, you can only throw the one page at it I think, but I find it very useful for finding out the basic page overhead and stability under parellel load. Adam K Cdric Bouvier wrote: Hello there. I once had to organize the stress testing

Re: BEGIN {}

2005-03-25 Thread Nicholas Clark
On Fri, Mar 25, 2005 at 08:32:13AM -, Rafael Garcia-Suarez wrote: Autrijus Tang wrote in perl.perl6.compiler : Consider this program, example.p6: use v6; my $var = BEGIN { say I'm compiling, man; time() } say Compiled at { time() - $var } seconds ago!; Is this

Re: [perl #34564] [PATCH] Cleanup of pmc2c2.pl

2005-03-25 Thread Leopold Toetsch
Matt Diephouse [EMAIL PROTECTED] wrote: Attached is a patch to clean up pmc2c2.pl and (hopefully) make it more readable and a little easier to approach. No new features are added (yet). Thanks, applied. leo

FYI embedding API change

2005-03-25 Thread Leopold Toetsch
A lot of the packfile functions that didn't take an CInterp* as first argument now have one. This change was necessary to switch PMC constants {un,}packing to freeze/thaw eventually. Sorry for the disruption and the big patch, but it's an all or nothing thingy basically. Thanks, leo

Re: Another Perl Task: review PMC compiler

2005-03-25 Thread Leopold Toetsch
Matt Diephouse [EMAIL PROTECTED] wrote: Leopold Toetsch [EMAIL PROTECTED] wrote: Seems to be another ordering problem, where a hash is used instead of an array with inherited vtable methods. pylong.dump has already the wrong entry: 'destroy' = 'default', in the suoer hash. I don't

Re: Another Perl Task: review PMC compiler

2005-03-25 Thread Peter Sinnott
On Fri, Mar 25, 2005 at 11:31:58AM +0100, Leopold Toetsch wrote: Matt Diephouse [EMAIL PROTECTED] wrote: Leopold Toetsch [EMAIL PROTECTED] wrote: Seems to be another ordering problem, where a hash is used instead of an array with inherited vtable methods. pylong.dump has already the wrong

Re: BEGIN {}

2005-03-25 Thread Markus Laire
Rafael Garcia-Suarez wrote: It looks not correct to my perl 5 trained eyes. BEGIN is designed to let things run as early as possible, mostly for Perl programs to discover things about the environment they're running in. That's a different environment than the environment they were compiled in. For

PPI and the Perl 5 to Perl 6 converter?

2005-03-25 Thread Adam Kennedy
I thought I'd just drop in a quick note to people to let you know that PPI 0.903 was just release, which fixs the last significant performance bug. PPI is now completely leak-free and implicitly-DESTROY's correctly. Anyone who wanted to have a short at doing any kind of mass-processing of Perl

Re: Another Perl Task: review PMC compiler

2005-03-25 Thread Leopold Toetsch
Peter Sinnott [EMAIL PROTECTED] wrote: I had a quick look and things looked ok. The parents are stored in a hash but they are retrieved sorted by their value which increments as parents are added. What was different between the 2 machines ( perl versions/os/whatever )? It's ok on: $ uname

Re: BEGIN {}

2005-03-25 Thread Rafael Garcia-Suarez
Markus Laire wrote in perl.perl6.compiler : my $use_debug_mode = BEGIN { %*ENV{DEBUGME} ?? 1 :: 0 }; According to S04 you'd use INIT block for that. INIT is run at run time, ASAP. But BEGIN is run at compile time, ASAP. Fair enough, makes sense. As long as BEGIN and CHECK blocks are run

[perl #34572] [PATCH] README.win32 instructions for nmake with ICU

2005-03-25 Thread K. Stol
# New Ticket Created by K. Stol # Please include the string: [perl #34572] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34572 Hello, Found some spare time today to give another shot at parrot on windows, and

RE: [perl #34572] [PATCH] README.win32 instructions for nmake with ICU

2005-03-25 Thread Gay, Jerry
i tried to build parrot on win32 yesterday. i too found the readme out of date. i didn't know how version-dependent parrot was with unicode, so i tracked down the 2.8 version of icu at ftp://ftp.software.ibm.com/software/globalization/icu/2.8 with this version installed, 'icudata.lib' is the

Re: BEGIN {}

2005-03-25 Thread Larry Wall
On Fri, Mar 25, 2005 at 02:52:51PM +0800, Autrijus Tang wrote: : So, as now Pugs generates PMC code that makes mandel.p6 run : faster than Perl 5 (http://use.perl.org/~autrijus/journal/23829), : I'm pondering this BEGIN{} mess that Pugs had not dealt with. : : Consider this program, example.p6: :

Re: PPI and the Perl 5 to Perl 6 converter?

2005-03-25 Thread Larry Wall
On Fri, Mar 25, 2005 at 10:27:53PM +1100, Adam Kennedy wrote: : Also, I saw another mention recently (possibly on TPF request for : donations) about the Perl 5 to Perl 6 converter, and it being 40% : completed? ... Larry? Well, by one reckoning it's 0% done. At the moment I'm just working on a

removing SET_NON_ZERO_NULL

2005-03-25 Thread Chip Salzenberg
The SET_NON_ZERO_NULL macro is silly. On any arch where null pointers are not represented as all zeroes, the null pointer value is still *spelled* 0 in source code. CFOO *p = 0 always works, for all values of FOO and all architectures. If I'm missing something, please speak up. -- Chip

precedence of return

2005-03-25 Thread Greg Buchholz
I'm wondering if the precedence of the return keyword isn't wrong in pugs. In the code below, fibo2 works as I'd expected, fibo returns nothing. (If this is expected behavior, I'd apppreciate someone pointing me to TFM). Thanks, Greg Buchholz #!perl6 use v6; sub fib ($n) { return

Re: removing SET_NON_ZERO_NULL

2005-03-25 Thread Nicholas Clark
On Fri, Mar 25, 2005 at 04:39:39PM -0500, Chip Salzenberg wrote: The SET_NON_ZERO_NULL macro is silly. On any arch where null pointers are not represented as all zeroes, the null pointer value is still *spelled* 0 in source code. CFOO *p = 0 always works, for all values of FOO and all

[Pugs] More Pugs precedence idiosyncrasies

2005-03-25 Thread Andrew Savige
Just a couple more p5/pugs anomalies I noticed. # This does not work in pugs: No compatible subroutine found: my. my $x = my $y = 0; I noticed the next one when using the new slurp() function. Looks like an operator precedence problem. # cat f.p6 sub ret_list_0 { () } sub ret_list_3 { ( 'abc',

Moving the p5 standard library to p6

2005-03-25 Thread Andrew Savige
I noticed the Pugs folks have started porting File::Spec and other modules to Pugs, which leads me to ask this question. I've also taken a look at Rod Adams S29. There a quite a few p5 standard libraries with crusty old user interfaces that many folks dislike. Two that people often seem to

YAML test output

2005-03-25 Thread Nathan Gray
I was wondering if I should switch my test log output to YAML, or some more parseable format. Or maybe change output format based on the log file extension? The problem, of course, is not to encumber Test.pm with anything heavy, and no extra dependencies. Any thoughts, especially from Stevan

Re: Moving the p5 standard library to p6

2005-03-25 Thread Larry Wall
On Sat, Mar 26, 2005 at 12:05:06PM +1100, Andrew Savige wrote: : I noticed the Pugs folks have started porting File::Spec and : other modules to Pugs, which leads me to ask this question. : I've also taken a look at Rod Adams S29. : : There a quite a few p5 standard libraries with crusty old user

Re: YAML test output

2005-03-25 Thread Stevan Little
Nathan, On Mar 25, 2005, at 8:31 PM, Nathan Gray wrote: I was wondering if I should switch my test log output to YAML, or some more parseable format. Or maybe change output format based on the log file extension? The problem, of course, is not to encumber Test.pm with anything heavy, and no

Re: removing SET_NON_ZERO_NULL

2005-03-25 Thread Chip Salzenberg
According to Nicholas Clark: Is it being used as part of an optimisation? Is it so that memory for structures can be allocated with calloc() (or later reset to all bits zero) and then in the source to reset that structure a macro used to write 0 to all the pointers? On a platform where a NULL

[Pugs] A couple of string interpolation edge cases

2005-03-25 Thread Andrew Savige
I stumbled across a couple of interesting quote interpolation edge cases: Case 1 -- # cat ttt.p6 my $x = {; # pugs ttt.p6 unexpected end of input expecting \, $!, $/, \\ or block NonTerm SourcePos ttt.p6 2 1 Is this a bug? Case 2 -- # cat q1.pl my $x = $; print x='$x'\n; # perl -w

Re: [Pugs] A couple of string interpolation edge cases

2005-03-25 Thread Larry Wall
On Sat, Mar 26, 2005 at 03:32:18PM +1100, Andrew Savige wrote: : I stumbled across a couple of interesting quote interpolation : edge cases: : : Case 1 : -- : : # cat ttt.p6 : my $x = {; : : # pugs ttt.p6 : : unexpected end of input : expecting \, $!, $/, \\ or block : NonTerm SourcePos

Re: [Pugs] A couple of string interpolation edge cases

2005-03-25 Thread Luke Palmer
Andrew Savige writes: I stumbled across a couple of interesting quote interpolation edge cases: Case 1 -- # cat ttt.p6 my $x = {; # pugs ttt.p6 unexpected end of input expecting \, $!, $/, \\ or block NonTerm SourcePos ttt.p6 2 1 Is this a bug? No. Braces in strings are

[Pugs] Semicolon as statement terminator

2005-03-25 Thread Andrew Savige
I was flabbergasted by this one. # cat weird.p6 my$x=42my$y=Zaphod~Beeblebroxmy$z=I think they're just strange symbols of some kindsayx='$x' y='$y' z='$z' # pugs weird.p6 x='42' y='ZaphodBeeblebrox' z='I think they're just strange symbols of some kind' Wow! It actually seems to work. Are

Re: [Pugs] Semicolon as statement terminator

2005-03-25 Thread Luke Palmer
Andrew Savige writes: I was flabbergasted by this one. # cat weird.p6 my$x=42my$y=Zaphod~Beeblebroxmy$z=I think they're just strange symbols of some kindsayx='$x' y='$y' z='$z' # pugs weird.p6 x='42' y='ZaphodBeeblebrox' z='I think they're just strange symbols of some kind' Wow! It

[perl #34576] [PATCH] more pmc2c2.pl work

2005-03-25 Thread via RT
# New Ticket Created by Matt Diephouse # Please include the string: [perl #34576] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34576 This patch (a) adds comments before each subroutine describing its parameters,

Re: [Pugs] Semicolon as statement terminator

2005-03-25 Thread Autrijus Tang
On Sat, Mar 26, 2005 at 05:31:15PM +1100, Andrew Savige wrote: I was flabbergasted by this one. # cat weird.p6 my$x=42my$y=Zaphod~Beeblebroxmy$z=I think they're just strange symbols of some kindsayx='$x' y='$y' z='$z' Thanks, fixed in r1192. Enjoy, /Autrijus/ pgpyAv8jmJREQ.pgp