S16 questions

2009-02-13 Thread Timothy S. Nelson
Hi. I've been trying to help reorganise the draft S16, as I'm also in the process of writing something roughly equivalent to Net::Cmd in Perl6. I have some questions. First question, how do IO::Encoded and eg. IO::Encoded::Readable relate to each other? I'm assuming it's one of the follow

r25329 - docs/Perl6/Spec

2009-02-13 Thread pugs-commits
Author: wayland Date: 2009-02-14 07:37:40 +0100 (Sat, 14 Feb 2009) New Revision: 25329 Modified: docs/Perl6/Spec/S02-bits.pod docs/Perl6/Spec/S16-io.pod Log: S02: Moved comment about standard file handles to S16. S16: Did more clearing up, and fixed some stupid things I did last time Modi

Re: r25325 - docs/Perl6/Spec

2009-02-13 Thread Chris Dolan
On Feb 13, 2009, at 11:50 PM, Larry Wall wrote: On Fri, Feb 13, 2009 at 11:34:03PM -0600, Chris Dolan wrote: Argh! I submitted a patch implementing $?PROGRAM in Rakudo literally 5 minutes before you sent this... http://rt.perl.org/rt3/Ticket/Display.html?id=63228 Indeed, why do you thin

Re: r25325 - docs/Perl6/Spec

2009-02-13 Thread Larry Wall
On Fri, Feb 13, 2009 at 11:34:03PM -0600, Chris Dolan wrote: > Argh! I submitted a patch implementing $?PROGRAM in Rakudo literally 5 > minutes before you sent this... > > http://rt.perl.org/rt3/Ticket/Display.html?id=63228 Indeed, why do you think I fixed the spec? :) But don't worry, we te

r25328 - docs/Perl6/Spec

2009-02-13 Thread pugs-commits
Author: wayland Date: 2009-02-14 06:38:34 +0100 (Sat, 14 Feb 2009) New Revision: 25328 Modified: docs/Perl6/Spec/S16-io.pod Log: S16-io: Reorganised everything, grouping things together a bit better. This is only a draft; otherwise I'd be a lot more careful :). Specifically, I've: -

Re: r25325 - docs/Perl6/Spec

2009-02-13 Thread Chris Dolan
Argh! I submitted a patch implementing $?PROGRAM in Rakudo literally 5 minutes before you sent this... http://rt.perl.org/rt3/Ticket/Display.html?id=63228 Chris On Feb 13, 2009, at 11:21 PM, pugs-comm...@feather.perl6.nl wrote: Author: lwall Date: 2009-02-14 06:21:13 +0100 (Sat, 14 Feb 2

r25325 - docs/Perl6/Spec

2009-02-13 Thread pugs-commits
Author: lwall Date: 2009-02-14 06:21:13 +0100 (Sat, 14 Feb 2009) New Revision: 25325 Modified: docs/Perl6/Spec/S19-commandline.pod Log: [S19] $?PROGRAM makes no sense Modified: docs/Perl6/Spec/S19-commandline.pod === --- docs/Per

infectious traits and pure functions

2009-02-13 Thread Jon Lang
In reading over the Debugging draft (i.e., the future S20), I ran across the concept of the infectious trait - that is, a trait that doesn't just get applied to the thing to which it is explicitly applied; rather, it tends to spread to whatever else that thing comes in contact with. "Taint" is the

r25323 - docs/Perl6/Spec

2009-02-13 Thread pugs-commits
Author: lwall Date: 2009-02-14 02:31:33 +0100 (Sat, 14 Feb 2009) New Revision: 25323 Modified: docs/Perl6/Spec/S10-packages.pod docs/Perl6/Spec/S11-modules.pod docs/Perl6/Spec/S12-objects.pod Log: Allow use of :: as anonymous package name Clear up more * as GLOBAL fossils Modified: docs

