Re: int("0x123") == int(0x123) ?

2005-03-20 Thread Autrijus Tang
On Tue, Mar 15, 2005 at 11:14:07AM -0800, Larry Wall wrote: > On Wed, Mar 16, 2005 at 02:57:36AM +0800, Autrijus Tang wrote: > : So, between the two consistencies, do you think that the more DWIMmy > : one of parsing "0o123" is more helpful? I'll implement it tomorrow > : if that's the case. :) >

Re: [perl #34501] Segfault in stress test

2005-03-20 Thread Leopold Toetsch
Nick Glencross <[EMAIL PROTECTED]> wrote: > I've been checking that my md5sum library still works after a few > months, Yeah. PIR code is quite stable. > ... but it seems to segfault in a test file with the > following backtrace: > #0 0x0816d0d0 in do_thaw (interpreter=0x82f7050, pmc=0x84be710

Re: [CVS ci] builtins

2005-03-20 Thread Leopold Toetsch
Bob Rogers <[EMAIL PROTECTED]> wrote: >From: Leopold Toetsch <[EMAIL PROTECTED]> >2) these methods can be called in various ways: > This doesn't seem to be working for me. Oops. I did obviously some changes in classes/nci.c instead of the pmc file. Thanks for reporting - fixed, leo

[Pugs] Bitten by Pugs chomp

2005-03-20 Thread Andrew Savige
I'm unsure how chomp() should work with p6; it's not listed in S29 yet. Should the semantics of g.p6 below be the same for p5 and p6? It produces different output when run with p5 compared to pugs, at least that's my sleepy brain sees. # cat g.p6 my @x = ( "a\n", "1", "x\n" ); for (@x) { print "1

Re: [perl #34501] Segfault in stress test

2005-03-20 Thread Nick Glencross
Leopold Toetsch via RT wrote: Nick Glencross <[EMAIL PROTECTED]> wrote: I've been checking that my md5sum library still works after a few months, Yeah. PIR code is quite stable. It is, isn't it? No changes were need what-so-ever. Thanks for reporting, leo I do hope so. I rarely know w

Re: Different ways for MinGW

2005-03-20 Thread Nick Glencross
Leopold Toetsch wrote: François PERRAD <[EMAIL PROTECTED]> wrote: In his Wiki (http://wiki.kn.vutbr.cz/mj/index.cgi?Build%20Parrot%20with%20MinGW), Michal Juroz lists 3 ways for building Parrot : 1) Build Parrot with MinGW, MSYS and MSYS-DTK 2) Build Parrot with MinGW and ActiveState Perl 3) Build

[Pugs] 6.0.12 released.

2005-03-20 Thread Autrijus Tang
I am very happy to announce Pugs 6.0.12, with full support for source code written in UTF-8, and Perl5-compatible regular expression matching as rx:perl5//. With this release out, I will divert some of my time on the Compiler backend. See http://use.perl.org/~autrijus/journal/23757 and tomorrow's

Perl6 and Duff's Device

2005-03-20 Thread Gaal Yahas
It looks like Duff's Device won't be possible in Perl6. This is a shame. sub duff ($from) { # real life would use reference here, this is a demo # dummy: simulate write to serial i/o port my $to; my $i = 0;

Re: New S29 draft up

2005-03-20 Thread Juerd
Matt Diephouse skribis 2005-03-18 13:35 (-0500): > > +"0x$_" # hex > > +"0o$_" # oct > > +"0b$_" # bin (does not exist in Perl 5) > Too bad sub names can't start with numbers: > 0x $hex; # hex $hex But they can, if you call them prefix operators instead of subs. See also -e and alike operator

Re: New S29 draft up

2005-03-20 Thread Matt Diephouse
Juerd <[EMAIL PROTECTED]> wrote: > Matt Diephouse skribis 2005-03-18 13:35 (-0500): > > Too bad sub names can't start with numbers: > > 0x $hex; # hex $hex > > But they can, if you call them prefix operators instead of subs. See > also -e and alike operators, which start with a character that is

Re: [Pugs] Bitten by Pugs chomp

2005-03-20 Thread Rod Adams
Andrew Savige wrote: I'm unsure how chomp() should work with p6; it's not listed in S29 yet. It'll be a lot like it is in Perl5, in that it'll remove any trailing newlineish looking characters, and returns the number of characters that I can't answer completely until we finish discussing on p6l h

Re: Best way to slurp a file in Perl 6

2005-03-20 Thread Rod Adams
Larry Wall wrote: On Sat, Mar 19, 2005 at 11:03:40PM +1100, Andrew Savige wrote: : 2) Documentation. :Where is the slurp built-in documented? I couldn't find it :in any of the Synopses (including Rod Adams' recent S29). :In desperation, I googled and found CPAN Perl6::Slurp. The officia

Re: Referencing a caller's slurpy array.

2005-03-20 Thread Rod Adams
Larry Wall wrote: On Wed, Mar 16, 2005 at 11:49:12PM -0600, Rod Adams wrote: : I haven't gotten a solid answer on when and how Perl will autogenerate : methods from subs. In general I don't think of it as autogeneration at all, but as failover to a different dispatcher. I can't think of a case

plan to port SQL::Routine within a week

2005-03-20 Thread Darren Duncan
Here are my shortest-term plans that affect Pugs: 1. Circa March 21-23, I will release the Perl 5 version of SQL::Routine v0.57 to CPAN, plus updated Perl 5 versions of its dependents, and then announce their availability to dbi-users and other such forums as "developer release #2". This will c

Re: Module::Phalanx100

2005-03-20 Thread Andy Lester
On Mar 20, 2005, at 4:18 PM, Robert Rothenberg wrote: FYI, I've uploaded Module::Phalanx100 to CPAN in to $CPAN/authors/id/R/RR/RRWO/Module-Phalanx100-0.01.tar.gz There's already a Bundle::Phalanx. -- Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance

Re: Perl6 and Duff's Device

2005-03-20 Thread Luke Palmer
Gaal Yahas writes: > It looks like Duff's Device > won't be possible in Perl6. This is a shame. > > sub duff ($from) { > # real life would use reference here, this is a demo > # dummy: simulate write to serial i/o port >

Re: New S29 draft up

2005-03-20 Thread Luke Palmer
Matt Diephouse writes: > Juerd <[EMAIL PROTECTED]> wrote: > > Matt Diephouse skribis 2005-03-18 13:35 (-0500): > > > Too bad sub names can't start with numbers: > > > 0x $hex; # hex $hex > > > > But they can, if you call them prefix operators instead of subs. See > > also -e and alike operators,

Re: New S29 draft up

2005-03-20 Thread Rod Adams
Luke Palmer wrote: Matt Diephouse writes: Juerd <[EMAIL PROTECTED]> wrote: Matt Diephouse skribis 2005-03-18 13:35 (-0500): Too bad sub names can't start with numbers: 0x $hex; # hex $hex But they can, if you call them prefix operators instead of subs. See also -e and alike

[PATCH] Return a varying number of values in IMCC (buggy)

2005-03-20 Thread Bob Rogers
The attached patch is supposed to do two things: 1. Makes it possible to say ".flatten foo" as part of a .pcc_begin_return/.pcc_end_return sequence. Remarkably, this part of the patch is only a one-line change; the internals for call & return are closer than the syntax. 2. Makes ".fla

nothing

2005-03-20 Thread Rod Adams
Does Perl need a no-op function? With the addition of "no bare literals", it makes constructs like 1 while some_func(); an error. I propose creating a no-op function "nothing" that can be used here or anywhere else you specifically wish to do nothing at all. given $this { when Even { nothing

Re: eval (was Re: New S29 draft up)

2005-03-20 Thread Rod Adams
Larry Wall wrote: On Fri, Mar 18, 2005 at 10:28:18AM -0500, Aaron Sherman wrote: : Thus: : : eval read :file("foo"); : : There you have it. The problem being that it will now report errors in some random temporary string rather than at some line number in a file. Not good. Orthogonality strike

chr and ord

2005-03-20 Thread Rod Adams
I'm thinking C and C should be strictly Code Point level activities, but I'm not sure. They likely need to be renamed, in any event, to better reflect the fact that everything is Unicode these days. -- Rod Adams

study

2005-03-20 Thread Rod Adams
C is an odd sort of function. AFAIK, it's the only optimization hint that we have. Will the P6RE even use this information, and is it worth keeping? My gut feeling tells me that it will be useful again around 6.2, and we should keep it around until then as a potential no-op. Comments? -- Rod Ad

Slices

2005-03-20 Thread Matt Diephouse
Is it possible to assign to an array slice? @array[0..4] = ( 0..4 ); # splice @array, 0, 5, 0..4 If so (and I'm hoping it is), is there an equivalent of Ruby's `[]=` method? (Is there a way to define this behavior within my own array-like classes?) Can I use slice notation when dealing with st

Re: study

2005-03-20 Thread Luke Palmer
Rod Adams writes: > C is an odd sort of function. AFAIK, it's the only optimization > hint that we have. > > Will the P6RE even use this information, and is it worth keeping? > > My gut feeling tells me that it will be useful again around 6.2, and we > should keep it around until then as a pote

Re: Slices

2005-03-20 Thread Luke Palmer
Matt Diephouse writes: > Is it possible to assign to an array slice? > > @array[0..4] = ( 0..4 ); # splice @array, 0, 5, 0..4 Of course. You could in Perl 5, right? > If so (and I'm hoping it is), is there an equivalent of Ruby's `[]=` > method? (Is there a way to define this behavior within

Re: Slices

2005-03-20 Thread Rod Adams
Matt Diephouse wrote: Is it possible to assign to an array slice? @array[0..4] = ( 0..4 ); # splice @array, 0, 5, 0..4 If so (and I'm hoping it is), is there an equivalent of Ruby's `[]=` method? (Is there a way to define this behavior within my own array-like classes?) I assign to array and ha

Re: study

2005-03-20 Thread Rod Adams
Luke Palmer wrote: Rod Adams writes: C is an odd sort of function. AFAIK, it's the only optimization hint that we have. Will the P6RE even use this information, and is it worth keeping? My gut feeling tells me that it will be useful again around 6.2, and we should keep it around until then as

Re: Slices

2005-03-20 Thread Brent 'Dax' Royal-Gordon
Luke Palmer <[EMAIL PROTECTED]> wrote: > > Can I use slice notation when dealing with strings? > > > >say $string[-1]; # say substr($string, -1); > >$string[0..2] = "Hello"; > > No. I'm pretty sure that's the Right Thing, too. First, the "sixth > element" in a string depends on how you'r

Re: study

2005-03-20 Thread Luke Palmer
Rod Adams writes: > Luke Palmer wrote: > >Ummm... yeah, keep a function around if it's not currently implemented. > >I don't think so. > > > I see that as preferable to saying "we had it in 5.10, we dropped it in > 6.0, then added it back in for 6.2." Umm... your statement isn't quite so shock