Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-11

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 gravity joined #perl6
00:05 s1n i want to beef up the recursion limit, i found an example in PIR, but i need to change this in :main
00:05 s1n where would i find it, or it's equivalent in rakudo?
00:11 shinobi-cl joined #perl6
00:12 shinobi-cl hi..... im new to perl6 :) i love perl5 it does my work so smooth...
00:13 shinobi-cl i have a quaestion,,, a simple one... i cant find it on the web :S what extension should i use for modules? pm or p6m or pm6 or p6
00:14 shinobi-cl i want to port some code i did for reading some Doom wads info on perl5
00:16 s1n shinobi-cl: perl6-examples (on github) tends to use pl still, check other perl6 projects, maybe found on github
00:16 shinobi-cl thanks! :)
00:26 jnthn We're tending to still use .pm for modules.
00:37 eternaleye joined #perl6
00:45 plantanran joined #perl6
00:48 bsdperl joined #perl6
00:52 s1n man, i am getting _tons_ of segfaults anymore
00:52 s1n it's inconsistant, but seems to be related to large loop operations
00:53 s1n anyone else seeing this type of thing?
01:04 s1n rakudo: my @r = gather { my $f = 1; while($f < 10) { take $f; $f++ } }; say @r;
01:04 p6eval rakudo 35369: OUTPUT«./parrot: error while loading shared libraries: /home/evalenv/parrot/blib/lib/libparrot.so.0.8.2: invalid ELF header␤»
01:04 s1n uhoh
01:05 s1n pugs: my @r = gather { my $f = 1; while($f < 10) { take $f; $f++ } }; say @r;
01:05 p6eval pugs: OUTPUT«123456789␤»
01:05 s1n perl6: my @r = gather { my $f = 1; while($f < 10) { take $f; $f++ } }; say @r;
01:05 p6eval rakudo 35369: OUTPUT«101010101010101010␤»
01:05 p6eval ..elf 24862: OUTPUT«Parse error in: /tmp/7JBQjnUwN4␤panic at line 1 column 28 (pos 28): Missing right brace␤WHERE: my @r = gather { my $f = 1; while($f < 10) { take $f; $f++␤WHERE:                            /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:255:in `_block_rest'␤
01:05 p6eval ..STD_re...
01:05 p6eval ..pugs: OUTPUT«123456789␤»
01:06 s1n rakudo's response looks like  bug, is that right?
01:11 DemoFreak joined #perl6
01:14 DemoFreak joined #perl6
01:16 pugs_svn r24863 | s1n++ | [spec] added a test to mix gather with while loops
01:23 shinobi-cl joined #perl6
01:41 unobe joined #perl6
01:55 archpollux joined #perl6
01:55 s1n pmichaud: did you ever merge the rval branch?
01:55 archpollux eval
01:55 archpollux eval! print "\n"
01:55 archpollux eval? print "\n"
01:55 archpollux eval print "\n"
01:56 archpollux eval 1
01:56 archpollux eval 1+1
01:56 s1n archpollux: try perl6: 1
01:56 archpollux perl6: 1
01:56 p6eval elf 24863: RESULT«1␤»
01:56 p6eval ..pugs, rakudo 35370: RESULT«1»
01:56 archpollux thanks man!
01:56 s1n archpollux: or std for parse checks
01:56 s1n np
01:57 archpollux perl6: [+] qw( 1 2 3 )
01:57 p6eval pugs: OUTPUT«*** ␤    Unexpected "2"␤    expecting operator, ":" or ")"␤    at /tmp/Z7rwcnlTNz line 1, column 11␤»
01:57 p6eval ..rakudo 35370: RESULT«6»
01:57 p6eval ..elf 24863: OUTPUT«Parse error in: /tmp/YHCncX8J9M␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: [+] qw( 1 2 3 )␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
01:57 p6eval ..STD_red/std.rb:210:i...
02:03 archpollux where is reduction documented?
02:04 archpollux sorry, would you know where reduction is documented? :)
02:04 archpollux please ;)
02:10 s1n perl6: [+] <1 2 3>
02:10 p6eval pugs: RESULT«6.0»
02:10 p6eval ..rakudo 35370: RESULT«6»
02:10 p6eval ..elf 24863: OUTPUT«/home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:117:in `block in to_dump0': undefined method `to_dump0' for nil:NilClass (NoMethodError)␤       from /home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:117:in `map'␤ from
02:10 p6eval ../home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:1...
02:10 s1n archpollux: not too sure if/how qw works in p6
02:11 archpollux yeah, having trouble with that too
02:12 s1n archpollux: http://perlcabal.org/syn/S03.html#Reduction_operators
02:12 archpollux are angle brackets now used for lists instead of parentheses?
02:13 literal <> is like Perl 5's qw()
02:13 archpollux i guess not
02:13 archpollux aha
02:13 archpollux nice
02:14 literal and «» is the same, but it interpolates as well
02:14 literal kind like single quote vs. double quote
02:14 shinobi-cl left #perl6
02:15 archpollux yeah nice
02:15 archpollux now check this out
02:15 archpollux why doesn't this work:
02:15 literal archpollux: reduction (at least [+] and such) is documented in Synopsis 3
02:15 archpollux map {length} <x yy zzz>
02:15 pbuetow joined #perl6
02:15 archpollux perl6: map {length} <x yy zzz>
02:15 p6eval rakudo 35370: OUTPUT«Statement not terminated properly at line 1, near ">"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:15 p6eval ..pugs: OUTPUT«*** ␤    Unexpected end of input␤    at /tmp/YJ8y8MfAau line 2, column 1␤»
02:15 p6eval ..elf 24863: OUTPUT«Use of uninitialized value $r in concatenation (.) or string at ./elf_f line 3451.␤syntax error at (eval 125) line 3, near "> )"␤ at ./elf_f line 3861␤»
02:15 literal perl6: map {.length} <x yy zzz>
02:15 p6eval elf 24863: OUTPUT«Use of uninitialized value in concatenation (.) or string at ./elf_f line 3408.␤Use of uninitialized value $r in concatenation (.) or string at ./elf_f line 3451.␤syntax error at (eval 123) line 3, near "{->length"␤syntax error at (eval 123) line 3, near "> )"␤ at ./elf_f line
02:15 p6eval ..38...
02:15 p6eval ..rakudo 35370: OUTPUT«Statement not terminated properly at line 1, near ">"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:15 p6eval ..pugs: OUTPUT«*** ␤    Unexpected end of input␤    at /tmp/saq3qPGEvQ line 2, column 1␤»
02:15 archpollux perl6: map {.length} <x yy zzz>
02:15 p6eval elf 24863: OUTPUT«Use of uninitialized value in concatenation (.) or string at ./elf_f line 3408.␤Use of uninitialized value $r in concatenation (.) or string at ./elf_f line 3451.␤syntax error at (eval 123) line 3, near "{->length"␤syntax error at (eval 123) line 3, near "> )"␤ at ./elf_f line
02:16 p6eval ..38...
02:16 p6eval ..rakudo 35370: OUTPUT«Statement not terminated properly at line 1, near ">"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:16 p6eval ..pugs: OUTPUT«*** ␤    Unexpected end of input␤    at /tmp/2ztUBX12wh line 2, column 1␤»
02:16 archpollux umm?
02:16 literal rakudo: <x yy zzz>.map({.bytes})
02:16 p6eval rakudo 35372: OUTPUT«Method 'bytes' not found for invocant of class 'Str'␤current instr.: '_block24' pc 149 (EVAL_16:74)␤»
02:17 literal rakudo: <x yy zzz>.map({.length})
02:17 p6eval rakudo 35372: OUTPUT«Method 'length' not found for invocant of class 'Str'␤current instr.: '_block24' pc 149 (EVAL_16:74)␤»
02:17 literal rakudo: <x yy zzz>.map({.chars})
02:17 p6eval rakudo 35372: RESULT«[1, 2, 3]»
02:17 archpollux aha
02:18 literal rakudo: map {.chars}, <x yy zzz>
02:18 p6eval rakudo 35372: RESULT«[1, 2, 3]»
02:18 literal I guess the comma is needed
02:18 s1n does s29 say it's required?
02:20 s1n std: map {.length} <x yy zzz>
02:20 literal all the examples in S29 have the comma
02:20 p6eval std 24863: OUTPUT«############# PARSE FAILED #############␤(Possible runaway string from line 1 to line 1)␤Syntax error at /tmp/F2EGTIm8wk line 0:␤------> [32m[31m[0m␤    expecting prefix or noun␤00:05 85m␤»
02:20 s1n guess so
02:21 literal but there's also another form you can use
02:21 s1n are prefix protos supported by rakudo yet?
02:21 literal rakudo: <x yy zzz>.map: { .chars }
02:21 p6eval rakudo 35372: RESULT«[1, 2, 3]»
02:22 literal rakudo: map { .chars }: <x yy zzz>
02:22 p6eval rakudo 35372: OUTPUT«Statement not terminated properly at line 1, near ": <x yy zz"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:22 s1n std: proto prefix:<[+]> (*@args){ return 1; }
02:22 literal tha's a bug in rakudo
02:22 p6eval std 24863: OUTPUT«Out of memory!␤»
02:22 s1n wow, out of memory?
02:23 archpollux hahahaha
02:23 s1n TimToady: can i report bugs against the std parser?
02:23 s1n std: multi prefix:<[foo]> (Int $x) { 42 }
02:24 p6eval std 24863: OUTPUT«Out of memory!␤»
02:24 s1n well, that's no good, the standard parser can't parse examples from the spec
02:24 s1n TimToady: where can i report this bug?
02:25 literal do @tell TimToady something something
02:25 literal and lambdabot will deliver the message when as soon as he says something
02:26 TimToady I generally backlog however
02:26 TimToady it seems to work fine here, maybe the server is low on memory?
02:27 s1n hmm
02:27 s1n TimToady: is the server feather?
02:27 TimToady takes 221MB here
02:27 s1n wow
02:27 s1n just to define a prefix?
02:28 TimToady has to generate a new language for a macro, and that's not optimized yet
02:28 s1n ah
02:29 s1n has this been implemented in rakudo yet though?
02:29 TimToady no
02:29 TimToady I don't think so
02:29 s1n ahh, okay, cause they already had [+], so i assumed they did what the spec did
02:29 TimToady I think they just hardwired some of the metas
02:30 s1n ah okay, thanks
02:38 spx2 joined #perl6
02:40 rakudo_svn r35373 | pmichaud++ | [rakudo]: add Positional/Associative checks for array/hash parameters.
02:42 xyp joined #perl6
02:56 meppl joined #perl6
03:25 meteorjay joined #perl6
03:27 japhb__ joined #perl6
03:33 meppuru joined #perl6
03:54 s1n pmichaud: ping
03:55 pmichaud s1n: pong
04:00 rakudo_svn r35379 | pmichaud++ | [rakudo]: Adjust CALLMETHOD to work on Perl6Scalar.
04:01 hercynium joined #perl6
04:02 elmex_ joined #perl6
04:09 gravity What's the status on the examples in the pugs repository with regards to rakudo? Were they going to be moved or something, or is that still the canonical location?
04:30 rakudo_svn r35381 | pmichaud++ | [rakudo]:  Final bits of array/hash parameter handling.
04:30 pugs_svn r24864 | pmichaud++ | [t/spec]: Fix/unfudge tests in passing-arrays.t .
04:38 justatheory joined #perl6
04:59 jhuni joined #perl6
05:09 sri_kraih joined #perl6
05:20 cdavaz joined #perl6
05:38 Ehtyar joined #perl6
06:09 xuser joined #perl6
06:20 rakudo_svn r35388 | pmichaud++ | [rakudo]:  Fix variable typo in ObjectRef.  Partially fixes RT #61324.
06:20 rakudo_svn r35389 | pmichaud++ | [rakudo]:  Handle .perl on Arrays with missing elements.
06:36 alc joined #perl6
06:44 preflex joined #perl6
07:00 iblechbot joined #perl6
07:09 sri_kraih_ joined #perl6
07:20 unobe joined #perl6
07:30 rakudo_svn r35392 | pmichaud++ | [rakudo]:  Fix '.values' method for Any (RT #62148).
07:31 sri_kraih joined #perl6
07:40 japhb__ joined #perl6
07:49 vixey joined #Perl6
08:18 ejs joined #perl6
08:20 rakudo_svn r35397 | pmichaud++ | [rakudo]:  Fix default values for optional params (RT #61172).
08:38 pmurias joined #perl6
08:51 agentzh joined #perl6
09:03 pmichaud rakudo:  class Foo { has $.x = 42; }; say Foo.new.x
09:03 p6eval rakudo 35397: OUTPUT«sh: ./parrot: Permission denied␤»
09:19 pmurias ruoso: as Multi is a knowhow it needs a new and clone?
09:33 maerzhase joined #perl6
10:15 DemoFreak joined #perl6
10:23 iblechbot joined #perl6
10:27 lambdabot joined #perl6
10:34 ft joined #perl6
10:46 masak joined #perl6
10:59 pmurias diakopter: how's building smop going?
10:59 maerzhase joined #perl6
11:01 masak buubot: spack File
11:01 buubot masak: S02-bits.pod:2 S16-io.pod:26 S17-concurrency.pod:1 S26-documentation.pod:1 S29-functions.pod:1
11:01 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
11:02 masak @massage
11:02 lambdabot azawawi said 14h 37m 29s ago: http://use.perl.org/~azawawi/journal/38255
11:02 masak buubot: spack \bFile\b
11:02 buubot masak: S16-io.pod:23 S17-concurrency.pod:1
11:02 riffraff joined #perl6
11:07 barney joined #perl6
11:13 masak re #60780: I see two, no three, things that _could_ happen. either the last items that didn't add up are skipped, or the values are padded with undefs and warnings are thrown when they're accessed, or the values are padded with undefs and no warnings are thrown.
11:13 masak I prefer (2) or (3).
11:47 ruoso pmurias, yes... it might have a .new that calls .^clone
11:47 ruoso (we might call it new, just so it looks like a regular object)
12:04 meppl joined #perl6
12:46 pmurias ruoso: do you think having a persistent STD as a deamon process would be a good idea?
12:46 schmalbe joined #perl6
12:50 masak std: FIRST {}
12:50 p6eval std 24864: OUTPUT«00:05 71m␤»
12:50 masak std: loop { FIRST {} }
12:50 p6eval std 24864: OUTPUT«00:04 72m␤»
12:50 masak std: loop { if 1 { FIRST {} } }
12:50 p6eval std 24864: OUTPUT«00:05 82m␤»
12:50 masak TimToady: should the last one compile?
12:56 pmurias ruoso: it calls ^!clone not ^clone right?
12:58 pmurias diakopter: did you have any luck with compiling smop?
13:44 Chillance joined #perl6
14:27 spx2 joined #perl6
14:31 gravity joined #perl6
14:32 Whiteknight joined #perl6
14:47 pmurias n
14:48 pmurias ruoso: we need a way of attaching debugging information to mold
14:48 pmurias so we can print out meaningfull error messages
14:49 spx2 joined #perl6
14:55 masak joined #Perl6
15:08 riffraff joined #perl6
15:09 riffraff hi
15:09 masak y0
15:10 masak @tell moritz_ you're right that 'make test' should have 'make all' as a dep in November/p6w, but I'm reluctant to add that until my problems with precompilation go away.
15:10 lambdabot Consider it noted.
15:20 rakudo_svn r35417 | pmichaud++ | [rakudo]:  Handle numification and boolean test of protoobjects (RT #62006)
15:21 TimToady masak: yes, that should compile
15:22 masak TimToady: so where is the error caught? at entering the loop?
15:22 TimToady what error?
15:22 TimToady std: loop { if 1 { FIRST {} } }
15:23 p6eval std 24864: OUTPUT«00:05 82m␤»
15:23 TimToady looks well formed to me
15:23 masak TimToady: "FIRST, NEXT, and LAST are meaningful only within the lexical scope of a loop, and may occur only at the top level of such a loop block."
15:24 TimToady right, was thinking FIRST == START
15:24 masak ah.
15:24 TimToady but in any case it's still legal syntax, just bad semantics
15:24 masak so where is it caught?
15:25 TimToady where FIRST is attempting to look up its loop scope, and notices it doesn't have one, I imagine
15:25 masak oki
15:25 masak that sounds ALAP.
15:25 masak the compiler does nothing to alert to the probelm before?
15:26 masak s/probelm/problem/
15:26 TimToady I didn't say that
15:26 masak :)
15:26 TimToady I just said the parsing doesn't catch it
15:26 masak ok.
15:26 TimToady a compiler also does semantic analysis
15:27 TimToady and in any case, is always allowed to complain about something it knows will blow up at run time
15:27 masak aye.
15:27 TimToady but STD is far from a full compiler
15:27 masak fair enough.
15:27 jnthn I suspect there will be a list of things that are meant to be complained about at runtime at latest, but compilers may blow up over earlier.
15:28 * masak thinks that assignment to readonly variables should be on that list
15:28 jnthn I hope at some point Rakudo will be smart enough to do that at compile time.
15:28 jnthn I hope we can catch some obvious badly typed things then too.
15:28 TimToady it's often the optimizer that catches such errors
15:29 jnthn Aye, makes sense.
15:30 spx2 joined #perl6
15:31 * TimToady wanders off for a bit
15:43 jan_ joined #perl6
16:09 cspencer joined #perl6
16:40 rakudo_svn r35420 | pmichaud++ | [rakudo]:  Make Whatever more graceful outside of slices (RT #62066).
16:41 meteorjay joined #perl6
17:12 ovid joined #perl6
17:13 s1n pmichaud: just read some p6minutes, still planning on moving rakudo to it's own git server?
17:14 ovid Is reading from the command line not yet implemented?
17:14 ovid ./perl6 -e 'my $line = $*IN; say $line'
17:14 ovid IO<0x28854d0>
17:14 ovid Or did I do that wrong?
17:16 ovid Or is this room actually empty? :)
17:17 masak ovid: hello.
17:17 ovid Hello.
17:17 masak ovid: I've also been experiencing realine problems of late.
17:17 masak things are in a bit of a flux after the merge.
17:17 masak ovid: are you sure you have a very fresh Rakudo?
17:18 ovid Hmm, I *thought* it was working a couple of weeks ago, but I couldn't remember and I didn't have my sample code.
17:18 ovid Updated a few hours ago.  I'll update again, just to be sure.
17:18 masak ovid: (oh, and you did that wrong. should be my $line = =$*IN)
17:18 ovid I had tried that, too.
17:18 ovid $ ./perl6 -e 'my $line = =$*IN; say $line'
17:18 ovid perl6(621) malloc: *** error for object 0x2adfb62: Non-aligned pointer being freed
17:18 ovid *** set a breakpoint in malloc_error_break to debug
17:19 masak aye, looks like a version of the problem I had.
17:19 masak ovid: file a bug. cry a bit. move on.
17:19 ovid OK.
17:20 masak ovid: (might also be worthwhile checking the results from ../../parrot perl6.pbc, as well as spelling it '$*IN.readline')
17:21 ovid Will do.  Recompiling right now.
17:21 azawawi joined #perl6
17:22 azawawi hi
17:22 ovid Of course, recompiling works better if I revert my local .pir changes :)
17:22 pugs_svn r24865 | lwall++ | [gather.t] fix syntax error
17:33 Whiteknight joined #perl6
17:34 jnthn huh...don't we have tests for IO stuff that pass?
17:34 jnthn > my $x = $*IN.readline(); say $x;
17:34 jnthn Method 'read' not found
17:34 jnthn Method 'attr' not found for invocant of class 'Class'
17:34 lambdabot <no location info>: parse error on input `='
17:34 jnthn wtf...
17:36 jnthn Oddness. It works on stuff that open returns, but no longer on $*IN.
17:37 jnthn Which I guess we don't have tests for ('cus they're kinda hard to write atm...)
17:38 meppl joined #perl6
17:39 s1n isn't there a websvn browser for pugs? (one that has a diff viewer)
17:39 masak rakudo: class A { method foo { say "" ~~ * } }; A.new.foo
17:39 p6eval rakudo 35420: OUTPUT«Null PMC access in find_method()␤current instr.: 'parrot;A;foo' pc 169 (EVAL_19:76)␤»
17:39 * masak reports rakudobug
17:39 jnthn masak: Is that dependent on it being in a class?
17:39 masak jnthn: yes.
17:40 jnthn p6eval: say "" ~~ *
17:40 jnthn rakudo: say "" ~~ *
17:40 p6eval rakudo 35420: OUTPUT«1␤»
17:40 masak rakudo: sub f { say "" ~~ * }; f
17:40 p6eval rakudo 35420: OUTPUT«1␤»
17:40 azawawi s1n: http://dev.pugscode.org/timeline
17:40 masak I take pride in reducing to a minimum.
17:40 jnthn Bizzare.
17:40 azawawi s1n: but it is a bit broken
17:42 s1n azawawi: thanks
17:42 s1n TimToady: are parens on loop statements invalid or just not preferred anymore?
17:43 TimToady foo() is always a function call
17:43 s1n so for() is not valid?
17:43 masak s1n: sure if you have 'sub for' elsewhere :)
17:44 s1n std: for(0..2){}
17:44 p6eval std 24865: OUTPUT«Unknown routines:␤     for called at 1 ␤00:05 85m␤»
17:44 s1n hmm guess not
17:44 s1n std: for 0..2 {}
17:44 p6eval std 24865: OUTPUT«00:05 85m␤»
17:45 s1n is that true across the board now? while/if/for/....?
17:45 jnthn TimToady: Is STD.pm detecting undeclared routines? If so, is that going to be an error?
17:45 masak s1n: yes.
17:45 s1n perl6: for(0..2){}
17:45 p6eval pugs: OUTPUT«*** ␤    Unexpected end of input␤    expecting operator or block construct␤    at /tmp/Yn0ykMyhHO line 2, column 1␤»
17:45 p6eval ..rakudo 35420: OUTPUT«Could not find non-existent sub for␤current instr.: '_block14' pc 78 (EVAL_18:43)␤»
17:45 p6eval ..elf 24865: OUTPUT«Parse error in: /tmp/4GKCaTjcnQ␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: for(0..2){}␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤  STD_red/std.rb:210:in
17:46 p6eval ..`_...
17:46 s1n rakudo: while(0){}
17:46 p6eval rakudo 35420: OUTPUT«Could not find non-existent sub while␤current instr.: '_block14' pc 60 (EVAL_16:40)␤»
17:46 azawawi s1n: you need at least one space between for/while/if and the first argument :)
17:47 s1n uhhh okay, that's kinda odd, parens are function calls, so 'while (0)' is a list with 1 element?
17:47 s1n if i don't put the space there, it's a function call?
17:47 s1n std: for (0..2) {}
17:47 p6eval std 24865: OUTPUT«00:05 85m␤»
17:48 azawawi s1n: yup
17:48 s1n hmm, that doesn't seem very dwim
17:48 s1n whitespace as syntax, sounds very python-ish
17:49 jnthn s1n: for (0..2) { } will be a loop. for(0..2) would be a call. for(0..2) { } is maybe a syntax error (two terms in a row not allowed), I think...
17:49 azawawi s1n: i thought so when i first encountered it
17:49 s1n is everyone in agreement that that's the best way? it doesn't seem very perl-ish
17:49 masak s1n: all programming languages treat whitespace as syntax to some degree.
17:49 masak s1n: I like it.
17:49 s1n it makes me puke in my mouth a little heh
17:51 masak s1n: we're all going to have to adapt a little to Perl 6's syntax conventions. :) that's to be expected.
17:51 masak s1n: remember that you don't have to use parentheses at all in a for loop.
17:51 masak so the problem is negligible.
17:52 pugs_svn r24866 | azawawi++ | [S:H:P6] updated to latest STD.pm. Releasing 0.031 to CPAN
17:53 s1n well, i guess everyone is on board with that idea
17:54 jnthn Aye, for 0..2 { ... } is the usual way to write it. :-)
17:54 masak s1n: please withhold judgment for a while and try it out. :) it's pretty nice.
17:55 azawawi s1n: http://perlcabal.org/syn/S04.html#line_1210
17:55 s1n the problem i have is with the whitespace changing the semantics of for
17:56 masak s1n: look. if you mash together the variables 'foo' and 'bar' in Java, it also changes the semantics.
17:56 masak this is no different.
17:56 _dh joined #perl6
17:56 s1n masak: but not many languages change 'foo ()' and 'foo()'
17:56 ejs joined #perl6
17:57 masak s1n: that's true. and I've heard this complaint before. I'm just not bothered by it myself.
17:57 s1n it will be an adoption issue
17:57 s1n it will cause grief and frustration
17:57 masak people will have to learn to write 'for' without the parens.
17:58 s1n heh, that's optimistic
17:58 masak the rest of Perl 6 is worth the effort.
17:58 s1n it seems arbitrary to change that though
17:59 s1n i guess i don't understand why it's that way?
17:59 literal I don't think so, people are already used to not needing parens in postfix form
17:59 literal so, in that way, Perl 6 is more consistent
17:59 s1n literal: i'm not saying no parens is bad
18:00 s1n literal: i'm suggesting the whitespace changing it is very confusing
18:00 literal yeah, but what you get in return is you always know that foo() is a function call
18:01 s1n but 'foo ()' may or may not be
18:02 _dh sounds like something PHP would do to its users
18:02 literal no worse than Perl 5 in that regard :P
18:02 _dh :)
18:02 s1n sigh, am i the only one that thinks this is somehow wrong?
18:02 _dh s1n, no
18:03 s1n i _will always_ get that wrong when writing p6 code
18:05 literal you give yourself too little credit :)
18:05 s1n heh, no, because i don't write perl all day long, i switch back and forth with several other languages
18:06 s1n which all make a clear distinction, 'for()' ~~ 'for ()'
18:06 literal then you should just drop the parens when writing Perl 6
18:07 masak yes, that's what I'm saying.
18:07 s1n again, i don't have a problem with using the non-parens version
18:08 masak s1n: apparently you do :)
18:08 s1n the whitespace changing the meaning between 'for ()' and 'for()' is odd
18:08 s1n i actually like the non-parens version
18:08 literal it does so only because for isn't a function
18:08 literal that is, the loop construct is not a function
18:09 s1n why is a for function allowable then?
18:09 masak s1n: why shouldn't it?
18:10 rakudo_svn r35421 | pmichaud++ | [rakudo]:  $v ~~ NaN tests for NaN-ness (RT #61942).
18:10 pugs_svn r24867 | azawawi++ | [S:H:P6] Fixing a typo in 0.032
18:10 s1n because my pea-sized brain thinks of for as a keyword that allows parens, making this change confuses me and gives me a boo-boo
18:11 Psyche^ joined #perl6
18:11 s1n 'because we can' doesn't seem like a good reason to me, i would imagine there would be a sound reason for doing so
18:12 moritz_ re
18:12 lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
18:12 masak s1n: the rule is simply that 'foo()' is always treated as a function call, whatever the 'foo'
18:12 s1n masak: but 'foo ()' may or may not be a function, that's the confusing thing
18:12 s1n again, pea-sized brain here can't comprehend why
18:12 masak std: sub foo {}; foo ()
18:13 p6eval std 24866: OUTPUT«00:05 85m␤»
18:13 moritz_ azawawi: re if()..., there's already a ticket for that
18:13 s1n std: sub if { }; if ()
18:13 p6eval std 24866: OUTPUT«00:05 85m␤»
18:13 masak s1n: I don't know either. I guess, because there is no confusion with other constructs.
18:13 moritz_ if () isn't a valid sub call
18:13 jnthn rakudo: sub if { say 42 }; if()
18:13 p6eval rakudo 35420: OUTPUT«42␤»
18:13 s1n std: sub for {} for (0..1) {}
18:13 jnthn rakudo: sub if { say 42 }; if ()
18:14 p6eval std 24866: OUTPUT«############# PARSE FAILED #############␤Syntax error at /tmp/LoFJd3kQoG line 1:␤------> [32msub for {} for (0..1) [31m{}[0m␤    expecting any of:␤       infix or meta-infix␤      infix stopper␤    standard stopper␤ terminator␤00:05 85m␤»
18:14 p6eval rakudo 35420: OUTPUT«42␤»
18:14 jnthn Hmm.
18:14 s1n did i read that right?
18:15 s1n i defined a function called for, called it, and it parse-failed?
18:15 jnthn s1n: Need a ; or line break after the }
18:15 jnthn std: sub for {}; for (0..1) {}
18:15 p6eval std 24867: OUTPUT«00:05 85m␤»
18:16 s1n yay, now i can create something like 'sub for { `rm -rf /` }' and really screw with people :)
18:17 s1n then i can redefine 'sub for {}' to make 'for()' actually act like a for-loop
18:17 s1n which i can bet you money that someone will do that
18:18 azawawi do what? i heard money :)
18:18 moritz_ s1n: the nice about Perl 6 is that if you define that sub for, people won't see it unless they import it into their code
18:18 s1n yeah, that won't cause any grief at all
18:19 pmichaud I suspect that even if there's a subroutine called 'for', it can only be called using the "for()" syntax.
18:20 s1n true, but i'm guessing people will fat finger the hell out of that
18:20 rakudo_svn r35422 | pmichaud++ | [rakudo]: spectest-progress.csv update: 279 files, 6143 passing, 0 failing
18:20 s1n they mean 'for ()' but forgot the space and oops
18:21 pmichaud I don't recognize 'for ()'
18:21 s1n std: for (0..2) {}
18:21 p6eval std 24867: OUTPUT«00:05 85m␤»
18:21 pmichaud sure, that's a for loop.
18:21 pmichaud it's obviously a for loop.
18:21 s1n std: for(0..2){}
18:22 p6eval std 24867: OUTPUT«Unknown routines:␤     for called at 1 ␤00:05 85m␤»
18:22 pmichaud that's a function call.  It's obviously a function call.
18:22 s1n heh
18:22 s1n pmichaud: the only really issue i have is the space, it kinda makes things confusing
18:23 _dh yea it is weird.
18:23 pmichaud as the synopsis indicate, we have to put some constraints somewhere so that we get flexibility elsewhere.  whitespace is one of the (few) places where there's a constraint.
18:23 pmichaud and the error messages will almost always indicate where the programmer made a boo-boo.
18:23 s1n could we not just make 'sub for' dwim?
18:23 s1n or make 'sub for' invalid?
18:24 _dh i hope there's not too many other weird changes like this. as it might make the lang unpopular. and it's already got enough competition as it is
18:24 pmichaud why make 'sub for' invalid?  That sounds like an unnecessary limitation.
18:24 s1n hey okay, it's not my language
18:24 s1n i'm just suggesting people may find that a sore spot
18:25 pmichaud afaict, people who actually write much p6 code haven't found it a sore spot.
18:25 _dh s1n, everything has warts, just some more than others
18:25 s1n the first module i'm going to write though will fix that
18:25 pmichaud (granted, that may be a self-selecting group.)
18:25 s1n pmichaud: the goal isn't to be accepting with the 2 dozen people that use it now, but the p5 people
18:25 pmichaud why would I want to limit myself to the p5 audience?
18:25 s1n and the python, and ruby, and java, etc people
18:26 s1n exactly
18:26 s1n name another language that does something quirky like that?
18:26 pmichaud quirky like what?
18:26 pmichaud significant whitespace?  I can name at least one language that has that.  :-)
18:26 s1n python heh
18:26 s1n python's whitespace gives me nightmares
18:27 kisu joined #perl6
18:27 s1n i've seen it make children cry too
18:27 * jnthn notes http://en.wikipedia.org/wiki/Whitespace_(programming_language)
18:27 jnthn I think the main thing I've heard is that
18:27 jnthn foo() and
18:27 jnthn foo ()
18:27 jnthn Are different.
18:28 s1n maybe
18:28 s1n do subs _always_ have no whitespace?
18:28 jnthn As in, feedback I've heard when presenting Perl 6. Generally, people who have brought this up have tended to like to line up parens
18:28 spx2 joined #perl6
18:28 jnthn foo    (1);
18:28 jnthn longer  (2);
18:28 s1n std: sub foo {}; foo  (1);
18:28 jnthn er, fail
18:28 p6eval std 24867: OUTPUT«00:05 83m␤»
18:28 jnthn But you get the point
18:28 pmichaud yeah, now it's
18:29 pmichaud foo\    (1)
18:29 pmichaud longer\ (2)
18:29 jnthn pmichaud: \ not .?
18:29 s1n std: sub foo {}; foo      (1);
18:29 pmichaud I think \
18:29 p6eval std 24867: OUTPUT«00:05 83m␤»
18:29 pmichaud I could be wrong there.
18:29 s1n why did that example parse?
18:29 jnthn It could always be both. <grin>
18:29 pmichaud s1n:  in that case you're calling 'foo' as a listop.
18:29 s1n sub for {}; for (0..1);
18:30 s1n listop?
18:30 pmichaud in that case you're likely to get a syntax error.
18:30 pmichaud because the 'for' statement expects a block.
18:30 s1n pmichaud: so postfix for loops aren't valid?
18:30 s1n std: say $_ for 0..2;
18:30 p6eval std 24867: OUTPUT«00:05 86m␤»
18:31 pmichaud in that case 'for' is a statement_loop modifier.
18:31 pmichaud it's clearly not a function call.
18:31 s1n std: sub for {}; for (0..1);
18:31 p6eval std 24867: OUTPUT«00:05 85m␤»
18:31 s1n no syntax error?
18:31 pmichaud okay, I'm guessing std doesn't generate an error but perhaps should.
18:31 pmichaud keep in mind that std isn't complete.
18:32 s1n i'm just trying to make sense of this
18:32 s1n to me, with my pea-sized brain and all, this seems confusing
18:32 pmichaud just be sure to have a space after 'for', 'if', 'while', etc. and everything pretty much does what you want.
18:32 s1n maybe not to everyone else, but that's why i loathe python
18:32 pmichaud unless you _want_ to write functions named 'for', 'if', 'while', etc., in which case you get what you ask for
18:33 s1n pmichaud: are module's supported yet? can i write my own and import it?
18:33 pmichaud the nice thing about the p6 version is that the parens aren't required.
18:33 pmichaud so it's not like we're adding keystrokes.  Less, if one considers that ( and ) are actually two keypresses each.
18:34 pmichaud afk, lunch
18:36 _dh if the change helps improve perl such as its executation time then i'm all for such changes, but if it was done for the sole purpose of somebody just thinking 'hey lets change this, cause its cooler!' then i'm afraid perl is going in the wrong direction
18:39 pmichaud it improves our ability to extend Perl.
18:39 s1n pmichaud: how?
18:40 pmichaud by giving better control over parsing and distinguishing statements from subroutines.
18:40 moritz_ s1n: it bascially allows you to add new keywords without fearing to break subs of the same name
18:41 ovid Well, as of the last compile, "my $line = =$*IN;" no longer throws an error.  I just silently does nothing (that I can see).
18:41 pmichaud it should be waiting for input from stdin.
18:41 ovid Er, "It" just silently does nothing :)
18:41 ovid Nope.  It doesn't.  Did a couple of weeks ago, as I recall.
18:42 pmichaud okay.  it appears to work as of r35310, so I'm testing r35311 (a major merge)
18:42 ovid This just prints a blank line, no hanging:  ./perl6 -e 'my $line = =$*IN; say $line'
18:42 ovid I'm on 35420
18:42 moritz_ that worked last Wednesday
18:43 s1n hmm
18:43 s1n rakudo: for(0..2){ say $_ }
18:43 p6eval rakudo 35422: OUTPUT«Could not find non-existent sub for␤current instr.: '_block14' pc 78 (EVAL_19:43)␤»
18:43 moritz_ rakudo: my $i = =$*IN; say $i
18:43 s1n that is valid on r35352
18:43 p6eval rakudo 35422: No output (you need to produce output to STDOUT)
18:43 moritz_ s1n: it shouldn't
18:44 s1n moritz_: it is though, that's why i was surprised
18:44 ovid Calling it directly from parrot:
18:44 ovid $ ../../parrot perl6.pbc -e 'my $line = =$*IN; say $line'
18:44 ovid Bus error
18:44 s1n can someone else try that out on a recent build?
18:45 ovid I just did an svn up and am recompiling.
18:45 moritz_ ovid: I get a segmentation fault
18:45 moritz_ on r35421
18:46 ovid What OS, by the way?  I'm Darwin Kernel Version 9.6.0
18:47 moritz_ Linux 2.6.27.6 #1 SMP
18:47 moritz_ 32 bit
18:49 ovid OK, just wanted to make sure that wasn't some weird quirk of my OS.
18:50 ovid Hmm, parrot's failing several tests, so it didn't even get down to "make perl6"
18:59 s1n std: for(0..2){ say $_; };
18:59 p6eval std 24867: OUTPUT«Unknown routines:␤     for called at 1 ␤00:05 86m␤»
18:59 cycloid joined #perl6
18:59 s1n hmm, r35352 actually does the loop on that
19:00 s1n moritz_: can you give that a whirl to make sure i'm not doing something wrong
19:03 moritz_ s1n: anything of the form indentifier(...) is parsed as sub call
19:03 s1n moritz_: is there a for sub in rakudo then?
19:04 s1n rakudo: for(1..10){ say $_; };
19:04 p6eval rakudo 35422: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
19:04 moritz_ s1n: I should have said "should be parsed"
19:05 moritz_ s1n: we know that rakudo is impefect in that respect
19:05 s1n okay, so that snippet i just tried is a bug then?
19:05 moritz_ yes
19:05 moritz_ and we have a ticket for that already
19:05 s1n number?
19:05 moritz_ dunno
19:06 pugs_svn r24868 | moritz++ | [t/spec] { $^foo == $foo } now works in rakudo, unfudge a test for it
19:07 kisu_ joined #perl6
19:08 moritz_ rakudo: my $x; say $x.values;
19:08 p6eval rakudo 35422: OUTPUT«Use of uninitialized value␤␤»
19:09 moritz_ rakudo: my $x; say +$x.values;
19:10 p6eval rakudo 35422: OUTPUT«Use of uninitialized value␤0␤»
19:10 cspencer joined #perl6
19:10 pmichaud okay, my $x = =$*IN;  fails for me in r35311, so I suspect that revision.
19:10 s1n std: say $_;
19:10 p6eval std 24868: OUTPUT«00:05 83m␤»
19:10 jnthn pmichaud: Which was that?
19:11 pmichaud jnthn: the rvar merge :-(
19:11 jnthn Ah. :-(
19:11 jnthn That's...really odd.
19:11 pmichaud I agree.
19:11 s1n rakudo: say $_;
19:11 p6eval rakudo 35422: OUTPUT«Use of uninitialized value␤␤»
19:11 jnthn I didn't think any IO things were changed?
19:11 s1n is $_ supposed to be defined initially?
19:11 jnthn Don't think so.
19:11 moritz_ jnthn, pmichaud: would you be happy with basic IO and command line tests written in perl 5?
19:11 s1n does p6 not use $_ anymore?
19:12 moritz_ s1n: declared, but not defined
19:12 jnthn $_ is very much alive in p6. :-)
19:12 pmichaud s1n: just pretend there's a "my $_"  at the beginning of the program.
19:12 moritz_ to be kept in the parrot repo
19:12 moritz_ 'my $_ is context<rw>'
19:12 s1n declared variables don't take an initialized default value of 0 or something similar?
19:12 jnthn moritz_: I wouldn't object - I'd *much* rather we have tests for this kinda stuff.
19:13 jnthn s1n: No, just as in Perl 5.
19:13 pmichaud I don't mind if there are p5 tests, as long as "make spectest" continues to work.
19:13 pmichaud declared variables have default "undefined" value.
19:13 pmichaud (depending on the type)
19:13 moritz_ rakudo: say (a => 3).keys
19:13 p6eval rakudo 35422: OUTPUT«0␤»
19:14 pmichaud I call rakudobug :-)
19:14 moritz_ tests are in t/spec/S29-hash/keys_values.t
19:14 s1n i never noticed $_ was uninitialized in p5
19:14 moritz_ buubot: eval: print +(defined $_ ? 'yes' : "no")
19:14 buubot moritz_:  yes1
19:15 moritz_ $ perl -le 'print +(defined $_ ? "yes" : "no")'
19:15 pmichaud $ cat x
19:15 pmichaud print $_, "\n";
19:15 pmichaud $ perl -w x
19:15 pmichaud Use of uninitialized value in print at x line 1.
19:15 pmichaud $
19:15 moritz_ no
19:15 s1n buubot: eval: use warnings; print $_;
19:15 buubot s1n:  HASH(0xa064b60)1
19:16 s1n heh huh?
19:16 pmichaud I suspect that "use" might set $_.
19:16 s1n i just did a perl -e and i got an uninit warning
19:16 moritz_ pmichaud: I think that $_ in eval (as buubot uses) is inherited from the outside
19:17 pmichaud that also.
19:17 pugs_svn r24869 | moritz++ | [t/spec] test that my $x; $x.values; lives
19:17 moritz_ rakudo: say (*-1).WHAT
19:17 p6eval rakudo 35422: OUTPUT«Use of uninitialized value␤Num␤»
19:18 moritz_ pmichaud: that's wrong
19:18 pmichaud I haven't seen a test or spec.
19:18 moritz_ pmichaud: *-1 is the same as a block { $_ - 1 }
19:18 pmichaud then fudge it for now and push the ticket back to "nobody"  :-)
19:18 moritz_ pmichaud: there was a spec update a few days ago
19:19 pmichaud yes, I haven't had a chance to review that spec change yet.
19:19 moritz_ will do.
19:19 pmichaud it's not entirely clear yet how/where the block is to be generated
19:20 s1n moritz_: were you referring to #57960 for the for loop bug?
19:21 eternaleye joined #perl6
19:21 moritz_ s1n: no
19:21 pmichaud moritz:  S02 says:  If you say
19:21 pmichaud say 1 + *;
19:21 pmichaud you should probably not expect it to yield a reasonable answer, unless
19:21 pmichaud you think an exception is reasonable.
19:22 s1n moritz_: i can't find a reported bug for this then... i might not be looking hard enough
19:22 moritz_ s1n: 60152
19:23 pmichaud moritz_: yes, I see the section beneath it that says it returns a Code object, though.
19:23 s1n moritz_: oh heh, i was looking for 'for'
19:23 moritz_ pmichaud: it seems that 1+* is different form *+1
19:24 pmichaud I don't think that's the case, though.
19:24 pugs_svn r24870 | moritz++ | [t] and [t/spec]
19:24 pugs_svn r24870 | moritz++ |  * moved exhaustive.t and hash_cap.t to spec/ (and cleaned up)
19:24 pugs_svn r24870 | moritz++ |  * more tests for ~ in regexes (backtracking)
19:24 moritz_ maybe TimToady++ just forgot to update the first section
19:25 pmichaud the question I posed during the design meeting:
19:25 pmichaud my $a = *;   say ($a + 1);
19:26 moritz_ that only works if we buid a basic computer algebra system into Perl 6
19:26 pmichaud right.  So I'm not sure what the correct answer is yet.
19:26 pmichaud i.e., is * always recognized specially by the compiler, or is it recognized at runtime?
19:26 moritz_ so did you get any reasonable answer during the meeting?
19:26 pmichaud ISTR the answer was "I'll think about it."
19:26 moritz_ heh ;)
19:26 pmichaud or perhaps "Not sure about that one."
19:27 * pmichaud checks the minutes.
19:27 moritz_ pmichaud: btw I also wrote some tests for ~ in regex
19:28 moritz_ pmichaud: currently PGE doesn't backtrack at all to find the terminator
19:28 pmichaud moritz_: excellent.  I'm not sure why PGE has trouble handling the brackets there.
19:28 moritz_ I don't think that's ok from a Perl 6 point of view
19:28 s1n rakudo: sub if(*@args){ say "function"; return 1; }; if(0..2){ say "true"; }
19:28 moritz_ rakudo: regex a { a ~ a a* }; say 'aaa' ~~ m/<a>/;
19:28 p6eval rakudo 35422: OUTPUT«true␤»
19:28 p6eval rakudo 35422: OUTPUT«Unable to parse , couldn't find final a␤current instr.: 'parrot;PGE;Match;FAILGOAL' pc 2927 (compilers/pge/PGE/Regex.pir:456)␤»
19:29 s1n hmm, doesn't seem to disambiguate either
19:29 pmichaud s1n:  it's known that rakudo doesn't always handle parentheses after identifiers properly.
19:29 s1n pmichaud: i was just testing what it does currently do
19:29 pmichaud all of for(), while(), if(), etc. exhibit this bug.  No need to submit a separate ticket for each one (or if you do, I'll just merge them back into the existing tickets)
19:30 s1n pmichaud: i wont, it's already in the ticket moritz linked
19:30 s1n i was just testing if it did it in the other direction
19:31 pmichaud moritz_: S05 says that the construct "produces an appropriate error message if the inner expression does not terminate on the required closing atom."
19:32 moritz_ that leaves room for interpretation
19:32 pmichaud I just followed the spec.  :-)
19:32 moritz_ it does terminate on the closing atom, if it backtracks
19:32 moritz_ and regex { .. } doesn't inhibit backtracking
19:32 moritz_ we need clarification from TimToady again, I think ;-)
19:33 pmichaud rakudo:  say 'aaa' ~~ / a ~ a a* /;
19:33 p6eval rakudo 35422: OUTPUT«Unable to parse , couldn't find final a␤current instr.: 'parrot;PGE;Match;FAILGOAL' pc 2927 (compilers/pge/PGE/Regex.pir:456)␤»
19:33 pugs_svn r24871 | moritz++ | [t/spec] added whatever.t
19:33 pmichaud moritz_: the way it's defined in S05, it would fail without backtracking.
19:34 pmichaud $<OPEN> = '(' <SETGOAL: ')'> <expression> [ $GOAL || <FAILGOAL> ]
19:34 pmichaud if we don't match $GOAL, then we <FAILGOAL>.  It doesn't get a chance to backtrack <expression>
19:34 moritz_ hm, right
19:34 pmichaud (and FAILGOAL is what throws the exception)
19:34 pmichaud perhaps it needs to be
19:35 pmichaud $<OPEN> = '(' <SETGOAL: ')'> [ <expression> $GOAL || <FAILGOAL> ]
19:35 pmichaud so that we can backtrack into <expression> to look for the $GOAL.
19:35 moritz_ rakudo: regex a { ['(' ~ ')' <a>]? }; '(())' ~~ m/<a>/
19:35 p6eval rakudo 35422: RESULT«Method 'perl' not found for invocant of class 'Match'␤current instr.: '_block14' pc 74 (EVAL_17:43)␤»
19:36 moritz_ rakudo: regex a { ['(' ~ ')' <a>]? }; say '(())' ~~ m/<a>/ ?? 1 !! 0
19:36 p6eval rakudo 35422: OUTPUT«1␤»
19:36 moritz_ rakudo: regex a { ['(' ~ ')' <a>]? }; say '(())' ~~ m/^ <a> $/ ?? 1 !! 0
19:36 p6eval rakudo 35422: OUTPUT«1␤»
19:36 moritz_ very nice, pmichaud++
19:37 pmichaud anyway, perhaps TimToady can clarify the spec a bit.
19:37 pmichaud the spec does say "something more like" so perhaps there's some intentional wiggle room there.
19:40 Matt-W whoa, is that doing paired bracket matching by itself??
19:40 Matt-W that's very cool
19:40 rakudo_svn r35423 | moritz++ | [rakudo] add whatever.t to t/spectest.data
19:44 azawawi moritz_: ping
19:44 moritz_ azawawi: pong
19:44 pugs_svn r24872 | moritz++ | [t/spec] fix small error in construction.t
19:44 azawawi moritz_: can a token/rule exist without a grammar?
19:45 moritz_ azawawi: yes
19:45 azawawi interesting
19:46 moritz_ rakudo: token t { a* }; say "aaa" ~~ m/<t>/
19:46 p6eval rakudo 35423: OUTPUT«aaa␤»
19:47 azawawi moritz_: im working on integrating Perl6 plugin with Padre outline tree view to display a Perl 6 program's structure
19:48 moritz_ sounds cool
19:48 * azawawi takes a look at STD.pm
19:49 azawawi moritz_: so any class that's inside grammar STD is a child of it?
19:50 moritz_ azawawi: not in the sense that it inherits from Grammar STD
19:50 Matt-W A conflict occurred during role composition due to method 'render'.
19:50 Matt-W ^ That's new...
19:50 moritz_ class Outer { class Inner { ... } }; constructs Outer and Outer::Inner
19:51 azawawi moritz_: yeah sure, grammar Quasi and Q inherit STD as far as i understand
19:52 azawawi moritz_: interesting idea, develop it first on full html mode (as a tree component) :)
19:52 azawawi moritz_: and learn from there...
19:53 moritz_ Matt-W: jnthn is the Chief Warlock of Object Orientation, talk to him about it ;-)
19:54 Matt-W moritz_: I'm sure this used to work :(
19:54 Matt-W trying to compose a test case
19:54 jnthn I'm the what?!
19:54 pugs_svn r24873 | moritz++ | [t/spec] wrote test S12-construction/new.t with basic tests for the Class.new
19:54 * jnthn denies all
19:55 moritz_ what's the specified semantics? the class method wins, the role method gets overridden?
19:55 jnthn The class method should win if there is one.
19:55 jnthn And no conflict.
19:55 Matt-W I'm getting conflict
19:55 Matt-W I'll nopaste a very short test case
19:55 jnthn If two roles bring in a method of the same name and there is nothing in the class, it's a conflict.
19:55 jnthn Short test case good.
19:55 jnthn (Then I'll wonder, why I didn't have such a test case in t/spec...)
19:56 moritz_ rakudo: role B { method x { say "in role B" } }; class A does B { method x { say "in class A" }; }; A.new.x
19:56 p6eval rakudo 35423: OUTPUT«A conflict occurred during role composition due to method 'x'.␤current instr.: '!meta_trait' pc 20656 (perl6.pir:201)␤»
19:56 pasteling "Matt-W" at 82.4.230.112 pasted "Role composition failure test case" (13 lines, 224B) at http://sial.org/pbot/34373
19:56 moritz_ jnthn: short enough?
19:57 jnthn Ouch...how on earth...
19:57 jnthn Oh
19:57 Matt-W It didn't used to do that :)
19:57 Matt-W Unintended consequences of something else, I'd guess
19:57 * jnthn suspects that (a) some code was pulled out in rvar and not re-instanted and (b) we didn't have a test for this so it went unnoticed.
19:57 jnthn rvar removed a bunch of stuff to make refactoring easier and then added it back in.
19:57 jnthn I think I know exactly what we've lost.
19:57 Matt-W hurrah
19:58 jnthn Please file a ticket, I'll try and sort that out tomorrow.
19:58 * jnthn needs to do _lots_ of work on roles in the next few weeks.
19:58 Matt-W right-o
19:58 jnthn If it's what I think it is, it'll be an easyish fix.
19:59 * jnthn afk for a bit
20:02 Matt-W ticket filed
20:04 moritz_ Matt-W++
20:04 Matt-W Bah
20:04 Matt-W it'd be better if I could have a quarter of a clue how to actually fix things
20:04 Matt-W filing bugs is easy
20:05 moritz_ Matt-W: I know, but bug filing and writing tests cases is also important
20:05 moritz_ Matt-W: speakiing of which, can you please turn your example into a test suite?
20:05 moritz_ s/suite//
20:05 Matt-W umm
20:05 Matt-W I can try
20:06 moritz_ t/spec/S12-role/composition.t seems to be a good place
20:06 Matt-W where does that live
20:06 moritz_ rakudo: my sub foo { "bar" }; say foo();
20:06 p6eval rakudo 35423: OUTPUT«bar␤»
20:06 moritz_ Matt-W: in the pugs repository
20:06 Matt-W ahah
20:06 Matt-W i shall grab that then
20:07 moritz_ and rakudo imports that into t/spec if you say 'make spectest'
20:07 Matt-W aaaah
20:07 Matt-W that's good
20:07 Matt-W keeps the language tests in one place
20:07 moritz_ right
20:08 Matt-W pugscode.org is really broken
20:09 moritz_ Matt-W: the index site lives at docs/feather/index.html in the pugs repo. Feel free to fix whatever you want
20:09 Matt-W I don't have commit access
20:10 moritz_ that can be changed
20:10 moritz_ tell me your email address (in a query if you fear spam) and desired nickname
20:10 Matt-W Perhaps it's time it was
20:10 moritz_ and you'll get a commit bit in two to five minutes ;-)
20:10 Matt-W heh
20:11 moritz_ in the pugs repo we're fairly liberal with handling commit bits
20:12 moritz_ Matt-W: email send. It's customary to add yourself to AUTHORS in the first commit, to test the commit bit
20:15 moritz_ to all new pugs committers: you can also invite other people that want a commit bit, go to http://commitbit.pugscode.org/admin/project/Pugs/people to do that
20:15 pugs_svn r24874 | mattw++ | Adding myself to AUTHORS to test commit bit
20:16 Matt-W well that seems to hav eworked
20:16 Matt-W now on to something useful
20:17 pugs_svn r24875 | moritz++ | [t/spec] many unfudges found by autounfudge
20:20 rakudo_svn r35424 | moritz++ | [rakudo] add S12-construction/new.t to t/spectest.data
20:21 pugs_svn r24876 | moritz++ | [t/spec] test for RT #62172
20:24 pugs_svn r24877 | mattw++ | test for RT #62200: classes overriding methods from roles
20:24 Matt-W moritz_: could you check that please
20:24 moritz_ Matt-W: sure, just a sec
20:25 moritz_ Matt-W: when you add a test, you should adjust the plan() statement at the begin of the file, which tells us how many tests we want to run
20:25 Matt-W doh
20:25 Matt-W I should know that
20:26 moritz_ Matt-W: and since rakudo currently barfs on it, you should also surround the new section with #?rakudo skip 'RT #62200'\n{ ... }
20:27 Matt-W so change plan 8 to plan 9
20:27 Matt-W and put that block around the new bit
20:27 moritz_ right
20:28 pugs_svn r24878 | mattw++ | Fixes from moritz++ to do the test properly
20:29 s1n hmph, i can't seem to remember my pugscode password
20:30 s1n i checked .subversion/auth/svn.simple and that didn't work on the commitbit.pugscode.org login
20:30 moritz_ s1n: did you try your email address as user name?
20:31 s1n moritz_: doh, i apparently can't read heh
20:32 pugs_svn r24879 | moritz++ | [t/spec] indent lines in composition.t to not confuse the fudge script
20:32 Matt-W oh I have to indent as well
20:32 s1n moritz_: pugscode is under MIT license and not artistic?
20:32 Matt-W for some reason I assumed otherwise
20:33 moritz_ Matt-W: that's a current limitation of the fudge script which I always forget :(
20:33 moritz_ s1n: what makes you think so? does it say somewhere?
20:34 s1n admin page
20:34 s1n overview has license selected as MIT
20:34 moritz_ that's certainly not right
20:35 moritz_ README contains some license informations
20:36 s1n oh, okay whatever
20:41 Matt-W okay
20:41 Matt-W now svn has decided to do nothing
20:42 moritz_ it works here, albeit very slow
20:42 Matt-W it seems to have decided that I didn't update the file I updated
20:42 moritz_ what does 'svn status' say about it?
20:43 Matt-W nothing at all
20:43 ovid joined #perl6
20:43 moritz_ that means it's unchanged
20:44 Matt-W hmm it does seem to be
20:44 Matt-W that means the version in svn had already been fixed
20:44 Matt-W but the one on the web isn't that version
20:44 moritz_ which file and version are you talking about?
20:45 Matt-W docs/feather/pugscode.org/index.html
20:45 ovid I was looking at pugs/examples/cookbook/ and it seems like the files in 01strings/ are named after the 1st edition Cookbook, but the README (which I wrote, to be honest) states the we're working from the 2nd edition and the files in cookbook/ are definitely named after 2nd edition chapters.  Is there a misunderstanding?
20:45 Matt-W gosh, it was fixed in september, says svn log
20:46 Matt-W in r22212
20:46 Matt-W and r22211
20:46 moritz_ ovid: feel free to make it consistent in the way you prefer it
20:47 moritz_ Matt-W: so basically the web page isn't up-to-date?
20:47 ovid @moritz_ Thanks.
20:47 lambdabot Unknown command, try @list
20:48 moritz_ ah, it doesn't use the file from svn, bug from audreyt's svn checkout
20:49 moritz_ and since she hasn't developed pugs in a while, here working copy is quite out of date
20:49 moritz_ I'll try to fix that
20:51 moritz_ and that svn checkout is actually a svk copy, and svk isn't installed
20:52 jan_ joined #perl6
20:53 moritz_ Matt-W: should be fixed now - could you please check that?
20:54 Matt-W site's fine now
20:54 moritz_ ok
20:54 spx2 joined #perl6
20:55 Matt-W thanks
20:55 Matt-W moritz++
20:55 pugs_svn r24880 | moritz++ | [t/spec] tests for RT #61324
21:01 Limbic_Region joined #perl6
21:01 donaldh joined #perl6
21:02 riffraff joined #perl6
21:16 pugs_svn r24881 | Ovid++ | cookbook: Renamed files to make Perl Cookbook v2 sections.
21:17 pugs_svn r24882 | Ovid++ | cookbook:  Added comment to README to remind people not to use v1.
21:19 mberends joined #perl6
21:22 pugs_svn r24883 | moritz++ | [t/spec] Test for RT #62046
21:24 ovid Should the examples in the cookbook run under rakudo? I think they should target Perl 6, but they're in the Pugs repository.
21:27 moritz_ that's the choice of whoever decides to maintain them
21:28 ovid OK. I see they don't run, regardless, so they should probably be rewritten.
21:29 moritz_ first of all they use perl 5 style POD
21:29 moritz_ that's probably the biggest obstable
21:29 moritz_ erm, obstacle
21:29 ovid Yeah, I was noticing that. I don't know Perl 6 POD, but I could probably fix 'em up.
21:29 moritz_ just enclose it in =begin pod\n...\n=end pod
21:30 moritz_ rakudo will ignore everything between that
21:31 ovid OK
21:32 moritz_ uhm, these files seem to be 100% POD anyway, right?
21:33 moritz_ rakudo: say ?(undef & undef ~~ undef)
21:33 p6eval rakudo 35424: OUTPUT«1␤»
21:33 ovid No, not all.
21:33 moritz_ I only looked at two of them :/
21:36 pugs_svn r24884 | moritz++ | [t/spec] test for RT #60886
21:37 kleve joined #perl6
21:47 ovid $?LINE and friends are not yet implemented?
21:47 moritz_ no
21:47 moritz_ but jnthn++ implemented line anotations in the byte code format
21:47 moritz_ so it can probably done soonish
21:47 moritz_ rakudo: say $?LINE
21:47 p6eval rakudo 35424: OUTPUT«Scope not found for PAST::Var '$?LINE' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
21:58 jhuni joined #perl6
22:04 pugs_svn r24885 | moritz++ | [t/spec] tests for RT #61914
22:07 kisu joined #perl6
22:10 moritz_ rakudo: my Int $x = 'abc';
22:10 p6eval rakudo 35424: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 15625 (src/builtins/control.pir:204)␤»
22:13 mberends hi moritz_, do you have a few minutes?
22:13 moritz_ mberends: yes
22:13 moritz_ (although I might get a phone call in a few minutes, if my significant other is on time, which she usually isn't ;-)
22:14 mberends please see if you can reach my HTTP::Daemon server at http://autoexec.demon.nl:8888/ I need to verify that I poked the correct hole in my NAT router
22:15 moritz_ works
22:15 Matt-W dropped connection
22:16 mberends thanks! look around, follow the links and check the code if you like
22:16 Matt-W &
22:16 moritz_ mberends: the one to lib/HTTP/Daemon.pm is a 404
22:18 mberends ouch. path difference between machines. looking...
22:18 moritz_ mberends: you need to add tree/master/ before the lib/
22:18 mberends thanks
22:20 moritz_ very nice hack (using netcat to work around rakudo's IO limitations)
22:21 mberends please try "Directory" "Processes" and "Browser"
22:22 mberends Macintosh!
22:23 mberends watching your User-Agent header lines scroll by
22:24 mberends it takes 2-3 seconds to serve each page
22:24 moritz_ the iceweasel 2.0 on linux is mine ;-)
22:26 mberends it works. thanks moritz_, I must go sleep and $work..
22:26 moritz_ you sleep at work? ;-)
22:26 mberends I wish!
22:26 moritz_ anyway, have the appropriate amount of fun
22:27 mberends I'll have to stop this daemon but will re-start tomorrow evening
22:37 Jedai joined #perl6
22:37 pasteling "ovid" at 82.152.164.233 pasted "error:imcc:The opcode 'substr_s_p_ic' (substr<3>) was not found. Check the type and number of the arguments" (27 lines, 1.2K) at http://sial.org/pbot/34380
22:38 ovid Trying to learn pir and can't figure out why that doesn't compile.
22:43 moritz_ ovid: maybe because tmps is a PMC, not a String?
22:43 ovid I'll try that
22:44 moritz_ $S0 = tmps
22:44 moritz_ curchar = sustr $S0, -1
22:45 eternaleye_ joined #perl6
22:45 moritz_ ovid: it seems that the is_cclass opcode is better for testing if something is a whitespace or not
22:47 moritz_ languages/perl6/src/parser/quote_expression.pir contains ``$I0 = is_cclass .CCLASS_WHITESPACE, target, pos''
22:47 ovid How do I tell the length of a string?  I get "unexpected PARROT_OP ('length')" if I call "length tmps"
22:47 ovid I'll make the whitespace switch now.
22:47 icwiener joined #perl6
22:48 moritz_ $S0 = "abc" $I0 = length $S0 print $I0 print "\n"
22:48 moritz_ outputs 3 for me
22:50 * moritz_ keeps adding ;'s to the lines in PIR
22:50 moritz_ thankfully that generates very readable error messages
22:52 ovid Bah. is_cclass doesn't get recognized. I tried including cclass.pasm, but no love. This is too finicky for me.  I'll need to read the docs more :(
22:53 ovid Ah, I at least got 'length' to apparently work :)
22:57 cspencer joined #perl6
22:58 moritz_ ovid: is_cclass works for me if I substitute .CCLASS_WHITESPACE by its magic number, 32
22:59 ovid OK, I'll give that a try after more futzing around.
22:59 ovid It currently takes me about a minute to recompile each time, so it's slow going :)
23:00 pasteling "moritz_" at 91.10.169.86 pasted "a bad trim sub for ovid" (28 lines, 425B) at http://sial.org/pbot/34382
23:00 moritz_ ovid: I put my own very limited PIR fu together - this is plain PIR, wihtout any Rakudo parts
23:01 ovid Thanks :)
23:02 moritz_ that's also much faster to debug
23:16 moritz_ rakudo: sub f($a) { state $s = $a; say $s }; f(3); f(5);
23:16 p6eval rakudo 35425: OUTPUT«3␤5␤»
23:17 moritz_ rakudo: sub f($a) { state $s = $a unless $s; say $s }; f(3); f(5);
23:17 p6eval rakudo 35425: OUTPUT«Null PMC access in get_bool()␤current instr.: 'f' pc 134 (EVAL_16:65)␤»
23:17 moritz_ rakudo: sub f($a) { state $s = $a unless defined($s); say $s }; f(3); f(5);
23:17 p6eval rakudo 35425: OUTPUT«3␤5␤»
23:17 * jnthn wasn't aware state variables were implemented...
23:17 moritz_ neither was I
23:18 moritz_ but before the rvar2 merge state variables complained loudly at compile time
23:18 jnthn rakudo: sub foo { state $x = 1; $x++; say $x; }; foo(); foo();
23:18 moritz_ now they just seem to do the same thing as my
23:18 p6eval rakudo 35425: OUTPUT«2␤2␤»
23:18 jnthn That's probably because we're parsing the state keyword, but not doing anything more than we do for "my".
23:19 moritz_ and when I look at 'method scope_declarator' it seems that any unknown scope declarator is handled just as 'my'
23:20 moritz_ I might have unfudged some tests that relied on 'state $x' not being a fatal error
23:26 ovid Wow. I finally got trim working in pir, but cutting and pasting it into src/builtins/any-str.pir doesn't work (though I fixed the sub declaration).  I'll write and email to the list to figure out what's up.
23:34 moritz_ one of the differences is that in any-str.pir you'll probably get a Perl6Str object, not a string thing
23:34 moritz_ so you might have to cast into a $S register first
23:34 moritz_ anyway, bed time for me
23:34 moritz_ ciao
23:35 ovid OK.  See you.  Thanks for your help.
23:38 wknight8111 joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo