»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by wolfe.freenode.net on 30 October 2009.
arnsholt Any commit-bit enabled people around who can give me a couple of pointers? 00:03
zaslon lolperl6adventhazblogged! perl6advent++ 'Day 22: Operator Overloading': perl6advent.wordpress.com/2009/12/2...erloading/
colomon arnsholt: pointers to what?
arnsholt Basically: What's the recommended way of working with the repository? 00:04
colomon which one?
arnsholt Do you just have everything in one big working copy, or smaller bits
Oh, right. The pugs one
(The synopses, specifically, in my case)
colomon Personally, I keep the entire pugs repository around in one big directory tree.
But most of the mods I make to it, I do from the t/spec directory of whatever Rakudo install I'm working from. :) 00:05
arnsholt That makes sense
colomon Subversion doesn't have any issues working in subdirectories, so there's no real reason to separate the pugs repo into chunks -- other than having the spec tests handy in whatever Perl 6 build you are working on. 00:06
I don't have any idea how the others handle things.
arnsholt The "everything in one place" approach is sensible enough 00:08
rjbs Should I get a warning when I try to define the exact same multi sub twice? 00:09
rakudo: multi sub postfix:<!>(Int $n) { [+] 1..$n; }; say 3!; multi sub postfix:<!>(Int $n) { [+] 1..$n; }; say 3!
p6eval rakudo 8dc189: Ambiguous dispatch to multi 'postfix:!'. Ambiguous candidates had signatures:␤:(Int $n)␤:(Int $n)␤in Main (file <unknown>, line <unknown>)␤
00:09 rgrau left
justatheory remember the rjbs 00:21
00:21 vamped left
pugs_svn r29386 | arnsholt++ | [AUTHORS] Added self to AUTHORS. 00:31
00:32 meppl joined
pugs_svn r29387 | arnsholt++ | [docs] Fixed two POD typos in S02. 00:35
Wolfman2000 rakudo: multi sub postfix:<!>(Int $n) { [*] 1..$n; }; say 3!; multi sub postfix:<!>(Num $n) { [+] 1..$n; }; say 3.5!; 00:46
p6eval rakudo 8dc189: 6␤6␤
Wolfman2000 rjbs: You are correct: you can't define the exact same multi sub with the exact same parameters.
If you change at least one thing, it will pass 00:47
00:47 lestrrat is now known as lest_away 00:55 brrant joined
diakopter Wolfman2000: that was his question (because it didn't give a warning with just the declarations) 00:57
rakudo: multi sub postfix:<!>(Int $n) { [+] 1..$n; }; multi sub postfix:<!>(Int $n) { [+] 1..$n; };
p6eval rakudo 8dc189: ( no output )
diakopter rakudo: multi sub postfix:<!>(Int $n) { [+] 1..$n; }; multi sub postfix:<!>(Int $n) { [+] 1..($n - 1) };
p6eval rakudo 8dc189: ( no output )
diakopter std: multi sub postfix:<!>(Int $n) { [+] 1..$n; }; multi sub postfix:<!>(Int $n) { [+] 1..($n - 1) };
p6eval std 29387: ok 00:02 116m␤
diakopter pugs: multi sub postfix:<!>(Int $n) { [+] 1..$n; }; multi sub postfix:<!>(Int $n) { [+] 1..($n - 1) }; 00:58
p6eval pugs: ( no output )
Wolfman2000 ah
Tene Huh. ng doesn't support protoregexes, even though nqp-rx does. 01:06
that's... unfortunate. :(
U'll try to fix it tonight.
rjbs Right: I accidentally pasted a definition twice in a row to the REPL and then it complained that it didn't know how to dispatch. :) 01:10
01:11 eternaleye joined 01:13 japhb left 01:14 nbrown joined 01:19 lest_away is now known as lestrrat 01:20 cdarroch left
diakopter rjbs: it's a good catch; masakbot will report it when he returns :) 01:22
phenny: @tell masak backlog for "definition twice in a row" 01:23
phenny: tell masak backlog for "definition twice in a row"
phenny diakopter: I'll pass that on when masak is around.
01:24 xomas joined
colomon mathw: ack, hope I just didn't step on an edit of yours on the day 22 post. (I fixed the factorial bug.) 01:30
rjbs Thanks. :-) 01:37
01:45 Casan joined
colomon rjbs: not your factorial bug, the factorial bug in mathw's Advent post. :) 01:49
(or were you the one who noticed that?)
01:57 agentzh joined 01:59 JimmyZ joined 02:02 Casan left 02:04 colomon_ joined, colomon left, colomon_ is now known as colomon
rjbs Noticed what? 02:09
I noticed a problem with declaring a multi sub twice. 02:10
diakopter rjbs: colomon was asking whether your "Thanks" was to me or to colomon
(ultimately/effectively asking, I should say) 02:11
rjbs I was thanking diakopter for ensuring masak saw it. 02:17
02:19 zaslon left, pointme left 02:20 pointme joined, mubot joined, zaslon joined 02:36 cls_bsd left 02:48 agentzh left 02:52 eternaleye left 03:01 eternaleye joined 03:18 ShaneC left 03:22 matsuzine joined 03:31 agentzh joined 03:32 nbrown left 03:37 takadonet joined
takadonet afternoon all 03:37
arnsholt LTM looks complicated... 03:41
03:43 gfx joined 03:50 japhb joined 03:55 bigpresh_ left, matsuzine left 03:57 nbrown joined
takadonet anyone have good example of using Role at run-time? 03:58
03:58 bigpresh_ joined
arnsholt takadonet: I'm not sure, but I think that's how you return a zero-but-true value 04:01
takadonet arnsholt: ok. Reading the spec right now on Roles. Planning to use run-time a lot! 04:02
04:06 takadonet left 04:08 meppel joined 04:09 meppl left, meppel is now known as meppl, justatheory left 04:10 ihrd1 joined, ihrd1 left 04:25 eternaleye left 04:27 eternaleye joined 04:46 eternaleye left 04:59 eternaleye joined 05:00 patspam left 05:45 eternaleye left 05:59 eternaleye joined 06:17 FalseVinylShrub_ joined 06:20 FalseVinylShrub_ left 06:38 js__ joined 06:39 js__ left 06:40 js__ joined, js__ left 06:41 FalseVinylShrub joined 06:46 FalseVinylShrub left 06:47 FalseVinylShrub joined 06:50 FalseVinylShrub left 06:51 FalseVinylShrub joined 06:52 xenoterracide left, stephenlb left 06:55 FalseVinylShrub_ joined 06:56 FalseVinylShrub_ left 07:00 Trey left 07:10 carlin left 07:13 carlin joined 07:14 carlin left 07:19 Su-Shee joined 07:21 kaare joined, kaare is now known as Guest70262
Su-Shee good morning 07:22
JimmyZ good afternoon 07:23
PerlJam good morning
or, really for me, good time-just-before-sleep
Su-Shee doesn't offer more coffee then.. ;) 07:24
PerlJam okay, it's sleepish time for me. good night 07:34
07:41 eternaleye left 07:45 iblechbot joined 07:48 carlin joined 07:51 eternaleye joined 08:01 mberends joined
mberends good morning. the new spidey in vill is beginning to crawl :) 08:03
08:11 Su-Shee left 08:12 Su-Shee joined, xenoterracide joined 08:13 rgrau joined 08:28 mariuz joined 08:33 gfx left 08:38 lestrrat is now known as lest_away 08:45 Baggio_ joined 08:51 itnac is now known as katz 08:53 eternaleye left, synth left 08:54 JimmyZ_ joined 09:01 JimmyZ left 09:02 JimmyZ_ is now known as JimmyZ 09:05 agentzh left 09:07 eternaleye joined, eternaleye left 09:12 eternaleye joined, eternaleye left 09:13 soupdragon left 09:14 eternaleye joined 09:15 synth joined 09:22 FalseVinylShrub left, pjcj left 09:27 meneldor joined 09:31 PacoLinux left 09:35 eternaleye left 09:36 Baggio_ left 09:37 FalseVinylShrub joined 09:39 eternaleye joined 09:47 Su-Shee_ joined 09:53 FalseVinylShrub left 09:55 Su-Shee left, Su-Shee_ is now known as Su-Shee 09:59 TiMBuS joined 10:05 FalseVinylShrub joined 10:07 rgrau left 10:09 tempire left 10:10 meppl left 10:13 eternaleye left 10:16 eternaleye joined 10:17 FalseVinylShrub left
moritz_ rakudo: say Inf === Inf 10:19
p6eval rakudo 8dc189: 1␤
10:20 jaldhar left
mathw Morning 10:21
10:22 tempire joined 10:32 JimmyZ left 10:34 FalseVinylShrub joined 10:43 jaffa8 joined
jaffa8 hi 10:43
what can be wrong here: if ( $ctype ~~ /(\w+\.)?(\w+)\.(\w+)%type/ ) {? 10:44
the parser is confused.
10:46 TiMBuS left 10:54 Baggio_ joined 10:56 meppl joined
moritz_ the % is wrong 10:57
std: /(\w+\.)?(\w+)\.(\w+)%type/
p6eval std 29387: Potential difficulties:␤ Variable %type is not predeclared at /tmp/QkQfhHWPpX line 1:␤------> /(\w+\.)?(\w+)\.(\w+)%type⏏/␤ok 00:01 108m␤
jaffa8 ok 10:59
how can I specify the context? 11:06
moritz_ which context? 11:07
jaffa8 list
or scalar
or hash
as it was in Perl 5 e.g. @{} 11:08
moritz_ jaffa8: perlcabal.org/syn/S03.html#Term_precedence
jaffa8 ok 11:12
if I do this 11:13
for ( $fields )
will cycle through the array in $fields
or will it just cycle through one scalar?
moritz_ try it :-) 11:14
rakudo gives the right answer
jaffa8 rakudo: @a=(4,5,6); $field=@a; for $field { say $_;} 11:15
p6eval rakudo 8dc189: Symbol '@a' not predeclared in <anonymous> (/tmp/X8VsptipbK:2)␤in Main (file <unknown>, line <unknown>)␤
huf have you got a name for the difference?
sharp arrays and blunt ones? oslt
or soft and hard ones or *something*
jaffa8 rakudo: my @a=(4,5,6); my $field=@a; for $field { say $_;}
p6eval rakudo 8dc189: 4 5 6␤
moritz_ huf: interpolating and non-interpolating arrays? 11:16
huf moritz_: that's waaaaay too long ;)
but yeah.
"pointy block" is too long and unwieldy as well, imho. pointy needs to be replaced with something that's just one syllable ;) 11:18
moritz_ "lambda"
huf hmm. anonymous subs and pointy blocks arent the same tho, right? what's the difference? 11:19
moritz_ huf: blocks are transparent to return() control exceptions
jaffa8 rakudo: $l =~ /^>>types/ 11:20
p6eval rakudo 8dc189: Symbol '$l' not predeclared in <anonymous> (/tmp/O7vr9D7354:2)␤in Main (file <unknown>, line <unknown>)␤
jaffa8 rakudo: my $l;$l =~ /^>>types/
huf moritz_: ah. can you convert between the two?
p6eval rakudo 8dc189: ( no output )
jaffa8 moritz_, is =~ ok?
moritz_ huf: not easily
std: 1 =~ 2 11:21
p6eval std 29387: ===SORRY!===␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/lOC3K6f8sv line 1:␤------> 1 =~⏏ 2␤FAILED 00:01 104m␤
moritz_ huf: also routines are mutable (you can call .wrap and .unwrap), and blocks are immutable
11:21 rodi joined
huf moritz_: what's wrap and unwrap do? 11:22
moritz_ huf: perlcabal.org/syn/S06.html#Wrapping
11:23 eternaleye left
huf ah. neat 11:23
diakopter #perl6: g'morn 11:24
moritz_ good morning diakopter 11:26
jaffa8 rakudo: $i=1; my $i; 11:27
p6eval rakudo 8dc189: Null PMC access in getprop()␤in Main (file <unknown>, line <unknown>)␤
jaffa8 rakudo: $i=1; my $i; my $i;
p6eval rakudo 8dc189: Redeclaration of variable $i␤Null PMC access in getprop()␤in Main (file <unknown>, line <unknown>)␤ 11:28
diakopter ng: $i=1; my $i; 11:32
p6eval ng 9d5018: ( no output )
moritz_ one of the oldest bugs in rakudo (permitting the usage of a variable before it's declare, as long as it's on the same line)
diakopter ng: $i=1; my $i; say $i
p6eval ng 9d5018: 1␤
diakopter oh
jaffa8 rakudo: for my $i3 (4,5,6) {} 11:33
p6eval rakudo 8dc189: Redeclaration of variable $i3␤Confused at line 2, near "(4,5,6) {}"␤in Main (file <unknown>, line <unknown>)␤
moritz_ ng: $i=1␤ my $i; say $i
p6eval ng 9d5018: Confused at line 1, near "$i=1\n my $"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
diakopter ng: $i=1;␤ my $i; say $i
p6eval ng 9d5018: 1␤
moritz_ ng: $i=1;␤ my $i; say $i
p6eval ng 9d5018: 1␤
moritz_ wtf?
ng: $i=1;␤ say $i
p6eval ng 9d5018: Symbol '$i' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (src/PCT/HLLCompiler.pir:101)␤
moritz_ new bug in ng, it seems
diakopter not just same line; same compilation unit
no
jaffa8 what is ng?
diakopter rakudo: $i=1;␤ my $i; say $i
p6eval rakudo 8dc189: Null PMC access in getprop()␤in Main (file <unknown>, line <unknown>)␤ 11:34
moritz_ jaffa8: a branch of rakudo
jaffa8 What are the best implementations of Perl 6 now?
what for?
diakopter moritz_: it's the same in ng as main
moritz_ diakopter: yes, you're right
jaffa8: fixing lots of stuffs, and re-doing the grammar with proto regexes
diakopter wonders about BEGIN
moritz_ anway, I've got to run
bye
11:37 JimmyZ joined 11:39 bluescreen joined 11:48 eternaleye joined 11:50 Younder left 11:53 JimmyZ left 11:54 bluescreen left
jaffa8 Does anyone know how to do reverse for loops? 11:57
rodi jaffa: you want to do something to a list in reverse order? 12:00
jaffa8 yes
huf for reverse ... { } ?
rodi for (2,3,4).reverse { .say }
.reverse works on a list. 12:01
or for reverse :)
12:03 pmurias joined
meneldor hello guys :) 12:08
12:09 bluescreen joined
jaffa8 rakudo: my $i=4;for reverse $i3 0 .. $i {} 12:09
p6eval rakudo 8dc189: Confused at line 2, near "0 .. $i {}"␤in Main (file <unknown>, line <unknown>)␤
jaffa8 rakudo: my $i=4;for reverse 0 .. $i {} 12:10
p6eval rakudo 8dc189: ( no output )
jaffa8 rakudo: my $i=4;for $i3 reverse 0 .. $i {}
p6eval rakudo 8dc189: Confused at line 2, near "reverse 0 "␤in Main (file <unknown>, line <unknown>)␤
jaffa8 rakudo: my $i=4;for $i3 (reverse 0 .. $i) {}
p6eval rakudo 8dc189: Confused at line 2, near "(reverse 0"␤in Main (file <unknown>, line <unknown>)␤
jaffa8 rakudo: my $i=4;for $i3 (reverse (0 .. $i)) {} 12:11
p6eval rakudo 8dc189: Confused at line 2, near "(reverse ("␤in Main (file <unknown>, line <unknown>)␤
12:11 FalseVinylShrub left
jaffa8 rakudo: my $i=4;for $i3 reverse 0 .. $i { say $_} 12:11
p6eval rakudo 8dc189: Confused at line 2, near "reverse 0 "␤in Main (file <unknown>, line <unknown>)␤
jaffa8 rakudo: my $i=4;for reverse 0 .. $i { say $_}
p6eval rakudo 8dc189: 4␤3␤2␤1␤0␤
jaffa8 rakudo: my $i=4;for $x reverse 0 .. $i { say $_} 12:12
12:12 FalseVinylShrub joined
p6eval rakudo 8dc189: Confused at line 2, near "reverse 0 "␤in Main (file <unknown>, line <unknown>)␤ 12:12
jaffa8 rakudo: my $i=4;for $x (reverse 0 .. $i) { say $_}
p6eval rakudo 8dc189: Confused at line 2, near "(reverse 0"␤in Main (file <unknown>, line <unknown>)␤
eternaleye rakudo: my $i = 4; for reverse(0..$i) -> $x { say $x; } 12:26
p6eval rakudo 8dc189: 4␤3␤2␤1␤0␤
eternaleye jaffa8: ^^
it was parsing it as reverse(0)..$i 12:27
hejki rakudo: my $i = 4; for (^$i).reverse { .say }
eternaleye since .. has very loose precedence
p6eval rakudo 8dc189: 3␤2␤1␤0␤
eternaleye rakudo: my $i = 4; for (^^$i).reverse { .say } 12:28
p6eval rakudo 8dc189: 3␤2␤1␤0␤
hejki rakudo: my $i = 4; (^$i).reverse>>.say
p6eval rakudo 8dc189: 3␤2␤1␤0␤
12:29 pnu joined
jaffa8 what is ^ 12:29
hejki 0..
rakudo (^4) == (0..3)
jaffa8 ok
hejki rakudo: say (^4) == (0..3); say (^4) === (0..3); 12:30
p6eval rakudo 8dc189: 1␤0␤
12:30 iblechbot left
jaffa8 Has anyone tried to convert perl 6 to exe? 12:31
hejki i guess making runnable binary isn't the first task on the list :)
jaffa8 it should be automatic
as parrot supports it
yet it is not working
that is why I do not understand your remark 12:32
hejki my remark was mainly for pointing out that the compile-part of rakudo isn't getting as much attention other parts are. in case it's built-in in parrot and isn't working.. well i guess you'll have to ask someone who knows his parrot better :) 12:34
jaffa8 ok 12:35
12:38 Baggio_ left 12:40 Baggio_ joined
hejki hmm.. how i define new methods for $_ ? 12:44
12:45 tempire left 12:58 masak joined
masak oh hai from a bus. 12:59
phenny masak: 21 Dec 18:29Z <colomon> tell masak Feel free to add github colomon / mandelbrot to proto. Though I don't know that the format is right to be installed (it's just two scripts unless moritz_++ has been fiddling with it since the last time I looked).
masak: 01:23Z <diakopter> tell masak backlog for "definition twice in a row"
masak hejki: I wouldn't rely on >>.say to preserve order if I were you.
colomon: I don't think the shape of repositories should matter for inclusion in proto. at least you can download the stuff. :) 13:00
diakopter: submitted. thanks. :)
jaffa8 how would you convert this substr( $progline, $s, $e - $s ) =~ s/./ /g;? 13:01
masak my $substr = $progline.substr($s, $e - $s); 13:02
$substr.=subst(/./, ' ', :g);
hm, except that doesn't do-what-you-want. :/
$progline = $progline.substr(0, $s) ~ (' ' x ($e - $s)) ~ $progline.substr($e); 13:04
that works.
jaffa8 is there left-handed substr now?
hejki masak: oh.. i thought hyper was dwimmy ;> 13:05
masak hejki: what do you mean?
hejki well for me @ar>>.say means it preserves order :)
and since hyper should do what i mean.. well :)
masak hejki: no, the point of >>. is that it may filter the elements in the order it likes. 13:06
hejki: you won't see it in a function without side effects, since the order of the *results* is preserved.
but not the order of the side effects.
hejki ahh .. so actually it doesn't do what i mean, it does what it likes to do :) 13:07
masak it will do what you mean after you've read about it in S03 and understood it properly. :)
hejki :P 13:08
masak hejki: but don't feel to bad about it, this is a mistake that pros have made.
*cough* jnthn *cough*
hejki ofc it is, i just did ;>
masak that, too. :)
13:09 synth left
masak hejki: next thing you can move on to is doing side effects in C<where> blocks. that's another fun one. :) 13:09
rakudo: sub foo($a where { say "OH HAI" }) { say $a }; foo("FOO!") 13:10
p6eval rakudo 8dc189: OH HAI␤FOO!␤
13:11 cls_bsd joined
masak rakudo: multi foo($a where { say "OH NOES!"; 0 }) {}; multi foo($a where { say "OH HAI" }) { say $a }; foo("OMGLOLBBQ!") 13:11
p6eval rakudo 8dc189: OH NOES!␤OH HAI␤OH HAI␤OMGLOLBBQ!␤
masak note two 'OH HAI's.
hejki :)
masak hejki: can you guess why? 13:12
hejki the first one returns 0?
masak yes, but when? it's not called.
I mean that multi candidate is not called.
13:13 cls_bsd left
hejki rakudo: multi foo($a where { say "OH NOES!" }) {}; multi foo($a where { say "OH HAI" }) { say $a }; foo("OMGLOLBBQ!") 13:15
p6eval rakudo 8dc189: OH NOES!␤OH HAI␤Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Any $a where all({ ... }))␤:(Any $a where all({ ... }))␤in Main (file <unknown>, line <unknown>)␤
masak there's an important clue, I guess.
hejki :)
masak it prints OH NOES and OH HAI, and then dies of ambiguity. 13:16
hejki does it run the where blocks without calling them?
rakudo: multi foo($a where { say "OH NOES!" }) {}; multi foo($a where { say "OH HAI" }) { say $a };
p6eval rakudo 8dc189: ( no output )
masak hejki: exactly. 13:17
hejki that's caused by multi?
masak hejki: it has to, in order to check whether the arguments will bind.
hejki is this intentional?
oh ye true
cause of the where-clause :)
masak very much intentional.
hejki ye
funny :)
masak moral of the story: don't do side effects in where clauses.
because there are no guarantees as to how many times they'll run. 13:18
hejki seemingly yes
masak if you must use side effects, make sure you know the consequences.
hejki heh.. i do know now (at least partly :))
masak hejki++ 13:19
hejki but anyways, nice chat. working hours are over :)
laters
masak o/
13:19 null___ joined 13:20 null___ left 13:25 Baggio__ joined 13:26 takadonet joined
takadonet morning all 13:26
masak o/
takadonet masak: how are you?
masak takadonet: I'm on a bus, I'm writing my advent post for tomorrow, and I'm feeling swell, thanks. :) 13:28
takadonet: you?
takadonet masak: Working on my large perl 5 project and on my 'little breaks' , working on bioperl6 13:29
13:29 Baggio_ left
takadonet Happy as hell that I finally got a nice version of a fasta grammar and actions working together 13:29
masak takadonet: yes, I backlogged that. congratulations! 13:30
mathw hey masak 13:31
o/
masak mathw: \o
takadonet masak: thanks. Now planning to apply the 'fasta role' at run time
masak takadonet: sounds interesting. 13:32
takadonet What topic is the advent post tomorrow? 13:33
masak gather/take
13:33 xomas is now known as xomas_, xomas_ is now known as xomas
takadonet !!! 13:34
I was just about to use gather and take in my Actions class
masak what an astonishing coincidence!
mathw I like gather/take
masak in Soviet Russia, gather/take likes you. 13:35
takadonet Well second time it was a coincidence, was working on my grammar when the advent post of grammar appeared :)
masak :) 13:36
mathw in Soviet Russia, take gathers you
13:43 SmokeMachine joined
meneldor is the method "new" now build-in in the classes? 13:48
13:48 masak` joined
takadonet meneldor: Yes, you can override if you choice to. 13:52
meneldor nice :)
13:53 orafu left, orafu joined 13:57 patspam joined
mberends masak: in Soviet Russia, Paris does you ;) 13:57
masak` mberends: again this Paris. she's not my type! :) 13:58
Su-Shee Paris isn't even in Russia. ;) 13:59
mberends masak`: in Soviet Russia, are you allowed to have types?
masak` mberends: I wouldn't know. as long as they're the state-approved type, you're allowed to, I guess. 14:00
Su-Shee CHuck Norris: yes. Everybody else: no.
arnsholt mberends: Yes. But they check you, of course 14:02
mberends :)
masak` obvious in retrospect. arnsholt++ 14:03
14:08 masak`` joined
masak`` is there any sense in having grep behave the same way as map with respect to multiple arguments to the block? 14:09
mberends grep and map should be as similar as possible, principle of least surprise 14:11
frettled is there any sense in it not… what mberends said.
14:11 am0c joined 14:12 frettled sets mode: +oooo masak`` mberends Su-Shee takadonet, frettled sets mode: +v zaslon, frettled sets mode: +v mubot, frettled sets mode: +v pointme
mberends hopefully DWIM means flattening nested lists in both cases, not sure if that is currently the case 14:13
masak`` allowing, for example, `grep { $^a == $^b }, 1, 1, 2, 3, 4, 4;` # 1, 1, 4, 4
14:13 masak`` left, masak left, masak`` joined, vorner joined
masak`` rakudo: say (grep { $^a == $^b }, 1, 1, 2, 3, 4, 4).perl 14:14
p6eval rakudo 8dc189: Not enough positional parameters passed; got 1 but expected 2␤in Main (file src/gen_setting.pm, line 324)␤
masak`` so in other words, the above is a bug?
14:15 masak`` left
rjbs That looks like a bug to me. 14:15
14:15 masak`` joined
masak`` what do you think, by the way, of the idea of padding lists with undef/Nil/Muuuh if/when the number of arguments don't evenly divide the number of elements? 14:15
I think I'd prefer that to silently dropping the end if it doesn't add up. 14:16
rjbs That would make the behavior match mis-matched hyperoperation, right? 14:17
pmurias an error might be an apporopriate response here
14:18 eternaleye left
frettled rakudo: say (grep { $^a == $^b }, 1,1,2,3,4,4).perl 14:18
p6eval rakudo 8dc189: Not enough positional parameters passed; got 1 but expected 2␤in Main (file src/gen_setting.pm, line 324)␤
frettled (just double-checking)
pmurias pugs: say (grep { $^a == $^b }, 1,1,2,3,4,4).perl 14:19
p6eval pugs: ()␤
frettled ISTR that rakudo behaved weirdly in one of these instances before.
14:19 masak`` is now known as masak
meneldor what is the difference between pugs and rakudo ? 14:31
masak meneldor: they are different implementations. 14:32
14:32 masak` left
masak meneldor: numerous differences in features implemented, and spec up-to-dateness. 14:33
meneldor why we need different implementations and which is better to use?
someone here said that pugs is obsolete 14:34
masak we don't -need- different implementations. we just don't know which way to implement Perl 6 is the best, so we're trying different ways.
meneldor i see
masak Pugs was created in 2005, at a time when the tech for creating Rakudo wasn't available.
Pugs is obsolete in some ways, and strikingly modern in others. 14:35
I'd recommend Rakudo for daily use.
meneldor then im on the right way :)
14:36 drbean_ joined
rjbs I think we will be very happy to have multiple implementations, though. 14:39
14:39 hatseflats joined
rjbs Sprixel, for example, could end up being pretty darn great. 14:39
14:40 Baggio_ joined, masak` joined
masak` so could vill. 14:40
rjbs vill? 14:41
google not helping
oh, is that llvm perl6?
masak` yes.
mberends++
mathw yes that could be very interesting indeed
masak` 2010 promises to be very interesting. 14:42
mathw :)
masak` I remember December 2008... we didn't really have a Perl 6 ecosystem yet.
mathw 2009 was very interesting, actually
I really got into Perl 6 properly in 2009
In 2010, maybe I'll actually understand it :)
masak` I had just started working on Druid, and tentatively put it on github. 14:43
mathw And submit more than two patches to Rakudo
masak` in January, proto forced itself to be born.
mathw I remember the genesis of proto. Have I really been here a year or more? Wow.
I still feel new 14:45
masak` tell me about it. :)
takadonet stupid parametric roles!
takadonet shakes his fist
14:47 Guest70262 left
masak` takadonet: what about them? 14:47
I've never had any complaints.
takadonet masak: having issue but got a few more things I can try...... 14:48
mathw I've never tried using one 14:50
although I did read jnthn's advent post about them with great interest
must find an excuse to use one soon
I do like generic programming
14:50 masak left 14:51 rgrau joined
takadonet one of the MAIN module in bioperl is called SeqIO . It's a perfect spot to use parametric roles 14:51
masak` it is indeed. 14:52
takadonet masak: I forgot.... are you a bioinformatician as well? 14:54
14:57 Baggio__ left
takadonet got it!!!! 14:57
mathw \o/
masak` takadonet: I am.
frettled it can't be helped 14:58
takadonet forgot to remove the attribute from the constructor of SeqIO object since it will live in the role
masak` :)
mathw frettled: It's probably preferable to being a Java programmer
masak` sadly, I'm that as well.
takadonet been over 2 years since I really did any Java programming 14:59
masak` Java is quite a nice toy language, but not fit for bigger projects, in my opinion.
mathw My former boss made me do the SCJP exam in an attempt to get me to like Java
masak` medium-sized ones are fine though. anything smaller than 100k LOC or so.
mathw He just gave me more ammunition...
15:03 am0c left 15:06 Psyche^ joined
frettled SCJP = SUN Certified Java Programmer? (Just guessing, but I know how those initials go…) 15:06
…as opposed to MCSE = Minesweeper Consultant and Solitaire Expert
mathw yes, sun certified java programmer 15:07
it's an incredibly dull exam in which you're expected to demonstrate your flawless knowledge of the superiority of the Java Way
it's also quite easy, if you study for a bit
takadonet what is perl6 equivalent to 'require $module' ? 15:08
masak` advent editors: check out my gather draft in the Wordpress interfact. comments appreciated. 15:10
I'll be offline for a bit now, commuting.
15:10 masak` left 15:11 PacoLinux joined, JimmyZ joined
colomon "Wordpress interfact"? 15:13
(I don't see gather / take in the "posts" list.)
colomon is trying git-svn for $work....
PerlJam sees no gather draft either 15:14
15:15 Patterner left, Psyche^ is now known as Patterner, KyleHa joined
PerlJam more of an NQP question, but anyone know what causes an "rtype not set" error? 15:16
colomon 's son has realized he can use the lower branches of the Christmas tree as a tool to try to knock ornaments off the higher branches.
JimmyZ rakudo: my $a, $b; $a = \3; $b = \$a; sb = 4 ;say $a; 15:28
p6eval rakudo 8dc189: Symbol '$b' not predeclared in <anonymous> (/tmp/tunJAASAuE:2)␤in Main (file <unknown>, line <unknown>)␤
JimmyZ rakudo: my ($a, $b); $a = \3; $b = \$a; sb = 4 ;say $a;
p6eval rakudo 8dc189: No applicable candidates found to dispatch to for 'prefix:='␤in Main (file <unknown>, line <unknown>)␤
15:37 FalseVinylShrub left 15:39 mberends left
rodi if ~ calls the Str() method, + calls the Num() method, does ? call the Bit() method? 15:43
e.g. if I defined a Bit() method, does it know what to do in boolean context?
15:44 iblechbot joined
JimmyZ rakudo: (?'bb').WAHT.say; 15:47
p6eval rakudo 8dc189: Method 'WAHT' not found for invocant of class ''␤in Main (file src/gen_setting.pm, line 324)␤
JimmyZ rakudo: (?'bb').WHAT.say; 15:48
p6eval rakudo 8dc189: Bool()␤
JimmyZ rakudo: (?'bb').perl.say;
p6eval rakudo 8dc189: Bool::True
JimmyZ rakudo: (?'bb').PARROT.say;
p6eval rakudo 8dc189: ␤
JimmyZ rakudo: (?'').perl.say;
p6eval rakudo 8dc189: Bool::False
mathw rakudo: ''.Bool.perl.say 15:49
p6eval rakudo 8dc189: Method 'Bool' not found for invocant of class 'Str'␤in Main (file src/gen_setting.pm, line 324)␤
rodi JimmyZ: thanks :)
mathw hmm
I thought it was called Bool
evidently not
colomon Or it's just NYI. 15:50
std: ''.Bool.perl.say
p6eval std 29387: ok 00:01 106m␤
JimmyZ rodi: :) 15:51
ng: ?''.perl.say
p6eval ng 9d5018: ""␤
JimmyZ rakudo: ?''.perl.say 15:52
p6eval rakudo 8dc189: ""␤
rodi ng: "".perl.say
p6eval ng 9d5018: ""␤
rodi ng: +"".perl.say
p6eval ng 9d5018: ""␤
colomon btw, ~ is not just .Str, nor is (prefix) + just .Num
rakudo: say (+1).WHAT
p6eval rakudo 8dc189: Int()␤ 15:53
colomon rakudo: say 1.Num.WHAT
p6eval rakudo 8dc189: Num()␤
JimmyZ rakudo: (?'').perl.say
p6eval rakudo 8dc189: Bool::False
JimmyZ rakudo: 1.WHAT.say
p6eval rakudo 8dc189: Int()␤
JimmyZ rakudo: (?'').^methods.say 15:54
p6eval rakudo 8dc189:
..perlACCEPTSpredsuccScalarpickacosechacotanabselemsendchompreduceindexceilingp5chompcotanh:dpairs:e:fcombatanordacosevalchoptanhintatanhcoseccharsrootsucreversekeysisaucfirsttansubstrcosfmtbytespickevalfileacosecjoinsinhasinhcosechtrimasecchracotanhfloorsechasechrandtruncatesortroundrindex…
JimmyZ rakudo: (?'').^methods.perl.say
p6eval rakudo 8dc189: [{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, {
..... }, …
JimmyZ rakudo: ~(?'').^methods.say
p6eval rakudo 8dc189:
..perlACCEPTSpredsuccScalarpickucfirst:fsechtancosrandtruncatefmtfirsttranssortsqrtasincoshgrepsubstelemschompucindexchracotanhpairssamecasesubstrflipdoesatanhcosecexpacoseccharscancosechlcfirstrootsmapciscomblogatanminacosmaxbytesevalchopsinrindextanhIntvaluesasinhacosechabsendceilingp5cho…
rodi rakudo: (?'').^methods>>.say 15:55
JimmyZ rakudo: ~((?'').^methods).say
p6eval rakudo 8dc189:
..perl␤ACCEPTS␤pred␤succ␤Scalar␤pick␤can␤cotan␤atan2␤lcfirst␤uc␤srand␤keys␤map␤polar␤cis␤log␤substr␤min␤max␤pick␤first␤evalfile␤trans␤sin␤Int␤acosec␤join␤subst␤sinh␤cosech␤acosech␤abs␤elems␤end␤chomp␤index␤ceiling␤trim␤p5chomp␤asec␤pairs␤sech␤ord␤rand␤truncate␤sort␤sqrt␤rindex␤asin␤int␤atan…
rakudo 8dc189:
..pickpredACCEPTSperlsuccScalartrimasecchracotanhfloorsechasechrandtruncateroundsortsqrtrindexasinsplitcoshexpmatchacoshgrepwordsvaluescancotanatan2lcfirstsrandmappolarciskvsamecaselogmincapitalizemaxfirsttranssinflipIntdoesp5choplcsubstacosechacotanabselemschompendindexreduceceilingp5chomp…
JimmyZ rakudo: (?'').^methods.join(' ').say
p6eval rakudo 8dc189: succ Scalar pick perl pred ACCEPTS atan min acos max bytes eval chop sin rindex tanh Int values asinh acosech abs end ceiling p5chomp keys kv floor asech ord capitalize pick round evalfile int split match acosh words p5chop lc join sinh cotan acotan atan2 reduce srand trim asec
..reverse co…
JimmyZ there were two pick functions? 15:56
16:00 nihiliad joined
pmichaud_ good morning, perl6 16:03
brb
16:04 pmichaud joined, tempire joined
pmichaud re-good morning, #perl6 16:05
PerlJam pmichaud: What causes "rtype not set"? 16:08
(good morning :)
pmichaud attempting to use an expression as an lvalue, usually.
(in PAST) 16:10
16:10 zloyrusskiy joined
rjbs good morning, pmichaud 16:14
mathw o/ pmichaud
rjbs I tried this: for 0..* { .say }
I did not get an infinite stream of numbers on my terminal. 16:15
Who is in error?
rodi did you use an infinite terminal? 16:17
pmichaud afaik we don't have lazy ranges yet
(but I'm about 5 days out of date)
in the master branch we don't have lazy ranges yet
16:17 JimmyZ left
rjbs rodi: I used a MAXINT terminal, which is a good first-order approximation. 16:17
pmichaud: Okay, great. So that should hve worked, right?
once Perl6 is finished :)
pmichaud when the ng branch becomes master 16:18
in about 10 days
rjbs And also: C<< .say for ^* >> ?
pmichaud doesn't uses the word "finished" :-)
^* probably doesn't mean "up to infinity"
it'd be a closure
in the same sense as +* 16:19
16:20 frettled sets mode: +o pmichaud
Tene pmichaud: any chance I can get protoregex support in master any time soon? 16:27
erm, in ng?
pmichaud Tene: sure, shouldn't take long
jaffa8 hi 16:29
how do I specify the search path for parrot?
Tene pmichaud: any chance of getting proto regex variants to default to matching whatever's in the original proto definition? 16:31
pmichaud Tene: why would one need that?
Tene: anyway, that'd be a specification change, I think. 16:32
Tene Hmm. Maybe I'm misreding the spec.
"For a given grammatical category, a default parsing rule or set of rules is used, but those rules that have not yet been "used" by the time the macro keyword or token is seen can be replaced by use of "is parsed" trait." 16:34
from S06
PerlJam Are you implementing macros?
pmichaud I don't think that the protoregex is used to set that default, though.
Tene pmichaud: Ah. 16:35
I was thinking about, say, statement_prefix 16:36
Where they're all <sym> <blorst>
pmichaud something still has to define the <sym> part
Tene Right. I was thinking it would be like: token statement_prefix:sym<foo> { <...> }, oslt. 16:37
pmichaud haven't see anything like that 16:38
*seen
Tene Okay, nevermind. :)
pmichaud anyway, I'd get a spec clarification on that point
Tene PerlJam: shh. 16:40
16:42 ash___ joined 16:43 vorner left 16:47 Baggio_ left 16:48 meppl left 16:52 meneldor left 17:01 cahek joined
Tene Which ml do i send spec questions to, again? 17:04
TimToady what's yer Q?
perl6-language, if we can't help you :)
Tene "For a given grammatical category, a default parsing rule or set of rules is used, but those rules that have not yet been "used" by the time the macro keyword or token is seen can be replaced by use of "is parsed" trait."
Where is the default parsing rule set?
\Discussed just ^ a bit 17:05
17:05 abra joined
rjbs pmichaud: Thanks for the clarification on ^* 17:06
The auto-closure with * scares me, but I will remain open-minded.
TimToady Tene: I'll have to backlog some and glare at the context a bit. 17:07
rjbs (The Men Who Glare at Context) 17:08
takadonet ...
rjbs Scopes would've been a better analog.
BTW, were people still looking for topics for the last day or two of the calendar?
Something that I don't recall seeing address is something wildly important: IO. 17:09
hejki agree
pmichaud we were trying to limit ourselves to things that actually work well in Rakudo :)
rjbs Ok, that's cool. I generally know nothing about what works or not atm.
pmichaud right
IO "works", but only in a few select instances. It would make a good advent post.
17:09 zloyrusskiy left
rjbs Can you read from and write to a named file reliably at all? 17:09
hejki hmm.. did the advent have stuff about macros or concurrency? 17:10
rjbs That's all that's needed to make things a *lot* easier.
hejki: no
pmichaud rjbs: yes
rjbs s/easier/more practicable/
Tene hejki: rakudo doesn't have either macros or concurrency.
takadonet is there a built in subroutine to upper case only the first letter of a string?
rjbs hejki: It talked about how hyperoperation will autoparallelize when it ... can.
ucfirst? /me checks.
Tene takadonet: ucfirst
hejki Tene: the advent is about perl6, not rakudo? :)
pmichaud rakudo: say "hello".ucfirst
p6eval rakudo 8dc189: Hello␤
rjbs hejki: The point is to get people to want to play with the language and feel around in it. 17:11
pmichaud hejki: yes, it's about Perl 6, but we purposely wanted to stick to things that are known to work "today"
hejki pmichaud: ahh, i see
rjbs: well it has certainly done that - at least for my part ;>
pmichaud hejki: in the case of concurrency, it's not even specced yet.
rjbs hejki: If you say, "Look at this amazing thing... which doesn't exist!" people might start to think that Perl 6 is vapor.
takadonet Tene: thanks
pmichaud (beyond the hypers, perhaps)
hejki pmichaud: ok, but it's upcoming feature, right?
rjbs: ye.. completely understandable 17:12
pmichaud hejki: I think that concurrency is still needing some exploration
hejki ok
pmichaud macros are upcoming, yes.
17:12 iblechbot left
rjbs will be interested to see them. 17:12
Tene I'm working on macros right now. 17:13
pugs_svn r29388 | pmichaud++ | [perl6advent]: Add IO to possible list of topics (rjbs++)
Tene prototyping with a macro system for scheme.
hejki :)
macros is definetly interesting
s/is/are/; 17:14
and other stuff too.. but anyways, keep up the good work :)
ash___ i think i see another issue with ng, i can't tell though. when you declare a method with a ^ in it (like doing: method ^compose($obj) ) its not getting added to the HOW of the class right 17:17
jaffa8 so there is ng
I heard
what happnes to rakudo? 17:18
diakopter I didn't realize Self was again being developed .... www.selflanguage.org
ash___ ng is just a branch of rakudo
jaffa8 what does it mean branch?
diakopter a friendly fork?
PerlJam jaffa8: a branch is just another line of development.
ash___ the ng branch is using a different set of the parrot tools to build rakudo basically 17:19
jaffa8 I understand what is branch 17:20
Waste of resources?
rodi tell that to a tree.
pmichaud we decided that we needed to refactor some of Rakudo's core internals, so we chose to do that in a separate branch
jaffa8 you mean that will be the final branch 17:21
pmichaud when the branch is a bit farther along, we'll make it the mainline branch
[particle] jaffa8: the ng branch will become the master branch when development is complete and all tests pass again
ash___ ng: role A { method ^compose($obj) { say 'hi'; nextsame; } }; my $a = 5; $a does A;
pmichaud but there were a lot of rakudo internals that needed to be rewritten
p6eval ng 9d5018: ( no output )
jaffa8 Why do you refactor it? 17:22
ash___ in theory that should of said 'hi' rather than no output
[particle] you refactor something to improve it
pmichaud jaffa8: ...so that it would match the changes to the specification that have occurred since it was written
17:23 cahek left 17:24 justatheory joined
jaffa8 ok 17:24
takadonet Role issue again.... 17:25
lisppaste3 takadonet pasted "Role issue" at paste.lisp.org/display/92482
takadonet Like to pass the name of the role as a variable to an object. i .e $obj does $newRole instead of $obj does newRole; 17:27
Is it possible yet? :)
ash___ takadonet: is that the right syntax for that?
jaffa8 DO you know that perl6.exe does not produce pir?
takadonet ash__: no idea, that why i'm asking
Since only at run time , will i know which role to apply 17:28
pmichaud it would be my $me = me
takadonet ahhh
pmichaud++
ash___ takadonet: you can do a like of roles too if you need that, $ya does (me, Positional); S14 talks about roles a lot if you haven't read it yet 17:29
PerlJam jaffa8: it doesn't?
ash___ s/you can do a like/you can do a list/ 17:30
jaffa8 often it fails.
takadonet ash__: I have but looks like not enough
jaffa8 too often to be usable.
for very simple examples
ash___ pmichaud: do you know where methods are composed into their classes? method_def in src/Perl6/Actions.pm seems likely, the issue is mainly for methods with '^' in them, they don't seem to be getting applied to the HOW of the class/role right 17:36
17:41 cdarroch joined
pmichaud ash, looking 17:42
ash___: looks to me as though the code doesn't handle ^method yet 17:43
looks like it does !method, but not ^method
ash___ kk
pmichaud (line 829 of Actions.pm) 17:44
ash___ pmichaud: i have an ng patch to fix Role.^methods so you can use them at runtime 17:45
pmichaud ash___: perhaps email it to perl6-compiler, or leave a message for jnthn? 17:47
or you can send it to me, but I might not be able to evaluate it too much yet. I haven't become familiar with the new role/class code in the ng branch
moritz_ or just to [email@hidden.address] and I'll assign the ticket to jnthn++ 17:48
pmichaud that works too
although I don't know if we're watching rt that closely for ng tickets yet
ash___ just email [email@hidden.address] ? what should the subject be?
moritz_ [PATCH] implement $feature in ng
pmichaud [PATCH] fix Role.^methods so you can use them at runtime 17:49
afk for a little while 17:52
moritz_ phenny: tell mberends I compiled vill; 'echo | ./vill' segfaults - is that expected? :-) Debian Lenny amd64 + llvm-2.6
phenny moritz_: I'll pass that on when mberends is around.
ash___ moritz_: its sent 17:53
and like a dunce i forgot to mention its for the ng branch 17:54
moritz_ set the owner to jnthn++ 17:55
colomon \o/ ng patch! 17:57
ash___ how do you update a ticket in the perl bug tracker? if i wanted to mention its an ng bug 17:58
Tene TimToady: Please hilight me when you either have glared at context or given up, so that I know to harass you again later. 18:01
TimToady 'kay; bit distract at Julian's hospital today... 18:02
*distracted
Tene TimToady: Sure, not urgent.
I won't be trying to implement in rakudo for another day or so.
TimToady to the first approximation, your answer is that the grammatical categories come straight out of the standard grammar 18:03
Tene Are they currently in STD.pm ? 18:04
18:05 justatheory left, cognominal left
TimToady yes, infix:, prefix:, etc, but the section on macros was written without talking about the interaction with operator precedece parsing 18:05
so it could use some rewriting
Tene what about, say, statement_prefix?
TimToady likewise, that's a standard category in STD 18:06
Tene macro statement_prefixRight, but where's the default parsing rule for it defined? 18:07
TimToady everything that starts statement_prefix: is participating in the default parsing
those are just implicitly alternatives in a generated <statement_prefix> rule 18:08
but a macro can throw out those alternatives and supply its own 'rest of rule' via 'is parsed'
Tene So if I say: macro statement_prefix:<FOO> { ... }, without an 'is parsed' trait, where is the regex to parse it found?
TimToady then the grammatical category only supplies when the macro is looked for, and what state we will end up in 18:09
yes, well, that's a good question, and I can see where the current answer is incomplete
lemme think about that s'more today
Tene My first thought, fwiw, was that that should come in the proto definition: proto token statement_prefix { <sym> <blast> } 18:10
TimToady I've probably been oversimplifying it slightly in my head, and the default parsing rule needs to involve the proto more than it does yet 18:11
18:11 justatheory joined, cognominal joined, constant joined, ssm joined
Tene then BEGIN, CHECK, INIT, etc. would be something like: token statement_prefix:BEGIN { <...> } 18:11
or {}, or *, or some other unspecified.
TimToady I think we can assume the body of the proto will be the default parser
but note that 'is parsed' assumes that <sym> is already matched, while 'is reparsed' assumes you'll rematch <sym> 18:12
yes, it would be nice to reuse the proto def in the more specific rules 18:13
Tene As a second question, spec talks about "the rest ...", so would statement_prefix:<FOO> have "is parsed(/<blast>/)", or "is parsed(/<sym> <blast/)", or what?
Ah.
You answer before I ask. Classy. :)
TimToady we might want to call the proto body as a subrule like <proto>
Tene I like that.
TimToady <...> would mean 'unimplemented
'
though perhaps <PROTO> would be better 18:14
Tene Yes, I can see how <...> would be wrong.
TimToady or given how many times this will happen, something huffmanly shorter
<:> or some such
Tene token statement_prefix:BEGIN; # use the proto if no body is supplied? 18:15
18:15 parduncia joined
Tene How evil is that? 18:15
TimToady we're tying to avoid using ; for missing bodies
18:16 payload joined
TimToady while trying to preserve the meme that says that ; means the body is actually the rest of the block 18:16
Tene Ah, yes. Forgot about that.
TimToady though there has been some discussion about changing 'module Foo;' to some other syntax and then letting ; be the missing body meaning
but I'd prefer not to let it mean both things as it does in Perl 5 18:17
pmichaud "module Foo is below;" :-)
"module Foo is the_rest_of_this_file;"
18:17 mariuz left
TimToady module foo is: 18:18
Tene module foo is ↓;
TimToady or maybe it's a scope declarator 18:23
18:23 cotto left, plainhao left, y3llow left, kcwu left, arnsholt left, hugme left, jql left, s1n left, dukelet0 left, mtve left, tomaw_ left
TimToady file module foo; 18:23
18:23 abra left
TimToady unit module foo; 18:24
18:24 abra joined
Tene I like the direction this is going. 18:24
AFK lunch.
18:25 zloyrusskiy joined, abra left 18:26 abra joined 18:28 arnsholt joined, RichiH joined, cj joined, cotto joined, plainhao joined, y3llow joined, kcwu joined, mdxi joined, hicx174 joined, araujo joined, ashizawa joined, Infinoid joined, Wolfman2000 joined, pugs_svn joined, gbacon joined, REPLeffect_ joined, allbery_b joined, akl joined, jql joined, tomaw_ joined, dukelet0 joined, s1n joined, hugme joined, mtve joined, irc.freenode.net sets mode: +ovv arnsholt pugs_svn hugme, stepnem joined 18:41 abra left 18:42 abra joined 18:45 zloyrusskiy left 18:50 stephenlb joined 18:51 arnsholt left, pugs_svn left, mdxi left, Wolfman2000 left, cotto left, hugme left, jql left, Infinoid left, kcwu left, y3llow left, araujo left, ashizawa left, plainhao left, gbacon left, hicx174 left, cj left, s1n left, dukelet0 left, REPLeffect_ left, mtve left, allbery_b left, akl left, tomaw_ left, RichiH left 18:55 xinming_ joined 19:03 arnsholt joined
arnsholt From what I can gather from S05, protoregexes are essentially dynamically computed alternations. Is that right? 19:07
Tene TimToady: so, are spec changes coming eventually, or do I need to pursue this further later? 19:09
TimToady I need to think more about what ; will actually mean by way of defaults across the board 19:11
there are potentially interactions with coercion and Cool as well 19:12
19:15 rodi left, allbery_b joined
TimToady arnsholt: yes, it's dynamic in the usual OO polymorphic sense that the methods in question depend on the actual type 19:15
though for a given type that set of methods shouldn't change (in the absence of monkey typing) 19:16
and the category stands in for an | alternation computed over that set of methods 19:17
Tene: and there's something contradictory about treating protos as both the inside and the outside of the set of methods 19:19
19:20 cj joined, RichiH joined, cotto joined, plainhao joined, y3llow joined, kcwu joined, mdxi joined, hicx174 joined, araujo joined, ashizawa joined, Infinoid joined, Wolfman2000 joined, pugs_svn joined, gbacon joined, REPLeffect_ joined, akl joined, jql joined, tomaw_ joined, dukelet0 joined, s1n joined, hugme joined, mtve joined, irc.freenode.net sets mode: +vv pugs_svn hugme
TimToady but maybe this resolves by thinking of the proto as generic 19:21
19:21 parduncia left, ssm left, constant left, payload left, justatheory left, cognominal left 19:24 abra left, abra joined 19:25 omega_ left, lisppaste3 joined
arnsholt TimToady: Thanks for the confirmation 19:26
/clarification
19:28 TimToady sets mode: +v ilogger2 19:29 payload joined, justatheory joined, cognominal joined, constant joined, ssm joined 19:30 parduncia joined 19:32 omega joined, mberends joined 19:34 abra left 19:35 abra joined 19:38 ash___ left
takadonet rakudo: my $a=5;say $a; 19:54
p6eval rakudo 8dc189: 5␤
takadonet rakudo: role fix::me {};Class A{}; A.new() does fix::me 19:55
p6eval rakudo 8dc189: Confused at line 2, near "A{}; A.new"␤in Main (file <unknown>, line <unknown>)␤
takadonet rakudo: role fix::me {};class A{}; A.new() does fix::me 19:57
p6eval rakudo 8dc189: ( no output )
takadonet role fix::me {};class A{}; my $role = fix::me;A.new() does $role
19:57 iblechbot joined 20:01 bluescreen left
takadonet rakudo: role fix::me {};class A{}; my $role = fix::me;A.new() does $role 20:02
p6eval rakudo 8dc189: ( no output )
takadonet rakudo: role fix::me {};class A{}; my $role = fix:: ~ 'me'; A.new() does $role 20:03
p6eval rakudo 8dc189: ( no output )
takadonet hmmm weird
20:09 Chillance joined 20:11 bluescreen joined 20:22 ash__ joined 20:23 brrant left
moritz_ takadonet: p6eval times out whenever a class or role is declared 20:24
(in rakudo)
I have no idea why
mberends ah, moritz_++
phenny mberends: 17:52Z <moritz_> tell mberends I compiled vill; 'echo | ./vill' segfaults - is that expected? :-) Debian Lenny amd64 + llvm-2.6
20:25 moritz_ sets mode: +o mberends
takadonet mortiz_: thanks The last one should have died and that my 'bug' in my code. Cannot figure out the syntax to get it to work 20:25
mberends moritz_: heh, you found a NYI way to put source into vill. The alternatives `vill programfile` and `vill -e'commandline'` are currently implemented 20:26
moritz_ mberends: so, what kind of programs can I run with vill? 20:27
mberends see vill/src/options.cpp # nothing works yet
moritz_ I tried -e 1 20:28
which was the most primitive program I could think of :-)
20:28 masak joined, Trey joined
masak \o/ 20:28
sorry about the lack of post draft earlier; I had a technical failz just before de-bussing. 20:29
fixing now.
mberends moritz_: the code generator is not complete. there is a dummy piece of code that generates the equivalent of the C language `puts( "vill compiled A\n"` etc just to show that it's not segfaulted.
moritz_: in vill/src/codegen.cpp 20:31
moritz_ has to get used to the idea that C++ can be used for other things than numerical simulations 20:32
mberends so ./vill -e 'say "123";' will output "vill compiled A\nvill compiled Z\n" 20:33
moritz_ yes, I've noticed
mberends it leaves a little executable behind in /tmp/a.out, or where -o chooses otherwise
./vill -h and ./vill -H lists all options 20:34
I'm hoping the executables will grow only slowly as functionality is added 20:35
and only in proportion to what the P6 code requires
(I used to hack on a Small-C compiler that made sub-1K executables) 20:36
masak now you can view the draft. comments welcome. 20:37
20:37 payload left
moritz_ let's make sure I understood that right: you want to compile control flow to LLVM IR, and VMish things are compiled on a as-needed basis into the executable too? 20:38
mberends moritz_: yes, it's a rather static compile time strategy, not necessarily suited to full featured dynamic runtime behaviour. 20:39
20:39 payload joined, abra left 20:40 SmokeMachine left
moritz_ mberends: s/constract/construct/ 20:41
mberends moritz_: thanks :) 20:42
masak moritz_: thanks
oh, that really was for mberends. nvm :)
moritz_ no, it was for masak
sorry, tab fail
moritz_ fail, more likely :-)
mberends mutual appreciation win 20:43
moritz_ traverse-tree-inorder is shiny
masak: now if you did that with signature unpacking... :-)
pmurias mberends: what's your medium term goal with vill?
moritz_ masak: my @all-nodes = gather { traverse-tree-inorder($tree) };
masak: I believe you can omit the braces
mberends pmurias: to discover how much of Perl 6 can be handled by a C-like static compiler. 20:44
masak moritz_: oh, good point.
20:45 stephenlb left
PerlJam the delayed execution paragraph seems to be missing a word "...but only if it turns out that you actually the information." 20:45
I assume you meant to say "need the information"
moritz_ or "access the information"
PerlJam or something 20:46
masak PerlJam: already fixed.
moritz_: fixed, and fixed.
PerlJam I really like the examples at the end. 20:47
rjbs perl6++ # hyphens in identifiers
PerlJam masak++
masak \o/
if I have the time, I'll finish with an obligatory obfu, too.
I saw a really nice Christmas tree cellular automaton on Twitter the other day. 20:48
I wrote to its author asking for permission; unfortunately no reply.
pmurias mberends: expand a bit more on that
please
masak maybe I can obfu it enough to call it my own without feeling bad about it.
mberends pmurias: in order to learn more about Perl 6 implementations, I intend to study Mildew closely as well, and help document it (with your approval). I find that I cannot understand most of the implementations because their documentation is sparse, to put it politely.
pmurias mberends: feel welcome to document things 20:49
mberends pmurias: llvm seems more suited to supporting static compiled languages than dynamic ones. That means things like eval() will be difficult and probably inefficient. 20:50
pmurias eval is inefficient 20:51
but i don't think it won't be very hard
the way mildew didn't it was by emitting a shared library and then linking that 20:52
mberends interpreters can do eval() with much less extra programming
pmurias: emitting a shared library and linking it is also on the roadmap for vill :) 20:53
moritz_: is the echo 'commands' | ./vill a useful invocation style that you sometimes need? If so the implementation can be bumped up the todo list. 20:57
20:57 Calimbeul left 20:59 jaffa8 left
mberends masak: really channeling APL or challenging? # nice post btw 21:01
moritz_ mberends: only third-rank priority really 21:02
mberends moritz_: it segfaulted exactly the same here
21:03 y3llow_ joined
pmurias mberends: from glimpsing at the llvm tutorial, llvm can JIT compile and execute it's AST so eval should more problematic then in an interpreter 21:04
mberends pmurias: the tutorial is nice, and that is fine if you are prepared to install llvm everywhere that you want to run compiled Perl 6 programs. I would prefer most executables to be copyable and runnable as single standalone files, just as produced by C compilers. But yes, that is how runtime eval() can work. 21:06
pmurias if you don't have llvm the only way runtime eval can work is by using a different implementation ;) 21:08
21:10 masak left 21:11 masak joined
masak mberends: I meant "channelling". I thought of writing "channelling the dead ghost of APL", but that felt like going a bit too far. 21:11
lolicanhaznom &
21:14 ash__ left 21:15 y3llow left 21:16 takadonet left
mberends pmurias: good point. there are many other bits I would like to work on before considering runtime eval. Perl 6 modules as statically compiled shared libs will be a (more) useful goal before then. 21:21
pmurias mberends: if you there are things you would like documented make a list or add TODO markers and i'll try to describe them 21:32
mberends pmurias: excellent, thanks. I was also thinking of just trying to document how things appear to work, and hope that you can detect and correct my mistakes. Both approaches can work alongside each other. 21:34
21:35 bluescreen left
mberends masak: "even _though_ they will currently ... spin the fans" 21:37
masak mberends: thanks. fixing.
mberends is planning "painful, complicated cheating" already ;) 21:38
masak :)
21:48 synth joined 21:49 Su-Shee left
masak does some last-minute updates to the blog post 22:00
22:04 ash__ joined
mberends masak: fibonacci has 1 b 22:07
masak mberends: thanks; fixing.
22:08 KyleHa left
masak mberends: I shoulda known that; I know the etymology. :/ 22:08
mberends 'course
masak ok; I hereby remove my editing hand from the post. It'll auto-publish at midnight.
any errors that you find before/after then, please correct as you please. 22:09
I'll see y'all in the mroing. :)
mberends 'nite
masak de-IRCs
22:09 masak left 22:16 TiMBuS joined, takadonet joined
takadonet sweet it worked! 22:17
22:20 takadonet left, dbrock joined 22:35 omega left, omega joined, omega left, eternaleye joined 22:40 omega_ joined
colomon I'm confused why masak says: "It’s unfortunate that the functional paradigm puts the steps in reverse order of processing. The proposed pipe syntax, notably the ==>, would solve that. But it’s not implemented in Rakudo yet, only described in S03." 22:47
when getting the natural order can already be done by switching to method syntax...
22:50 dduncan joined
ash__ colomon: do you know much about the src/Perl6/Actions.pm file? 22:53
colomon ash__: only a tiny bit, but I'm happy to try to help -- I might learn something in the process too! :)
s/might/probably will/
22:54 xenoterracide is now known as xenoterracide_
ash__ i am trying to figure out how to add ^method's to the HOW of the class, in method_def line 840ish they are doing the method defitions 22:54
i figured where it grabs the package's method hash i could check if $<specials> is ^ and grab the HOW's methods list instead of the @PACKAGE[0] method list, but it doesn't seem to like that 22:55
so really what i am curious about is what exactly is @PACKAGE[0]
i am assuming thats the class/role/grammar definition your currently scoped to 22:56
22:56 TiMBuS left
ash__ but it seems confusing to me how on like 836 they just declare: our @PACKAGE; and it already contains the right thing since they check if its actually defined on the next line or throw a panic 22:57
colomon I'm with you on the confusing. :( 22:58
give me a sec to get my dinner on the stove.
ash__ no worries
22:59 iblechbot left 23:03 stepnem left 23:05 TiMBuS joined
colomon Hmmm... @PACKAGE isn't mentioned at all in the spec. 23:05
Tene it's an internal compiler variable, it would have nothing to do with the spec. 23:07
japhb What's the state of date/time functionality in Rakudo? My local PM meeting is next week, and we're circulating the idea of writing an app together to manage our group's calendar in Perl 6 ....
Tene japhb: look at Temporal.pm, which I've heard masak talk about a lot. 23:08
japhb Is that a proto project, or in the Rakudo repo? 23:09
Tene no idea. :)
colomon Tene: doesn't masak mostly speak about rewriting it sometime in the near future?
Tene looks like rakudo
japhb looks around ...
Tene src/setting/Temporal.pm
colomon Tene: any help you can provide ash__ on @PACKAGE would be a good thing. :) 23:10
japhb Tene, yeah, I see it now
It's not yet converted in the ng branch, it looks like
Tene ash__: the 'our' declarator indicates that PACKAGE is scoped to the current namespace, and you can see it initialized in the INIT block at the start of the file. 23:11
23:11 stepnem joined
japhb urf? What is 'has #`(Hour) ...' ? 23:11
Tene embedded comment. 23:12
japhb Ah!
Tene he's not actually enforcing a type constraint.
japhb I thought it was some variant of the once-predicted number`unit syntax
Tene ash__: @PACKAGE holds the *representation* of the currently-in-construction namespaces.
ash__ okay, so its just a ResizablePMCArray then? So, if your in the middle of a package declaration, does it have a 'HOW' yet? do you know by chance? 23:13
Tene No, it wouldn't ever have that.
It's a RPA. RPAs don't have HOW methods. 23:14
ash__ hmmm, do you know when it would get one?
Tene 16:13 <@Tene> No, it wouldn't ever have that.
The things it holds might.
Remember, it holds *representations* of the namespaces being constructed. 23:16
It doesn't actually hold real namespaces.
ash__ yeah, i am just trying to think how/where you'd need to access the class/role/grammar's HOW to append ^methods 23:17
Tene the class doesn't exist yet at that time.
It's compiled into instructions that construct the class.
You're confusing compile-time and runtime.
ash__ so, that's just collecting the parts then it actually constructs the class later right? 23:19
does that happen in src/Perl6/Compiler/Role.pm in the finish method? 23:20
Tene ash__: run ./perl6 --target=pir on this: class Foo { method bar { say "lol" } } 23:26
The compiler *generates and does not run* instructions to call ClassHOW.new("Foo") and then .add_method(metaclass, "bar", <the method>) 23:28
So you don't actually add the method in the compiler. You *generate instructions* that will call .add_method on the metaclass.
ash__ i see, well, that makes sense. For whatever reason i thought it all sorta happened in the compiler phase 23:29
Tene Yeah, it's very normal for people to get confused about the difference there. :)
ash__: also, if you load a library, the library itself is compiled, loaded, and run, all during the compilation phase of the first library. 23:30
And there's symbol registration, etc... so it does get all mixed up together.
ash__ so i am looking in the wrong place then, to fix this issue, i need to be looking at 'add_method' on the ClassHOW it seems 23:31
well, actually its in ParrotBackend which ClassHOW uses, but i think thats the right place to fix this, right? 23:33
Tene I don't know whether that infrastructure is in place or not, but I expect that it is. I don't expect that you'll need to make any changes there. 23:35
You just need to change the compiler to notice the ^ and add the method to the metaclass instead of to the class.
arnsholt Does petdance stop by here?
Tene arnsholt: occasionally. 23:36
arnsholt Okies. I'll go look for a mail address then
(I found a bug in the vim perl6 syntax)
ash__ Tene: well, the complier is already checking for the '^' but its not currently doing anything with that, but you can check it in the add_method pretty simply i think. is that the wrong place to check for it? If so, how would I be able to access the ClassHOW|RoleHOW for the package I am constructing in the compiler? 23:38
23:40 reqamst_ joined, revdiablo joined
Tene I don't see an obvious answer, ash__. 23:44
ash__ i see how i might do it actually, i think i can figure it out, it would be good for me to learn. So, I think the way i'd go about it is to extend src/Perl6/Compiler/Package to have another attribute called $!how_methods maybe where you can add them there, then in the finish method after your done adding the methods via add_method you can check to the objects HOW and add the extra methods via its add_method
s/can check/can change/ 23:46
hmmm one question, can you get the object's id? like, to see if 2 objects are the exact same instance of an object? 23:47
rjbs =:= operator is referntial equality, I believe. 23:49
a quick test indicates I'm probably right.
maybe "objects are identical" is better 23:50
ash__ rjbs++ thanks
arnsholt According to S03, =:= is "container identity" 23:51
23:56 payload left 23:58 payload joined