[perl #63222] git pull ?

2009-02-13 Thread via RT
# New Ticket Created by Peter Schwenn # Please include the string: [perl #63222] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63222 > Rakudistes, After a git clone of rakudo I get successful make and test of perl6.exe.

Re: PCT via Perl6: success!

2009-02-13 Thread Chris Dolan
On Feb 13, 2009, at 9:54 AM, Patrick R. Michaud wrote: On Fri, Feb 13, 2009 at 12:58:13AM -0600, Chris Dolan wrote: * I couldn't figure out how to call 'compreg' from Rakudo, so I used inline PIR If using PCT, it shouldn't be necessary to call 'compreg' at all... where was this needed?

[perl #62278] Feed Operators do not work?

2009-02-13 Thread jn...@jnthn.net via RT
On Tue Jan 13 02:40:17 2009, richardh wrote: > The feed operators ==> and <== dont appear to work. > Not on the rakudo feature status page > > I tried the following code (I know it is better to use [+] for this > example, but I was looking for a simple code snippet). > > my @arr = ( 1,2,3,4 ); >

[perl #62892] Rakudo dies when trying to do 'is' inheritance on a role

2009-02-13 Thread jn...@jnthn.net via RT
On Thu Jan 29 02:02:53 2009, masak wrote: > rakudo: role A {}; class B is A {} > rakudo 36139: OUTPUT«Null PMC access in get_string() [...] > * masak submits rakudobug > > I haven't checked in the specs what this should do, but STD says it's > allowed. It should pun the role into a class, and i

Re: References to parts of declared packages

2009-02-13 Thread TSa (Thomas Sandlaß)
On Friday, 13. February 2009 20:30:24 Larry Wall wrote: > While taking a shower I refined the design somewhat in my head, > thinking about the ambiguities in package names when you're redefining. > By my previous message, it's not clear whether the intent of > > multi package Foo::Bar {...} > >

[perl #62346] No interactivity ? No prompt?

2009-02-13 Thread jn...@jnthn.net via RT
On Wed Jan 14 05:08:59 2009, richardh wrote: > I thought > our Str prompt Str > had been implimented. > > Does prompt exist in parrot? > It now exists in Rakudo as of git 1ac6625. > If not, would be possible to do in reasonable future? > Depends if this part of the ex-future is reasonable to yo

Re: References to parts of declared packages

2009-02-13 Thread Jon Lang
Larry Wall wrote: > Jon Lang wrote: > : And with package versioning, you may not need an "is instead" > : equivalent: if you want to "redefine" a package, just create a newer > : version of it in a tighter lexical scope than the original package was > : in. You can still access the original packag

Re: Synopsis for Signatures?

2009-02-13 Thread Larry Wall
On Fri, Feb 13, 2009 at 10:24:14AM -0800, Jon Lang wrote: : Given that signatures have grown well beyond their origins as : subroutine parameter lists, and given that signatures have their own : syntax, perhaps they should be moved out of S06? I could see S08 : being retasked to address signatures

Re: References to parts of declared packages

2009-02-13 Thread Larry Wall
On Fri, Feb 13, 2009 at 10:46:42AM -0800, Jon Lang wrote: : And with package versioning, you may not need an "is instead" : equivalent: if you want to "redefine" a package, just create a newer : version of it in a tighter lexical scope than the original package was : in. You can still access the o

[perl #62196] Null PMC access on smartmatch inside method in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Sun Jan 11 09:42:35 2009, masak wrote: > rakudo: class A { method foo { say "" ~~ * } }; A.new.foo > rakudo 35420: OUTPUT«Null PMC access in find_method() [...] > * masak reports rakudobug > masak: Is that dependent on it being in a class? > jnthn: yes. > rakudo: say "" ~~ * > rakudo: sub

[perl #62164] Smartmatch dies when comparing a Str and an Array

2009-02-13 Thread jn...@jnthn.net via RT
On Sun Jan 11 04:36:44 2009, ihrd wrote: > Hi, > ah, and this bug broke my code : > I was using Str ~~ Array, Regex ~~ Array and it works properly before. > > > ":)".say if 'a' ~~ Now gives no output, which is the correct thing. If you were expecting different, your code is wrong. :-) Maybe you

[perl #62164] Smartmatch dies when comparing a Str and an Array

2009-02-13 Thread jn...@jnthn.net via RT
On Sat Jan 10 08:20:33 2009, masak wrote: > perl6: say "foo" ~~ ["foo", "bar"] > ..rakudo 35339: OUTPUT«Non-dwimmy hyperoperator cannot be > used on arrays of different sizes or dimensions [...] This now works (gives 0). And will reply to next bit of the ticket separately... Thanks, Jonathan

[perl #61654] Where-clauses only work correctly with blocks -- not smartmatch

2009-02-13 Thread jn...@jnthn.net via RT
On Wed Dec 24 07:35:47 2008, dwh...@nvidia.com wrote: > (rakudo 34337) > > Examples: > > sub foo( $x where { $_ eq "x" } ) { say "X" } > x("x") > > works, but > > sub foo( $x where "x" ) { say "X" } > sub foo( $x where /x/ ) { say "X" } Now also work as of git 0f87695. Plus added tests. T

[perl #61776] Rakudo gives incorrect output for subtypes

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Feb 13 10:06:37 2009, jn...@jnthn.net wrote: > On Sat Dec 27 14:08:48 2008, publiustemp-perl6us...@yahoo.com wrote: > > subset Letter of Str where { $_ =~ /^ <[a..z]> $/ }; > > > > ...snip... > > > That's a Perl 5-o. :-) You likely meant: > > subset Letter of Str where { $_ ~~ /^

Re: References to parts of declared packages

2009-02-13 Thread Jon Lang
Larry Wall wrote: > Jon Lang wrote: > : Well, we _do_ have a mechanism in place for adding to an existing > : class (e.g., "class Foo is also { ... }"), and classes are a special > : case of modules; so I don't see why you shouldn't be able to do > : likewise with modules and even packages. That s

Synopsis for Signatures?

2009-02-13 Thread Jon Lang
At present, signatures appear to serve at least three rather diverse purposes in Perl 6: * parameter lists for routines (can also be used to specify what a given routine returns; explored in detail in S06). * variable declaration (see "declarators" in S03). * parametric roles (currently only addre

Re: References to parts of declared packages

2009-02-13 Thread Larry Wall
On Fri, Feb 13, 2009 at 09:44:12AM -0800, Jon Lang wrote: : TSa wrote: : > Does that imply that packages behave like C++ namespaces? That is : > a package can be inserted into several times: : > : > package A : > { : > class Foo {...} : > } : > # later elsewhere : > package A : >

[perl #61776] Rakudo gives incorrect output for subtypes

2009-02-13 Thread jn...@jnthn.net via RT
On Sat Dec 27 14:08:48 2008, publiustemp-perl6us...@yahoo.com wrote: > subset Letter of Str where { $_ =~ /^ <[a..z]> $/ }; > > my $first_letter = 'a'; > say $first_letter; > > my Letter $second_letter = 'a'; > say $second_letter; > > sub doit (Letter $letter) { >

Re: [perl #36283] [TODO] pasm/pir: forbid assignment syntax for inout params

2009-02-13 Thread kjstol
On Fri, Feb 13, 2009 at 4:09 PM, Andrew Whitworth wrote: > Well, it was a long shot. Nothing is ever as easy as it seems! The Yes, but nice try anyway ;-) > > problem with this ticket is that we need all sorts of different > information, none of which is available at the same time. We need to >

[perl #61454] Rakudo complains about hypers when matching some list with whatever stars in them

2009-02-13 Thread jn...@jnthn.net via RT
On Wed Dec 17 15:43:01 2008, masak wrote: > rakudo: say (3) ~~ (*,3,*) > rakudo 34053: OUTPUT[Non-dwimmy hyperoperator cannot be used > on arrays of different sizes or dimensions. Fixed in git f7b4b86 and tests added. Thanks, Jonathan

[perl #61532] Method declaration not parsed correctly when "is also" present

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Dec 19 09:20:41 2008, cspencer wrote: > > The following code: > >class Array is also { > method splice(@array: $offset = 0, Int $size? = 0, *...@values) { >say "Splicing array: offset = $offset, size = $size"; > } >}; > >(1..10).splice(1, 1); > > does not pa

Re: References to parts of declared packages

2009-02-13 Thread Jon Lang
TSa wrote: > Does that imply that packages behave like C++ namespaces? That is > a package can be inserted into several times: > > package A > { > class Foo {...} > } > # later elsewhere > package A > { > class Bar {...} > } > > I would think that this is just different sy

Re: References to parts of declared packages

2009-02-13 Thread Larry Wall
On Fri, Feb 13, 2009 at 06:27:07PM +0100, TSa wrote: > Does that imply that packages behave like C++ namespaces? That is > a package can be inserted into several times: > >package A >{ >class Foo {...} >} ># later elsewhere >package A >{ >class Bar {...} >

[perl #61452] Rakudo doesn't treat several whatever stars in a row correctly in a list smartmatch

2009-02-13 Thread jn...@jnthn.net via RT
On Wed Dec 17 15:38:07 2008, masak wrote: > rakudo: say (1,2,3) ~~ (1,*,*,3) > rakudo 34053: OUTPUT[0␤] > Hmm. > jnthn: what do you think of that first one? > The first one looks like a bug. > jnthn: :) > * masak submits And as of git daa2eea it looks like an ex-bug. Plus added a bunch of te

Re: References to parts of declared packages

2009-02-13 Thread TSa
HaloO, Jon Lang wrote: Carl Mäsak wrote: * A should be treated as a post-declared package. Whatever this means, it sounds preferable. :) It means that you can define package A without ever declaring it, by declaring all of its contents using such statements as 'role A::B ', 'sub A::Foo', and

Re: Question about testing perl6, rakudo or pugs online

2009-02-13 Thread Larry Wall
On Thu, Feb 12, 2009 at 06:37:26AM -0800, dev.null.box wrote: : Hi... : : I´m used to test oneliners on the perl6 irc channel when i´m at : home... But, at work, latetly i´m having lots of free time (this week : has been sooo boring). : : But, i have irc blocked at my office (and yes, i´ve tried

[perl #61204] :x() in .subst does not fail when there aren't enough matches

2009-02-13 Thread jn...@jnthn.net via RT
On Tue Dec 09 02:00:40 2008, masak wrote: > Rakudo r33613 treats the :x($n) adverb as "up to $n matches", not (as > specced) "exactly $n matches". > > $ perl6 -e 'say "foofoofoo".subst("foo", "bar", :x(3))' # right > barbarbar > > $ perl6 -e 'say "foofoofoo".subst("foo", "bar", :x(4))' # wrong >

[perl #61106] Something doesn't work in hash indexing through a closure in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Feb 13 06:05:01 2009, jn...@jnthn.net wrote: > On Sun Dec 07 04:33:27 2008, masak wrote: > > Moritz (>), Carl (>>): > > >> Rakudo r33577 responds strangely to the following program: > > >> > > >> $ perl6 -e 'my $locator = method { . }; my %h = { here => "foo" > > >> }; say %h.$locator' > > >

Re: [perl #36283] [TODO] pasm/pir: forbid assignment syntax for inout params

2009-02-13 Thread Andrew Whitworth
Well, it was a long shot. Nothing is ever as easy as it seems! The problem with this ticket is that we need all sorts of different information, none of which is available at the same time. We need to know the syntax that's used by the op (using '=' or not) which is known in the parser but not elsew

Re: PCT via Perl6: success!

2009-02-13 Thread Patrick R. Michaud
On Fri, Feb 13, 2009 at 12:58:13AM -0600, Chris Dolan wrote: > * I couldn't figure out how to call 'compreg' from Rakudo, so I used > inline PIR If using PCT, it shouldn't be necessary to call 'compreg' at all... where was this needed? > * a '>' token in my grammar couldn't find the > tok

Re: [perl #61744] error:imcc:syntax error, unexpected VAR, expecting '(' ('var')

2009-02-13 Thread Moritz Lenz
jn...@jnthn.net via RT wrote: > On Fri Dec 26 14:41:49 2008, markusl wrote: >> I'm attempting to compile Parrot and Perl 6 for the first time using >> gcc 4.1.2 >> on Linux. I've checked out revision 34399 form svn. Parrot compiles >> successfully, but languages/perl6 fails like this: >> >> >>

[perl #61744] error:imcc:syntax error, unexpected VAR, expecting '(' ('var')

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Dec 26 14:41:49 2008, markusl wrote: > I'm attempting to compile Parrot and Perl 6 for the first time using > gcc 4.1.2 > on Linux. I've checked out revision 34399 form svn. Parrot compiles > successfully, but languages/perl6 fails like this: > > > m...@edward:~/parrot/languages/perl6$ m

[perl #61446] Rakudo dies when trying to define an enum with zero elements

2009-02-13 Thread jn...@jnthn.net via RT
On Thu Jan 29 21:02:29 2009, s1n wrote: > On Thu Jan 29 20:48:56 2009, s1n wrote: > > As of r36167, this isn't crashing anymore. Should probably mark this > > resolved since it's now OBE. > > I added a test to S12-enums/basic.t to make sure this works: > > > --- basic.t (revision 25107) > +++

[perl #61034] Null PMC access when assigning result from an empty given inside a do expression

2009-02-13 Thread jn...@jnthn.net via RT
On Thu Dec 04 04:35:43 2008, pmichaud wrote: > On Wed, Dec 03, 2008 at 03:54:16PM -0800, Carl Mäsak wrote: > > # New Ticket Created by "Carl Mäsak" > > # Please include the string: [perl #61034] > > # in the subject line of all future correspondence about this issue. > > # http://rt.perl.org/rt

Re: Question about testing perl6, rakudo or pugs online

2009-02-13 Thread jerry gay
On Thu, Feb 12, 2009 at 06:37, dev.null.box wrote: > Hi... > > I´m used to test oneliners on the perl6 irc channel when i´m at > home... But, at work, latetly i´m having lots of free time (this week > has been sooo boring). > > But, i have irc blocked at my office (and yes, i´ve tried alternative

[perl #61106] Something doesn't work in hash indexing through a closure in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Sun Dec 07 04:33:27 2008, masak wrote: > Moritz (>), Carl (>>): > >> Rakudo r33577 responds strangely to the following program: > >> > >> $ perl6 -e 'my $locator = method { . }; my %h = { here => "foo" > >> }; say %h.$locator' > >> get_pmc_keyed() not implemented in class 'Undef' > >> [...] > >>

[perl #61772] Slurpy array 'is copy' returns incorrectly.

2009-02-13 Thread jn...@jnthn.net via RT
Hi, OK, good news and bad. :-) Cutting down the example a tad for the interesting bit: > sub array_slurpy (*...@array) { > say sprintf "Array has %d elements and the first value is > '%s'", > @array.elems, @array[0]; > return @array; > } > > sub array_slur

[perl #62382] [TODO] method form of postfix:

2009-02-13 Thread Vasily Chekalkin via RT
On Wed Jan 14 22:00:33 2009, masak wrote: > rakudo: my $t = 5; say $t.i > rakudo 35576: OUTPUT«Method 'i' not found for invocant of > class 'Int [...] > TimToady: should that work? > think so > * masak submits rakudobug Implementation of postfix:i there - http://github.com/bacek/rakudo/commit

[Parrot] New comment on Readers Needed!.

2009-02-13 Thread hexcoder
hexcoder has left a new comment on your post "Readers Needed!": in the book chapter 02, section 2.2.2 after running nqp (whatever that is, it is not explained before), there is an unfinished sentence: 'With a few simple examples, you have' In chapter 'Build requirements' I would like to see a mor

[perl #60966] wrong data pass

2009-02-13 Thread jn...@jnthn.net via RT
On Mon Dec 01 05:13:01 2008, tantra wrote: > In this code, result will be 123, but i think that it must be 1. > > sub test(@test is copy) > { > @test[0] = 123; > }; > > my @test = (1, 2, 3); > test(@test); > > print @test[0]; Indeed - fixed in git 6059ad9 and added tests to S06-traits/is-co

[perl #60258] Matching against a method produces the wrong result in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Fri Oct 31 06:31:53 2008, masak wrote: > Rakudo r32247 does the wrong thing when matching a something against > the ".method" syntax. > > $ perl6 -e 'class A { method alwaystrue { return 1 } }; given A.new { > say "irrelevant" ~~ .alwaystrue }' > 0 > > According to the big matching table in S0

[perl #60152] if(something) is not treated as a sub call in Rakudo

2009-02-13 Thread jn...@jnthn.net via RT
On Mon Oct 27 11:21:57 2008, pmichaud wrote: > On Sun, Oct 26, 2008 at 02:47:12PM -0700, Carl Mäsak wrote: > > > > rakudo: if(3 < 5) { say "yes" } # that should fail > > > > Early experimentation indicates that this goes for unless, while, > > until and given as well, and probably others I can't

[perl #63180] Null PMC access when the word 'scalar' is mentioned in Rakudo

2009-02-13 Thread Vasily Chekalkin via RT
On Thu Feb 12 06:05:34 2009, masak wrote: > Rakudo b2e7ac: > > $ perl6 -e 'scalar' > Null PMC access in getprop() > [...] Quick fix is there - http://github.com/bacek/rakudo/commit/585a5f91d0e0d301e730be1e5849959f01681b96 I'm not sure is it fixing problem or symptoms... -- Bacek

[perl #62836] Null PMC access when calling user-declared sub in List:: class

2009-02-13 Thread Vasily Chekalkin via RT
On Tue Jan 27 06:10:21 2009, masak wrote: > rakudo: sub List::a {}; <1 2 3>.a > rakudo 36054: OUTPUT«Null PMC access in invoke() [...] > > I'm not at all sure subs should be called that way, but a Null PMC > access is always wrong. In recent rakudo it complains about routine definition: $ ../.

[perl #62836] Null PMC access when calling user-declared sub in List:: class

2009-02-13 Thread Vasily Chekalkin via RT
On Tue Jan 27 06:10:21 2009, masak wrote: > rakudo: sub List::a {}; <1 2 3>.a > rakudo 36054: OUTPUT«Null PMC access in invoke() [...] > > I'm not at all sure subs should be called that way, but a Null PMC > access is always wrong. And it actually works: $ ../../parrot perl6.pbc -e 'class List

[perl #62992] is_deeply fails while .perl shows the same data structure

2009-02-13 Thread Vasily Chekalkin via RT
On Mon Feb 02 10:33:44 2009, szab...@gmail.com wrote: > The attached test script is a simplified version of a test script > that fails. (if I remove the regex and manually add the values then > the test passes). It's actually not a bug. Result of matching is Match, not Str. To fix you script just

Question about testing perl6, rakudo or pugs online

2009-02-13 Thread dev.null.box
Hi... I´m used to test oneliners on the perl6 irc channel when i´m at home... But, at work, latetly i´m having lots of free time (this week has been sooo boring). But, i have irc blocked at my office (and yes, i´ve tried alternative ports for irc on freenode)... so, i wonder, is there is a websit

[perl #63180] Null PMC access when the word 'scalar' is mentioned in Rakudo

2009-02-13 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #63180] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=63180 > Rakudo b2e7ac: $ perl6 -e 'scalar' Null PMC access in getprop() [...]

Re: [perl #39714] [TODO] Refactor IMCC to remove static globals

2009-02-13 Thread kjstol
On Fri, Feb 13, 2009 at 12:55 AM, jerry gay wrote: > On Thu, Feb 12, 2009 at 15:53, Will Coleda wrote: > > On Thu, Feb 12, 2009 at 6:09 PM, kjstol wrote: > >> On Thu, Feb 12, 2009 at 9:22 PM, Will Coleda via RT < > >> parrotbug-follo...@parrotcode.org> wrote: > >> > >>> On Tue Jul 04 19:30:44 2