Re: [perl #75524] [BUG] Creating $n regexes in a loop returns the last one $n times

2010-06-02 Thread David Green
On 2010-06-02, at 7:59 pm, Patrick R. Michaud via RT wrote: > You're reading this wrong. A regex is like a sub, so your final example > is saying something more like: > say rx { $_ } for Doh, of course! I'm still stuck in P5-think. (Also explains why eval() worked... that should have give

[perl #75524] [BUG] Creating $n regexes in a loop returns the last one $n times

2010-06-02 Thread Patrick R. Michaud via RT
On Wed Jun 02 14:50:54 2010, david.gr...@telus.net wrote: > Creating several regexes should return several different objects: > > say /@_[0]/, /@_[1]/, /@_[2]/ given > _block27 _block35 _block43 > > > However, inside a loop, instead of different regexes, the final one > gets repeated: >

[perl #75514] [BUG] &exit produces a (disappointing) backtrace in Rakudo

2010-06-02 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #75514] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=75514 > rakudo: exit rakudo 18d996: OUTPUT«␤ in main program body at line 1␤» * masak submits

[perl #75526] [BUG] Some non-alphanumeric ranges don't work

2010-06-02 Thread via RT
# New Ticket Created by David Green # Please include the string: [perl #75526] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=75526 > Certain ranges with endpoints that aren't 0-9, A-Z don't work: say <@>.. say <á>

[perl #75524] [BUG] Creating $n regexes in a loop returns the last one $n times

2010-06-02 Thread via RT
# New Ticket Created by David Green # Please include the string: [perl #75524] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=75524 > Creating several regexes should return several different objects: say /@_[0]/, /@_[1

Re: r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread Moritz Lenz
Jason Switzer wrote: > On Wed, Jun 2, 2010 at 5:10 AM, wrote: > >> Author: masak >> Date: 2010-06-02 12:10:22 +0200 (Wed, 02 Jun 2010) >> New Revision: 31043 >> >> Modified: >> docs/Perl6/Spec/S32-setting-library/Containers.pod >> Log: >> [S32/Containers] Buf does Stringy, too >> >> -class

Re: Str.trans implementation

2010-06-02 Thread David Green
On 2010-05-31, at 5:32 pm, Chris Fields wrote: > I think, in order to get regexes to work we will need a way of getting the > name of the matching regex from the Match object somehow. Any idea how to do > that? I had started working on this too, and ended up going on quite an adventure... my

Re: r31050 -[S03] refine hyper dwimminess to be more like APL, with modular semantics

2010-06-02 Thread Moritz Lenz
Solomon Foster wrote: > On Wed, Jun 2, 2010 at 3:52 PM, Aaron Sherman wrote: >> Is there some automatic translation of these examples into tests? If not, >> here's what they'd be: >> >> ok(( (1,2,3,4) «+» (1,2) ) ~~ (2,4,4,6) ) >> ok(( (1,2,3) «+» (1,2) ) ~~ (2,4,4) ) >> ok(( (1,2,3,4) «+« (1,

Re: r31050 -[S03] refine hyper dwimminess to be more like APL, with modular semantics

2010-06-02 Thread Solomon Foster
On Wed, Jun 2, 2010 at 3:52 PM, Aaron Sherman wrote: > Is there some automatic translation of these examples into tests? If not, > here's what they'd be: > > ok(( (1,2,3,4) «+» (1,2) ) ~~ (2,4,4,6) ) > ok(( (1,2,3)   «+» (1,2) ) ~~ (2,4,4)   ) > ok(( (1,2,3,4) «+« (1,2) ) ~~ (2,4)     ) > ok(( (1,

Re: r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread Aaron Sherman
On Wed, Jun 2, 2010 at 2:59 PM, Jason Switzer wrote: > On Wed, Jun 2, 2010 at 5:10 AM, wrote: > > > > > -class Buf does Positional {...} > > +class Buf does Positional does Stringy {...} > > > > I never really thought about this, but now that I see it here, it made me > realize that how

Re: r31050 -[S03] refine hyper dwimminess to be more like APL, with modular semantics

2010-06-02 Thread Aaron Sherman
On Wed, Jun 2, 2010 at 12:51 PM, wrote: > + > +(1,2,3,4) »+« (1,2) # always error > +(1,2,3,4) «+» (1,2) # 2,4,4,6 rhs dwims to ((1,2) xx *).batch(4) > +(1,2,3) «+» (1,2) # 2,4,4 rhs dwims to ((1,2) xx *).batch(3) > +(1,2,3,4) «+« (1,2) # 2,4 lhs dwims

Re: r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread Jason Switzer
On Wed, Jun 2, 2010 at 5:10 AM, wrote: > Author: masak > Date: 2010-06-02 12:10:22 +0200 (Wed, 02 Jun 2010) > New Revision: 31043 > > Modified: > docs/Perl6/Spec/S32-setting-library/Containers.pod > Log: > [S32/Containers] Buf does Stringy, too > > -class Buf does Positional {...} > +cl

Re: r31051 -[S02] refine Blobs to simply be immutable Bufs, with similar generic characteristics

2010-06-02 Thread Jon Lang
Darren Duncan wrote: > With the above addition, you have both Buf and Blob roles as well as Buf and > Blob types. > > I think you need to make each of those just a role or a type, and then add > another named entity which is the counterpart role or type. > > For example, as you have Stringy as a ro

Re: r31054 -[S03] suggestions from dataweaver++

2010-06-02 Thread yary
And while we're at it with expanding examples, can we use string concatenation instead of addition? It makes following what's happening easier. eg, +1 on that prior post. -y

Re: r31054 -[S03] suggestions from dataweaver++

2010-06-02 Thread Jon Lang
wrote: > +Regardless of whether the dwim is forced or emergent from the shapes > +of the arrays, once the side to dwim on has been chosen, the dwim > +semantics on the dwimmy side are always: > + > +    (@dwimmyside xx *).batch(@otherside.elems) > + > +This produces a list the same length as the c

r31054 -[S03] suggestions from dataweaver++

2010-06-02 Thread pugs-commits
Author: lwall Date: 2010-06-02 20:19:54 +0200 (Wed, 02 Jun 2010) New Revision: 31054 Modified: docs/Perl6/Spec/S03-operators.pod Log: [S03] suggestions from dataweaver++ more refinements to the description of the dwim semantics Modified: docs/Perl6/Spec/S03-operators.pod =

Re: r31050 -[S03] refine hyper dwimminess to be more like APL, with modular semantics

2010-06-02 Thread Jon Lang
Smylers wrote: > pugs-comm...@feather.perl6.nl writes: > >> Author: lwall >> Log: >> [S03] refine hyper dwimminess to be more like APL, with modular semantics >> >> +    (1,2,3)   »+» 1       # 2,4,4,6     rhs dwims to (1 xx *).batch(3) > > I'd've expected the output to be 2,3,4; is the 2,4,4,6 cop

r31053 -[S03] copy-o spotted by Smylers++

2010-06-02 Thread pugs-commits
Author: lwall Date: 2010-06-02 20:02:31 +0200 (Wed, 02 Jun 2010) New Revision: 31053 Modified: docs/Perl6/Spec/S03-operators.pod Log: [S03] copy-o spotted by Smylers++ Modified: docs/Perl6/Spec/S03-operators.pod === --- docs/Perl

r31052 -[S02] add native blob types

2010-06-02 Thread pugs-commits
Author: lwall Date: 2010-06-02 19:54:21 +0200 (Wed, 02 Jun 2010) New Revision: 31052 Modified: docs/Perl6/Spec/S02-bits.pod Log: [S02] add native blob types Modified: docs/Perl6/Spec/S02-bits.pod === --- docs/Perl6/Spec/S02-bits.

Re: r31051 -[S02] refine Blobs to simply be immutable Bufs, with similar generic characteristics

2010-06-02 Thread Darren Duncan
pugs-comm...@feather.perl6.nl wrote: Author: lwall Date: 2010-06-02 19:30:34 +0200 (Wed, 02 Jun 2010) New Revision: 31051 Modified: docs/Perl6/Spec/S02-bits.pod Log: [S02] refine Blobs to simply be immutable Bufs, with similar generic characteristics Thank you for this change; it was esse

r31051 -[S02] refine Blobs to simply be immutable Bufs, with similar generic characteristics

2010-06-02 Thread pugs-commits
Author: lwall Date: 2010-06-02 19:30:34 +0200 (Wed, 02 Jun 2010) New Revision: 31051 Modified: docs/Perl6/Spec/S02-bits.pod Log: [S02] refine Blobs to simply be immutable Bufs, with similar generic characteristics Modified: docs/Perl6/Spec/S02-bits.pod ===

support of parsing from a non TOP rule

2010-06-02 Thread Stéphane Payrard
Hi, the attached patch modifying HLLCompiler.pir supports parsing from an arbitrary rule in a grammar, using the $:rule parameter Example : grammar A { token a { a } }; say A.parse('a', :rule).perl This is nice for testing part of a grammar. This patch is the result of the following conversat

Re: r31050 -[S03] refine hyper dwimminess to be more like APL, with modular semantics

2010-06-02 Thread Smylers
pugs-comm...@feather.perl6.nl writes: > Author: lwall > Log: > [S03] refine hyper dwimminess to be more like APL, with modular semantics > > +(1,2,3) »+» 1 # 2,4,4,6 rhs dwims to (1 xx *).batch(3) I'd've expected the output to be 2,3,4; is the 2,4,4,6 copy pasta or am I missing s

r31050 -[S03] refine hyper dwimminess to be more like APL, with modular semantics

2010-06-02 Thread pugs-commits
Author: lwall Date: 2010-06-02 18:51:06 +0200 (Wed, 02 Jun 2010) New Revision: 31050 Modified: docs/Perl6/Spec/S03-operators.pod Log: [S03] refine hyper dwimminess to be more like APL, with modular semantics Modified: docs/Perl6/Spec/S03-operators.pod =

[perl #75504] [BUG] Error using nested classes as type for class attributes

2010-06-02 Thread via RT
# New Ticket Created by Adrian White # Please include the string: [perl #75504] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=75504 > On Rakudo @ 1727ca53c7052fabe008748b70823bf8460ad656 In trying to write tests for Day 2

[perl #75502] [BUG] Using %() to coerce hash context causes core dump

2010-06-02 Thread via RT
# New Ticket Created by Adrian White # Please include the string: [perl #75502] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=75502 > Using %() to coerce hash context causes Rakudo to core dump. e.g. Using Rakudo @ 18d996

r31045 -[S32/Containers] oh, and let's bump the version, too

2010-06-02 Thread pugs-commits
Author: masak Date: 2010-06-02 12:11:42 +0200 (Wed, 02 Jun 2010) New Revision: 31045 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] oh, and let's bump the version, too Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod =

r31044 -[S32/Containers] Buf.new parameter no longer slurpy

2010-06-02 Thread pugs-commits
Author: masak Date: 2010-06-02 12:10:26 +0200 (Wed, 02 Jun 2010) New Revision: 31044 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] Buf.new parameter no longer slurpy Feedback from implementors suggests that this would be too inefficient. Also, might be good

r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread pugs-commits
Author: masak Date: 2010-06-02 12:10:22 +0200 (Wed, 02 Jun 2010) New Revision: 31043 Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: [S32/Containers] Buf does Stringy, too Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod ===