pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
Ontolog I just found out about the Perl 6 conference in China 01:56
that rocks because I am in China
I see people can submit speaches
but I am not sure what to write about 01:57
meppl good night 03:03
rakudo_svn r31470 | tene++ | [exceptionhandler] 04:46
r31470 | tene++ | * Only check for previous usage on unfiltered EHs.
r31470 | tene++ | [rakudo]
r31470 | tene++ | * Add a filter on and remove a workaround in gather.
pmurias ruoso: hi 12:44
ruoso hi pmurias 12:47
pmurias using STD as our frontend might be a sensible option 12:49
ruoso I was just looking at the output of std_dump_match... and it's pretty reasonable 12:50
pmurias we won't even need perl5 embedding to make it work if the AST2m0ld is written in perl5
ruoso hmm.. I see.. 12:51
pugs_svn r22441 | pmurias++ | [smop] a proposed AST format 12:58
pmurias a treeified version of m0ld might work as the AST, as we desugar everything to method calls anyway 12:59
ruoso: i'm starting my CS degree in a few days so i'm moving to a different city so i might not have internet access 13:00
(at first ;)
ruoso congrats ;) 13:01
I always admire the people who have the patience to go through CS
;)
wolverian is running out of it 13:02
ruoso pmurias, so you mean turning std ast into mold ast? 13:06
pmurias yes 13:07
std ast is a parse tree so it represents how something was parsed not what is it
it might be too big a jump, but i don't know how p6 ast should look like 13:10
what should i hack on while i don't have internet? 13:11
ruoso well... that translation seems like a good job ;) 13:13
fullermd would think "getting internet" :p 13:14
ruoso @tell pmurias, although STD returns a parse tree... it doesn't really seem so far from an AST 13:17
lambdabot Consider it noted.
azawawi @seen moritz_ 13:50
lambdabot moritz_ is in #perl6. I last heard moritz_ speak 20h 39m 49s ago.
azawawi hi 13:51
moritz_ hi
azawawi @seen moritz_
lambdabot moritz_ is in #perl6. I last heard moritz_ speak 9s ago.
azawawi lol
how do i get a commit bit for parrot?
moritz_ by submitting so many good patches that the other commiters grow tired of applying your patches 13:52
and grant you a commit bit
azawawi im thinking of implementing a few of Str.pir
ruoso seriously considering making SMOP embedded in p5
ruoso later & 13:53
moritz_ azawawi: most Str builtins should actually go into builtins/any-str.pir, and be a method of Any (and convert to Str as necessary)
azawawi: S29 is a bit outdated in that respect
azawawi: anyway, patches are always welcome
azawawi where do i submit patches? 13:54
moritz_ [email@hidden.address]
azawawi moritz_: do they have a mailing list archive for [email@hidden.address] 13:55
moritz_ azawawi: the archive is the request tracker at rt.perl.org/rt3/, and also go to the mailing list(s) 13:56
azawawi moritz_: thx
s1n moritz_: ping 14:14
moritz_ s1n: pong 14:16
azawawi moritz_: what happened to kp6? 14:20
s1n moritz_: have you seen those radix tests i added yesterday?
moritz_ azawawi: it was close to bootstrapping, but was too slow... 14:21
azawawi: so a new backend was planned, which became "smop"
s1n: yes
s1n moritz_: are there any more tests you think i'm missing there?
keep in mind, full radix support isn't there yet 14:22
moritz_ s1n: not sure, I haven't found something obvious to test
s1n: except perhaps more cases wher the conversion fails 14:23
like ":2<1.1stff"
s1n moritz_: i can add more failing tests
moritz_ s1n: but all in all I think the tests are quite good 14:24
s1n moritz_: good, i was going to start adding more of the spec for radix notation 14:26
azawawi moritz_: i think S06*/code.t could be removed since it is a duplicate of closure-parameters.t 14:29
moritz_: feather.perl6.nl/syn/S06.html#Closure_parameters
lambdabot Title: S06 14:30
moritz_ takes a look 14:31
moritz_ azawawi: can rakudo already run closure-parameters.t? 14:32
pugs_svn r22442 | s1n++ | [t/spec] added a few more invalid radix notation tests
azawawi let me check
moritz_: "Lexically scoped subs not yet implemented" 14:33
moritz_: i will try to make it work 14:34
moritz_ azawawi: I think it will block on signature parsing
azawawi moritz_: code.t does not work on pugs btw
moritz_ it works here 14:35
azawawi moritz_: i must have ran another one by mistake... my mistake. 14:36
moritz_ "It works on my machine" -- Nicholas Clark
azawawi i ran it using old (/usr/bin/pugs) 14:37
azawawi moritz_: S06-signature/closure-parameters.t totally fails at parsing... 14:48
moritz_: unfudgable ;-)
moritz_ that's what I feared
azawawi oh well, at least i will solve the TODO smartlink in code.t ;-) 14:49
pugs_svn r22443 | azawawi++ | [t/spec] Added a smartlink and a future move order TODO ;-) 14:54
moritz_ can there be default values for named parameters? 15:56
masak moritz_: why not?
moritz_ masak: "Perl 6 and Parrot Essentials" says "only on optional parameters" 15:57
masak the nameds are automatically optional, right? so it's only natural that they have defaults
moritz_ ok, what's the syntax for them?
masak dunno
moritz_ std: sub (:$x($y)) { $x }
p6eval std 22443: OUTPUT[parsed␤]
masak seems reasonable.
moritz_ std: sub (:$x("foo")) { $x } 16:00
p6eval std 22443: OUTPUT[parse failure␤]
moritz_ some like it's not
std: mixed('a' <== 'b', 'c', 'd', 'e'); 16:01
p6eval std 22443: OUTPUT[Unknown routines:␤ mixed called at 1 ␤parsed␤]
moritz_ didn't know about the <== operator
std: sub mixed ($req, +$opt, +$another, *@slurpy) {...} 16:02
p6eval std 22443: OUTPUT[parse failure␤]
masak what if, instead of writing `sort { $^a <=> $^b }`, I wanted to write something like `sort using(infix:<< <=> >>)`. that wouldn't be a problem, would it? I mean, a sub such as &using can easily be defined, right? 17:07
pugs_svn r22444 | azawawi++ | [t/spec] Fixed Copy&Paste mistakes in no-implicit-block.t 17:41
azawawi @seen moritz_ 18:24
lambdabot moritz_ is in #perl6. I last heard moritz_ speak 2h 22m 10s ago.
moritz_ std: sub foo($optional? = 3) { ... } 19:59
p6eval std 22444: OUTPUT[parsed␤]
moritz_ std: sub foo($optional = 3?) { ... }
p6eval std 22444: OUTPUT[parse failure␤]
moritz_ std: sub foo($optional? is rw) 20:00
p6eval std 22444: OUTPUT[parse failure␤]
moritz_ std: sub foo($optional is rw?)
p6eval std 22444: OUTPUT[cp: cannot create regular file `lex/STD/EXPR': Permission denied␤parse failure␤]
moritz_ std: sub foo($optional is rw?) 20:01
p6eval std 22444: OUTPUT[parse failure␤] 20:02
moritz_ '$optional? is rw' works on my machine 20:05
std: sub foo($optional? is rw)
p6eval std 22444: OUTPUT[parse failure␤]
moritz_ so don't trust evalbot
at least not with STD.pm
literal is it possible to do "given $scalar;" ? 20:06
so that the remaining "when"s in that scope will use it
moritz_ no, but you can just use $_ = $scalar
erm temp $_ = $scalar 20:07
literal yeah
moritz_ sometimes one way to do it is enough ;)
meppl good night 20:13
pugs_svn r22445 | moritz++ | [docs/tutorial] book update 21:01
r22445 | moritz++ | Including, but not limited to:
r22445 | moritz++ | * optional params now have the ? after the name
r22445 | moritz++ | * capture interpolation is done with prefix:<|> (used to be prefix:<*>)
r22445 | moritz++ | * Chapter 7 is vastly out of date. Updated to use "regex" instead of "rule"
r22445 | moritz++ | (but got only half way), updated much other stuff, added a huge TODO list
lichtkind do capture contain references? 21:32
ruoso lichtkind, reference is not really a concept in Perl 6 21:34
lichtkind ruoso: i know ok i explain in detail 21:35
ruoso: $var = 2;$capture = \$var; $var = 3; say $$capture; 21:36
what should be output?
ruoso 2, because a capture is not a bind
lichtkind thanks that makes sense 21:37
but cature can contain default falues vor parameters?
capture 21:38
ruoso: even if you dunno that you helped me greatly 21:40
ruoso it's the signature that contain default values, not the capture
lichtkind ah 21:41
ruoso++
ruoso ;P 21:42
lichtkind i currently writing the tutorial part 5
is there way to match capture of 2 bubs like |&routine1 ~~ |&routine2; ?
ruoso lichtkind, I don't think there's anything specced on capture ~~ capture... 21:47
lichtkind thatswhy i ask :)
but its specced to match sigmatures 21:48
how to get sig of a sub
ruoso &foo.signature ? 21:51
I'd guess
pugs: sub abc ($x) { }; say &abc.signature 21:52
p6eval pugs: OUTPUT[:($x)␤]
ruoso pugs: sub abc ($x) { }; say &abc.signature.arity
p6eval pugs: OUTPUT[*** No such subroutine: "&arity"␤ at /tmp/pXL9BSAiMs line 1, column 23 - line 2, column 1␤]
lichtkind thanks 21:57
ruoso pugs: sub abc { }; say &abc.signature 22:02
p6eval pugs: OUTPUT[:(@_)␤]
lichtkind pugs: @a, $b, %c = 1 .. 5, 6, {'sonnen' => 'schein'};$capture = \(@a, $b, %c); 23:19
p6eval pugs: OUTPUT[*** ␤ Unexpected ","␤ expecting "::"␤ Variable "@a" requires predeclaration or explicit package name␤ at /tmp/tvHYsMF4Nq line 1, column 3␤]