Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-13

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:00 Psyche^ joined #perl6
00:08 araujo joined #perl6
00:12 drbean joined #perl6
00:43 achromic joined #perl6
01:11 Visitor99 joined #perl6
01:15 redicaps joined #perl6
01:26 plobsing joined #perl6
01:30 payload1 joined #perl6
01:42 HarryS joined #perl6
01:52 clochette joined #perl6
02:19 leprevost joined #perl6
02:23 agentzh joined #perl6
02:35 tjyang joined #perl6
02:59 bpalmer joined #perl6
03:00 wooden joined #perl6
03:00 wooden joined #perl6
03:15 gabiruh joined #perl6
03:16 lafille joined #perl6
03:25 tom_tsuruhara joined #perl6
03:27 Intensity joined #perl6
03:45 molaf joined #perl6
04:01 ingy star: say "ok" if "xxx" ~~ /['xxx'|'yyy']/
04:01 p6eval star 2010.07: OUTPUT«ok␤»
04:04 ingy star: say "ok" if "xxx" ~~ /^['xxx'|'yyy']$/
04:04 p6eval star 2010.07: OUTPUT«ok␤»
04:12 ingy star: say "ok" if "xxx" ~~ /^[xxx|yyy]$/
04:12 p6eval star 2010.07: OUTPUT«ok␤»
04:18 ingy star: class X { method foo($self, |@list) { for @list -> $elem { say $elem } } X.new.foo(1,2,3)
04:18 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
04:19 ingy star: class X { method foo($self, |@list) { for @list -> $elem { say $elem } }; X.new.foo(1,2,3)
04:19 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
04:19 ingy star: class X { method foo($self, @list) { for @list -> $elem { say $elem } }; X.new.foo(1,2,3)
04:19 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
04:20 sorear you need a ; after }
04:20 ingy star: class X { method foo($self, @list) { for @list -> $elem { say $elem }; }; X.new.foo(1,2,3)
04:20 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
04:20 ingy star: class X { method foo($self, @list) { for @list -> $elem { say $elem }; }; } X.new.foo(1,2,3)
04:20 p6eval star 2010.07: OUTPUT«Method 'foo' not found for invocant of class 'Any'␤  in main program body at line 22:/tmp/2ym9I49rFC␤»
04:21 ingy star: class X { method foo($self, @list) { for @list -> $elem { say $elem }; }; }; X.new.foo(1,2,3)
04:21 p6eval star 2010.07: OUTPUT«Nominal type check failed for parameter '@list'; expected Positional but got Int instead␤  in 'X::foo' at line 22:/tmp/xCqkIVjVrY␤  in main program body at line 22:/tmp/xCqkIVjVrY␤»
04:21 ingy star: class X { method foo($self, |@list) { for @list -> $elem { say $elem }; }; }; X.new.foo(1,2,3)
04:21 p6eval star 2010.07: OUTPUT«Nominal type check failed for parameter '@list'; expected Positional but got Capture instead␤  in 'X::foo' at line 22:/tmp/r6QNB2dYAI␤  in main program body at line 22:/tmp/r6QNB2dYAI␤»
04:21 sorear *@list
04:21 ingy star: class X { method foo($self, *@list) { for @list -> $elem { say $elem }; }; }; X.new.foo(1,2,3)
04:21 p6eval star 2010.07: OUTPUT«2␤3␤»
04:21 ingy star: class X { method foo(*@list) { for @list -> $elem { say $elem }; }; }; X.new.foo(1,2,3)
04:21 p6eval star 2010.07: OUTPUT«1␤2␤3␤»
04:22 * ingy hugs sorear
04:28 ingy star: say "ok" if (0,2,4).grep($_)
04:28 p6eval star 2010.07: OUTPUT«ok␤»
04:28 ingy star: say "ok" if (0,0,0).grep($_)
04:28 p6eval star 2010.07: OUTPUT«ok␤»
04:28 ingy star: say "ok" if (0,0,0).grep($)
04:28 p6eval star 2010.07: OUTPUT«===SORRY!===␤Contextual $*GOAL not found␤»
04:29 trwww joined #perl6
04:30 ingy sorear: how do I determine if a scalar is an element of an array?
04:30 ingy (1,3,4).elem(4)
04:30 ingy star: (1,3,4).elem(4)
04:30 p6eval star 2010.07: OUTPUT«Method 'elem' not found for invocant of class 'Parcel'␤  in main program body at line 22:/tmp/l_7GZrVbX9␤»
04:31 ingy star 4.elem(1,3,4)
04:31 ingy star: 4.elem(1,3,4)
04:31 p6eval star 2010.07: OUTPUT«Method 'elem' not found for invocant of class 'Int'␤  in main program body at line 22:/tmp/2EK1I0fTNH␤»
04:31 tylercurtis rakudo: my @a = 1,3,4; say @a.grep(4).so;
04:31 p6eval rakudo 811c1c: OUTPUT«Method 'so' not found for invocant of class 'List'␤  in main program body at line 22:/tmp/Pqde_n8uHM␤»
04:31 tylercurtis rakudo: my @a = 1,3,4; say @a.grep(4).Bool;
04:32 p6eval rakudo 811c1c: OUTPUT«1␤»
04:32 synth joined #perl6
04:32 tylercurtis ingy: ^^ works, at least for that simple case, but I'm not sure if it's the best way.
04:32 ingy tylercurtis: good enough for me
04:33 bpalmer left #perl6
04:33 ingy rakudo: my @a = 1,3,4; say @a.grep(5).Bool;
04:33 p6eval rakudo 811c1c: OUTPUT«0␤»
04:35 ingy tylercurtis: ironically I added Bool (and Str Num List None) types to TestML today and that's the code I'm porting to p6 now :)
04:36 ingy it's a fairly shallow/simplistic type system, but it buys a lot
04:37 orafu joined #perl6
04:41 c0nspiracy__ joined #perl6
04:42 ingy star: class XYQ {}; say XYQ.new.WHAT
04:42 p6eval star 2010.07: OUTPUT«XYQ()␤»
04:42 ingy star: class XYQ {}; say XYQ.new.WHAT.Str
04:42 p6eval star 2010.07: OUTPUT«XYQ()<0x8375d50>␤»
04:43 ingy star: class XYQ {}; my $what = XYQ.new.WHAT; say ~$what
04:43 p6eval star 2010.07: OUTPUT«XYQ()␤»
04:43 ingy star: class XYQ {}; my $what = XYQ.new.WHAT; say "$what"
04:43 p6eval star 2010.07: OUTPUT«XYQ()␤»
04:44 ingy star: class XYQ {}; my $what = XYQ.new.WHAT; say ~$what.substr(0,-2)
04:44 p6eval star 2010.07: OUTPUT«Method 'substr' not found for invocant of class ''␤  in main program body at line 22:/tmp/T8FkvrJEmx␤»
04:44 ingy star: class XYQ {}; my $what = XYQ.new.WHAT; say "$what".substr(0,-2)
04:44 sorear rakudo: say 3 ~~ [0,1,2,4]
04:44 p6eval star 2010.07: OUTPUT«XYQ␤»
04:44 p6eval rakudo 811c1c: OUTPUT«0␤»
04:44 sorear rakudo: say 3 ~~ [0,1,2,3, 4]
04:44 p6eval rakudo 811c1c: OUTPUT«0␤»
04:45 sorear rakudo: say [0,1,2,4] ~~ 3
04:45 p6eval rakudo 811c1c: OUTPUT«0␤»
04:45 sorear rakudo: say [0,1,2,4] ~~ 4
04:45 p6eval rakudo 811c1c: OUTPUT«1␤»
04:45 sorear that's one way
04:45 sorear rakudo: say 3 == any(0,1,2,4)
04:45 sorear rakudo: say 3 == any(0,1,3,4)
04:46 p6eval rakudo 811c1c: OUTPUT«any(Bool::False)␤»
04:46 p6eval rakudo 811c1c: OUTPUT«any(Bool::False, Bool::True)␤»
04:51 tylercurtis rakudo: say [0,1,2,4] ~~ 2
04:51 p6eval rakudo 811c1c: OUTPUT«0␤»
04:52 ingy o_O
04:52 tylercurtis sorear: I don't think @list ~~ $something is a way of doing what he wants.
04:53 ingy star: class X::Y::Q {}; my $what = X::Y::Q.new.WHAT; say ~$what
04:53 p6eval star 2010.07: OUTPUT«X::Y::Q()␤»
04:54 tylercurtis Numeric.ACCEPTS tests for numeric equality.
04:55 ingy star: say not 0
04:55 p6eval star 2010.07: OUTPUT«1␤»
04:55 ingy star: say not 1
04:55 p6eval star 2010.07: OUTPUT«0␤»
04:55 sorear rakudo: say not 0
04:56 p6eval rakudo 811c1c: OUTPUT«1␤»
04:56 sorear odd, I thought that bug was fixed already
05:00 Axius joined #perl6
05:04 ingy star: %x = (got => 1, not => 2); say %x.perl
05:04 p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "%x = (got "␤»
05:08 ingy class X { has $.this; has $.not; }; say X.new(this => 1, not => 5).perl
05:08 ingy star: class X { has $.this; has $.not; }; say X.new(this => 1, not => 5).perl
05:08 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
05:08 ingy star: class X { has $.this; has $.not; }; say X.new(this => 1, 'not' => 5).perl
05:08 p6eval star 2010.07: OUTPUT«X.new(this => 1, not => Any)␤»
05:09 ingy ?
05:09 ingy star: class X { has $.this; has $.not; }; say X.new('this' => 1, 'not' => 5).perl
05:09 p6eval star 2010.07: OUTPUT«X.new(this => Any, not => Any)␤»
05:09 sorear 'not' => 5 is not a valid named argument
05:10 sorear star: \( foo => 5 ).perl.say
05:10 p6eval star 2010.07: OUTPUT«\("foo" => 5)␤»
05:10 sorear star: \( 'foo' => 5 ).perl.say
05:10 p6eval star 2010.07: OUTPUT«\("foo" => 5)␤»
05:10 sorear hmm.
05:10 ingy star: \( not => 5 ).perl.say
05:10 p6eval star 2010.07: OUTPUT«===SORRY!===␤You can't backslash that at line 22, near "( not => 5"␤»
05:11 ingy that's my point
05:11 sorear star: sub foo(*@x, *%y) { say "Pos: @x[]\nNam: %y{}" }; foo(bar => 2)
05:11 p6eval star 2010.07: OUTPUT«Pos: ␤Nam: 2␤»
05:11 sorear star: sub foo(*@x, *%y) { say "Pos: @x[]\nNam: %y{}" }; foo("bar" => 2)
05:11 p6eval star 2010.07: OUTPUT«Pos: bar    2␤Nam: ␤»
05:11 ingy >not< is messed up
05:11 ingy rakudo: \( not => 5 ).perl.say
05:11 p6eval rakudo 811c1c: OUTPUT«===SORRY!===␤You can't backslash that at line 22, near "( not => 5"␤»
05:12 sorear >not< is a predefined list operator
05:12 ingy well that sure sucks
05:13 ingy I can have a $.not
05:13 sorear star: sub foo(*@x, *%y) { say "Pos: @x[]\nNam: %y{}" }; foo(|("bar" => 2))
05:13 p6eval star 2010.07: OUTPUT«Pos: bar    2␤Nam: ␤»
05:13 sorear :/
05:13 sorear that's supposed to work too.
05:14 sorear .not is an Any method; overriding it with an attribute might not work very well, even without the named arg breakage
05:15 ingy that's kinda not very TimToady
05:17 ingy guess I'll have to use python tricks
05:17 ingy like not_
05:21 sorear there are plenty of ways to do it!  they just happen to all be broken.
05:31 Tene star: sub foo(*@x, *%y) { say "Pos: @x[]\nNam: %y{}" }; my %x = ('bar' => 2); foo(|%x);
05:31 p6eval star 2010.07: OUTPUT«Pos: ␤Nam: 2␤»
05:34 Tene So, that works.
05:37 sorear star: sub foo(*@x, *%y) { say "Pos: @x[]\nNam: %y{}" }; foo(|{"bar" => 2})
05:37 p6eval star 2010.07: OUTPUT«Pos: ␤Nam: 2␤»
05:41 kaare joined #perl6
05:43 John___ joined #perl6
05:45 drbean joined #perl6
05:45 Trashlord joined #perl6
05:46 jhuni joined #perl6
05:47 John___ what do to, here
05:47 John___ say: 39 3
05:48 John___ std: say 39 3
05:48 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/1Voea7yM7n line 1:␤------> [32msay 39 [33m⏏[31m3[0m␤    expecting any of:␤       bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 114m␤»
05:48 John___ std: say 39 + 3
05:48 p6eval std 31912: OUTPUT«ok 00:01 114m␤»
05:48 John___ hi all
05:49 sorear Hello.
05:50 John___ hello
05:51 snarkyboojum o/ #perl6
06:02 uniejo joined #perl6
06:02 ingy what is: Cannot resume dead coroutine.
06:06 moritz_ an error
06:06 moritz_ ingy: are you on an old rakudo?
06:06 sorear http://trac.parrot.org/parrot/ticket/1710
06:13 wtw joined #perl6
06:20 dalek niecza: e05ecc0 | sorear++ | Cursor.cs:
06:20 dalek niecza: Prototype of NFA execution engine
06:20 dalek niecza: review: http://github.com/sorear/niecza/commit/e​05ecc00a394db3b423d514a746a4d6f2da67f5d
06:20 dalek niecza: 052ee48 | sorear++ | Cursor.cs:
06:20 dalek niecza: Exit NFA engine once there are no states left
06:20 dalek niecza: review: http://github.com/sorear/niecza/commit/0​52ee4877e7574baffba508741514c320c711c95
06:20 sorear Is it just me, or has dalek gotten a great deal faster
06:32 drbean joined #perl6
06:43 dudulz joined #perl6
06:54 * moritz_ thinks sorear has gotten a great deal faster
07:09 lafille joined #perl6
07:11 foodoo joined #perl6
07:22 synth joined #perl6
07:23 JohnDoe365 joined #perl6
07:23 JohnDoe365 left #perl6
07:32 sorear ===SORRY!===
07:32 sorear syntax error ... somewhere
07:32 sorear uh. Is this automatically a bug?
07:38 mj41 joined #perl6
07:39 moritz_ yes
07:41 sorear rakudo: pir::nonexistant__P()
07:41 p6eval rakudo 811c1c: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P110')␤ in file 'EVAL_8' line 35222422␤===SORRY!===␤syntax error ... somewhere␤»
07:41 moritz_ well, pir:: stuff is non-spec
07:41 sorear so are error messages atm
07:51 mj41 joined #perl6
07:52 synth joined #perl6
07:57 moritz_ somebody found my blog by searching for 'perl 6 sigils make no sense' :-)
08:05 moritz_ rakudo: 'abc' ~~ /(.)+/; $/[0] := 'foo'; say $?
08:05 moritz_ rakudo: 'abc' ~~ /(.)+/; $/[0] := 'foo'; say $/
08:05 p6eval rakudo 811c1c: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$?"␤»
08:05 p6eval rakudo 811c1c: OUTPUT«abc␤»
08:06 moritz_ rakudo: 'abc' ~~ /(.)+/; $/[0] := 'foo'; say $0
08:06 p6eval rakudo 811c1c: OUTPUT«foo␤»
08:06 moritz_ rakudo: 'abc' ~~ /(.)+/; $/<alpha> := 'foo'; say $<alpha>
08:06 p6eval rakudo 811c1c: OUTPUT«␤»
08:08 moritz_ rakudo: 'abc' ~~ /(.)+/; $/[0] := 'foo'; say $/.perl
08:08 p6eval rakudo 811c1c: OUTPUT«Method '!_perl' not found for invocant of class 'Str'␤  in <anon> at line 6490:CORE.setting␤  in 'Match::!_perl_quant' at line 1␤  in <anon> at line 6463:CORE.setting␤  in <anon> at line 1␤  in 'List::Bool' at line 1␤  in 'prefix:<?>' at line 416:CORE.setting␤  in 'reducewith'
08:08 p6eval ..at l…
08:09 moritz_ rakudo: my $a = ("foo" ~~ /.+/); 'abc' ~~ /(.)+/; $/[0] := $a; say $/.perl
08:09 p6eval rakudo 811c1c: OUTPUT«Match.new(␤ from => 0,␤ orig => "abc",␤ to   => 3,␤ positional => [␤   Match.new(␤    from => 0,␤    orig => "foo",␤    to   => 3,␤   ),␤  ],␤)␤»
08:15 simcop2387 joined #perl6
08:15 Axius joined #perl6
08:15 Axius_ joined #perl6
08:22 wamba joined #perl6
08:23 cosimo joined #perl6
08:24 stepnem joined #perl6
08:25 shade_ joined #perl6
08:27 jnthn morning, #perl6
08:27 M_o_C joined #perl6
08:28 wamba left #perl6
08:28 moritz_ morning jnthn
08:32 sorear hello jnthn
08:33 thebird joined #perl6
08:45 dakkar joined #perl6
09:03 pugssvn r31975 | moritz++ | [spec] small markup fixes
09:08 daxim joined #perl6
09:18 bbkr joined #perl6
09:18 oyse joined #perl6
09:18 briang joined #perl6
09:18 tadzik joined #perl6
09:19 tadzik good morninh
09:19 sorear hello
09:19 moritz_ good morning-ish :-)
09:20 oyse Hi. I am considiring helping out with the blizkost project. Does anyone know if that project is actually doable. It seems mighty hard :)
09:20 c9s joined #perl6
09:20 briang left #perl6
09:20 moritz_ oyse: it can run real-world code right now... thought it often needs some workarounds
09:21 moritz_ oyse: for example Tim Bunce demonstrated a bridge to the p5 DBI at YAPC::EU
09:21 moritz_ so, any help would be greatly welcome
09:21 oyse moritz_: impressive!
09:21 moritz_ jnthn and sorear should be able to tell you more details - I've only followed the project as an observer so far
09:22 oyse moritz_: ok. thanks
09:23 sorear it's mostly usable if you just want to pass strings and callback functions across, and have ulimit -c 0 set
09:23 sorear I gave up in frustration trying to reconcile the Parrot view of aggregate data structures with Perl5 AV/HV
09:23 sorear so you'll need to marshal anything complicated through a sub
09:24 moritz_ wouldn't wrapping RPAs as AVs be a start?
09:25 oyse sorear: is reconciling these views possible given enough time or are they in some way mutually exclusive?
09:26 sorear oyse: no, parrot's data structure API needs to be burned at the stake and shot first
09:26 sorear fortunately, this is already ongoing
09:26 sorear I'll take another look at blizkost after lorito gets further
09:26 oyse BTW I have no knowledge of p5 guts or parrot guts, so very technical discussion will quickly go over my head
09:28 oyse sorear: so is it best to wait some time before making contributions to the project or is there some place I could start now?
09:28 redicaps left #perl6
09:29 sorear oyse: I think it would be very cool to have a Perl6-side module written which papers over the worse parts of the API
09:31 jnthn oyse: Another useful thing could be some basic docs/examples showing how Blizkost' is used from Rakudo.
09:31 jnthn Not sure we have any good docs on that yet.
09:31 sorear you could look at http://github.com/timbunce/DBDI/blo​b/1550bc4084b66e5b75f89235322157dc7​6fd65d5/DBDI/p5dbi/Connection.pm6 for inspiration
09:32 jnthn One area that I know is currently awkward is environment variables don't get passed on to the Perl 5 interpreter.
09:32 pugssvn r31976 | moritz++ | [S06] make MAIN short switches a bit saner
09:32 pugssvn r31976 |
09:32 pugssvn r31976 | The variable name of a parameter is purely an implementation detail
09:32 pugssvn r31976 | of the subroutine, and shouldn't be a concern while parsing command line
09:32 pugssvn r31976 | arguments. Instead rely on already existing alias syntax for named parameters.
09:33 jnthn Fixes for that would also be excellent (even read-only would be a good step forward).
09:34 sorear Another thing I've been meaning to prototype is an out-of-process blizkost
09:34 moritz_ patrickas++ # telling me about the spec insanity that I just got rid of
09:34 sorear Use sockets to communicate with /usr/bin/perl, instead of trying to load libperl.so
09:34 moritz_ damn, and I forgot to update the last-changed-date and version numb
09:35 moritz_ do we still need those? that's what version control systems are for, no?
09:35 oyse So there are apparently plenty of things do :) I will clone the repos and start looking at it soon. Thanks for the feedback!
09:36 sorear Yes, it would hurt performance a bit, but 1. it would get us out of Perl5 binary compatability hell 2. It would eliminate the need to even *have* a libperl.so (they aren't created by default builds of Perl 5, and requiring a custom build for Blizkost really, really sucks) 3. It would probably fix the global destruction segfaults
09:37 moritz_ oyse: feel free to troll jnthn for a commit bit to the blizkost repo :-)
09:39 * sorear can't wait for i386 to die
09:40 snearch joined #perl6
09:45 sorear Incidentally, I'm now using the two-process Perl embedding trick to attach a Perl interpreter to the CLR
09:46 sorear This is the main reason I switched from Makefiles to the Microsoft.Build XML abomination
09:46 sorear (for niecza)
09:47 sorear I have a small extension thingy which keeps a persistant Perl interpreter around, so I only have to load STD.pmc once
09:54 meppl joined #perl6
09:55 sorear rakudo: say "foobarx" ~~ / [ foo | foobar ]: x /
09:55 p6eval rakudo 811c1c: OUTPUT«foobarx␤»
09:56 sorear rakudo: say "foobarx" ~~ / [ f.o | f.obar ]: x /
09:56 p6eval rakudo 811c1c: OUTPUT«foobarx␤»
09:56 sorear rakudo: say "foobarx" ~~ / [ foobar | foo ]: x /
09:56 p6eval rakudo 811c1c: OUTPUT«foobarx␤»
09:56 sorear rakudo: say "foobarx" ~~ / [ f.obar | f.o ]: x /
09:56 p6eval rakudo 811c1c: OUTPUT«foobarx␤»
09:57 cjk101010 joined #perl6
09:57 cono rakudo: my @i = <1 2 3>; @i[1..*].perl.say
09:57 sorear rakudo: say "ooox" ~~ / [ o* ]: ox /
09:57 p6eval rakudo 811c1c: OUTPUT«(timeout)»
09:57 p6eval rakudo 811c1c: OUTPUT«ooox␤»
09:57 sorear oh, backtracking control is just broken
09:57 * sorear was about to ask when LTM snuck in
09:58 moritz_ rakudo: say 'aaaab' ~~ /a+: ab/
09:58 p6eval rakudo 811c1c: OUTPUT«␤»
09:58 sorear I guess it doesn't work if there's a [] in the way
09:58 moritz_ sorear: I think backtracking control works for subrules, and for non-backtracking quantifiers, not free :
09:59 sorear anyway I now have reallly basic LTM working in niecza
09:59 sorear I think
10:00 sorear the tracing output looks sane but I can't robustly test it without other features
10:00 Italian_Plumber joined #perl6
10:00 sorear like embedded blocks
10:00 moritz_ btw does STD.pm6 use a DFA under the hood?
10:00 sorear sort of
10:01 sorear it was far too slow to start when I had it using a straight DFA generator
10:01 dalek niecza: cd7f153 | sorear++ |  (8 files):
10:01 dalek niecza: Hook up LTM engine to regex processing
10:01 dalek niecza: review: http://github.com/sorear/niecza/commit/c​d7f1531f02876182a2853867b34ac9cf4406d97
10:01 sorear so I made it lazy - only the DFA nodes that are actually used are generated
10:02 moritz_ sounds sane-ish
10:02 moritz_ how does it handle backtracking? I mean when the rule with the long prefix fails later on?
10:03 cono rakudo: my @i = <1 2 3>; @i[0..*-1].perl.say
10:03 p6eval rakudo 811c1c: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode'␤  in 'Cool::Numeric' at line 1745:CORE.setting␤  in 'Cool::Numeric' at line 1746:CORE.setting␤  in 'infix:<==>' at line 6574:CORE.setting␤  in 'Range::iterator' at line 4550:CORE.setting␤  in 'Any::postcircumfix:<[
10:03 p6eval ..]>' at …
10:03 moritz_ 'aabaa' ~~ / [ .* :: <!> ] | a+ /
10:04 sorear every iteration of the DFA loop, all of the corresponding branches are pushed onto a stack
10:04 cono 0 .. *-1 are not working?
10:04 sorear at the end of the loop, the stack is inverted, duplicates are pruned, and the resulting list is used for normal || style backtracking
10:04 moritz_ cono: no.. infix:<..> should curry over WhateverCode, but not Whatever - that's NYI
10:04 moritz_ sorear: ok, thanks.
10:05 cono moritz_: ok, thanks
10:06 sorear previously, it worked by actually matching all declarative prefixes against the current string, one at a time, and then using the branches in reverse length order
10:07 sorear declarative prefixes can always be translated into perl5 syntax; this may not be a coincidence
10:07 sorear the old LTM engine used p5regex to not be intolerably slow
10:07 Axius joined #perl6
10:07 moritz_ well, declarative prefixes are what the computer scientist call "regular expressions"
10:07 moritz_ no wonder p5 can handle those :-)
10:08 szabgab how can I read a file line by line without autochomp?
10:09 szabgab or shall I use lines and put the \n back?
10:09 moritz_ szabgab: there's a flag to open() that prevents chomping, but it's NYI in rakudo
10:09 szabgab ty
10:10 sorear how does autochomp interact with a lack of trailing \n?
10:10 mathw the same way chomp does
10:10 sorear next on the agenda is to get <foo> in LTM branches working
10:11 sorear it needs to hook into the MOP to get a copy of foo's declarative prefix
10:11 sorear after that protoregexes should be pretty easy
10:11 moritz_ can't you just inspect the (abstract) syntax tree of the regex to get the declarative prefix?
10:13 sorear <foo> isn't bound at compile time, due to regex subclassing and the possibility of overriding
10:13 sorear s/regex/grammar/
10:13 moritz_ ah, right
10:14 sorear another possibility is to add a $.prefix to class Regex
10:14 * sorear wonders if that can be made to work
10:18 Axius joined #perl6
10:24 Axius joined #perl6
10:28 rokoteko star: class X { has $.this; has $.not; }; say X.new(:this(1), :not(5)).perl # ingy
10:28 p6eval star 2010.07: OUTPUT«X.new(this => 1, not => 5)␤»
10:31 sorear rokoteko++
10:35 sorear wait, sprixel was moritz_'s?
10:37 moritz_ no, diakopter's
10:39 Axius joined #perl6
10:39 * sorear saw it advertized on perlgeek.de and wondered
10:43 patrickas joined #perl6
10:46 rokoteko star: multi sub foo () {}; multi sub foo ($x) {}; multi sub foo ($x, $y){}; multi sub foo (@x) {}; multi sub foo (Str $x, Int $y) {}; &foo.push(sub (Int $x, Str $y) {}); say .signature.perl for &foo.candidates
10:46 p6eval star 2010.07: OUTPUT«:()␤:(Any $x)␤:(Any $x, Any $y)␤:(@x)␤:(Str $x, Int $y)␤:(Int $x, Str $y)␤»
10:50 rokoteko star: multi sub foo () {}; multi sub foo ($x) {}; multi sub foo ($x, $y){}; multi sub foo (@x) {}; multi sub foo (Int $x, Str $y) {}; &foo.push(sub (Int $x, Str $y) {}); say .signature.perl for &foo.candidates
10:50 p6eval star 2010.07: OUTPUT«:()␤:(Any $x)␤:(Any $x, Any $y)␤:(@x)␤:(Int $x, Str $y)␤:(Int $x, Str $y)␤»
10:51 rokoteko star: multi sub foo ($x, $y) {}; multi sub foo (@x) {}; multi sub foo (Int $x, Str $y) { "1: $x, $y" }; &foo.push(sub (Int $x, Str $y) { "2: $x, $y" }); foo(42, "bar").say
10:51 p6eval star 2010.07: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Int $x, Str $y)␤:(Int $x, Str $y)␤␤  in main program body at line 22:/tmp/FRuC8JfiU7␤»
10:54 tadzik joined #perl6
10:54 tadzik hello again
10:55 sorear hello
10:55 cono tadzik: hey
10:58 Italian_Plumber joined #perl6
11:06 azert0x joined #perl6
11:07 azert0x joined #perl6
11:11 wamba joined #perl6
11:15 masak joined #perl6
11:15 rokoteko How am I supposed to use the Failure object? This is bit confusing:
11:15 rokoteko star: sub foo { fail('I was born to fail..'); }; try { foo(); }; say $!.WHAT ~ "/" ~ $!.perl ~ "/" ~ ~$!
11:15 p6eval star 2010.07: OUTPUT«␤  in main program body at line 1␤»
11:15 rokoteko star: sub foo { fail('I was born to fail..'); }; my $x = foo(); say $x.WHAT ~ "/" ~ $x.perl ~ "/" ~ ~$x
11:15 p6eval star 2010.07: OUTPUT«I was born to fail..␤  in main program body at line 1␤»
11:16 masak rokoteko: the failure object is returned from foo()
11:16 masak no need for a try {} block, because a failure object doesn't throw an exception.
11:17 rokoteko Ahh!
11:17 rokoteko star: sub foo { die('I was born to fail..'); }; my $x = foo(); say $x.WHAT ~ "/" ~ $x.perl ~ "/" ~ ~$x
11:17 p6eval star 2010.07: OUTPUT«I was born to fail..␤  in 'foo' at line 22:/tmp/m6mBaSlJNS␤  in main program body at line 22:/tmp/m6mBaSlJNS␤»
11:17 rokoteko star: sub foo { die('I was born to fail..'); }; try { foo(); }; say $!.WHAT ~ "/" ~ $!.perl ~ "/" ~ ~$!
11:17 p6eval star 2010.07: OUTPUT«Exception()/undef/I was born to fail..␤»
11:17 rokoteko masak++: thank you :)
11:17 * masak bows
11:19 envi^home joined #perl6
11:20 rokoteko 14:15 < rokoteko> star: sub foo { fail('I was born to fail..'); }; my $x = foo(); say $x.WHAT ~ "/" ~ $x.perl ~ "/" ~ ~$x
11:20 rokoteko isnt the output wrong?
11:21 rokoteko I expected something like 'Failure()/I was born to fail../I was born to fail..' but it seems to die, or does it?
11:23 Axius joined #perl6
11:23 masak so, a Failure object throws an exception when you inspect it.
11:23 masak rakudo: sub foo { fail "ouch!" }; my $x = foo; say "alive"; say $x + 2
11:23 p6eval rakudo 811c1c: OUTPUT«alive␤Method 'Bridge' not found for invocant of class 'Failure'␤  in 'infix:<+>' at line 3417:CORE.setting␤  in main program body at line 22:/tmp/cKcz0h7ekN␤»
11:24 masak heh.
11:24 masak rakudo: sub foo { fail "ouch!" }; my $x = foo; say "alive"; say $x
11:24 p6eval rakudo 811c1c: OUTPUT«alive␤»
11:24 masak hm.
11:24 rokoteko rakudo: sub foo { fail "ouch!" }; my $x = foo; ~$x; say "alive"; say $x
11:24 p6eval rakudo 811c1c: OUTPUT«ouch!␤  in main program body at line 1␤»
11:24 masak yes. there you go.
11:24 masak don't know why doing 'say $x' prints nothing. that seems suspect to me.
11:25 masak but we already know we have some fishy CATCH-ing going on inside &say
11:26 rokoteko So fail() causes a soft error but when you inspect the Failure() object you should wrap it inside a try {} ?
11:30 rokoteko rakudo: sub foo ($x) { fail "[$x] ouch!" }; foo($_) for 1..2; say "alive"; say .WHAT for $!.pending  # NYI ?
11:30 masak rokoteko: aye.
11:30 p6eval rakudo 811c1c: OUTPUT«alive␤Method 'pending' not found for invocant of class ''␤  in main program body at line 22:/tmp/oKmjQdqN9h␤»
11:30 masak rokoteko: no, I don't think $!.pending is implemented.
11:31 masak and I doubt a fail() would put something there anyway.
11:32 rokoteko masak: what puts them in $! then? or is S04 Exceptions chapter just getting old?
11:32 rokoteko probably I dont get something again. :) heh.
11:32 masak not old as much as never fully tried by an implementation.
11:33 pmichaud good morning, #perl6
11:33 moritz_ good morning
11:33 cono morning
11:33 tadzik good morning
11:33 moritz_ rakudo never had a good exception model
11:33 jnthn morning, pmichaud
11:33 rokoteko masak: ok. thanks again. :)
11:33 masak rokoteko: I'll stop guessing how it should behave, since it's been a while since I read that part of S04. :)
11:33 moritz_ Tene++ worked on it a bit, but got side-tracked
11:33 pmichaud I've always found exceptions in S04 to be slightly underspecced.  Or there's a piece that isn't clear to the typical reader (myself included)
11:34 rokoteko masak: my knowledge is not that old yet. Im only at S07 so S04 wasnt that long time ago. :)
11:38 pmichaud &say shouldn't have any CATCH-ing going on
11:38 pmichaud so something else must be happening there.
11:38 masak I'm sure that one's in RT.
11:39 pmichaud oops, time to board
11:39 pmichaud (about to take yet another flight)
11:39 pmichaud bbl
11:39 tadzik joined #perl6
11:39 masak not saying &say actually does CATCH-ing. it just very much looks that way.
11:43 masak RT queue is at 666. o.O
11:43 Intensity joined #perl6
11:43 rokoteko on Friday the 13th?
11:44 masak those two things probably cancel each other out, though. so no worries.
11:44 kaare_ Perl 666?
11:50 masak kaare_: "In fact, we probably wouldn't end up converging on a version number of 2*PI as the RFC suggests, but rather on 6.6.6, which would be rather unfortunate." -- Larry Wall, Apocalypse 1
11:50 tadzik having a bug as a logo is quite unfortunate too, imho
11:51 masak nevertheless, the people who like it keep being in a majority.
11:51 masak the opponents are just louder so far.
11:51 tadzik I won't say I'm an opponent
11:52 masak it's worth noting that many of the people who like it are women, children, or open-minded. :)
11:53 nine joined #perl6
11:56 nine I've put up a little graph of daily rakudo relative spec test runtime: http://niner.name/rakudo/benchmarks.png
11:56 TiMBuS masak, where is this majority? everyone i asked about it said some pretty mean stuff =/
11:56 TiMBuS and i only asked perl coders
11:56 nine I'm planning to extend it to show graphs for individual test files as well
11:56 kaare_ Perhaps you should ask the open-minded people instead ;-)
11:57 jnthn nine: Nice!
11:57 moritz_ nine++
11:58 masak TiMBuS: I see some of the positive things being said here on-channel, and some on Twitter. things that people have been doing IRL, e.g. at YAPC::EU, also indicate support for the mascot.
11:58 nine In case you wonder: if the modification date of a test file changed since the last script run, the new value is taken as 1, so changes in the tests themselves should not skew results.
11:59 moritz_ TiMBuS: I wore a camelia shirt at YAPC::EU. Somebody whom I've never head of told me he liked it, and thought that other programming language logos are too abstract
12:00 moritz_ nine: where 1 means "same as before"? or "same as the initial value"?
12:01 moritz_ and where is the code? :-)
12:02 tadzik moritz_: directory upwards
12:02 nine moritz_: 1 means, new starting value. The bars are the cummulated relative time. Values like 1, 2, 0.5 will print the third bar the same size as the first, so you can see performance development over time.
12:03 tadzik nine: how about one displaying just bars with time in seconds, for mere mortals? :)
12:04 nine tadzik: that would not work, since the raw seconds are not comparable. If tests get added to a test file, the seconds would go up even if rakudo's performance did not change.
12:04 nine tadzik: also you are simply not interested in the total runtime of the test suite, but if performance got better or worse
12:05 tadzik right
12:06 takadonet morning all
12:06 moritz_ nine++ put a fair amount of thinking into the system, it seems
12:06 tadzik nine++ indeed
12:06 nine Will be interesting to see, if rakudo's performance changes more than simple fluctuations of test run time. But it's certainly worth a try :)
12:07 * jnthn for one really appreciates having this kind of data
12:08 nine moritz_: idea came after a little discussion with pmichaud at YAPC::EU, the rest was just a little pondering.
12:09 nine moritz_: where can I push the commit with my scripts to?
12:10 moritz_ nine: easiest would be pugs repository (into misc/bench/ or so)... do you have a commit bit?
12:10 nine moritz_: not yet
12:11 moritz_ nine: then please /msg me your email address, and desired nickname
12:11 moritz_ nine: invitation email sent (you might have to remove the port number from the confirmation URL)
12:12 moritz_ nine: it's a custom to add youself to AUTHORS in the first commit
12:13 moritz_ (repo is at http://svn.pugscode.org/pugs/ )
12:13 nine If it's a custom, I'll be happy to conform :)
12:25 isBEKaml joined #perl6
12:28 ruoso joined #perl6
12:30 tadzik jnthn: might organizing LOLSQL directory structure a bit, so it can be proto/pls/neutro friendly?
12:30 jnthn tadzik: Could do... ;-)
12:30 masak tadzik++
12:30 jnthn tadzik: Want a commit bit? :-)
12:31 masak of course he does :)
12:31 jnthn hugme: add tadzik to lolsql
12:31 hugme jnthn: You need to register with freenode first
12:31 jnthn ffs
12:31 tadzik jnthn: just fix the dirs :)
12:31 tadzik I don't think I'll be extending LOLSQL much :)
12:31 tadzik masak: how about bin/ in proto and pun?
12:32 tadzik masak: and tardis
12:32 jnthn hugme: add tadzik to lolsql
12:32 hugme jnthn: sorry, I don't know anything about project 'lolsql'
12:32 jnthn eek
12:32 tadzik :>
12:32 masak hugme: you could have said that before asking jnthn to register! :P
12:32 tadzik jnthn: I can fork you and request pull ever after, the git-way, you know :)
12:32 masak tadzik: will get to those eventually. probably not today. bug me if I forget.
12:32 pugssvn r31977 | nine++ | Add scripts for graphing relative spec test suite performance.
12:33 jnthn tadzik: no no, you can haz commit bit
12:33 masak tadzik: you seem like the perfect person to help me get pls production-ready. I like your eye for detail.
12:33 nine moritz_: Committed revision 31977.
12:33 * jnthn issues
12:33 jnthn tadzik: Be gud kitteh
12:34 tadzik masak: I'm actually fixing neutro, but it doesn't matter much in this case. Actually, I'm trying to make the modules from modules.perl6.org more standari^Wproto/pls/neutro friendly
12:34 moritz_ masak: in fact, hugme can't, because the nick can be other than the freenode registration
12:34 moritz_ s/other/different/
12:35 isBEKaml hugme: hug hugme
12:35 * hugme hugs hugme
12:35 masak tadzik: that's excellent.
12:36 masak tadzik: start by fixing neutro, and when you're done with that, I'll enchant you with the pls vision. :P
12:36 szabgab rakudo: my $x; BEGIN { $x++ }
12:36 p6eval rakudo 811c1c: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous> (/tmp/Qcrg7rI4ap:22)␤»
12:36 szabgab rakudo: my $x; CHECK { $x++ }
12:36 p6eval rakudo 811c1c: OUTPUT«===SORRY!===␤Null PMC access in find_method('clone')␤»
12:36 masak I believe that one's RT'd.
12:36 isBEKaml what's neutro? portable build engine?
12:37 isBEKaml for whatever flexible definition of portable that it offers, :)
12:37 masak szabgab: S04:1778: "Some closures produce C<Block> objects at compile time that cannot be cloned, because they're not attached to any runtime code that can actually clone them.  C<BEGIN>, C<CHECK>, C<INIT>, and C<END> blocks fall into this category.  Therefore you can't reliably refer to run-time variables from these closures even if they appear to be in the scope."
12:37 masak szabgab: the implications of that quote suck, and I don't understand why it has to be so yet.
12:38 moritz_ that's the fun section from S04, right? :-)
12:38 szabgab grrr
12:38 isBEKaml the -j3 fun section, I guess. :)
12:39 tadzik isBEKaml: it's just a working module installer :)
12:39 tadzik isBEKaml: I couldn't wait for pls :)
12:39 szabgab I used to count my tests in blocks and add them to $plan in BEGIN {}s
12:39 moritz_ what about plan *; ...; done_testing; ?
12:40 szabgab I like to have a fixed plan
12:40 szabgab subtests
12:40 isBEKaml tadzik: wow, that's great! :-)
12:40 szabgab hierarchic tests
12:40 masak moritz_: yes, that's the fun section...
12:41 tadzik isBEKaml: I'm glad you like it :)
12:41 masak szabgab: without access to variables in those blocks, those blocks are much less useful, IMHO.
12:42 tom_tsuruhara joined #perl6
12:42 szabgab is Twitter@namidum around ?
12:43 szabgab Twitter@nomadium if I could copy
12:43 isBEKaml tadzik: I'll invariably get around to trying things out. if anything, this channel gives me new stuff everyday. (-:
12:44 tadzik :)
12:44 masak writing twitter user account names like that makes them look like backwards email addresses...
12:44 szabgab I am just reading a book about branding where they show case Red Bull
12:44 szabgab I wonder if #perl6 is the new Red Bull?
12:45 moritz_ use namidum:auth<twitter>; # better masak?
12:45 masak moritz_: \o/
12:45 masak szabgab: tell me, do Red Bull intentionally produce animated commercials that make me never want to buy their product?
12:46 masak szabgab: seriously, that's some of the worst commercials out there.
12:46 masak on par with dubbed german commercials about polishing agents.
12:46 szabgab I like their commercials
12:46 * kaare_ will follow F1 when #perl6 can compete there.
12:46 szabgab but never tried their product :)
12:47 szabgab kaare_: we agreed that speed was not an objective for rakudo *
12:47 masak szabgab: we must have watched different ones.
12:47 kaare_ szabgab: hehe.
12:47 * moritz_ finds some of the red bull ads amusing, but not good
12:48 * moritz_ hopes Perl 6 will be both good *and* amusing
12:48 kaare_ "Rakudo - when your bicycle seems scaringly fast"
12:48 [Coke] left #perl6
12:49 * baest wonders if Perl 6 will sponsor two formula one teams
12:49 moritz_ the rakudo and niecza teams?
12:50 baest :) I think we need bigger budgets then
12:50 kaare_ Better start at the other end methinks. A turtle competition, perhaps?
12:51 szabgab how was that ad  "Good, Better, Gosser"
12:51 szabgab "Slow, Slower,*"
12:52 tadzik jnthn: OH NOES I NO CAN FIXES LOLSQL
12:52 hanekomu joined #perl6
12:52 jnthn OMGZ!
12:52 tadzik jnthn: Maximum recursion depth exceeded
12:52 tadzik jnthn: WAT DO?
12:53 jnthn tadzik: I writed it for alpha...
12:53 tadzik oh
12:53 jnthn Maybe is haz a fail on master these days
12:53 jnthn :-(
12:53 tadzik I has fixed a few old things, undef, :action
12:54 tadzik but noes, it aren't working
12:55 moritz_ rakudo: grammar A { }; A.parse('', :action(1))
12:55 p6eval rakudo 811c1c: OUTPUT«:action has been renamed to :actions in the Grammar.parse method␤  in 'Grammar::parse' at line 5710:CORE.setting␤  in main program body at line 22:/tmp/RLiCoBnC6w␤»
12:56 [particle] TEH KITTIEZ HAZ SAD :(
12:56 jnthn LOL HALP
12:56 moritz_ at least there's an obvious error message
12:56 tadzik moritz_: this one is fixed
12:57 Axius joined #perl6
13:02 macroron joined #perl6
13:06 tadzik (a..b).pick is the common idiom for getting a random number from between a and b. It, however, instanciates two objects in the process, which makes it blazingly slow. It could be translated to (b - a + 1).rand + a. Can it be done in compile time, to avoid the performance kick?
13:07 masak sure.
13:08 tadzik how to implement this? A macro?
13:08 masak a "step" in an optimizer somewhere.
13:08 masak consisting of an AST matcher and a transformation rule, probably.
13:09 * tadzik panics
13:09 masak disclaimer: I don't actually know this stuff. I only sound like I do.
13:09 colomon umm... why not just define pick on (a..b)?
13:10 masak that's not a bad idea.
13:10 colomon if you do that, no compiler magic is needed.
13:10 colomon would need a good batch more spectests to feel confident we got it right.
13:11 colomon btw, assuming you don't mean (a..b) literally, it probably creates a lot more than two objects.
13:12 tadzik I counted two
13:12 tadzik a Range, and the Array in pick implementation
13:12 tadzik my case was getting a random number in a loop. At first, it took 8 seconds for the program
13:12 colomon creating that Array requires creating an object for every element in it.
13:12 tadzik after changing (1..100).pick to 100.rand + 1 it became around 2 secs
13:12 colomon plus more for the iterator that generates the Array
13:13 tadzik when I moved the range outside the loop and just did @ar.pick, it became around 4
13:13 drbean joined #perl6
13:13 colomon star: say 100.rand
13:13 p6eval star 2010.07: OUTPUT«69.9741355233954␤»
13:14 tadzik http://wklej.org/id/376223/
13:15 perlygatekeeper left #perl6
13:15 bluescreen joined #perl6
13:15 tadzik colomon: so how to easily translate this in Rakudo?
13:15 tadzik I can try to do it with someone holding me hand ;)
13:15 PerlJam good morning all
13:15 takadonet PerlJam: morning
13:16 tadzik good morning PerlJam
13:17 PerlJam tadzik: you're going to optimize Range.pick today?
13:17 tadzik PerlJam: why not, if I'll handle
13:17 PerlJam tadzik++
13:17 imarcusthis joined #perl6
13:18 tadzik PerlJam: (a..b).pick is basically (b - a + 1).rand + a, isn't it?
13:18 tadzik If I figured it out right
13:18 PerlJam aye
13:18 tadzik or rather rand.Int
13:18 colomon tadzik: just for kicks, try your test using pick(1) instead of just pick.
13:18 bbkr joined #perl6
13:18 moritz_ module the min-exclusive / max-exclusive
13:18 colomon ah, never mind, I see the special case now
13:18 colomon moritz_: right, which is why good tests are needed.
13:19 tadzik { (a..b).pick; } is the special case. The common idiom
13:19 colomon and testing random number generators is a pain
13:19 tadzik well, we should probably prove it correct
13:20 rcfox rakudo: say (10..-10).pick;
13:20 p6eval rakudo 811c1c: OUTPUT«Any()␤»
13:20 colomon :\
13:20 colomon rakudo: say ().pick\
13:20 rcfox rakudo: say ~(3..-3);
13:21 p6eval rakudo 811c1c: OUTPUT«===SORRY!===␤Confused at line 22, near "say ().pic"␤»
13:21 p6eval rakudo 811c1c: OUTPUT«␤»
13:21 colomon rakudo: say ().pick
13:21 p6eval rakudo 811c1c: OUTPUT«Any()␤»
13:21 rcfox rakudo: say ~(3..0);
13:21 p6eval rakudo 811c1c: OUTPUT«␤»
13:21 colomon ah, it's returning (10..-10)[0], which is Any
13:25 Mowah joined #perl6
13:31 colomon tadzik: looks to me like the trick is figuring out how exactly how many elements the Range should have in it, factoring in exclude min and exclude max.
13:32 colomon then just call $elems.rand.floor and add it to the first element
13:32 colomon if the pick is asking for more than one element and is not replace, just pass on the call to Any.pick.
13:33 colomon ditto if the Range's first element is non-Numeric
13:34 Axius_ joined #perl6
13:35 Holy_Cow joined #perl6
13:35 PerlJam It seems to me for non-Numeric Ranges, figuring out how many elements the Range should have is not-so-easy.
13:36 colomon PerlJam: for many non-Numeric ranges, current implementation is broken anyway.
13:37 tadzik colomon: that's almost exactly what I did
13:38 tadzik isn't it?
13:38 colomon you left off the .floor, I think.
13:38 colomon but yes, that's what you did by hand.
13:38 colomon the trick is successfully handling all the edge cases.
13:39 colomon btw, Any.pick is ripe for optimization as well, it's not particularly smart ATM.
13:39 PerlJam .floor should only be called if $.min ~~ Int and $.max ~~ Int   :-)
13:39 Axius joined #perl6
13:40 PerlJam well, I guess it's only if $.min ~~ Int
13:42 tadzik masak: what's the best way you found to figure out whether a module is installed or not?
13:42 javs joined #perl6
13:43 masak tadzik: keep a list of module states.
13:43 colomon PerlJam: no, .floor always needs to be called.
13:43 masak cf poc-projects.state
13:44 colomon but you have to add in the min number AFTER the call to floor.
13:44 colomon ie $least + $elems.rand.floor, not ($least + $elems.rand).floor
13:45 PerlJam oh!  you're correct of course
13:45 finanalyst joined #perl6
13:45 PerlJam (I was mis-remembering how non-Numeric ranges work)
13:45 PerlJam er, non-Int ranges
13:46 colomon right, I'm not even sure it's possible to create a general shortcut for non-Numeric ranges.
13:49 finanalyst masak: just found list of modules and explanation on modules.perl6.org . How was the page generated?
13:50 colomon finanalyst: that page is automagically generated from the list of modules in the proto/pls repo on github.
13:51 tom_tsuruhara joined #perl6
13:51 finanalyst colomon: thanx. is there somewhere that explains how pls is/will be different from proto?
13:52 colomon not that I know of.
13:52 tadzik finanalyst: you may want to try neutro, before pls is there :)
13:53 colomon neutro?
13:53 tadzik yep, my module installer. It works
13:53 colomon unlike pls, last time I tried it.
13:53 tadzik that's why I wrote it
13:53 finanalyst where is neutro?
13:54 finanalyst not on proto module list
13:54 tadzik finanalyst: on git, as usual
13:54 tadzik http://github.com/tadzik/neutro
13:56 tadzik beware, the current tip depends on ufo, I'm fixing it right now
13:58 * masak considers tadzik++'s neutro to be the system's routing-around his own slackness with finishing pls
13:59 tadzik masak: I failed to understand this. What do you mean?
13:59 masak tadzik: basically, I've been planning to finished, but not actually finished pls for a long time now.
13:59 masak tadzik: and proto doesn't really work.
14:00 masak tadzik: and there's still an everyday need for a modules installer.
14:00 masak tadzik: I consider your project to be a natural response to that need, in the absence of something happening in the pls world.
14:00 masak s/to finished/to finish/
14:02 finanalyst masak: I just looked at the script that generates module information. Am I right in thinking on git based modules are supported?
14:02 masak finanalyst: in proto? in pls?
14:02 masak oh, in the generator script?
14:02 finanalyst the generator script
14:02 pmurias joined #perl6
14:02 pmurias ruoso: hi
14:02 masak finanalyst: github, and sometimes gitorious, I think.
14:03 masak finanalyst: we used to have an svn repo, but not any more.
14:03 colomon ./neutro i Math::Vector
14:03 colomon ==> Cloning Math::Vector
14:03 colomon fatal: destination directory '.' already exists.
14:03 colomon Failed cloning the repo!
14:03 finanalyst masak: i suggested a tool for collecting information about modules based on the proto list, and was going to implement this weekend
14:03 tadzik oh
14:04 tadzik colomon: it's linux, right?
14:04 finanalyst masak: but it seems its already been done
14:04 colomon tadzik: os x
14:04 masak finanalyst: I missed when you suggested that. :/
14:04 tadzik colomon: hmm
14:04 tadzik colomon: that is a good opportunty to make it a bit more portable
14:04 masak finanalyst: don't worry, there are still many worthy tasks that need doing.
14:05 finanalyst masak: i was thinking of using data from a META file in the module directory, not from github info
14:05 colomon oh, wonder if mkdirp is the problem?
14:05 masak finanalyst: anything that floats your boat, I guess.
14:05 tadzik colomon: I thought it's working, but File::Tools uses the moritz_++ implementation. Give me a sec
14:05 plainhao joined #perl6
14:06 tadzik colomon: could you show me the directory tree of your ~/.neutro?
14:06 finanalyst masak: how does pls differ from proto?
14:06 colomon looks like ~/.neutro has modules.list and src
14:07 tadzik colomon: anything in src?
14:07 colomon src has empty Math::Vector directory
14:07 tadzik colomon: permissions?
14:07 masak finanalyst: it's a complete rewrite. it corrects all I learned from starting and helping to maintain proto.
14:07 masak finanalyst: it has tests.
14:08 pugssvn r31978 | pmurias++ | [mildew] fix warning
14:08 masak finanalyst: its central classes can be used without the script, for example to install things batch-wise on a server.
14:08 colomon tadzik: modules.list is -rw-r--r--, others are drwxr-xr-x
14:08 pugssvn r31979 | pmurias++ | [mildew] use LD_RUN_PATH to insert the paths to the runtime libs into executables
14:08 pugssvn r31980 | pmurias++ | [Mildew-Setting-SMOP] run some Perl 6 tests
14:08 tadzik looks ok. Hold on a second
14:08 masak finanalyst: it's extensible in directions that I haven't yet predicted.
14:08 finanalyst masak: why is it in perl5 ?
14:09 masak finanalyst: it's not.
14:09 masak what is it you're looking at? :)
14:10 finanalyst masak: my mistake. sorry
14:11 tadzik colomon: could you try this neutro: http://wklej.org/id/376263/ ? Please also remove existing ~/.neutro
14:13 finanalyst masak: can i help with pls?
14:13 moritz_ 1) test it.
14:13 moritz_ 2) report any errors
14:13 moritz_ 3) fix any errors
14:14 tadzik colomon: oh wait, it doesn't work on linux either
14:14 colomon tadzik: was going to try that next.  ;)
14:15 colomon tadzik: your patch makes it work for me on os x
14:15 colomon errr... or at least, it thinks it works
14:15 tadzik colomon: but there is another bug. Thanks for testing though
14:15 tadzik now I have some failing tests for Math::Vector
14:16 tadzik while there shouldn't be any
14:16 colomon it doesn't even find Math::Vector tests here
14:16 colomon and it doesn't seem to install correctly, either.
14:17 tadzik oh
14:17 tadzik well, the main slogan is a line now :(
14:17 tadzik * lie
14:17 tadzik gimme a second, I fscked to many things at once I think
14:17 colomon http://wklej.org/id/376271/
14:17 masak finanalyst: what moritz_++ said.
14:18 masak finanalyst: basically, it's been tested for installing one or two projects on one platform, and it needs more testing like that.
14:19 finanalyst masak: it doesnt have its own README, so I assume that repeats proto's README?
14:19 finanalyst masak: s/it/pls/
14:19 masak finanalyst: as a first approximation, yes.
14:19 masak finanalyst: I haven't looked closely enough at the documentation to know what to copy and what to re-write.
14:19 tadzik colomon: http://wklej.org/id/376273/ try this one please, it should fail on the testing stage
14:19 masak but copying is better than nothing, I guess.
14:20 finanalyst masak: except that if its in perl6, it cant install perl6
14:20 masak finanalyst: right. pls doesn't install Parrot/Rakudo like proto did.
14:21 masak instead, it directs you to perl6.org or rakudo.org or something.
14:21 masak or is supposed to, rather.
14:21 plobsing joined #perl6
14:22 Axius joined #perl6
14:22 finanalyst masak: will study and come back with questions.
14:22 finanalyst left #perl6
14:22 masak finanalyst++
14:24 colomon tadzik: that one looks like it is actually trying to build, then hitting other problems.
14:24 colomon you're using ufo, right?
14:25 tadzik colomon: yep. system ufo when available, inlined when not
14:25 tadzik hmm, but I think there's something else
14:26 tadzik that's rather a rakudo bug :)
14:26 colomon hmmm... system ufo?
14:26 tadzik http://wklej.org/id/376278/
14:26 tadzik looks like :: in PERL6LIB confuses Rakudo, hence the whole thing fails
14:26 * tadzik works around
14:26 colomon tadzik: there shouldn't be a :: there, should there?
14:27 tadzik colomon: well, that's how the directory's named
14:27 colomon Math::Vector should install to Math/Vector
14:27 tadzik install, yes
14:27 colomon ah
14:27 tadzik but the sources are downloaded to .neutro/src/Math::Vector
14:27 moritz_ well, : is the PATH separator on unixish systems
14:27 tadzik ah, that explains a lot
14:27 moritz_ so it treats Math::Vector as Math, an empty string, Vector
14:28 colomon ah, actually the problem I just bumped into is that your inlined ufo tries to call perl6, when I need it to call ~/tools/rakudo/perl6
14:28 colomon so if I have ufo available and customized, that should start working....
14:29 tadzik my inline ufo is just a copypasted ufo source, with MAIN changed to ufo-inline
14:29 TiMBuS I'm using petdance's syntax highlighter for perl6, and I've updated my system to recognise perl6 files as their own mimetype. is there a way to set vim to detect which perl based on mimetype?
14:32 tadzik colomon: http://wklej.org/id/376280/ this one maybe?
14:32 tadzik colomon: works for me
14:32 MTW joined #perl6
14:32 MTW demolished
14:33 TimToady molished
14:34 * masak needs to remolish his apartment
14:35 moritz_ TiMBuS: I just use  # vim: ft=perl6  at the end of the files
14:38 colomon tadzik++
14:38 colomon looks like it works just fine for me now.
14:38 tadzik great
14:38 tadzik with inlined ufo too?
14:39 colomon I did hand edit your script to specify an explicit location for perl6 and prove executables
14:39 TiMBuS a modeline might have to do
14:39 colomon yes, inlined ufo (given those changes)
14:39 tadzik hmm
14:39 tadzik colomon: it might be a good idea to put those higher in your PATH
14:39 masak Perl 5 needs better error messages for us poor Perl 6 programmers with our sigil invariance and parenthesis-less if, while and for blocks :)
14:40 tadzik I have two perl6 in PATH, 2010.07 in /usr/bin and git version from ~/bin, the latter being found first
14:40 colomon tadzik: I don't know what the deal with prove is, the one in my path stopped working recently
14:40 moritz_ you mean better than "syntax error"? :-)
14:40 pmurias masak: if STD::P5 worked it should be possible to add them to it
14:40 TimToady maybe if p5 had a decent recursive descent parser rather than relying on yacc...
14:41 moritz_ .oO( you need to do some yacc shaving :-)
14:41 masak moritz_++ # horrible pun
14:41 TimToady yes, that's high on my list of everything that has to be done at once
14:42 ashleydev_ joined #perl6
14:42 TimToady (making horrible puns)
14:42 masak :D
14:42 moritz_ well, they don't work if you wait too long, usually
14:42 masak glad someone has their priorities straight.
14:42 tadzik colomon: the fresh neutro is on github now
14:43 moritz_ has anybody else tried rakudo on the gc_threshold_tuning parrot branch?
14:43 jnthn Yes, it's important to know what should happun first. :-)
14:43 moritz_ I'd love to get some feedback from macos or windows users
14:43 jnthn moritz_: Not yet, should get chance later on today though.
14:43 jnthn (almost done my dayjob tasks for the day :-))
14:44 colomon tadzik: seems like the next question is, can we turn neutro into a smoker, so that it regularly tests all available modules and flags test errors?
14:44 moritz_ jnthn: and remember to upload your signature talk slides
14:44 tadzik colomon: that's what emmentaller will be for
14:44 tadzik colomon: we're planning to work on that with masak++
14:44 justatheory joined #perl6
14:44 colomon tadzik: yes, but I want it now.  ;)
14:44 tadzik colomon :D
14:44 masak who doesn't? :)
14:44 tadzik masak: I'm still waiting for Juerd++ appliance
14:45 masak I believe the fastest way to emmentaler will be through pls.
14:45 tadzik it has a class for testing?
14:45 masak tadzik: oh? he's usually faster than that. maybe he's on vacation.
14:45 masak tadzik: no, but the pls core can easily be accomodated to install things for emmentaler.
14:45 masak and then testing is just a matter of doing the right thing with the installed project.
14:46 tadzik hmm
14:46 tadzik we could do it neutro now :)
14:46 masak in fact, we can mark each project with how it fares on fetch/build/test/install.
14:46 tadzik hmm
14:46 * tadzik gets hands dirty
14:47 masak tadzik: by all means, do it in neutro now. I might be wrong about pls being better suited for this.
14:47 masak or I might be right, but insignificantly so.
14:47 jnthn moritz_: Yeah, meant to last night and got distracted with stuffs. :-)
14:47 jnthn That's what I'll do right after $dayjob today. :-)
14:47 tadzik masak: I suppose pls would be better for everything, once it's ready
14:47 tadzik neutro is just a dirty script :)
14:48 colomon tadzik: working now is a BIG plus.
14:48 masak indeed.
14:48 masak I'm glad we have both neutro and pls right now.
14:48 masak they're a bit like Perl 5 and Perl 6, come to think of it :P
14:49 * tadzik looks for something with failing tests
14:49 masak dirty-but-working-now and perfect-but-on-the-way :)
14:49 masak tadzik: json had failing tests last I looked.
14:49 tadzik masak: I'm afraid they're alredy fixed :(
14:49 colomon tadzik: easy enough to add failing tests to one of my repos, if that would help.
14:50 tadzik no worries, JSON fails
14:50 pugssvn r31981 | pmurias++ | [v6-mildew] add some simple tests
14:51 moritz_ huh? it shouldn't
14:52 tadzik moritz_: http://wklej.org/id/376290/
14:52 colomon tadzik: are you handling dependancies in neutro?
14:52 tadzik colomon: yep
14:52 colomon tadzik++
14:52 moritz_ tadzik: how old is your rakudo?
14:52 Guest23195 joined #perl6
14:53 colomon masak++, too
14:53 tadzik moritz_: not at all I think
14:53 masak !old
14:53 moritz_ if you use yesterday's JSON, you also need yesterday's rakudo
14:53 tadzik This is Rakudo Perl 6, version 2010.07-111-g811c1c5 built on parrot 2.6.0 r48341
14:53 tadzik colomon: don't upvote me yet, last hacks have just broken dependency handling
14:54 tadzik :)
14:54 masak moritz_: I have failures too, but my Rakudo may be too old.
14:54 colomon but you're about to fix that, aren't you?  ;)
14:54 masak moritz_: will rebuild it and get back to you.
14:54 moritz_ tadzik: wow, I don't have such a revision at all
14:54 tadzik colomon: thinking about it right now :)
14:54 tadzik moritz_: oh
14:54 moritz_ tadzik: latest rakudo needs  938b133f
14:55 moritz_ erm, s/rakudo/json/
14:55 tadzik git pull says Already up-to-date.
14:55 moritz_ if you go back one revision in json, an older rakudo is fine too
14:55 moritz_ git show g811c1c5
14:55 moritz_ fatal: ambiguous argument 'g811c1c5': unknown revision or path not in the workin
14:55 moritz_ Use '--' to separate paths from revisions
14:55 tadzik moritz_: I have no 938b133f in my git log
14:56 tadzik being on master
14:57 moritz_ huh. Did I forget to push it?
14:57 moritz_ my bad
14:57 moritz_ no wonder json broke :-)
14:58 tadzik :D
14:59 tadzik $name.trans(':' => ',') -- what's wrong with this one? ($name being a string)
14:59 tadzik too few positional arguments: 2 passed, 3 (or more) expected
14:59 dalek rakudo: 938b133 | moritz++ | src/core/Match.pm:
14:59 dalek rakudo: be explicit about .keys, .values, .kv and .pairs in Match
14:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9​38b133fb25a98d6e2342a63115376c5edbed263
14:59 moritz_ rakudo: say 'foo'.trans(':' => ',')
14:59 p6eval rakudo 811c1c: OUTPUT«foo␤»
15:00 tadzik that works for me too
15:00 moritz_ rakudo: say 'f:o:o'.trans(':' => ',')
15:00 p6eval rakudo 811c1c: OUTPUT«f,o,o␤»
15:00 moritz_ tadzik: then it's a parrot string leaking out
15:00 tadzik $name.Str didn't help
15:00 tadzik what to do?
15:01 colomon why 2 pos arguments instead of 1?
15:01 moritz_ tadzik: try prefix ~
15:02 tadzik moritz_: same thing
15:02 colomon (~$name).trans
15:02 moritz_ colomon: invocant + one positional = 2
15:02 moritz_ parrot's .trans wants incovant + two positionals
15:02 tadzik hrm
15:02 tadzik rakudo: my $name = "LWP::Simple"; $name.trans(':' => ',')
15:03 tadzik works here
15:03 p6eval rakudo 811c1c:  ( no output )
15:03 colomon rakudo's .trans wants invocant plus arbitrary positionals
15:03 colomon multi method trans(*@changes)
15:03 moritz_ rakudo: my $name = "LWP::Simple"; say $name.trans(':' => ',')
15:03 p6eval rakudo 811c1c: OUTPUT«LWP,,Simple␤»
15:03 ruoso hi pmurias
15:03 tadzik colomon++ # (~$name).trans works
15:04 moritz_ didn't I say prefix ~ ? :-)
15:04 tadzik but that's a bug, no?
15:04 tadzik moritz_: I tried ~$name.trans then :)
15:04 colomon moritz_: you didn't mention the needed () around it.
15:04 tadzik my bad
15:04 colomon ~$name.trans is the same as ~($name.trans)
15:04 moritz_ well, standard precedence etc. :-)
15:04 tadzik I should've printed the Perl operators periodic table on my wall :)
15:04 tadzik colomon: deps fixed
15:05 masak yes, that's a bug.
15:05 colomon tadzik++
15:05 masak yes, it's in RT.
15:05 tadzik and gitpushed
15:05 Packetknife joined #perl6
15:05 Packetknife joined #perl6
15:06 tadzik time for some smoking capabilities
15:06 colomon \o/
15:07 masak hm, the bug I thought of was fixed already: http://rt.perl.org/rt3/Tic​ket/Display.html?id=76564
15:07 masak can someone golf the current one?
15:07 tadzik moritz_: what was the solution for a MAIN argument not expecting a value, like -v or --pretend?
15:07 tadzik I remember you telling this someone here
15:08 colomon tadzik: how were you generating $name?
15:08 tadzik colomon: With my fingers. I have my own database
15:08 tadzik check out modules.list
15:09 colomon tadzik: before the call to .trans, I mean.
15:09 tadzik it contains the name, the proto name (for dependency handling) and a git url
15:09 colomon we need to find out what caused your bug
15:09 tadzik oh
15:09 tadzik well, it's fetched from a file :)
15:12 moritz_ tadzik: Bool type constraint
15:12 moritz_ rakudo: sub MAIN($x, Bool :$blah) { }
15:12 p6eval rakudo 811c1c: OUTPUT«Usage:␤/tmp/oOHtRVJjOg [--blah] x␤»
15:12 tadzik alright
15:12 moritz_ rakudo: sub MAIN($x, :$blah) { }
15:12 p6eval rakudo 811c1c: OUTPUT«Usage:␤/tmp/BlINDDi8wf [--blah=value-of-blah] x␤»
15:13 tadzik looks like they'll have to be all installed anyway, we can't omit the install stage and run just tests
15:17 TimToady rakudo: sub MAIN($positional, :optoin($named)) { }
15:17 p6eval rakudo 811c1c: OUTPUT«Usage:␤/tmp/wpTX48wbxs [--named=value-of-named] positional␤»
15:18 TimToady should probably say --optoin=value-of-named, to be consistent with positionals
15:20 TimToady I don't mind the recent spec change, which is sane, but it would bother me to use the variable name as the semantic name of positionals but not of named parameters
15:21 masak +1
15:21 moritz_ it would bother me to use a private name for anything
15:21 TimToady then what's $x?
15:22 moritz_ part of the API
15:22 moritz_ you're allowed to call it as MAIN(x => 1)
15:22 moritz_ (maybe not from the command line, but in general names of positional arguments are part of the API)
15:23 daxim TimToady, can you paste the rakudo examples you used at the yapc keynote?  I want to show them off at the next lambdaheads meeting
15:23 moritz_ rakudo: sub f(:x($y)) { say $y }; f(3); f(x => 4)
15:23 p6eval rakudo 811c1c: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in 'f' at line 22:/tmp/MEml9UyFp5␤  in main program body at line 22:/tmp/MEml9UyFp5␤»
15:24 moritz_ hm, seems we can't rename positional parameters
15:24 moritz_ rakudo: sub f(x($y)) { say $y }; f(3); f(x => 4)
15:24 jnthn http://www.jnthn.net/articles.shtml is updated including slides from my YAPC::EU talk
15:24 p6eval rakudo 811c1c: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 22, near "($y)) { sa"␤»
15:24 jnthn moritz_: ^^
15:24 moritz_ jnthn++
15:25 tadzik how to make qx[] interpolate variables?
15:25 * jnthn hands moritz_ a : for that last example
15:25 moritz_ jnthn: I want to rename a positional parameter, not a named one
15:25 jnthn ...huh.
15:26 jnthn :-)
15:26 pyrimidine joined #perl6
15:26 masak jnthn++
15:27 tadzik rakudo: my $what = 'foo'; say qx[echo $what]
15:27 p6eval rakudo 811c1c: OUTPUT«Operation not permitted in safe mode␤  in 'Safe::forbidden' at line 2:/tmp/SS5qSPraww␤  in main program body at line 22:/tmp/SS5qSPraww␤»
15:27 tadzik :(
15:27 tadzik but how to make it work?
15:28 moritz_ qqx
15:29 tadzik works, thanks
15:29 tadzik yay, I have a mostly working testing script
15:29 masak moritz_: all tests pass in json. moritz_++
15:31 tadzik anyone willing to provide some neat html template for tests results?
15:31 colomon tadzik++
15:32 tadzik it only runs for like forever
15:32 squeeky tadzik: I'm sick of designing shipment paperwork, tell me what you need exactly.
15:33 tadzik squeeky: let me make some neat ascii-art for visualization
15:33 squeeky Bonus points if sneak in cowspeak.
15:33 moritz_ we do need copy on write, yes... :-)
15:35 tadzik squeeky: http://wklej.org/id/376308/ I was thinking about something like tis
15:36 tadzik oh, wait
15:36 tadzik the last field is supposed to be yellow
15:36 squeeky you want 4 states, right? Pass, Fail, Unknown, NA?
15:36 tadzik could be four, yep
15:37 tadzik http://wklej.org/id/376309/ -- teaser
15:37 tadzik :)
15:37 squeeky What's wrong with TAP?
15:38 BinGOs 'Successfully' rather than 'Succesfully'
15:38 tadzik nothing. But someone needs to download them, build, install deps and so on
15:39 BinGOs </nitpick>
15:39 tadzik hence I need a whole module installer
15:39 tadzik It should make use of TAP, I agree
15:39 masak tadzik: let me just throw in this for inspiration as well: http://github.com/masak/emmentale​r/blob/master/status-page-sketch
15:39 masak tadzik: that's all I've done on emmentaler so far.
15:40 BinGOs Interestingly you could drive the smoke testing with my existing smokebox framework
15:40 tadzik masak: looks cute
15:40 tadzik BinGOs: thanks for a typo fix
15:40 squeeky BinGOs: or better yet, port it over ;)
15:41 BinGOs So there's an event-driven framework for perl6 yet ?
15:43 TimToady every lazy list can be viewed as a sequence of events :)
15:46 BinGOs It would just require a POE::Component::SmokeBox::Backend er backend
15:48 dual joined #perl6
15:48 tadzik http://wklej.org/id/376314/ -- could someone help me with this one?
15:48 tadzik why doesn't chdir do anything?
15:49 moritz_ maybe $TMPDIR doesn't exist?
15:50 tadzik hm
15:50 tadzik moritz_++
15:54 daxim so, how do I fatalise chdir?
15:54 moritz_ you wait for sink context
15:54 daxim url?
15:54 moritz_ ... or implement it :-)
15:55 moritz_ S02 I guess
15:55 moritz_ and S04
15:57 daxim that's not talking about what I'm thinking
15:57 daxim fatalise means chdir throws an exception in case of error, y'know, like autodie or Fatal do
15:58 moritz_ the idea is that most built-ins (like open() and mkdir()) return "soft" exceptions
15:58 moritz_ and if you leave them in sink context, they turn fatal
15:58 daxim aha
15:58 moritz_ or if you try to use them in non-exceptional ways
15:58 cognominal jnthn++  for the slides. masak++ for tweeting their availability
15:59 moritz_ http://perlgeek.de/blog-en/​perl-6/failing-softly.html
15:59 jnthn I tweel too! :-)
15:59 cognominal is there slides for TimToady presentation(s)?
16:00 risou joined #perl6
16:00 moritz_ it wasn't very heavy on slides
16:00 jnthn I think there was < 10 slides. :_)
16:00 cognominal a video?
16:00 moritz_ being worked on
16:01 moritz_ 16:47 < peppe> oh, I have *great* news about that: my mini-dv camera broke, and  of course the customer care is on vacation. I'll get another  minidv camera from my girlfriend the next week, and then I'll  start dumping and transcoding them
16:02 daxim I just need the code snippets, did anyone bother to type them down?
16:02 masak moritz_++ # http://perlgeek.de/blog-en/​perl-6/failing-softly.html
16:05 moritz_ old news actually :-)
16:05 tadzik jnthn: isn't there typo on slide 51?
16:07 moritz_ where?
16:08 jnthn Oh, yes
16:08 jnthn Well, place-o :-)
16:09 moritz_ did you mis-place pisa?
16:09 jnthn moritz_: No, I just re-cycled some slides from Ukraine. :-)
16:09 * masak .oO( misplaces italics tag )
16:13 masak food &
16:19 dolmen joined #perl6
16:19 dolmen o/
16:19 tadzik \o
16:19 dolmen http://developers.slashdot.org/story/10/08/13/1​515208/Microsoft-May-Back-Off-of-NET-Languages
16:20 alester TiMBuS: Eventually the Perl 6 detection will be smarter.
16:20 moritz_ does it trigger on  use v6; ?
16:20 dolmen the IronRuby future is darkening
16:21 daxim http://developers.slashdot.org/comme​nts.pl?sid=1753576&amp;cid=33241504  "Static languages are better anyway."
16:21 tadzik yay! \o/
16:21 tadzik (not related)
16:21 alester moritz_: I don't know.
16:23 tadzik Ladies and Gentelman, I present you the first smoke tests results for Perl 6 modules: http://wklej.org/id/376334/txt/
16:23 alester http://github.com/petdance​/vim-perl/issues#issue/30 has all I know.
16:24 daxim tadzik, needs moar TAP.
16:24 tadzik daxim: I know, I know
16:24 tadzik that's to be don
16:25 [particle] tadzik++ # txterrific!
16:26 tadzik moritz_: could you change Math::Model proto.deps to deps.proto? Just for unification
16:27 moritz_ tadzik: done
16:27 tadzik moritz_++
16:27 takadonet tadzik: When I have time I will fix bioperl6 :S
16:27 moritz_ I was about to complain that it was installed before Math-RungeKutta :-)
16:28 tadzik takadonet: great!
16:28 tadzik takadonet: you are therefore proving that this forever-taking testing action was useful for something :)
16:28 colomon tadzik++
16:29 moritz_ time to add some tests to Math::Model
16:29 alester Do we have anything that creates TAP output at this point?
16:29 moritz_ Test.pm
16:30 alester So it's not like we don't have the technology for TAP yet.
16:30 alester do we have Test::Harness?
16:30 moritz_ not in p6
16:30 alester Maybe THAT should be my big start.
16:31 [particle] yes, what's perl without testing?
16:31 moritz_ alester: +1
16:31 moritz_ I'll be happy to try to answer any questions that come up while you port it to p6
16:32 [particle] alester: may the schwern be with you
16:33 alester You know, I did maintain T::H for a while.
16:33 alester I think I can handle it.
16:33 dolmen alester: will your vim-perl be in the official Vim 7.3 distro?
16:33 alester yes
16:33 alester Although "your" is pretty strong.
16:34 alester I just corralled everythign.
16:34 alester Which I'm finding is often half the battle.
16:34 colomon tadzik: Math::Polynomial and Math::Vector should be passing all their tests, so far as I know.
16:34 tadzik colomon: checking
16:34 colomon or is that what successfully installed means?
16:35 tadzik colomon: successfully installed means everything is ok :)
16:35 colomon tadzik++
16:35 tadzik that's just the neutro output, I'm working for making it more obvious
16:35 tadzik s/for/on/
16:36 colomon this is really terrific progress, IMO
16:36 tadzik it's nothing :)
16:40 tadzik don't regexes interpolate variables?
16:40 moritz_ wow, my Math::RungeKutta tests fail
16:40 moritz_ tadzik: they do
16:40 tadzik hrm
16:40 moritz_ tadzik: and should interpret them as literals
16:40 tadzik yeah, that's reasonable
16:41 isBEKaml alester: about the issue #31 last night, is there any need for globally storing perl6path? I commented them out and works fine here.
16:41 alester I don't know.
16:42 alester Add your note.
16:42 alester I
16:42 alester
16:42 alester really don't know anything about how any of that works.
16:42 alester I want to, but I'm just a wrangler right now.
16:42 tadzik Could you take a look at http://wklej.org/id/376347/ lines 16 and 43? The script output is: Unknown result: '==> Tests failed for ABC'
16:42 tadzik as if weren't matching this with regexes
16:43 moritz_ tadzik: /:s Test failed/
16:43 isBEKaml alester: AFAICT, even p5 ftplugins don't use @INC in their vimscripts.
16:43 moritz_ tadzik: whitespace is not significant in p6 regex
16:44 tadzik oh, right
16:44 alester Understood, isBEKaml .  Please add these notes so that I'm not the only one that knows them.
16:44 isBEKaml alester: right, will do.
16:44 tadzik yay, works
16:45 moritz_ or use quotes around the whole string
16:46 tadzik I pushed the smoker script with the needed neutro changes to the github repo, feel free to run it for yourself if you wish
16:54 * moritz_ too stupid to write p6 code
16:56 moritz_ Math::Model now has some initial (passing :) tests
16:59 daxim what's the latest spec talk in puncto continuations?
17:00 dalek rakudo: c41bcd7 | moritz++ | src/core/Match.pm:
17:00 dalek rakudo: Match.new roundtrips from Match.perl
17:00 dalek rakudo: Implements named and positional subcaptures
17:00 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​41bcd77824b8b12a1de018cb130b07b2e9a5b53
17:13 avuserow rakudo: sub hats {@_.perl.say}; hats(1, 2, 3)
17:13 p6eval rakudo 938b13: OUTPUT«[1, 2, 3]␤»
17:14 avuserow rakudo: sub hats {@_.perl.say}; my @a = 1, 2, 3; hats(@a)
17:14 p6eval rakudo 938b13: OUTPUT«[1, 2, 3]␤»
17:14 avuserow rakudo: sub hats {@_[0] = 1}; my @a = 1, 2, 3; hats(@a); @a.perl.say;
17:14 p6eval rakudo 938b13: OUTPUT«[1, 2, 3]␤»
17:14 avuserow rakudo: sub hats {@_[0] = 99}; my @a = 1, 2, 3; hats(@a); @a.perl.say;
17:14 p6eval rakudo 938b13: OUTPUT«[1, 2, 3]␤»
17:14 avuserow rakudo: sub hats (*@_ is ref) {@_[0] = 99}; my @a = 1, 2, 3; hats(@a); @a.perl.say;
17:14 p6eval rakudo 938b13: OUTPUT«[1, 2, 3]␤»
17:15 moritz_ I don't think we have slurpy rw in rakudo
17:16 avuserow makes sense.
17:16 moritz_ rakudo: sub f($a) { $a[0] = 42 }; my @a = 1, 2, 3; f(@a); say @a.perl
17:17 p6eval rakudo 938b13: OUTPUT«[42, 2, 3]␤»
17:18 tadzik testing the modules takes around 20 minutes here
17:25 tadzik should the MAIN sub work when running the compiled .pir?
17:25 dwierenga joined #perl6
17:28 moritz_ I don't know why not
17:30 moritz_ m:g// returns funny things :-)
17:31 moritz_ my oh my, why does rakudo compilation take so long?
17:33 meppl joined #perl6
17:41 moritz_ rakudo: my %h = a => 1, b => 2; say ?%h{any <b c>}
17:41 p6eval rakudo 938b13: OUTPUT«1␤»
17:43 patrickas joined #perl6
17:44 patrickas o/
17:44 moritz_ \o
17:45 patrickas Boss!
17:45 moritz_ /o\
17:45 patrickas :-)
17:45 patrickas moritz_: Do you knwo if some of the main tests used to fail on windows?
17:46 moritz_ patrickas: never got any report in that direction
17:46 patrickas ok I must have messed something up :-)
17:46 moritz_ happens :-)
17:47 patrickas this is recompiling to confirm takes a while so I thought I'd ask before i revert everything
17:47 moritz_ don't revert, just 'git stash' :-)
17:48 moritz_ sometimes stuff doesn't work, but later on you notice it was only a small detail
17:48 patrickas I thought I had done the short options ... but it i had an spectest fail :-(
17:48 moritz_ then you're happy to have the old patch somewhere, and can re-apply and fix it
17:48 patrickas moritz_ :-) You mean it's about time I learned how to use git :-)
17:49 patrickas gt stach feels like the twilight zone ... the changes are gone but they are still here
17:50 moritz_ right :-)
17:50 patrickas s/gt stach/git stash/ :-(
17:50 moritz_ up here in the north, we have long twilight times
17:50 moritz_ at least compared to your place :-)
17:52 moritz_ in fact it's twilight-ish outside right now
17:52 greatflamingfoo joined #perl6
17:54 moritz_ oh lol I broke subst
17:54 patrickas on the othe rhand turns out I did break MAIN :-)
17:54 patrickas the tests are still failing!
17:55 patrickas jnthn in on win32 too right ? he can probably confirm that main-usage.t always fails
17:56 patrickas ok un-revert / recompile / rerun tests :-)
17:56 moritz_ git stash apply
17:56 moritz_ aren't you happy you didn't throw it away? :-)
17:59 patrickas speaking of git, how easy is it to turn multiplt consecutive patches into just one ?
17:59 moritz_ git rebase -i $first_patch_sha1
18:00 moritz_ change all but the first lines to begin with an s  (for "squash")
18:00 patrickas ty
18:01 moritz_ then store the file
18:01 moritz_ and you get a chance to edit the combined commit message
18:01 jlaplante joined #perl6
18:02 moritz_ even works with non-consecutive patches, just leave the ones alone you don't want to include
18:02 jlaplante hey all, does anyone know if the heredoc mechanism is working in Rakudo Star?
18:02 moritz_ and move their lines to be above or below the consecutive patches
18:03 moritz_ jlaplante: not implemented :(
18:03 jlaplante ok
18:03 patrickas well at this stage i'll be happy if I can do it for two consecutive ones correctly
18:03 jlaplante well i know about 16 ways to do it now :)
18:03 jlaplante when it's ready
18:03 moritz_ niecza implements heredocs
18:04 jlaplante niezca?
18:04 moritz_ http://github.com/sorear/niecza a Perl 6 on .NET compiler
18:05 moritz_ though not as usable as rakudo, generally speaking
18:05 jlaplante oy -- i'm on arch64, happy to wait til it gets worked out in Rakudo
18:12 jfried joined #perl6
18:14 * nperez doesn't normally find bday's to be significant, but in any case:
18:14 nperez happy bday pmichaud :)
18:17 KyleHa joined #perl6
18:17 tadzik oh!
18:17 tadzik happy birthday pmichaud!
18:20 jferrero joined #perl6
18:31 moritz_ rakudo: say $*OS
18:31 p6eval rakudo 938b13: OUTPUT«linux␤»
18:35 TimToady std: sub MAIN ($x (|$y)) { $x,$y }
18:35 p6eval std 31912: OUTPUT«ok 00:01 117m␤»
18:36 TimToady rakudo: sub MAIN ($x (|$y)) { $x,$y }
18:36 p6eval rakudo 938b13: OUTPUT«Usage:␤/tmp/LujyMPH1UM x␤»
18:36 TimToady moritz_: there's a positional alias for you
18:37 moritz_ huh. :-)
18:38 rindolf joined #perl6
18:38 pugssvn r31982 | patrickas++ | Fix quoting command line args on windows moritz_++
18:39 pugssvn r31983 | patrickas++ | fix test
18:40 moritz_ rakudo: sub f($x (|$y)) { say $y }; f(:x<34>)
18:40 p6eval rakudo 938b13: OUTPUT«Capture()<0x6938800>␤»
18:40 moritz_ rakudo: sub f($x ($y)) { say $y }; f(:x<34>)
18:40 p6eval rakudo 938b13: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature of parameter $x␤  in 'f' at line 22:/tmp/pWusd8IRlC␤  in main program body at line 22:/tmp/pWusd8IRlC␤»
18:40 rokoteko is it possible to make a "diamnod" (ie. <>) operator? I somehow managed to fail even with std.
18:40 araujo joined #perl6
18:40 moritz_ I guess that's a bit hard because it's special-cased
18:41 dalek rakudo: 44f0ec0 | (Kyle Hasselbacher)++ | docs/ (2 files):
18:41 dalek rakudo: [docs] Misspellings caught by ispell
18:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​4f0ec0cd95b0fb257946dc7dd9c33aefc7ff882
18:41 rokoteko nods. also [] then?
18:41 rokoteko just checking. :)
18:41 TimToady what kind of an operator?
18:42 rokoteko std: sub infix:['<>'] ($x, $y) { "x: $x, y: $y"; }; say "foo"<>"bar";
18:42 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/dmyiIEs7u7 line 1:␤------> [32m$x, $y) { "x: $x, y: $y"; }; say "foo"<>[33m⏏[31m"bar";[0m␤    expecting any of:␤ POST␤   bracketed infix␤    infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤
18:42 p6eval ..statement modifier loop␤…
18:42 rokoteko tried with is tighter:['<'] etc. but ...
18:43 avuserow std: sub infix:['<>'] ($x, $y) { "x: $x, y: $y"; }; say "foo" <> "bar";
18:43 p6eval std 31912: OUTPUT«ok 00:01 119m␤»
18:43 TimToady you have to put spaces around it when you use it
18:43 TimToady yeah, like that
18:43 avuserow :)
18:43 TimToady otherwise it's parsed as a postfix
18:43 rokoteko oh.
18:43 TimToady this kind of extensibility is why we make a hard-and-fast rule
18:44 avuserow rakudo: sub infix:['<>'] ($x, $y) { "x: $x, y: $y"; }; say "foo" <> "bar";
18:44 p6eval rakudo 938b13: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
18:45 TimToady otherwise there's no consistent way to distinguish postfixes from infixes
18:45 rokoteko you can't affect the precedence in which postfix, infix, etc are parsed?
18:45 avuserow rakudo: sub infix:'<>' ($x, $y) { "x: $x, y: $y"; }; say "foo" <> "bar";
18:45 p6eval rakudo 938b13: OUTPUT«===SORRY!===␤Confused at line 22, near "sub infix:"␤»
18:45 TimToady postfixes are always tighter than any following infix
18:45 rokoteko rakudo: sub infix:<< <> >> ($x, $y) { "x: $x, y: $y"; }; say "foo" <> "bar";
18:45 p6eval rakudo 938b13: OUTPUT«===SORRY!===␤Confused at line 22, near "say \"foo\" "␤»
18:46 TimToady rakudo: sub infix:«<>» ($x, $y) { "x: $x, y: $y"; }; say "foo" <> "bar";
18:46 rokoteko avuserow: that failed also. maybe the unicode <<
18:46 p6eval rakudo 938b13: OUTPUT«x: foo, y: bar␤»
18:47 rokoteko avuserow: rakudo is very easily misinterpreting in infix:['<>']  other than infix:<> or the infix:��
18:47 rokoteko (did those hypers look correct? pasted from TimToady .. Im *still* on latin-1)
18:48 TimToady rakudo: sub infix:<\<\>> ($x, $y) { "x: $x, y: $y"; }; say "foo" <> "bar";
18:48 p6eval rakudo 938b13: OUTPUT«===SORRY!===␤Confused at line 22, near "say \"foo\" "␤»
18:48 TimToady yes, they looked correct here
18:49 TimToady which irc client are you using?
18:49 rokoteko good. maybe someday soon I will switch my irc encoding. not really much of use of latin-1, it's just the habit. ;)
18:49 rokoteko TimToady: irssi. why?
18:49 TimToady should be relatively easy then
18:49 TimToady are you running inside of screen?
18:49 TimToady (many of us do)
18:49 rokoteko .. well the point being that this is running inside a screen and on the other screen I got ircnet, where I chat with other finnish people who have been stuck to latin-1.
18:50 rokoteko but it's about time to let it go. ;)
18:50 rokoteko Im trying to say that it's not a technical issue.
18:50 TimToady I understand.
18:51 rindolf UTF-8 all the way down!
18:51 TimToady someone should write a latin-1 to utf-8 irc bridge
18:52 TimToady so you could use latin-1 channels from within a utf-8 irssi
18:52 rokoteko out of band signalling of used encoding. wasnt this something that (iirc) moritz_ blogged about.
18:52 tadzik a'right
18:52 tadzik http://tjs.azalayah.net/ser.html
18:52 tadzik the deal is: you want prettier results, help me with html/css :)
18:53 TimToady looks like yapsi isn't official any more :)
18:53 TimToady it doesn't pass the test suite :P
18:53 tadzik :)
19:00 TimToady rokoteko: you might be able to start screen and then switch some of its screens from utf8 to latin1.  see the encoding option
19:00 pmurias sorear: you are a co-author of data-derive?
19:00 rokoteko SIP (the signalling protocol mainly used with voip) has quite a brilliant design. We should actually use for SIP for initiating IRC sessions. no problems with encoding anymore. it even uses another protocol (SDP, Session Description Protocol) inside to describe the nitty-pitty details of how the data should be handled.
19:01 rokoteko TimToady: that is true. @work that would work, but @home Im on windows (I dunno how to teach Heidi to use linux, maybe she would learn fast - but never tried). do you also have a way to switch encoding during a putty session?
19:01 tadzik using utf-8 is another solution for any encoding problems
19:02 rokoteko tadzik: you cant say *any* if you don't know the problem area.
19:02 tadzik well, right
19:03 rokoteko and anyhow. even if I managed to do *all* that, I wouldnt still know how to type the hyper "<<" on my (Finnish layout) keyboard..
19:03 TimToady you could always run putty in utf8 and just switch using screen inside that
19:03 TimToady do you have a compose key?
19:03 rokoteko what is a compose key?
19:04 TimToady a key that does nothing, but makes the next 2 or 3 chars into a single char
19:04 TimToady dunno about windows on that score though
19:05 TimToady so I type COMPOSE << and it makes «
19:05 TimToady I've got it bound to my right "menu" key
19:05 ingy anyone (jnthn) seen this: Cannot resume dead coroutine.
19:06 rokoteko heh. on my first computer (Microprofessor II) there was a 'Multitech'-button, which did *nothing*.. :) but that external keyboard doesnt fit my PC.
19:06 TimToady sounds like an old rakudo
19:06 rokoteko TimToady: what OS are you using?
19:06 TimToady I use ubuntu currently
19:06 ingy TimToady: you talking to me?
19:06 TimToady yes
19:06 rokoteko ah. I need try that at work on monday. the compose key is probably configurable on Debian quite easily.
19:06 ingy it's star
19:06 ingy which is old, yes
19:06 TimToady :)
19:06 rokoteko ingy: 13:28 < rokoteko> star: class X { has $.this; has $.not; }; say X.new(:this(1), :not(5)).perl # ingy
19:07 TimToady I think either gnome or kde can configure one from the menu
19:07 ingy rokoteko: thanks :)
19:07 rokoteko ingy: np. :) been browsing through the synopsis and it just popped to my head. :)
19:08 ingy yay \o/
19:08 ingy I really want to do dev on star releases
19:08 TimToady or in vim, ^K<<
19:08 ingy hopefully I can work around this bug, since it came out of nowhere
19:09 ingy just need to divide and whimper
19:10 rokoteko TimToady: what. in insert mode? ctrl+K followed by two stroked on < -key ?
19:10 TimToady yes
19:10 TimToady say :dig to see all the digraphs you can enter that way
19:10 rokoteko ahh! :)
19:10 rokoteko �  ... ?
19:10 tadzik yep
19:10 pugssvn r31984 | pmurias++ | document Mildew::AST::Branch
19:11 rokoteko TimToady++
19:11 TimToady course, most of those are going to look pretty funny if your terminal isn't in utf8 :)
19:11 TimToady doesn't really help typing into irssi though
19:12 pmurias ruoso: look at Mildew::AST::Branch, is such AST documentation enough? (i want to document all the simplified AST nodes)
19:12 rokoteko I think I should switch to UTF8 on irc and also to US layout keyboard. the ` -key is also quite cumbersome to type with finnish layout, so I ended up mapping it to -  (for marks in vim)
19:12 TimToady with a compose key it's not terribly difficult to type dicritics when you need 'em
19:13 TimToady *dia
19:13 rokoteko ok. I add one more point. I should switch to using Debian at home also. or getting another computer for *only* myself and run Debian on it. :) Life is hard, QED.
19:14 TimToady one must have good rationalizations to make it through life :)
19:14 estrabd joined #perl6
19:14 Axius joined #perl6
19:15 rokoteko Yea, I used to say (mainly to myself) "Life is easy if you don't make it hard." ..
19:16 pugssvn r31985 | pmurias++ | [mildew] formating tweak
19:17 pugssvn r31986 | pmurias++ | [mildew] document Mildew::AST::Goto
19:20 lithos joined #perl6
19:20 lithos hi! I'm looking at an old ticket (RT 66824) and wondering: Is @a[*-1..*-1] supposed to work?
19:20 moritz_ yes (and it doesn't)
19:21 lithos the other issue raised in this ticket works now:
19:21 pugssvn r31987 | pmurias++ | [mildew] document Mildew::AST::Assign
19:21 lithos rakudo: sub f($x) { say $x }; f(|4)
19:21 p6eval rakudo c41bcd: OUTPUT«4␤»
19:23 dalek rakudo: 0839993 | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
19:23 dalek rakudo: Added short arguments parsing to MAIN
19:23 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
19:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​839993ed01c816dc8b3459fa7b79608be4fbf3a
19:23 rokoteko when my $it <== 1..5;  is implemented, what will $it.WHAT say? List() ?
19:24 rokoteko and a follow-up question: how to get $x.WHAT output Range() or Seq() then?
19:24 moritz_ probably List
19:24 lithos ah, there is a recent ticket for ranges using * (RT 77104)
19:24 moritz_ $it = 1..5; # Range
19:24 moritz_ $it = (1..5).Seq; # Seq
19:25 rokoteko rakudo: my $it = 1..5; say $it.WHAT
19:25 moritz_ rakudo: my $it <== 1..5;
19:25 moritz_ rakudo: my $it <== 1..5; say $it.WHAT
19:25 p6eval rakudo c41bcd: OUTPUT«Range()␤»
19:25 p6eval rakudo c41bcd: OUTPUT«Method 'push' not found for invocant of class ''␤  in main program body at line 22:/tmp/Z2hj0OAbsD␤»
19:25 p6eval rakudo c41bcd: OUTPUT«Method 'push' not found for invocant of class ''␤  in main program body at line 22:/tmp/lWhlEstKJ0␤»
19:25 rokoteko ahh. something I missed earlier when I was trying this out. thought it should be a Range() :)
19:26 pugssvn r31988 | moritz++ | [t/spec] fix some tests that assume .match(:g) returns a list
19:29 rokoteko also, what was it. in the source it was clearly not yet handled, but the error it gave was mysterious.
19:29 rokoteko rakudo: my @arr = <a b c>; 0..2 ==> @arr[@(*)] ==> my @x; # found it
19:29 p6eval rakudo c41bcd: OUTPUT«too many positional arguments: 3 passed, 3 expected␤  in main program body at line 1␤»
19:29 moritz_ @(*) is NYI
19:31 colomon what is @(*)  ?
19:32 rokoteko colomon: that's a translation. iiuic, it means the the current element being fed. :)
19:32 rokoteko colomon: I mean my above example was supposed to be a translation, not @(*) as itself.
19:32 moritz_ kind of $_ for feeds
19:32 colomon huh.
19:32 moritz_ or is it the whole feed?
19:32 * colomon needs to read up on feeds at some point
19:33 colomon is it a term of its own, or is it @(  )  applied to *?
19:33 rokoteko colomon: yea. they are difficult to play with as a lot of is NYI.
19:33 wamba joined #perl6
19:34 rokoteko colomon: you mean like currying * to @() ? I think it's a single term. I can look up the Synopsis for you.
19:35 colomon rokoteko: that's what I was thinking, yes.  (whatever curry)
19:35 rokoteko colomon: ah. http://perlcabal.org/syn/S06.html .. I dunno how to show line number in firefox, but search for @(*) works for me.
19:36 tadzik duh, Config::INI stopped working
19:36 tadzik I wonder if it's worth it to engage grammars for it
19:36 colomon "so any contextualizer with * as an argument"
19:37 colomon so it is @( ) applied to *
19:37 moritz_ $(*), @(*), %(*)
19:40 rokoteko colomon: ok. :) mind giving me an example how it should be used in other context than feed?
19:40 rokoteko Id be happy to learn. :) New to perl6.
19:41 moritz_ rakudo: say ([[1, 2], [3, 4].map: @(*)).perl
19:41 p6eval rakudo c41bcd: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
19:41 moritz_ rakudo: say ([[1, 2], [3, 4]].map: @(*)).perl
19:41 p6eval rakudo c41bcd: OUTPUT«No candidates found to invoke for method 'map' on object of type 'Array'; available candidates have signatures:␤:(Mu : &block;; *%_)␤␤  in main program body at line 22:/tmp/R4iPkj3IJ9␤»
19:41 moritz_ that would flatten the arrays
19:41 moritz_ rakudo: say ([[1, 2], [3, 4]].map: *.flat).perl
19:41 rokoteko std: say ([[1, 2], [3, 4]].map: @(*)).perl
19:41 p6eval rakudo c41bcd: OUTPUT«([1, 2], [3, 4])␤»
19:41 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
19:41 colomon rakudo: say ([[1, 2], [3, 4]].map: { @(*)).perl }
19:41 p6eval rakudo c41bcd: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
19:42 colomon rakudo: say ([[1, 2], [3, 4]].map: { @(*).perl }
19:42 p6eval rakudo c41bcd: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
19:42 colomon rakudo: say [[1, 2], [3, 4]].map: { @(*).perl }
19:42 sorear pmurias: I think so, it's been a while
19:42 p6eval rakudo c41bcd: OUTPUT«(Whatever.new())(Whatever.new())␤»
19:42 colomon :\
19:43 rokoteko moritz_, colomon: ahh: Im starting to see it. it's kinda like the old @$_ in perl5.
19:43 rokoteko (in your example)
19:43 colomon that's my (admittedly rough) understanding of it.
19:44 moritz_ rokoteko: * in general makes something a call
19:44 rokoteko but why would you, in a feed, use *that* instead of plain * when indexing an array?
19:44 tadzik were there any important grammar changes recently?
19:45 tadzik Config::INI stopped working for some reason
19:45 moritz_ how does it fail?
19:46 colomon rokoteko: I have no clue.  Feeds are mysterious to me.
19:46 tadzik sometimes it cannot parse, and sometimes it gets:
19:46 tadzik postcircumfix:<> not defined for type Array()
19:46 tadzik while extracting the values from the match object
19:46 moritz_ that means it didn't match, and you still tried to access $<something>
19:47 rokoteko my @arr = <a b c>; 0..2 ==> @arr[@(*)] ==> my @x; ... so @arr is <a b c> .. it's being fed through @arr using the index @(*), which refers to the array being fed. which is 0..2 actually. not to be pedantic about what is an array and what is not.
19:47 tadzik hmm
19:47 takadonet left #perl6
19:48 rokoteko so first it's @arr[0], on the next run it's @arr[1], etc. because the @(*) indexes the array at the blunt end of the fee, not the @arr.
19:49 rokoteko std: my @arr1 = <a b c>; my @arr2 = <1 2 3>; 0..2 ==> @arr1[@(*)] Z @arr2[@(*)] ==> my %hash;
19:49 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
19:49 rokoteko \o/
19:50 colomon so... why not @arr1[*] or @arr1[$(*)] here?
19:51 rokoteko let me think.
19:51 rokoteko .. the first one is because it need to refer to the 0..2 list sent to the feed.
19:52 rokoteko latter just look like a syntax failure. I think it could be possible like:
19:53 rokoteko std: my @arr1 = <a b c>; my @arr2 = <1 2 3>; my $src = 0..2; @($src) ==> @arr1[$(*)] Z @arr2[$(*)] ==> my %hash;
19:53 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
19:53 rokoteko worked. can't test in practice :/
19:54 rokoteko std: my @arr1 = <a b c>; my @arr2 = <1 2 3>; my $src := 0..2; @($src) ==> @arr1[$(*)] Z @arr2[$(*)] ==> my %hash;   # hmm. this is actually what I tried to type.
19:54 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
19:54 colomon I'm not sure how much getting by std tells you here.
19:54 moritz_ std just does syntax checking
19:54 MTW left #perl6
19:54 rokoteko colomon: to be honest, I really dunno. this is just a flow-of-thoughts. how would someone new to perl6 test it without an implementation?
19:55 rokoteko rakudo: my @arr1 = <a b c>; my @arr2 = <1 2 3>; my $src := 0..2; @($src) ==> @arr1[$(*)] Z @arr2[$(*)] ==> my %hash;   # hmm. this is actually what I tried to type.
19:55 p6eval rakudo 083999: OUTPUT«===SORRY!===␤Sorry, do not know how to handle this case of a feed operator yet. at line 22, near " my %hash;"␤»
19:55 rokoteko moritz_: ahh.. it fails ;)
19:55 colomon rokoteko: only way I know is to run it by someone who actually understands what it is supposed to do.  :)
19:55 colomon rakudo: 1..10 >> say $_;
19:56 p6eval rakudo 083999: OUTPUT«===SORRY!===␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at line 22, near "say $_;"␤»
19:56 colomon gack
19:56 colomon rakudo: 1..10 ==> say $_;
19:56 p6eval rakudo 083999: OUTPUT«Any()12345678910␤»
19:56 rokoteko colomon: that's true. but pardon me on a friday night and two weeks after my holiday. Im quite happy to be back with perl (at work and learning perl6 when time off from work) :)
19:56 colomon rakudo: 1..10 ==> say @(*);
19:56 rokoteko rakudo: 1..10 ==> sub ($x) { say $x; };
19:56 moritz_ I guess it's more productive to learn a part of perl6 that's mostly implemented :-)
19:57 p6eval rakudo 083999: OUTPUT«Whatever()<0x67b1d60>12345678910␤»
19:57 p6eval rakudo 083999: OUTPUT«===SORRY!===␤Sorry, do not know how to handle this case of a feed operator yet. at line 22, near " sub ($x) "␤»
19:57 TimToady rakudo: 1..10 ==> say;
19:57 colomon oh, funny
19:57 p6eval rakudo 083999: OUTPUT«12345678910␤»
19:57 rokoteko moritz_: heh. been playing with them also. :) but only at the beginning of Synopsis.
19:58 moritz_ TimToady: if I understood S05 correctly, 'abc' ~~ m:g/./  returns a single match object, containing all three matches as positional parts...
19:58 moritz_ TimToady: is there any way to distinguish that from m/(.)+/, when slice context is NYI?
19:59 sorear good * #perl6
19:59 TimToady moritz_: not that I know of
19:59 moritz_ :(
20:00 moritz_ .subst has to distinguish these two cases
20:00 moritz_ and we don't have slice context in rakudo
20:00 lithos rakudo: IO.foo
20:00 p6eval rakudo 083999: OUTPUT«Method 'foo' not found for invocant of class ''␤  in main program body at line 22:/tmp/C5NkXuRpTR␤»
20:00 moritz_ but I do have a branch that makes .match return a single match object, even with :g... and .subst blows all up
20:00 TimToady perhaps :g, :ov, and :ex should be taught to return a List of Match objects instead
20:00 lithos is it a known issue that the class name is not printed?
20:01 TimToady then it could be lazy
20:01 moritz_ rakudo: Int.blah
20:01 p6eval rakudo 083999: OUTPUT«Method 'blah' not found for invocant of class ''␤  in main program body at line 22:/tmp/ez0TIyzeqd␤»
20:01 moritz_ lithos: please submit... I noticed that it's missing, but I didn't notice when exactly
20:01 sorear lithos: There is no class name.  IO is a role; using it as a class creates an anonymous class using only the role
20:01 moritz_ rakudo: Any.Int
20:02 p6eval rakudo 083999: OUTPUT«Method 'Int' not found for invocant of class ''␤  in main program body at line 22:/tmp/GsuGw4ppqi␤»
20:02 moritz_ I don#t think Any is a role
20:02 moritz_ or supposed to be one
20:02 sorear oh.
20:02 pyrimidine left #perl6
20:02 moritz_ TimToady: would m:g// still set $/ then?
20:02 TimToady good question
20:03 * sorear does not like $*endsym
20:03 moritz_ I't say "no", because usually you'd iteratove over the result of m:g// anyway
20:03 TimToady endsym should eventually be handled by protos, methinks
20:04 TimToady lunch &
20:04 sorear hmm, rakudo doesn'
20:04 sorear t have $~Quote?
20:05 moritz_ nope
20:06 sorear there's an interesting little issue in niecza related to that
20:08 sorear "\r" and /\r/ both use the backslash:r token
20:08 sorear but in different grammars
20:08 sorear (in STD.pm6)
20:09 sorear niecza cheats; because the viv/Cursor grammar engine doesn't really handle matchification properly, I can just say if ($/.isa('STD::Regex')) { #`(do one thing) } else { #`(do something else) }
20:09 sorear but that doesn't seem to be an option in correct perl 6
20:11 dju joined #perl6
20:15 M_o_C joined #perl6
20:16 * lithos submitted #77202 [BUG] "Method 'foo' not found" error is missing class name
20:25 kenesh joined #perl6
20:31 Guest94967 joined #perl6
20:32 jferrero joined #perl6
20:34 masak joined #perl6
20:34 masak ahoj!
20:34 pmurias apeiron: so i would have a role, that can serialise the object to haskell and by default the method will use the MOP to get the class name and attributes so i can sanely serialize the attributes?
20:34 pmurias sorry, that was intended for #perl
20:35 tadzik yayitsmasak
20:35 tadzik masak: http://tjs.azalayah.net/ser.html
20:35 * masak looks
20:35 masak tadzik: wow! cool!
20:36 masak tadzik++
20:37 masak tadzik: I'd like to give that page some CSS therapy, but my time slots for tonight are full. would you allow me to do it tomorrow?
20:37 tadzik masak: sure!
20:37 masak also, please tell me what's under the hood :)
20:37 tadzik masak: it'll also need html therapy I'd say
20:37 tadzik masak: almost nothing :)
20:37 masak 99.9% of the web needs HTML therapy...
20:37 tadzik one second
20:38 masak tadzik: so you still want to build emmentaler with me? :)
20:38 tadzik masak: that's what I'm doing :)
20:38 masak oh, good :)
20:38 tadzik masak: http://wklej.org/id/376459/ this ugly generates the page
20:38 tadzik and the 'results' file is the output of smoker.pl
20:38 jnthn holey smokes!
20:39 masak tadzik: wow! that's not a lot of code. :)
20:39 jnthn (sorry for the cheesy pun...)
20:39 masak and it's p6!
20:39 colomon \o/
20:39 jnthn masak: Wonder if there's a correlation there. ;-)
20:40 masak tadzik: have you tried Tene++'s Tags or Tene++'s Ratel?
20:40 tadzik masak: no we need a cronjob which will run smoker.pl from time to time, and a better page generator
20:40 tadzik masak: nope
20:40 masak tadzik: both of those are in http://github.com/masak/web/tree/master/lib/
20:41 masak tadzik: either of those might help you output HTML even shorter.
20:41 masak feel free to give them a go.
20:41 tadzik masak: please check Web state on PERL 6 TESTERS PAGE
20:41 colomon would also be good to be running smoker.pl regularly on multiple platforms.
20:41 masak tadzik: I can set up a cron job.
20:41 colomon tadzik++
20:42 tadzik masak: I have a few ideas about this (more)
20:42 tadzik smoker.pl output will be written to a different file with a date every day (producing sth like results yyyy-mm-dd)
20:43 tadzik then something can make a nice JSON from it, JSON should be provided on the interwebs
20:43 tadzik and something nice can create a nice page, like this mentioned in your emmentaller repo
20:43 alester hinrik?
20:43 Tene masak: They're probably not updated to current rakudo, unless you did it.
20:43 alester purl, hinrik?
20:43 masak Tene: oh, true. that's a slight problem.
20:44 Tene masak: Quick!  Go push those unpushed commits that update them!
20:44 mikehh joined #perl6
20:44 masak :P
20:44 masak Tene: on a serious note, my GSoC grant finishes next week.
20:44 Tene tadzik: Yeah, tags or ratel would make that nicer.
20:44 masak Tene: after that, I'd like to bring Web.pm to week 20, and close the books on that one.
20:44 Tene masak: That was Buf, right?
20:45 masak aye.
20:45 tadzik Tene: I'm definitely not a designer, I think someone else should keep his eye on this
20:45 tadzik (or hers)
20:45 masak I suspect relations with TPF might be much simpler if I don't have unfinished grants while applying for new ones...
20:46 Tene masak: You'll have to drive it, but let me know what I need to do.
20:46 masak I'll gladly drive it.
20:46 masak sometimes I need someone driving me though, so feel free to poke me if nothing happens. :P
20:47 masak poke-driven development
20:48 avuserow .oO( that sounds like how several of my school projects are going )
20:48 lithos should "not" be available as a method? there is a ticket about it, but I don't find it in the spec
20:49 masak lithos: I've always figured both .so and .not are available as methods.
20:49 masak I might be wrong, though.
20:50 dju joined #perl6
20:50 tadzik should I open a ticket about this (a..b).pick possible optimization? Everyone will forgot about it otherwise
20:51 masak .so is mentioned in S12. from that I deduce by symmetry that .not should be there too, even though it's not mentioned.
20:51 masak tadzik: please do.
20:52 colomon tadzik: I'd just go ahead and do it myself, but I'm distracted by $work and really entranced by p6 modules at the moment.  :)
20:52 tadzik colomon: I'll do it myself if I knew how to mess inside Rakudo :)
20:53 colomon tadzik: actually, it's kind of easier not to mess around inside Rakudo
20:53 colomon just make a script with a function that does the right thing.
20:53 colomon once you have that working, it's very easy to translate to a method inside Rakudo.
20:54 tadzik colomon: the thing is, what I think should be done is to translate this statement into our rand() magic before the source is parsed (or maybe after?), and that's quite hard to achieve outside the compiler
20:55 tadzik no, it has to be parsed firsdt
20:55 tadzik and I still don't know where it should be done
20:55 colomon why?  there's no reason I can't see to just make it a method
20:55 colomon method on Range, that is.
20:55 dju_ joined #perl6
20:56 tylercurtis joined #perl6
20:56 colomon for one thing, how would "magic" help with my $range = 1..10; $range.pick?
20:56 tadzik hmm
20:56 tadzik it won't
20:57 tadzik oh wow
20:57 colomon works trivially for a Range.pick method.
20:57 tadzik you are right
20:57 tadzik hugme: hug tadzik
20:57 * hugme hugs tadzik
20:59 tadzik colomon: wouldn't it collide with Any-List.pm pick? or where is it placed
20:59 colomon place it in Range
20:59 tadzik yeah, I know
20:59 tadzik but there is also a pick somewhere else, with working :replace and stuff
21:00 tadzik I'd rather not break it
21:00 colomon overriding methods in more-derived classes is perfectly normal and valid p6
21:01 colomon Note, for instance, that both Cool and Num have .sin methods, even though Num is Cool.
21:01 colomon star: say Num ~~ Cool
21:01 p6eval star 2010.07: OUTPUT«1␤»
21:01 tadzik I see
21:02 tadzik but it still has to be multi, right?
21:02 tylercurtis colomon: I think tadzik is saying that he doesn't want to have to reimplement :replace and Whatever-handling and such in Range.pick.
21:02 masak jnthn: did you see #77200?
21:02 tadzik exactly
21:02 colomon tylercurtis: ah, that's not a worry, either.  you just pass the call onto Any.pick if it's got something you don't want to handle.
21:03 jnthn masak: no
21:03 colomon (:replace is easy to handle, it's the non-replace version that's trouble.)
21:03 masak jnthn: looks like your department.
21:03 masak jnthn: also looks quite wtf-ish.
21:03 jnthn eww
21:03 masak :)
21:03 jnthn srsly wtf.
21:03 tadzik colomon: replace version will be just furiously rand()ing in this case :0
21:03 tadzik :)
21:04 tadzik oh, that's what you said
21:05 tadzik now what was this formula we have invented…
21:07 colomon $least + $elems.rand.floor
21:08 moritz_ where $elems = $max - $min - $.min-exclusive - $.max-exclusive;
21:09 lithos left #perl6
21:09 moritz_ or so :-)
21:09 colomon moritz_++
21:09 tadzik exclusive?
21:09 moritz_ 0..^5
21:09 colomon actually, needs to be the floor of that for non-Int Numeric cases to work correctly.
21:09 colomon or not.
21:09 colomon that's actually kind of tricky
21:09 tadzik oh, so there is more fun
21:10 moritz_ should be special-cased only for Int
21:10 colomon moritz_: but it's right for all Numeric, so long as you get the end conditions right
21:10 colomon though Int-only might well be a good first step.
21:10 moritz_ only for Int it's -1 for exclusive
21:10 tadzik hrm
21:11 tadzik so there has to be different cases when one of the _excludes is True?
21:11 colomon moritz_: or for non-Int Numeric with Int values.
21:11 moritz_ tadzik: yes :(
21:11 colomon tadzik: to get $least and $elems correct, yes.
21:11 tadzik $least + $elems.rand.floor is the generic case, yes?
21:12 moritz_ yes
21:12 tadzik $least is actually $.min, but $elems is tricky?
21:12 tadzik that's a start
21:12 moritz_ $least = $.min-exclusive ?? $.min + 1 !! $.min
21:13 tadzik oh, right
21:13 tadzik so one exclusive is after us :)
21:14 moritz_ and then $elems = ($.max-exclusive ?? $.max - 1 !! $.max) - $least
21:14 colomon for Ints
21:14 moritz_ and then maybe an extra check if $lelems > 0
21:14 moritz_ for 0^..^1 for example
21:14 colomon star: say (-1).rand
21:14 p6eval star 2010.07: OUTPUT«-0.180539427415596␤»
21:15 colomon ooo, definitely an $elems > 0 check!
21:15 tadzik that's not fair, I was supposed to write this one :(
21:15 tadzik but alright, it came out to be tricky
21:16 colomon the real hard part is writing enough tests for this.
21:16 tadzik I'm a handheld device :)
21:16 colomon random number tests are tricky
21:16 tadzik it should rather be proven correct
21:16 tadzik or something
21:17 colomon philosophically speaking, I do not trust proofs
21:18 fod joined #perl6
21:18 moritz_ proofs are like programs that you haven't run :-)
21:19 moritz_ and that you can't easily run, in general
21:19 colomon exactly.
21:20 tadzik so these are programs without tests! /o\
21:22 colomon afk # low battery in laptop
21:22 moritz_ "given enough eyes, all bugs are shallow" - that's what the mathenaticians hope, and what works for short, often-used programs
21:23 tadzik how to do this Int check then? nextsame unless $.min ~~ Int and $.max ~~ Int?
21:25 tadzik that'd never be as fast as simple rand :(
21:25 moritz_ yes, except precedence
21:25 tadzik how much of this would be put in the compile time?
21:25 tadzik maybe $.min.isa(Int)?
21:25 moritz_ nextsame unless ($.min ~~ Int ) && ($.max ~~ Int)
21:26 tylercurtis rakudo: my $min = 5; my $max = 6.0; say $min&$max ~~ Int;
21:26 tadzik wouldn't .isa be faster than smartmatching?
21:26 p6eval rakudo 083999: OUTPUT«0␤»
21:26 tylercurtis rakudo: my $min = 5; my $max = 6; say $min&$max ~~ Int;
21:26 p6eval rakudo 083999: OUTPUT«0␤»
21:26 moritz_ tadzik: known bug
21:27 tadzik nextsame unless $.min.isa(Int) and $.max.isa(Int);
21:27 tadzik is that ok?
21:27 moritz_ yes
21:27 tadzik alright
21:27 tadzik so the elems > 0 check now, returning Nil if they're < 0, yep?
21:28 moritz_ rakudo: say ().pick().perl
21:28 p6eval rakudo 083999: OUTPUT«Any␤»
21:28 moritz_ s/Nil/Any/ it seems
21:28 moritz_ I don't know if that's good, but at least consistent
21:28 tadzik okay
21:28 tadzik http://wklej.org/id/376481/ looks good?
21:28 masak rakudo: sub foo {}; say foo.defined
21:29 p6eval rakudo 083999: OUTPUT«1␤»
21:29 moritz_ tadzik: looks good
21:29 Guest23195 left #perl6
21:29 masak TimToady: why is Nil defined? or -- and this might be what I'm really asking -- why are a number of things that I expect to be undefined suddenly defined in Perl 6?
21:30 dalek book: 6af373e | moritz++ | src/grammars.pod:
21:30 dalek book: [grammar] get rid of ugly >>>
21:30 dalek book: review: http://github.com/perl6/book/commit/6a​f373ef089b8b102b938ccd7ba35a083dbbb7f6
21:34 jlaplante left #perl6
21:36 dalek book: 70a9e37 | moritz++ | src/regexes.pod:
21:36 dalek book: [regexes] remove a TODO; since rakudo does not implement <?after>, we do not
21:36 dalek book: need an example for now
21:36 dalek book: review: http://github.com/perl6/book/commit/70​a9e37e248885aa313a1dc9ffd255e2bb7badf3
21:37 masak rakudo: 1..10 ==> say
21:37 p6eval rakudo 083999: OUTPUT«12345678910␤»
21:37 masak rakudo: 1..10 ==> *.say
21:37 p6eval rakudo 083999: OUTPUT«===SORRY!===␤Sorry, do not know how to handle this case of a feed operator yet. at line 22, near " *.say"␤»
21:37 masak not sure that's spec'd to work.
21:42 tadzik http://wklej.org/id/376487/
21:42 tadzik good enough I'd say
21:44 macroron left #perl6
21:44 tadzik or rather: not so bad
21:47 tadzik hmm
21:47 tadzik it can be also rewritten to PIR
21:47 tadzik yay or nay?
21:47 rokoteko rakudo: my &say2 := &say; 1..10 ==> say2;
21:47 p6eval rakudo 083999: OUTPUT«12345678910␤»
21:48 whiteknight joined #perl6
21:50 rokoteko rakudo: my &say2 := sub { say @_[0] }; 1..10 ==> &say2
21:50 p6eval rakudo 083999: OUTPUT«===SORRY!===␤Sorry, do not know how to handle this case of a feed operator yet. at line 22, near " &say2"␤»
21:51 rokoteko rakudo: my &say2 := sub { say @_[0] }; 1..10 ==> say2
21:51 p6eval rakudo 083999: OUTPUT«1␤»
21:52 rokoteko rakudo: my &say2 := sub { say @_[0] }; 1..10 ==> say2 for 1..10
21:52 p6eval rakudo 083999: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤»
21:53 rokoteko man it can be difficult.
21:54 tadzik rakudo: my $r = (1^..*); $r.perl.say
21:54 p6eval rakudo 083999: OUTPUT«1^..Inf␤»
21:54 tadzik awesome!
21:54 dalek book: 6629c9e | moritz++ | src/operators.pod:
21:54 dalek book: [operators] add precedence table
21:54 dalek book: review: http://github.com/perl6/book/commit/66​29c9e51fd1252114e5dcc5943aa99425757c2a
21:57 rokoteko moritz_++, where's the "." operator?
21:57 tadzik moritz_: http://wklej.org/id/376498/ what do you think?
21:57 moritz_ +    42.5.floor         method calls and postcircumfixes
21:58 moritz_ tadzik: looks good, though I prefer to have separate changes as separate patches
21:58 rokoteko ah. it was just very difficult to spot for me. so it's very tight. :)
21:58 tadzik can be done
22:00 moritz_ I guess it's eaiser to see if there's only one . in the term
22:05 tadzik moritz_: is it possible that one day every possible piece of code in Rakudo will be rewritten to PIR for performance reasons?
22:05 moritz_ tadzik: very unlikely
22:05 TimToady well, unless the optimizer does it :)
22:05 tadzik the optimizer should :)
22:06 tadzik so rewriting this pick to PIR for performance is not worth the effort?
22:06 moritz_ no; I don't think it's a typical hot code path
22:07 dalek book: 7f38858 | moritz++ | src/ (2 files):
22:07 dalek book: [subs] get rid of some TODOs, and some minor clarifications
22:07 dalek book: review: http://github.com/perl6/book/commit/7f​3885823edaf970c9b3e8827c40bc008f7d8c57
22:07 tadzik moritz_: well, I think it's my perfectionism coming out
22:07 tadzik moritz_: so that's the patch so far: http://wklej.org/id/376504/
22:08 tadzik the :replace version optimization is ommited on purpose, and the obligatory replace is for it won't clash with the non-replace version
22:08 moritz_ tadzik: looks good... please submit to RT, I'm going to bed now
22:09 tadzik sure thing
22:10 ashleydev joined #perl6
22:12 ashleydev_ joined #perl6
22:21 kenesh left #perl6
22:22 awwaiid joined #perl6
22:32 killasmurf86 joined #perl6
22:32 killasmurf86 left #perl6
22:41 kid51 joined #perl6
22:44 masak loliblogged! http://use.perl.org/~masak/journal/40494
22:46 tadzik lolipatchsubmitteed!
22:47 masak interesting borrowing of the meme... :)
22:47 masak maybe Tene was right; it does look like 'loli'...
22:47 tadzik sure it does
22:47 tadzik I thought that's the pun :)
22:48 masak not intentionally, no.
22:48 jnthn 'loli'?
22:48 masak I think I started writing 'haveaniceweekend!' to people a year or so ago.
22:48 masak then jnthn and others started saying 'lolitsmasak'.
22:48 masak and then people started going 'loliblogged'.
22:49 jnthn So really it was masak++'s fault. ;-)
22:49 masak lolitsmyfault
22:49 jnthn lolitain'tjustyou
22:49 tadzik phenny: tell moritz the Channel Index link on irc.pugscode.org is broken, shows a calendar for #perl6 rather than a channel list
22:49 phenny tadzik: I'll pass that on when moritz is around.
22:50 tadzik duh
22:50 tadzik phenny: tell moritz_ the Channel Index link on irc.pugscode.org is broken, shows a calendar for #perl6 rather than a channel list
22:50 phenny tadzik: I'll pass that on when moritz_ is around.
22:50 masak whydoweevenusespacessuchawaste
22:50 tadzik masak: WeShouldMaybeTryUsingCamelCase
22:50 masak ugh
22:50 tadzik sniff sniff, can you smell that?
22:50 tadzik it must be Java somewhere around
22:51 masak probably in an android phone somewhere.
22:51 masak let's sue the bastards.
22:52 jnthn I foresaw you saying that.
22:52 masak and thereby you tacitly agreed to this crazy kamikaze plan.
22:53 masak this will teach those Google folks to... use something other than Java. o.O
22:55 masak oh well. back to your regularly scheduled Perl 6 programming.
22:55 masak jnthn: how does a class know which classes it inherits from?
22:56 jnthn It's meta-object has a parent(s) list.
22:56 masak rakudo: class A {}; A.HOW.add_parent(A); say A.^parents
22:56 p6eval rakudo 083999: OUTPUT«Modifications to classes are not allowed after instantiation.␤  in main program body at line 22:/tmp/8hkdsXT9Nx␤»
22:56 masak awww :)
22:57 masak I just wanted to have some *fun* :)
22:57 jnthn Right, but
22:57 jnthn If you create a new ClassHOW and so on, you can do it. :-)
22:57 masak show me show me
22:57 * masak claps hands expectantly
22:57 jnthn See the subclass I build in Test::Mock.
22:57 tadzik http://trac.parrot.org/parrot/changeset/48447/
22:57 tadzik > improves rakudo hello world by 0.586%
22:57 tadzik Awesome! \o/
22:58 masak half a percent! hooray!
22:58 * tadzik votes for bumping the PARROT_REVISION for this
22:58 masak just keep doing that, like, a thousand times...
22:59 masak rakudo: say .995 ** 1000
22:59 p6eval rakudo 083999: OUTPUT«0.00665396857883197␤»
22:59 masak ...and we'll be down to 0.67% of our current speed. :)
23:00 masak by the way, RT, says I'm at 960 submitted bugs. time to pop a bottle of champagne soon. :)
23:00 masak s:2nd/,//
23:06 tadzik that's awesome
23:07 masak only 64 left to 2**10 :)
23:10 tinhead joined #perl6
23:16 risou joined #perl6
23:17 rokoteko actually it would be interestingresearchtoreadabout how far brain goes when interpreting words reading the first and last letter of the 'word', no matter how the middle letters are arranged. the same sentences happen to does?
23:17 sorear rokoteko: I read a paper like that once
23:17 rokoteko oh I talk like yoda the man.
23:17 rokoteko sorear: did  you find it easy?
23:18 rokoteko where did  you get the paper from? :)
23:18 sorear it was a 2-page mini-publication on human reading process, they shuffled the interior letters of every word
23:18 sorear Yes
23:18 jnthn The brain tends to identify words as whole shapes.
23:18 rokoteko ahh. but I was talking about sentences.
23:18 rokoteko not just words.
23:18 sorear My high school math teacher handed it to me.  Cool guy.
23:18 sorear Don't remember the name :/
23:19 sorear niecza: class X { }; class MockHOW is ClassHOW { method isa($x) { True }; }; my $h = MockHOW.new("SomeMock"); my $o = $h.create-protoobject; say $o ~~ X; # I wonder if this will work
23:19 p6eval niecza cd7f153: OUTPUT«Potential difficulties:␤  $x is declared but not used at /tmp/0GCb23BmBz line 1:␤------> [32m class MockHOW is ClassHOW { method isa([33m⏏[31m$x) { True }; }; my $h = MockHOW.new("So[0m␤Bool::True␤»
23:19 rokoteko I once tried to chat here about something related to the subject. let me look it up, Im sure Ive saved it somewhere, as I didnt want to paste on the channel. :)
23:19 sorear \o/
23:20 jnthn I have crappy eyesight and have only realized how much I depend on recognizing word shapes as a whole when I started to learn a language in another script, and really struggled (and still do) when I have to read out a word char by char.
23:20 rokoteko not so long ago. Jun 16 20:07 request-for-comments.txt :) http://rehn.fi/request-for-comments.txt
23:21 masak jnthn: reading out char by char is what we all have to start doing when learning another script.
23:21 rokoteko but this time I was wondering if the same might apply for sentences. ie. the first and last word are in the correct positions. what happens if you switch the places of the word at the middle of the sentences.
23:21 sorear jnthn: EVER TRY READING MORE THAN A FEW WORDS WHEN YOU DON'T HAVE DECENDERS AND ASCENDERS BECAUSE THERE ARE NO LOWERCASE LETTERS?  IT IS NOT EASY
23:21 jnthn masak: I know, it's just a bunch harder than I might have expected.
23:22 jnthn sorear: YES IT'S ANNOYING :p
23:23 masak I did an exercise once, wherein a Swedish text was written in a completely different script. within five minutes, individual words started jumping out at me. it was impressive/scary how quickly the brain adapted.
23:25 jnthn Wow.
23:25 jnthn Yeah, new script + new words is slower though. :-)
23:28 sorear Now you're making me wonder if large english text + machine transliterator = script learning aid of doom
23:28 molaf joined #perl6
23:33 tadzik yawn. goodnight, #perl6
23:34 rokoteko Thinks of switching to Perl(5/6) from Haskell or vice versa. $ switches meaning -> or . switched meaning. :: switches meaning. and ALSO keywords like "do" and "return" switch meanings. not an easy task. :)
23:34 rokoteko tadzik: sweet dreams :)
23:34 tadzik :)
23:34 tadzik hugme: hug tadzik
23:34 * hugme hugs tadzik
23:34 tadzik I feel better now
23:35 colomon sorear: you know, back in the old days, everything we did with computers was upper case....  ;)
23:36 sorear colomon: I pity you.
23:36 sorear rokoteko: Perl 5 and Haskell are my languages of choice.  Weird, huh?
23:37 kid51 Is there (yet) a perl6 equivalent to: 'perl -c myprogram' ?
23:37 rokoteko sorear: if had met you on #java it would be way more weird than here... ?
23:37 sorear in niecza (1300 lines of C#, 1700 lines of Perl 6, and 7000 lines of Perl 5) the syntax I mix up most consistantly is... comments
23:38 masak :)
23:38 rokoteko (not that I tend to hang around at #java, but still the same point...)
23:38 sorear I've never been on #java
23:40 rokoteko sorear: ah. so you agree. it would be totally freaky weird then! some kind of out of body experience.
23:41 masak "Don't I recognize you from London?" -- "No, I've never been to London." -- "Hm, me neither. Must have been two other guys then."
23:43 tylercurtis masak: out of curiosity, why does Nil.defined === True seem unintuitive to you?
23:44 masak tylercurtis: two reasons so far. I might come up with more if I look for them. (more)
23:44 masak tylercurtis: (1) 'return;' returns a Nil. from Perl 5 expectations, I expect that to return something undefined.
23:45 masak tylercurtis: (2) $obj.?foo gives a Nil when .foo doesn't exist. that means I can no longer use the idiom $obj.?foo // "default", something that used to work with older versions of the spec.
23:45 Tene masak: did you get an answer from TT about that?
23:45 masak not yet.
23:46 Tene masak: question faster!  I'm impatient!
23:46 rokoteko why doesn't  'return;'  return a Mu instead of Nil?
23:46 masak rokoteko: I think because there's an implied empty Parcel being returned.
23:47 jnthn return always returns a Parcel
23:47 tylercurtis Both sound like sensible objections.
23:47 jnthn Sometimes it's just a one-item Parcel taht evaporates.
23:47 jnthn I agree Nil.defined causes some odd issues though
23:47 sorear rokoteko: Because Perl 5 behavior was that return; in list context contributed no items
23:48 sorear rokoteko: Now, if you had said you had met me on #haskell in 2007, that would make more sense.  I was second only to lambdabot in that activity bracket.
23:48 sorear jnthn: Tell me more about evaporating parcels.
23:49 jnthn iirc, a one-item Parcel in item context is just that item.
23:49 jnthn Unless that changed again. :-)
23:51 masak then maybe an empty parcel should evaporate into something a bit less defined. :P
23:52 rokoteko "How empty can a Parcel be? 'Mu', answered the cow."
23:54 jnthn Time for some rest, night o/
23:56 * sorear has an irrational hatred of the .item method
23:56 rokoteko jnthn: Good nite! Don't let the bed bugs bite!
23:56 tylercurtis rakudo: my $foo = 5; say $foo.defined; $foo = Nil; say $foo.defined; my @a = 1,2,3; say @a.defined; @a = Nil; say @a.defined; # Nil is weird.
23:56 p6eval rakudo 083999: OUTPUT«1␤0␤1␤1␤»
23:58 rokoteko rakudo: my @a = Nil; my $b := @a; say @a.defined ~ "/" ~ $b.defined
23:58 p6eval rakudo 083999: OUTPUT«1/1␤»

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

Perl 6 | Reference Documentation | Rakudo