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