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