Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-12-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 arnsholt Any commit-bit enabled people around who can give me a couple of pointers?
00:03 zaslon lolperl6adventhazblogged! perl6advent++ 'Day 22: Operator Overloading': http://perl6advent.wordpress.com/2009/12/22/day-22-operator-overloading/
00:03 colomon arnsholt: pointers to what?
00:04 arnsholt Basically: What's the recommended way of working with the repository?
00:04 colomon which one?
00:04 arnsholt Do you just have everything in one big working copy, or smaller bits
00:04 arnsholt Oh, right. The pugs one
00:04 arnsholt (The synopses, specifically, in my case)
00:04 colomon Personally, I keep the entire pugs repository around in one big directory tree.
00:05 colomon 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
00:06 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 colomon I don't have any idea how the others handle things.
00:08 arnsholt The "everything in one place" approach is sensible enough
00:09 rjbs Should I get a warning when I try to define the exact same multi sub twice?
00:09 rjbs rakudo:  multi sub postfix:<!>(Int $n) { [+] 1..$n; }; say 3!;  multi sub postfix:<!>(Int $n) { [+] 1..$n; }; say 3!
00:09 p6eval rakudo 8dc189: Ambiguous dispatch to multi 'postfix:!'. Ambiguous candidates had signatures:␤:(Int $n)␤:(Int $n)␤in Main (file <unknown>, line <unknown>)␤
00:21 justatheory remember the rjbs
00:31 pugs_svn r29386 | arnsholt++ | [AUTHORS] Added self to AUTHORS.
00:32 meppl joined #perl6
00:35 pugs_svn r29387 | arnsholt++ | [docs] Fixed two POD typos in S02.
00:46 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␤
00:46 Wolfman2000 rjbs: You are correct: you can't define the exact same multi sub with the exact same parameters.
00:47 Wolfman2000 If you change at least one thing, it will pass
00:55 brrant joined #perl6
00:57 diakopter Wolfman2000: that was his question (because it didn't give a warning with just the declarations)
00:57 diakopter rakudo:  multi sub postfix:<!>(Int $n) { [+] 1..$n; }; multi sub postfix:<!>(Int $n) { [+] 1..$n; };
00:57 p6eval rakudo 8dc189:  ( no output )
00:57 diakopter rakudo:  multi sub postfix:<!>(Int $n) { [+] 1..$n; }; multi sub postfix:<!>(Int $n) { [+] 1..($n - 1) };
00:57 p6eval rakudo 8dc189:  ( no output )
00:57 diakopter std:  multi sub postfix:<!>(Int $n) { [+] 1..$n; }; multi sub postfix:<!>(Int $n) { [+] 1..($n - 1) };
00:57 p6eval std 29387: ok 00:02 116m␤
00:58 diakopter pugs:  multi sub postfix:<!>(Int $n) { [+] 1..$n; }; multi sub postfix:<!>(Int $n) { [+] 1..($n - 1) };
00:58 p6eval pugs:  ( no output )
00:58 Wolfman2000 ah
01:06 Tene Huh. ng doesn't support protoregexes, even though nqp-rx does.
01:06 Tene that's... unfortunate. :(
01:06 Tene U'll try to fix it tonight.
01:10 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:11 eternaleye joined #perl6
01:14 nbrown joined #perl6
01:22 diakopter rjbs: it's a good catch; masakbot will report it when he returns :)
01:23 diakopter phenny: @tell masak backlog for "definition twice in a row"
01:23 diakopter phenny: tell masak backlog for "definition twice in a row"
01:23 phenny diakopter: I'll pass that on when masak is around.
01:24 xomas joined #perl6
01:30 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:37 rjbs Thanks. :-)
01:45 Casan joined #perl6
01:49 colomon rjbs: not your factorial bug, the factorial bug in mathw's Advent post.  :)
01:49 colomon (or were you the one who noticed that?)
01:57 agentzh joined #perl6
01:59 JimmyZ joined #perl6
02:04 colomon_ joined #perl6
02:09 rjbs Noticed what?
02:10 rjbs 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
02:11 diakopter (ultimately/effectively asking, I should say)
02:17 rjbs I was thanking diakopter for ensuring masak saw it.
02:20 pointme joined #perl6
02:20 mubot joined #perl6
02:20 zaslon joined #perl6
03:01 eternaleye joined #perl6
03:22 matsuzine joined #perl6
03:31 agentzh joined #perl6
03:37 takadonet joined #perl6
03:37 takadonet afternoon all
03:41 arnsholt LTM looks complicated...
03:43 gfx joined #perl6
03:50 japhb joined #perl6
03:57 nbrown joined #perl6
03:58 takadonet anyone have  good example of using Role at run-time?
03:58 bigpresh_ joined #perl6
04:01 arnsholt takadonet: I'm not sure, but I think that's how you return a zero-but-true value
04:02 takadonet arnsholt: ok. Reading the spec right now on Roles. Planning to use run-time a lot!
04:06 takadonet left #perl6
04:08 meppel joined #perl6
04:10 ihrd1 joined #perl6
04:10 ihrd1 left #perl6
04:27 eternaleye joined #perl6
04:59 eternaleye joined #perl6
05:59 eternaleye joined #perl6
06:17 FalseVinylShrub_ joined #perl6
06:38 js__ joined #perl6
06:40 js__ joined #perl6
06:41 FalseVinylShrub joined #perl6
06:47 FalseVinylShrub joined #perl6
06:51 FalseVinylShrub joined #perl6
06:55 FalseVinylShrub_ joined #perl6
06:56 FalseVinylShrub_ left #perl6
07:13 carlin joined #perl6
07:19 Su-Shee joined #perl6
07:21 kaare joined #perl6
07:22 Su-Shee good morning
07:23 JimmyZ good afternoon
07:23 PerlJam good morning
07:23 PerlJam or, really for me, good time-just-before-sleep
07:24 * Su-Shee doesn't offer more coffee then.. ;)
07:34 PerlJam okay, it's sleepish time for me.  good night
07:45 iblechbot joined #perl6
07:48 carlin joined #perl6
07:51 eternaleye joined #perl6
08:01 mberends joined #perl6
08:03 mberends good morning. the new spidey in vill is beginning to crawl :)
08:12 Su-Shee joined #perl6
08:12 xenoterracide joined #perl6
08:13 rgrau joined #perl6
08:28 mariuz joined #perl6
08:45 Baggio_ joined #perl6
08:54 JimmyZ_ joined #perl6
09:07 eternaleye joined #perl6
09:12 eternaleye joined #perl6
09:14 eternaleye joined #perl6
09:15 synth joined #perl6
09:27 meneldor joined #perl6
09:37 FalseVinylShrub joined #perl6
09:39 eternaleye joined #perl6
09:47 Su-Shee_ joined #perl6
09:59 TiMBuS joined #perl6
10:05 FalseVinylShrub joined #perl6
10:16 eternaleye joined #perl6
10:19 moritz_ rakudo: say Inf === Inf
10:19 p6eval rakudo 8dc189: 1␤
10:21 mathw Morning
10:22 tempire joined #perl6
10:34 FalseVinylShrub joined #perl6
10:43 jaffa8 joined #perl6
10:43 jaffa8 hi
10:44 jaffa8 what can be wrong here: if ( $ctype ~~ /(\w+\.)?(\w+)\.(\w+)%type/ ) {?
10:44 jaffa8 the parser is confused.
10:54 Baggio_ joined #perl6
10:56 meppl joined #perl6
10:57 moritz_ the % is wrong
10:57 moritz_ std: /(\w+\.)?(\w+)\.(\w+)%type/
10:57 p6eval std 29387: Potential difficulties:␤  Variable %type is not predeclared at /tmp/QkQfhHWPpX line 1:␤------> [32m/(\w+\.)?(\w+)\.(\w+)%type[33m⏏[31m/[0m␤ok 00:01 108m␤
10:59 jaffa8 ok
11:06 jaffa8 how can I specify the context?
11:07 moritz_ which context?
11:07 jaffa8 list
11:07 jaffa8 or scalar
11:07 jaffa8 or hash
11:08 jaffa8 as it was in Perl 5 e.g. @{}
11:08 moritz_ jaffa8: http://perlcabal.org/syn/S03.html#Term_precedence
11:12 jaffa8 ok
11:13 jaffa8 if I do this
11:13 jaffa8 for ( $fields )
11:13 jaffa8 will cycle through the array in $fields
11:13 jaffa8 or will it just cycle through one scalar?
11:14 moritz_ try it :-)
11:14 moritz_ rakudo gives the right answer
11:15 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>)␤
11:15 huf have you got a name for the difference?
11:15 huf sharp arrays and blunt ones? oslt
11:15 huf or soft and hard ones or *something*
11:15 jaffa8 rakudo: my @a=(4,5,6); my $field=@a; for $field { say $_;}
11:15 p6eval rakudo 8dc189: 4 5 6␤
11:16 moritz_ huf: interpolating and non-interpolating arrays?
11:16 huf moritz_: that's waaaaay too long ;)
11:16 huf but yeah.
11:18 huf "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"
11:19 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
11:20 jaffa8 rakudo: $l =~ /^>>types/
11:20 p6eval rakudo 8dc189: Symbol '$l' not predeclared in <anonymous> (/tmp/O7vr9D7354:2)␤in Main (file <unknown>, line <unknown>)␤
11:20 jaffa8 rakudo: my $l;$l =~ /^>>types/
11:20 huf moritz_: ah. can you convert between the two?
11:20 p6eval rakudo 8dc189:  ( no output )
11:20 jaffa8 moritz_, is =~ ok?
11:20 moritz_ huf: not easily
11:21 moritz_ std: 1 =~ 2
11:21 p6eval std 29387: [31m===[0mSORRY![31m===[0m␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/lOC3K6f8sv line 1:␤------> [32m1 =~[33m⏏[31m 2[0m␤FAILED 00:01 104m␤
11:21 moritz_ huf: also routines are mutable (you can call .wrap and .unwrap), and blocks are immutable
11:21 rodi joined #perl6
11:22 huf moritz_: what's wrap and unwrap do?
11:22 moritz_ huf: http://perlcabal.org/syn/S06.html#Wrapping
11:23 huf ah. neat
11:24 diakopter #perl6: g'morn
11:26 moritz_ good morning diakopter
11:27 jaffa8 rakudo: $i=1; my $i;
11:27 p6eval rakudo 8dc189: Null PMC access in getprop()␤in Main (file <unknown>, line <unknown>)␤
11:27 jaffa8 rakudo: $i=1; my $i; my $i;
11:28 p6eval rakudo 8dc189: Redeclaration of variable $i␤Null PMC access in getprop()␤in Main (file <unknown>, line <unknown>)␤
11:32 diakopter ng: $i=1; my $i;
11:32 p6eval ng 9d5018:  ( no output )
11:32 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)
11:32 diakopter ng: $i=1; my $i; say $i
11:32 p6eval ng 9d5018: 1␤
11:32 diakopter oh
11:33 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>)␤
11:33 moritz_ ng: $i=1␤ my $i; say $i
11:33 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)␤
11:33 diakopter ng: $i=1;␤ my $i; say $i
11:33 p6eval ng 9d5018: 1␤
11:33 moritz_ ng: $i=1;␤ my $i; say $i
11:33 p6eval ng 9d5018: 1␤
11:33 moritz_ wtf?
11:33 moritz_ ng: $i=1;␤  say $i
11:33 p6eval ng 9d5018: Symbol '$i' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (src/PCT/HLLCompiler.pir:101)␤
11:33 moritz_ new bug in ng, it seems
11:33 diakopter not just same line; same compilation unit
11:33 diakopter no
11:33 jaffa8 what is ng?
11:33 diakopter rakudo: $i=1;␤ my $i; say $i
11:33 p6eval rakudo 8dc189: Null PMC access in getprop()␤in Main (file <unknown>, line <unknown>)␤
11:34 moritz_ jaffa8: a branch of rakudo
11:34 jaffa8 What are the best implementations of Perl 6 now?
11:34 jaffa8 what for?
11:34 diakopter moritz_: it's the same in ng as main
11:34 moritz_ diakopter: yes, you're right
11:34 moritz_ jaffa8: fixing lots of stuffs, and re-doing the grammar with proto regexes
11:34 * diakopter wonders about BEGIN
11:34 moritz_ anway, I've got to run
11:34 moritz_ bye
11:37 JimmyZ joined #perl6
11:39 bluescreen joined #perl6
11:48 eternaleye joined #perl6
11:57 jaffa8 Does anyone know how to do reverse for loops?
12:00 rodi jaffa: you want to do something to a list in reverse order?
12:00 jaffa8 yes
12:00 huf for reverse ... { } ?
12:00 rodi for (2,3,4).reverse { .say }
12:01 rodi .reverse works on a list.
12:01 rodi or for reverse :)
12:02 pmurias joined #perl6
12:08 meneldor hello guys :)
12:09 bluescreen joined #perl6
12:09 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>)␤
12:10 jaffa8 rakudo: my $i=4;for reverse 0 .. $i {}
12:10 p6eval rakudo 8dc189:  ( no output )
12:10 jaffa8 rakudo: my $i=4;for $i3 reverse 0 .. $i {}
12:10 p6eval rakudo 8dc189: Confused at line 2, near "reverse 0 "␤in Main (file <unknown>, line <unknown>)␤
12:10 jaffa8 rakudo: my $i=4;for $i3 (reverse 0 .. $i) {}
12:10 p6eval rakudo 8dc189: Confused at line 2, near "(reverse 0"␤in Main (file <unknown>, line <unknown>)␤
12:11 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 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>)␤
12:11 jaffa8 rakudo: my $i=4;for reverse 0 .. $i { say $_}
12:11 p6eval rakudo 8dc189: 4␤3␤2␤1␤0␤
12:12 jaffa8 rakudo: my $i=4;for $x reverse 0 .. $i { say $_}
12:12 FalseVinylShrub joined #perl6
12:12 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 $_}
12:12 p6eval rakudo 8dc189: Confused at line 2, near "(reverse 0"␤in Main (file <unknown>, line <unknown>)␤
12:26 eternaleye rakudo: my $i = 4; for reverse(0..$i) -> $x { say $x; }
12:26 p6eval rakudo 8dc189: 4␤3␤2␤1␤0␤
12:26 eternaleye jaffa8: ^^
12:27 eternaleye it was parsing it as reverse(0)..$i
12:27 hejki rakudo: my $i = 4; for (^$i).reverse { .say }
12:27 eternaleye since .. has very loose precedence
12:27 p6eval rakudo 8dc189: 3␤2␤1␤0␤
12:28 eternaleye rakudo: my $i = 4; for (^^$i).reverse { .say }
12:28 p6eval rakudo 8dc189: 3␤2␤1␤0␤
12:28 hejki rakudo: my $i = 4; (^$i).reverse>>.say
12:28 p6eval rakudo 8dc189: 3␤2␤1␤0␤
12:29 pnu joined #perl6
12:29 jaffa8 what is ^
12:29 hejki 0..
12:29 hejki rakudo (^4) == (0..3)
12:29 jaffa8 ok
12:30 hejki rakudo: say (^4) == (0..3); say (^4) === (0..3);
12:30 p6eval rakudo 8dc189: 1␤0␤
12:31 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 :)
12:31 jaffa8 it should be automatic
12:31 jaffa8 as parrot supports it
12:31 jaffa8 yet it is not working
12:32 jaffa8 that is why I do not understand your remark
12:34 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:35 jaffa8 ok
12:40 Baggio_ joined #perl6
12:44 hejki hmm.. how i define new methods for $_ ?
12:58 masak joined #perl6
12:59 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).
12:59 phenny masak: 01:23Z <diakopter> tell masak backlog for "definition twice in a row"
12:59 masak hejki: I wouldn't rely on >>.say to preserve order if I were you.
13:00 masak colomon: I don't think the shape of repositories should matter for inclusion in proto. at least you can download the stuff. :)
13:00 masak diakopter: submitted. thanks. :)
13:01 jaffa8 how would you convert this substr( $progline, $s, $e - $s ) =~ s/./ /g;?
13:02 masak my $substr = $progline.substr($s, $e - $s);
13:02 masak $substr.=subst(/./, ' ', :g);
13:02 masak hm, except that doesn't do-what-you-want. :/
13:04 masak $progline = $progline.substr(0, $s) ~ (' ' x ($e - $s)) ~ $progline.substr($e);
13:04 masak that works.
13:04 jaffa8 is there left-handed substr now?
13:05 hejki masak: oh.. i thought hyper was dwimmy ;>
13:05 masak hejki: what do you mean?
13:05 hejki well for me @ar>>.say means it preserves order :)
13:05 hejki and since hyper should do what i mean.. well :)
13:06 masak hejki: no, the point of >>. is that it may filter the elements in the order it likes.
13:06 masak hejki: you won't see it in a function without side effects, since the order of the *results* is preserved.
13:06 masak but not the order of the side effects.
13:07 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. :)
13:08 hejki :P
13:08 masak hejki: but don't feel to bad about it, this is a mistake that pros have made.
13:08 masak *cough* jnthn *cough*
13:08 hejki ofc it is, i just did ;>
13:08 masak that, too. :)
13:09 masak hejki: next thing you can move on to is doing side effects in C<where> blocks. that's another fun one. :)
13:10 masak 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 #perl6
13:11 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!␤
13:11 masak note two 'OH HAI's.
13:11 hejki :)
13:12 masak hejki: can you guess why?
13:12 hejki the first one returns 0?
13:12 masak yes, but when? it's not called.
13:12 masak I mean that multi candidate is not called.
13:15 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>)␤
13:15 masak there's an important clue, I guess.
13:15 hejki :)
13:16 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?
13:16 hejki rakudo: multi foo($a where { say "OH NOES!" }) {}; multi foo($a where { say "OH HAI" }) { say $a };
13:16 p6eval rakudo 8dc189:  ( no output )
13:17 masak hejki: exactly.
13:17 hejki that's caused by multi?
13:17 masak hejki: it has to, in order to check whether the arguments will bind.
13:17 hejki is this intentional?
13:17 hejki oh ye true
13:17 hejki cause of the where-clause :)
13:17 masak very much intentional.
13:17 hejki ye
13:17 hejki funny :)
13:17 masak moral of the story: don't do side effects in where clauses.
13:18 masak because there are no guarantees as to how many times they'll run.
13:18 hejki seemingly yes
13:18 masak if you must use side effects, make sure you know the consequences.
13:18 hejki heh.. i do know now (at least partly :))
13:19 masak hejki++
13:19 hejki but anyways, nice chat. working hours are over :)
13:19 hejki laters
13:19 masak o/
13:19 null___ joined #perl6
13:25 Baggio__ joined #perl6
13:26 takadonet joined #perl6
13:26 takadonet morning all
13:26 masak o/
13:26 takadonet masak: how are you?
13:28 masak takadonet: I'm on a bus, I'm writing my advent post for tomorrow, and I'm feeling swell, thanks. :)
13:28 masak takadonet: you?
13:29 takadonet masak: Working on my large perl 5 project and on my 'little breaks' , working on bioperl6
13:29 takadonet Happy as hell that I finally got a nice version of a fasta grammar and actions working together
13:30 masak takadonet: yes, I backlogged that. congratulations!
13:31 mathw hey masak
13:31 mathw o/
13:31 masak mathw: \o
13:31 takadonet masak: thanks. Now planning to apply the 'fasta role' at  run time
13:32 masak takadonet: sounds interesting.
13:33 takadonet What topic is the advent post tomorrow?
13:33 masak gather/take
13:34 takadonet !!!
13:34 takadonet I was just about to use gather and take in my Actions class
13:34 masak what an astonishing coincidence!
13:34 mathw I like gather/take
13:35 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 :)
13:36 masak :)
13:36 mathw in Soviet Russia, take gathers you
13:43 SmokeMachine joined #perl6
13:48 meneldor is the method "new" now build-in in the classes?
13:48 masak` joined #perl6
13:52 takadonet meneldor: Yes, you can override if you choice to.
13:52 meneldor nice :)
13:53 orafu joined #perl6
13:57 patspam joined #perl6
13:57 mberends masak: in Soviet Russia, Paris does you ;)
13:58 masak` mberends: again this Paris. she's not my type! :)
13:59 Su-Shee Paris isn't even in Russia. ;)
13:59 mberends masak`: in Soviet Russia, are you allowed to have types?
14:00 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.
14:02 arnsholt mberends: Yes. But they check you, of course
14:02 mberends :)
14:03 masak` obvious in retrospect. arnsholt++
14:08 masak`` joined #perl6
14:09 masak`` is there any sense in having grep behave the same way as map with respect to multiple arguments to the block?
14:11 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 #perl6
14:13 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`` joined #perl6
14:13 vorner joined #perl6
14:14 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)␤
14:14 masak`` so in other words, the above is a bug?
14:15 rjbs That looks like a bug to me.
14:15 masak`` joined #perl6
14:15 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:16 masak`` I think I'd prefer that to silently dropping the end if it doesn't add up.
14:17 rjbs That would make the behavior match mis-matched hyperoperation, right?
14:17 pmurias an error might be an apporopriate response here
14:18 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)␤
14:18 frettled (just double-checking)
14:19 pmurias pugs: say (grep { $^a == $^b }, 1,1,2,3,4,4).perl
14:19 p6eval pugs: ()␤
14:19 frettled ISTR that rakudo behaved weirdly in one of these instances before.
14:31 meneldor what is the difference between pugs and rakudo ?
14:32 masak meneldor: they are different implementations.
14:33 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?
14:34 meneldor 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.
14:34 meneldor i see
14:34 masak Pugs was created in 2005, at a time when the tech for creating Rakudo wasn't available.
14:35 masak Pugs is obsolete in some ways, and strikingly modern in others.
14:35 masak I'd recommend Rakudo for daily use.
14:35 meneldor then im on the right way :)
14:36 drbean_ joined #perl6
14:39 rjbs I think we will be very happy to have multiple implementations, though.
14:39 hatseflats joined #perl6
14:39 rjbs Sprixel, for example, could end up being pretty darn great.
14:40 Baggio_ joined #perl6
14:40 masak` joined #perl6
14:40 masak` so could vill.
14:41 rjbs vill?
14:41 rjbs google not helping
14:41 rjbs oh, is that llvm perl6?
14:41 masak` yes.
14:41 masak` mberends++
14:41 mathw yes that could be very interesting indeed
14:42 masak` 2010 promises to be very interesting.
14:42 mathw :)
14:42 masak` I remember December 2008... we didn't really have a Perl 6 ecosystem yet.
14:42 mathw 2009 was very interesting, actually
14:42 mathw I really got into Perl 6 properly in 2009
14:42 mathw In 2010, maybe I'll actually understand it :)
14:43 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
14:43 masak` in January, proto forced itself to be born.
14:43 mathw I remember the genesis of proto. Have I really been here a year or more? Wow.
14:45 mathw I still feel new
14:45 masak` tell me about it. :)
14:45 takadonet stupid parametric roles!
14:45 * takadonet shakes his fist
14:47 masak` takadonet: what about them?
14:47 masak` I've never had any complaints.
14:48 takadonet masak: having issue but got a few more things I can try......
14:50 mathw I've never tried using one
14:50 mathw although I did read jnthn's advent post about them with great interest
14:50 mathw must find an excuse to use one soon
14:50 mathw I do like generic programming
14:51 rgrau joined #perl6
14:51 takadonet one of the MAIN module in bioperl is called SeqIO . It's a perfect spot to use parametric roles
14:52 masak` it is indeed.
14:54 takadonet masak: I forgot.... are you a bioinformatician as well?
14:57 takadonet got it!!!!
14:57 mathw \o/
14:57 masak` takadonet: I am.
14:58 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
14:58 masak` :)
14:58 mathw frettled: It's probably preferable to being a Java programmer
14:58 masak` sadly, I'm that as well.
14:59 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.
14:59 mathw My former boss made me do the SCJP exam in an attempt to get me to like Java
14:59 masak` medium-sized ones are fine though. anything smaller than 100k LOC or so.
14:59 mathw He just gave me more ammunition...
15:06 Psyche^ joined #perl6
15:06 frettled SCJP = SUN Certified Java Programmer?  (Just guessing, but I know how those initials go…)
15:06 frettled …as opposed to MCSE = Minesweeper Consultant and Solitaire Expert
15:07 mathw yes, sun certified java programmer
15:07 mathw it's an incredibly dull exam in which you're expected to demonstrate your flawless knowledge of the superiority of the Java Way
15:07 mathw it's also quite easy, if you study for a bit
15:08 takadonet what is perl6 equivalent to 'require $module' ?
15:10 masak` advent editors: check out my gather draft in the Wordpress interfact. comments appreciated.
15:10 masak` I'll be offline for a bit now, commuting.
15:11 PacoLinux joined #perl6
15:11 JimmyZ joined #perl6
15:13 colomon "Wordpress interfact"?
15:13 colomon (I don't see gather / take in the "posts" list.)
15:13 * colomon is trying git-svn for $work....
15:14 * PerlJam sees no gather draft either
15:15 KyleHa joined #perl6
15:16 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.
15:28 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>)␤
15:28 JimmyZ rakudo:  my ($a, $b); $a = \3; $b = \$a; sb = 4 ;say $a;
15:28 p6eval rakudo 8dc189: No applicable candidates found to dispatch to for 'prefix:='␤in Main (file <unknown>, line <unknown>)␤
15:39 mberends left #perl6
15:43 rodi if ~ calls the Str() method, + calls the Num() method, does ? call the Bit() method?
15:43 rodi e.g. if I defined a Bit() method, does it know what to do in boolean context?
15:44 iblechbot joined #perl6
15:47 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)␤
15:48 JimmyZ rakudo: (?'bb').WHAT.say;
15:48 p6eval rakudo 8dc189: Bool()␤
15:48 JimmyZ rakudo: (?'bb').perl.say;
15:48 p6eval rakudo 8dc189: Bool::True␤
15:48 JimmyZ rakudo: (?'bb').PARROT.say;
15:48 p6eval rakudo 8dc189: ␤
15:48 JimmyZ rakudo: (?'').perl.say;
15:48 p6eval rakudo 8dc189: Bool::False␤
15:49 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)␤
15:49 rodi JimmyZ: thanks :)
15:49 mathw hmm
15:49 mathw I thought it was called Bool
15:49 mathw evidently not
15:50 colomon Or it's just NYI.
15:50 colomon std: ''.Bool.perl.say
15:50 p6eval std 29387: ok 00:01 106m␤
15:51 JimmyZ rodi: :)
15:51 JimmyZ ng: ?''.perl.say
15:51 p6eval ng 9d5018: ""␤
15:52 JimmyZ rakudo: ?''.perl.say
15:52 p6eval rakudo 8dc189: ""␤
15:52 rodi ng: "".perl.say
15:52 p6eval ng 9d5018: ""␤
15:52 rodi ng: +"".perl.say
15:52 p6eval ng 9d5018: ""␤
15:52 colomon btw, ~ is not just .Str, nor is (prefix) + just .Num
15:52 colomon rakudo: say (+1).WHAT
15:53 p6eval rakudo 8dc189: Int()␤
15:53 colomon rakudo: say 1.Num.WHAT
15:53 p6eval rakudo 8dc189: Num()␤
15:53 JimmyZ rakudo: (?'').perl.say
15:53 p6eval rakudo 8dc189: Bool::False␤
15:53 JimmyZ rakudo: 1.WHAT.say
15:53 p6eval rakudo 8dc189: Int()␤
15:54 JimmyZ rakudo: (?'').^methods.say
15:54 p6eval rakudo 8dc189:
15:54 p6eval ..perlACCEPTSpredsuccScalarpickacosechacotanabselemsendchompreduceindexceilingp5chompcotanh:dpairs:e:fcombatanordacosevalchoptanhintatanhcoseccharsrootsucreversekeysisaucfirsttansubstrcosfmtbytespickevalfileacosecjoinsinhasinhcosechtrimasecchracotanhfloorsechasechrandtruncatesortroundrindex…
15:54 JimmyZ rakudo: (?'').^methods.perl.say
15:54 p6eval rakudo 8dc189: [{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, {
15:54 p6eval ..... }, …
15:54 JimmyZ rakudo: ~(?'').^methods.say
15:54 p6eval rakudo 8dc189:
15:54 p6eval ..perlACCEPTSpredsuccScalarpickucfirst:fsechtancosrandtruncatefmtfirsttranssortsqrtasincoshgrepsubstelemschompucindexchracotanhpairssamecasesubstrflipdoesatanhcosecexpacoseccharscancosechlcfirstrootsmapciscomblogatanminacosmaxbytesevalchopsinrindextanhIntvaluesasinhacosechabsendceilingp5cho…
15:55 rodi rakudo: (?'').^methods>>.say
15:55 JimmyZ rakudo: ~((?'').^methods).say
15:55 p6eval rakudo 8dc189:
15:55 p6eval ..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…
15:55 p6eval rakudo 8dc189:
15:55 p6eval ..pickpredACCEPTSperlsuccScalartrimasecchracotanhfloorsechasechrandtruncateroundsortsqrtrindexasinsplitcoshexpmatchacoshgrepwordsvaluescancotanatan2lcfirstsrandmappolarciskvsamecaselogmincapitalizemaxfirsttranssinflipIntdoesp5choplcsubstacosechacotanabselemschompendindexreduceceilingp5chomp…
15:55 JimmyZ rakudo: (?'').^methods.join(' ').say
15:55 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
15:55 p6eval ..reverse co…
15:56 JimmyZ there were two pick functions?
16:00 nihiliad joined #perl6
16:03 pmichaud_ good morning, perl6
16:03 pmichaud_ brb
16:04 pmichaud joined #perl6
16:04 tempire joined #perl6
16:05 pmichaud re-good morning, #perl6
16:08 PerlJam pmichaud: What causes "rtype not set"?
16:08 PerlJam (good morning :)
16:08 pmichaud attempting to use an expression as an lvalue, usually.
16:10 pmichaud (in PAST)
16:10 zloyrusskiy joined #perl6
16:14 rjbs good morning, pmichaud
16:14 mathw o/ pmichaud
16:14 rjbs I tried this: for 0..* { .say }
16:15 rjbs I did not get an infinite stream of numbers on my terminal.
16:15 rjbs Who is in error?
16:17 rodi did you use an infinite terminal?
16:17 pmichaud afaik we don't have lazy ranges yet
16:17 pmichaud (but I'm about 5 days out of date)
16:17 pmichaud in the master branch we don't have lazy ranges yet
16:17 rjbs rodi: I used a MAXINT terminal, which is a good first-order approximation.
16:17 rjbs pmichaud: Okay, great.  So that should hve worked, right?
16:17 rjbs once Perl6 is finished :)
16:18 pmichaud when the ng branch becomes master
16:18 pmichaud in about 10 days
16:18 rjbs And also: C<< .say for ^* >> ?
16:18 * pmichaud doesn't uses the word "finished" :-)
16:18 pmichaud ^*  probably doesn't mean "up to infinity"
16:18 pmichaud it'd be a closure
16:19 pmichaud in the same sense as  +*
16:27 Tene pmichaud: any chance I can get protoregex support in master any time soon?
16:27 Tene erm, in ng?
16:27 pmichaud Tene: sure, shouldn't take long
16:29 jaffa8 hi
16:29 jaffa8 how do I specify the search path for parrot?
16:31 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?
16:32 pmichaud Tene: anyway, that'd be a specification change, I think.
16:32 Tene Hmm.  Maybe I'm misreding the spec.
16:34 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."
16:34 Tene from S06
16:34 PerlJam Are you implementing macros?
16:34 pmichaud I don't think that the protoregex is used to set that default, though.
16:35 Tene pmichaud: Ah.
16:36 Tene I was thinking about, say, statement_prefix
16:36 Tene Where they're all <sym> <blorst>
16:36 pmichaud something still has to define the <sym> part
16:37 Tene Right.  I was thinking it would be like: token statement_prefix:sym<foo> { <...> }, oslt.
16:38 pmichaud haven't see anything like that
16:38 pmichaud *seen
16:38 Tene Okay, nevermind. :)
16:38 pmichaud anyway, I'd get a spec clarification on that point
16:40 Tene PerlJam: shh.
16:42 ash___ joined #perl6
17:01 cahek joined #perl6
17:04 Tene Which ml do i send spec questions to, again?
17:04 TimToady what's yer Q?
17:04 TimToady perl6-language, if we can't help you :)
17:04 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."
17:04 Tene Where is the default parsing rule set?
17:05 Tene \Discussed just ^ a bit
17:05 abra joined #perl6
17:06 rjbs pmichaud: Thanks for the clarification on ^*
17:06 rjbs The auto-closure with * scares me, but I will remain open-minded.
17:07 TimToady Tene: I'll have to backlog some and glare at the context a bit.
17:08 rjbs (The Men Who Glare at Context)
17:08 takadonet ...
17:08 rjbs Scopes would've been a better analog.
17:08 rjbs BTW, were people still looking for topics for the last day or two of the calendar?
17:09 rjbs Something that I don't recall seeing address is something wildly important: IO.
17:09 hejki agree
17:09 pmichaud we were trying to limit ourselves to things that actually work well in Rakudo :)
17:09 rjbs Ok, that's cool.  I generally know nothing about what works or not atm.
17:09 pmichaud right
17:09 pmichaud IO "works", but only in a few select instances.  It would make a good advent post.
17:09 rjbs Can you read from and write to a named file reliably at all?
17:10 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.
17:10 rjbs hejki: no
17:10 pmichaud rjbs: yes
17:10 rjbs s/easier/more practicable/
17:10 Tene hejki: rakudo doesn't have either macros or concurrency.
17:10 takadonet is there a built in subroutine to upper case only the first letter of a string?
17:10 rjbs hejki: It talked about how hyperoperation will autoparallelize when it ... can.
17:10 rjbs ucfirst? /me checks.
17:10 Tene takadonet: ucfirst
17:10 hejki Tene: the advent is about perl6, not rakudo? :)
17:10 pmichaud rakudo:  say "hello".ucfirst
17:10 p6eval rakudo 8dc189: Hello␤
17:11 pmichaud hejki: yes, it's about Perl 6, but we purposely wanted to stick to things that are known to work "today"
17:11 rjbs hejki: The point is to get people to want to play with the language and feel around in it.
17:11 hejki pmichaud: ahh, i see
17:11 hejki rjbs: well it has certainly done that - at least for my part ;>
17:11 pmichaud hejki: in the case of concurrency, it's not even specced yet.
17:11 rjbs hejki: If you say, "Look at this amazing thing... which doesn't exist!" people might start to think that Perl 6 is vapor.
17:11 takadonet Tene: thanks
17:11 pmichaud (beyond the hypers, perhaps)
17:11 hejki pmichaud: ok, but it's upcoming feature, right?
17:12 hejki rjbs: ye.. completely understandable
17:12 pmichaud hejki: I think that concurrency is still needing some exploration
17:12 hejki ok
17:12 pmichaud macros are upcoming, yes.
17:12 * rjbs will be interested to see them.
17:13 Tene I'm working on macros right now.
17:13 pugs_svn r29388 | pmichaud++ | [perl6advent]:  Add IO to possible list of topics (rjbs++)
17:13 Tene prototyping with a macro system for scheme.
17:13 hejki :)
17:13 hejki macros is definetly interesting
17:14 hejki s/is/are/;
17:14 hejki and other stuff too.. but anyways, keep up the good work :)
17:17 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
17:17 jaffa8 I heard
17:18 jaffa8 what happnes to rakudo?
17:18 diakopter I didn't realize Self was again being developed .... www.selflanguage.org
17:18 ash___ ng is just a branch of rakudo
17:18 jaffa8 what does it mean branch?
17:18 diakopter a friendly fork?
17:18 PerlJam jaffa8: a branch is just another line of development.
17:19 ash___ the ng branch is using a different set of the parrot tools to build rakudo basically
17:20 jaffa8 I understand what is branch
17:20 jaffa8 Waste of resources?
17:20 rodi tell that to a tree.
17:20 pmichaud we decided that we needed to refactor some of Rakudo's core internals, so we chose to do that in a separate branch
17:21 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
17:21 [particle] jaffa8: the ng branch will become the master branch when development is complete and all tests pass again
17:21 ash___ ng: role A { method ^compose($obj) { say 'hi'; nextsame; } }; my $a = 5; $a does A;
17:21 pmichaud but there were a lot of rakudo internals that needed to be rewritten
17:21 p6eval ng 9d5018:  ( no output )
17:22 jaffa8 Why do you refactor it?
17:22 ash___ in theory that should of said 'hi' rather than no output
17:22 [particle] you refactor something to improve it
17:22 pmichaud jaffa8: ...so that it would match the changes to the specification that have occurred since it was written
17:24 justatheory joined #perl6
17:24 jaffa8 ok
17:25 takadonet Role issue again....
17:25 lisppaste3 takadonet pasted "Role issue" at http://paste.lisp.org/display/92482
17:27 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 takadonet Is it possible yet? :)
17:27 ash___ takadonet: is that the right syntax for that?
17:27 jaffa8 DO you know that perl6.exe does not produce pir?
17:27 takadonet ash__: no idea, that why i'm asking
17:28 takadonet Since only at run time , will i know which role to apply
17:28 pmichaud it would be   my $me = me
17:28 takadonet ahhh
17:28 takadonet pmichaud++
17:29 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?
17:30 ash___ s/you can do a like/you can do a list/
17:30 jaffa8 often it fails.
17:30 takadonet ash__: I have but looks like not enough
17:30 jaffa8 too often to be usable.
17:30 jaffa8 for very simple examples
17:36 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:41 cdarroch joined #perl6
17:42 pmichaud ash, looking
17:43 pmichaud ash___: looks to me as though the code doesn't handle ^method yet
17:43 pmichaud looks like it does !method, but not ^method
17:44 ash___ kk
17:44 pmichaud (line 829 of Actions.pm)
17:45 ash___ pmichaud: i have an ng patch to fix Role.^methods so you can use them at runtime
17:47 pmichaud ash___: perhaps email it to perl6-compiler, or leave a message for jnthn?
17:47 pmichaud 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
17:48 moritz_ or just to rakudobug@perl.org and I'll assign the ticket to jnthn++
17:48 pmichaud that works too
17:48 pmichaud although I don't know if we're watching rt that closely for ng tickets yet
17:48 ash___ just email  rakudobug@perl.org ? what should the subject be?
17:48 moritz_ [PATCH] implement $feature in ng
17:49 pmichaud [PATCH]  fix Role.^methods so you can use them at runtime
17:52 pmichaud 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
17:52 phenny moritz_: I'll pass that on when mberends is around.
17:53 ash___ moritz_: its sent
17:54 ash___ and like a dunce i forgot to mention its for the ng branch
17:55 * moritz_ set the owner to jnthn++
17:57 colomon \o/ ng patch!
17:58 ash___ how do you update a ticket in the perl bug tracker? if i wanted to mention its an ng bug
18:01 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:02 TimToady 'kay; bit distract at Julian's hospital today...
18:02 TimToady *distracted
18:02 Tene TimToady: Sure, not urgent.
18:02 Tene I won't be trying to implement in rakudo for another day or so.
18:03 TimToady to the first approximation, your answer is that the grammatical categories come straight out of the standard grammar
18:04 Tene Are they currently in STD.pm ?
18:05 TimToady yes, infix:, prefix:, etc, but the section on macros was written without talking about the interaction with operator precedece parsing
18:05 TimToady so it could use some rewriting
18:05 Tene what about, say, statement_prefix?
18:06 TimToady likewise, that's a standard category in STD
18:07 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
18:08 TimToady those are just implicitly alternatives in a generated <statement_prefix> rule
18:08 TimToady but a macro can throw out those alternatives and supply its own 'rest of rule' via 'is parsed'
18:08 Tene So if I say: macro statement_prefix:<FOO> { ... }, without an 'is parsed' trait, where is the regex to parse it found?
18:09 TimToady then the grammatical category only supplies when the macro is looked for, and what state we will end up in
18:09 TimToady yes, well, that's a good question, and I can see where the current answer is incomplete
18:09 TimToady lemme think about that s'more today
18:10 Tene My first thought, fwiw, was that that should come in the proto definition: proto token statement_prefix { <sym> <blast> }
18:11 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 justatheory joined #perl6
18:11 cognominal joined #perl6
18:11 constant joined #perl6
18:11 ssm joined #perl6
18:11 Tene then BEGIN, CHECK, INIT, etc. would be something like: token statement_prefix:BEGIN { <...> }
18:11 Tene or {}, or *, or some other unspecified.
18:11 TimToady I think we can assume the body of the proto will be the default parser
18:12 TimToady but note that 'is parsed' assumes that <sym> is already matched, while 'is reparsed' assumes you'll rematch <sym>
18:13 TimToady 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?
18:13 Tene Ah.
18:13 Tene You answer before I ask.  Classy.  :)
18:13 TimToady we might want to call the proto body as a subrule like <proto>
18:13 Tene I like that.
18:13 TimToady <...> would mean 'unimplemented
18:13 TimToady '
18:14 TimToady though perhaps <PROTO> would be better
18:14 Tene Yes, I can see how <...> would be wrong.
18:14 TimToady or given how many times this will happen, something huffmanly shorter
18:14 TimToady <:> or some such
18:15 Tene token statement_prefix:BEGIN; # use the proto if no body is supplied?
18:15 parduncia joined #perl6
18:15 Tene How evil is that?
18:15 TimToady we're tying to avoid using ; for missing bodies
18:16 payload joined #perl6
18:16 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.
18:16 TimToady though there has been some discussion about changing 'module Foo;' to some other syntax and then letting ; be the missing body meaning
18:17 TimToady but I'd prefer not to let it mean both things as it does in Perl 5
18:17 pmichaud "module Foo is below;"    :-)
18:17 pmichaud "module Foo is the_rest_of_this_file;"
18:18 TimToady module foo is:
18:18 Tene module foo is ↓;
18:23 TimToady or maybe it's a scope declarator
18:23 TimToady file module foo;
18:24 TimToady unit module foo;
18:24 abra joined #perl6
18:24 Tene I like the direction this is going.
18:24 Tene AFK lunch.
18:25 zloyrusskiy joined #perl6
18:26 abra joined #perl6
18:28 arnsholt joined #perl6
18:28 RichiH joined #perl6
18:28 cj joined #perl6
18:28 cotto joined #perl6
18:28 plainhao joined #perl6
18:28 y3llow joined #perl6
18:28 kcwu joined #perl6
18:28 mdxi joined #perl6
18:28 hicx174 joined #perl6
18:28 araujo joined #perl6
18:28 ashizawa joined #perl6
18:28 Infinoid joined #perl6
18:28 Wolfman2000 joined #perl6
18:28 pugs_svn joined #perl6
18:28 gbacon joined #perl6
18:28 REPLeffect_ joined #perl6
18:28 allbery_b joined #perl6
18:28 akl joined #perl6
18:28 jql joined #perl6
18:28 tomaw_ joined #perl6
18:28 dukelet0 joined #perl6
18:28 s1n joined #perl6
18:28 hugme joined #perl6
18:28 mtve joined #perl6
18:28 stepnem joined #perl6
18:42 abra joined #perl6
18:50 stephenlb joined #perl6
18:55 xinming_ joined #perl6
19:03 arnsholt joined #perl6
19:07 arnsholt From what I can gather from S05, protoregexes are essentially dynamically computed alternations. Is that right?
19:09 Tene TimToady: so, are spec changes coming eventually, or do I need to pursue this further later?
19:11 TimToady I need to think more about what ; will actually mean by way of defaults across the board
19:12 TimToady there are potentially interactions with coercion and Cool as well
19:15 allbery_b joined #perl6
19:15 TimToady arnsholt: yes, it's dynamic in the usual OO polymorphic sense that the methods in question depend on the actual type
19:16 TimToady though for a given type that set of methods shouldn't change (in the absence of monkey typing)
19:17 TimToady and the category stands in for an | alternation computed over that set of methods
19:19 TimToady Tene: and there's something contradictory about treating protos as both the inside and the outside of the set of methods
19:20 cj joined #perl6
19:20 RichiH joined #perl6
19:20 cotto joined #perl6
19:20 plainhao joined #perl6
19:20 y3llow joined #perl6
19:20 kcwu joined #perl6
19:20 mdxi joined #perl6
19:20 hicx174 joined #perl6
19:20 araujo joined #perl6
19:20 ashizawa joined #perl6
19:20 Infinoid joined #perl6
19:20 Wolfman2000 joined #perl6
19:20 pugs_svn joined #perl6
19:20 gbacon joined #perl6
19:20 REPLeffect_ joined #perl6
19:20 akl joined #perl6
19:20 jql joined #perl6
19:20 tomaw_ joined #perl6
19:20 dukelet0 joined #perl6
19:20 s1n joined #perl6
19:20 hugme joined #perl6
19:20 mtve joined #perl6
19:21 TimToady but maybe this resolves by thinking of the proto as generic
19:24 abra joined #perl6
19:25 lisppaste3 joined #perl6
19:26 arnsholt TimToady: Thanks for the confirmation
19:26 arnsholt /clarification
19:29 payload joined #perl6
19:29 justatheory joined #perl6
19:29 cognominal joined #perl6
19:29 constant joined #perl6
19:29 ssm joined #perl6
19:30 parduncia joined #perl6
19:32 omega joined #perl6
19:32 mberends joined #perl6
19:35 abra joined #perl6
19:54 takadonet rakudo: my $a=5;say $a;
19:54 p6eval rakudo 8dc189: 5␤
19:55 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>)␤
19:57 takadonet rakudo: role fix::me {};class A{}; A.new() does fix::me
19:57 p6eval rakudo 8dc189:  ( no output )
19:57 takadonet role fix::me {};class A{}; my $role = fix::me;A.new() does $role
19:57 iblechbot joined #perl6
20:02 takadonet rakudo: role fix::me {};class A{}; my $role = fix::me;A.new() does $role
20:02 p6eval rakudo 8dc189:  ( no output )
20:03 takadonet rakudo: role fix::me {};class A{}; my $role = fix:: ~ 'me'; A.new() does $role
20:03 p6eval rakudo 8dc189:  ( no output )
20:03 takadonet hmmm weird
20:09 Chillance joined #perl6
20:11 bluescreen joined #perl6
20:22 ash__ joined #perl6
20:24 moritz_ takadonet: p6eval times out whenever a class or role is declared
20:24 moritz_ (in rakudo)
20:24 moritz_ I have no idea why
20:24 mberends ah, moritz_++
20:24 phenny mberends: 17:52Z <moritz_> tell mberends I compiled vill; 'echo | ./vill' segfaults - is that expected? :-) Debian Lenny amd64 + llvm-2.6
20:25 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:26 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:27 moritz_ mberends: so, what kind of programs can I run with vill?
20:27 mberends see vill/src/options.cpp # nothing works yet
20:28 moritz_ I tried -e 1
20:28 moritz_ which was the most primitive program I could think of :-)
20:28 masak joined #perl6
20:28 Trey joined #perl6
20:28 masak \o/
20:29 masak sorry about the lack of post draft earlier; I had a technical failz just before de-bussing.
20:29 masak fixing now.
20:29 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.
20:31 mberends moritz_: in vill/src/codegen.cpp
20:32 * moritz_ has to get used to the idea that C++ can be used for other things than numerical simulations
20:33 mberends so ./vill -e 'say "123";' will output "vill compiled A\nvill compiled Z\n"
20:33 moritz_ yes, I've noticed
20:33 mberends it leaves a little executable behind in /tmp/a.out, or where -o chooses otherwise
20:34 mberends ./vill -h and ./vill -H lists all options
20:35 mberends I'm hoping the executables will grow only slowly as functionality is added
20:35 mberends and only in proportion to what the P6 code requires
20:36 mberends (I used to hack on a Small-C compiler that made sub-1K executables)
20:37 masak now you can view the draft. comments welcome.
20:38 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:39 payload joined #perl6
20:39 mberends moritz_: yes, it's a rather static compile time strategy, not necessarily suited to full featured dynamic runtime behaviour.
20:41 moritz_ mberends: s/constract/construct/
20:42 mberends moritz_: thanks :)
20:42 masak moritz_: thanks
20:42 masak oh, that really was for mberends. nvm :)
20:42 moritz_ no, it was for masak
20:42 moritz_ sorry, tab fail
20:42 moritz_ moritz_ fail, more likely :-)
20:43 mberends mutual appreciation win
20:43 moritz_ traverse-tree-inorder is shiny
20:43 moritz_ masak: now if you did that with signature unpacking... :-)
20:43 pmurias mberends: what's your medium term goal with vill?
20:43 moritz_ masak: my @all-nodes = gather { traverse-tree-inorder($tree) };
20:43 moritz_ masak: I believe you can omit the braces
20:44 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 PerlJam the delayed execution paragraph seems to be missing a word "...but only if it turns out that you actually the information."
20:45 PerlJam I assume you meant to say "need the information"
20:45 moritz_ or "access the information"
20:46 PerlJam or something
20:46 masak PerlJam: already fixed.
20:46 masak moritz_: fixed, and fixed.
20:47 PerlJam I really like the examples at the end.
20:47 rjbs perl6++ # hyphens in identifiers
20:47 PerlJam masak++
20:47 masak \o/
20:47 masak if I have the time, I'll finish with an obligatory obfu, too.
20:48 masak I saw a really nice Christmas tree cellular automaton on Twitter the other day.
20:48 masak I wrote to its author asking for permission; unfortunately no reply.
20:48 pmurias mberends: expand a bit more on that
20:48 pmurias please
20:48 masak maybe I can obfu it enough to call it my own without feeling bad about it.
20:48 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.
20:49 pmurias mberends: feel welcome to document things
20:50 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:51 pmurias eval is inefficient
20:51 pmurias but i don't think it won't be very hard
20:52 pmurias 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
20:53 mberends pmurias: emitting a shared library and linking it is also on the roadmap for vill :)
20:57 mberends 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.
21:01 mberends masak: really channeling APL or challenging? # nice post btw
21:02 moritz_ mberends: only third-rank priority really
21:02 mberends moritz_: it segfaulted exactly the same here
21:03 y3llow_ joined #perl6
21:04 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:06 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:08 pmurias if you don't have llvm the only way runtime eval can work is by using a different implementation ;)
21:11 masak joined #perl6
21:11 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 masak lolicanhaznom &
21:21 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:32 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:34 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:37 mberends masak: "even _though_ they will currently ... spin the fans"
21:37 masak mberends: thanks. fixing.
21:38 * mberends is planning "painful, complicated cheating" already ;)
21:38 masak :)
21:48 synth joined #perl6
22:00 * masak does some last-minute updates to the blog post
22:04 ash__ joined #perl6
22:07 mberends masak: fibonacci has 1 b
22:07 masak mberends: thanks; fixing.
22:08 masak mberends: I shoulda known that; I know the etymology. :/
22:08 mberends 'course
22:08 masak ok; I hereby remove my editing hand from the post. It'll auto-publish at midnight.
22:09 masak any errors that you find before/after then, please correct as you please.
22:09 masak I'll see y'all in the mroing. :)
22:09 mberends 'nite
22:09 * masak de-IRCs
22:09 masak left #perl6
22:16 TiMBuS joined #perl6
22:16 takadonet joined #perl6
22:17 takadonet sweet it worked!
22:20 dbrock joined #perl6
22:35 omega joined #perl6
22:35 eternaleye joined #perl6
22:40 omega_ joined #perl6
22:47 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 colomon when getting the natural order can already be done by switching to method syntax...
22:50 dduncan joined #perl6
22:53 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!  :)
22:53 colomon s/might/probably will/
22:54 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:55 ash__ 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 ash__ so really what i am curious about is what exactly is @PACKAGE[0]
22:56 ash__ i am assuming thats the class/role/grammar definition your currently scoped to
22:57 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:58 colomon I'm with you on the confusing.  :(
22:58 colomon give me a sec to get my dinner on the stove.
22:58 ash__ no worries
23:05 TiMBuS joined #perl6
23:05 colomon Hmmm... @PACKAGE isn't mentioned at all in the spec.
23:07 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 ....
23:08 Tene japhb: look at Temporal.pm, which I've heard masak talk about a lot.
23:09 japhb Is that a proto project, or in the Rakudo repo?
23:09 Tene no idea. :)
23:09 colomon Tene: doesn't masak mostly speak about rewriting it sometime in the near future?
23:09 Tene looks like rakudo
23:09 * japhb looks around ...
23:09 Tene src/setting/Temporal.pm
23:10 colomon Tene: any help you can provide ash__ on @PACKAGE would be a good thing.  :)
23:10 japhb Tene, yeah, I see it now
23:10 japhb It's not yet converted in the ng branch, it looks like
23:11 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 stepnem joined #perl6
23:11 japhb urf?  What is 'has #`(Hour) ...' ?
23:12 Tene embedded comment.
23:12 japhb Ah!
23:12 Tene he's not actually enforcing a type constraint.
23:12 japhb I thought it was some variant of the once-predicted number`unit syntax
23:12 Tene ash__: @PACKAGE holds the *representation* of the currently-in-construction namespaces.
23:13 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.
23:14 Tene It's a RPA.  RPAs don't have HOW methods.
23:14 ash__ hmmm, do you know when it would get one?
23:14 Tene 16:13 <@Tene> No, it wouldn't ever have that.
23:14 Tene The things it holds might.
23:16 Tene Remember, it holds *representations* of the namespaces being constructed.
23:16 Tene It doesn't actually hold real namespaces.
23:17 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.
23:17 Tene It's compiled into instructions that construct the class.
23:17 Tene You're confusing compile-time and runtime.
23:19 ash__ so, that's just collecting the parts then it actually constructs the class later right?
23:20 ash__ does that happen in src/Perl6/Compiler/Role.pm in the finish method?
23:26 Tene ash__: run ./perl6 --target=pir on this: class Foo { method bar { say "lol" } }
23:28 Tene The compiler *generates and does not run* instructions to call ClassHOW.new("Foo") and then .add_method(metaclass, "bar", <the method>)
23:28 Tene So you don't actually add the method in the compiler.  You *generate instructions* that will call .add_method on the metaclass.
23:29 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. :)
23:30 Tene 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 Tene And there's symbol registration, etc... so it does get all mixed up together.
23:31 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:33 ash__ well, actually its in ParrotBackend which ClassHOW uses, but i think thats the right place to fix this, right?
23:35 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 Tene You just need to change the compiler to notice the ^ and add the method to the metaclass instead of to the class.
23:35 arnsholt Does petdance stop by here?
23:36 Tene arnsholt: occasionally.
23:36 arnsholt Okies. I'll go look for a mail address then
23:36 arnsholt (I found a bug in the vim perl6 syntax)
23:38 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:40 reqamst_ joined #perl6
23:40 revdiablo joined #perl6
23:44 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
23:46 ash__ s/can check/can change/
23:47 ash__ 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:49 rjbs =:= operator is referntial equality, I believe.
23:49 rjbs a quick test indicates I'm probably right.
23:50 rjbs maybe "objects are identical" is better
23:50 ash__ rjbs++ thanks
23:51 arnsholt According to S03, =:= is "container identity"
23:58 payload joined #perl6

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

Perl 6 | Reference Documentation | Rakudo