Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-07-29

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 timotimo ah, maybe
00:00 lue they ask opposing question, and lead to the same result, which is my thinking.
00:00 lue *questions
00:02 * lue imagines that because of the obverse/reverse dichotomy, talking about logical obverses might get confusing, if his understanding of logical obversion is correct :)
00:04 BenGoldberg m: say "foobar".split("b"); say "foobar".comb("b");
00:04 camelia rakudo-moar c00999: OUTPUT«foo ar␤Cannot call 'comb'; none of these signatures match:␤:(Cool: *%_)␤:(Cool: Regex $matcher, Any $limit = { ... }, *%_)␤:(Str:D: *%_)␤:(Str:D: Regex $pat, Any $limit = { ... }, Any :match($match), *%_)␤  in block  at /tmp/ttXp__j4yx:1␤␤»
00:04 BenGoldberg m: say "foobar".split(/b/); say "foobar".comb(/b/);
00:04 camelia rakudo-moar c00999: OUTPUT«foo ar␤b␤»
00:04 timotimo yeah, comb only takes patterns
00:04 timotimo m: say "foobar".count("o")
00:04 camelia rakudo-moar c00999: OUTPUT«No such method 'count' for invocant of type 'Str'␤  in block  at /tmp/TQ0Ov3VKkV:1␤␤»
00:04 timotimo is there something like that?
00:05 BenGoldberg m: say "foobar".comb(/o/).elems;
00:05 camelia rakudo-moar c00999: OUTPUT«2␤»
00:06 timotimo well, yeah
00:06 lue timotimo: something something  $thing.comb.Bag ... something something
00:06 timotimo i was going to provide "foobar".how-often("o") xx "o" as an alternative implementation of .comb("o")
00:06 timotimo which is kind of pointless if you use comb to implement that :P
00:06 lue where's your bootstrapping spirit !? :P
00:09 gtodd hmm with perl5 sometimes I wish I could do tr/A-Z/1-26/ but I thought with perl6 I could use a hash as the "range" part for tr// or .trans ?  where would this be documented?  Is .trans a method for Str?
00:10 gtodd I found a blog posting but no official docs :)
00:11 ventica2 so, .split is about the boundaries between letters and .comb is about the letters themselves? (trying to grok the diff)
00:11 timotimo http://perlcabal.org/syn/S05.html#Transliteration
00:11 timotimo ventica2: aye
00:11 ventica2 nice
00:11 timotimo ventica2: well, try understanding it like this:
00:11 timotimo split matches stuff and throws that stuff away, giving you the rest
00:12 timotimo comb matches stuff and gives you that stuff, throwing away the rest
00:12 timotimo also:
00:12 timotimo m: "Hello world. How are you today?".split(/\W+/, :all).perl.say
00:12 camelia rakudo-moar c00999: OUTPUT«(("Hello", Match.new(orig => "Hello world. How are you today?", from => 5, to => 6, ast => Any, list => ().list, hash => EnumMap.new())), ("world", Match.new(orig => "Hello world. How are you today?", from => 11, to => 13, ast => Any, list => ().list, hash…»
00:12 timotimo oops ;)
00:12 timotimo m: "Hello world. How are you today?".split(/\W+/, :all).say
00:12 camelia rakudo-moar c00999: OUTPUT«Hello 「 」␤ world 「. 」␤ How 「 」␤ are 「 」␤ you 「 」␤ today 「?」␤ ␤»
00:12 timotimo m: "Hello world. How are you today?".split(/\W+/, :all)>>.Str.say
00:12 camelia rakudo-moar c00999: OUTPUT«Hello   world .  How   are   you   today ? ␤»
00:12 timotimo m: "Hello world. How are you today?".split(/\W+/, :all)>>.Str.perl.say
00:13 camelia rakudo-moar c00999: OUTPUT«("Hello", " ", "world", ". ", "How", " ", "are", " ", "you", " ", "today", "?", "")␤»
00:13 timotimo :all will also give you the matched stuff
00:13 timotimo (as match objects even)
00:13 timotimo (it won't give you the stuff between the splits because there was no matching taking place there)
00:14 ventica2 grokked &
00:14 timotimo :)
00:14 ventica2 thx :)
00:15 timotimo very welcome
00:17 timotimo i'm getting a tiny bit frustrated with how the jit behaves ... it ought to not hang :)
00:18 timotimo at least the jitlog.txt doesn't continue growing, so it's probably looping in some kind of legit manner
00:20 timotimo like generating an infinite loop somehow
00:38 gtodd timotimo: cheers thanks I was looking on http://doc.perl6.org/routine.html
00:39 timotimo hum. that lists a bunch of methods, but why not this one?
00:39 timotimo strange.
00:39 gtodd $string.trans(%hash);  and  $string.=trans(%hash); work somewhat as planned but not every element of the string is swapped
00:40 gtodd similar "space" issue as with pumpkin perl tr/a-z/1-26/
00:41 timotimo can you give a piece of working (non-working) code as a paste on gist or something?
00:42 nbrown joined #perl6
00:46 nbrown_ joined #perl6
00:46 TimToady tr/a-z/1-26/ makes no sense in P5
00:46 timotimo the night shift has arrived :)
00:47 TimToady that's equivalent to tr/abcdefghijklmnopqrstuvwxyz/126/
00:48 TimToady or is that the point?
00:48 TimToady "space" is too many final frontiers...
00:51 timotimo gnite #perl6   o/
00:51 TimToady o/
00:58 gtodd yeah I know ... you can do:   my $str="abcdefhij"; ($str=$str)=~tr/a-j/0-9/ ; print $str
01:00 xenoterracide_ joined #perl6
01:02 gtodd but not if the bits of the string and replacement differ
01:03 gtodd I thought the hash approach of perl6 might auto adjust or shift the string
01:07 TimToady m: $_ = 'abcdefghijklmnopqrstuvwxyz'; .=trans(['a'..'z'] => [1..26]); .say
01:07 camelia rakudo-moar c00999: OUTPUT«1234567891011121314​151617181920212223242526␤»
01:07 TimToady are you trying to do that?
01:10 gtodd seems it just needs arrays :-)
01:10 gtodd got it to work :-)
01:10 gtodd oops yeah like you just did :-D
01:10 gtodd dman these multiscreen setups I should have IRC on my monitor at all times
01:11 BenGoldberg m: 'abc'.trans(/a/ => 'z').say
01:11 camelia rakudo-moar c00999: OUTPUT«zbc␤»
01:12 BenGoldberg How different is trans from s/// ?
01:12 TimToady quite
01:13 gtodd yeah ... seems very cool
01:13 TimToady s/// won't apply a mapping of characters for you unless you work hard at it
01:13 BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' . $/ . 'Z' } ).say
01:13 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lxq7dvGuBg�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/lxq7dvGuBg:1�------> [32m'abc'.trans(/(a)/ => { 'X' . [33m�[31m$/ . 'Z' } ).say[0m�»
01:13 gtodd so there is tr/// and a method .trans
01:13 gtodd ?
01:13 BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' ~ $/ ~ 'Z' } ).say
01:13 camelia rakudo-moar c00999: OUTPUT«XZbc␤»
01:14 BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' ~ $0 ~ 'Z' } ).say
01:14 camelia rakudo-moar c00999: OUTPUT«XZbc␤»
01:14 BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' ~ @_ ~ 'Z' } ).say
01:14 camelia rakudo-moar c00999: OUTPUT«XZbc␤»
01:14 TimToady .trans is mostly doing string mapping, and hasn't any clue about captures on the left, since usually you have strings on the left without captures
01:15 TimToady it was only an afterthought to allow regexen on the left
01:15 * TimToady is actually surprised a closure on the right works at all :)
01:16 TimToady m: 'abc'.trans(/(a)/ => -> $/ { 'X' ~ $0 ~ 'Z' } ).say
01:16 camelia rakudo-moar c00999: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in block  at /tmp/Jk53ijrmqG:1␤␤»
01:16 TimToady it's just not expecting a $/ at all
01:16 BenGoldberg m: 'abc'.trans(/(a)/ => { 'X' ~ $^a ~ 'Z' } ).say
01:16 camelia rakudo-moar c00999: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in block  at /tmp/brpoaqI2sd:1␤␤»
01:16 gtodd { 'X' ~ @_ ~ 'Z' }   that ort of looks like ascii art for hindu god of some kind
01:17 BenGoldberg Oh well.  Maybe in the future ;)
01:17 TimToady maybe
01:19 TimToady one almost wants to allow assignment ops instead of => there
01:19 TimToady so you can do s[...] op= expr in parallel
01:19 TimToady trans is basically a parallel s///
01:20 TimToady but that tracks the LTM for you like an alternation in regex would
01:23 dayangkun joined #perl6
01:23 TimToady one could, in fact, do something like s:g [ a { make 1 } | b { make 2 } | c { make 3 } ... ] = $/.ast
01:25 TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = $/.ast; .say
01:25 camelia rakudo-moar c00999: OUTPUT«123␤»
01:25 TimToady tr/abc/123/ is basically just sugar for that
01:27 TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = $/.ast * 3; .say
01:27 camelia rakudo-moar c00999: OUTPUT«369␤»
01:28 TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = $/.ast.ord - 16; .say
01:28 camelia rakudo-moar c00999: OUTPUT«333435␤»
01:28 TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = chr $/.ast.ord - 16; .say
01:28 camelia rakudo-moar c00999: OUTPUT«!"#␤»
01:28 TimToady oops
01:29 TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = chr $/.ord - 16; .say
01:29 camelia rakudo-moar c00999: OUTPUT«QRS␤»
01:29 TimToady m: $_ = 'abc'; s:g [ a { make 1 } | b { make 2 } | c { make 3 } ] = chr $/.ord - 16 - 32; .say
01:29 camelia rakudo-moar c00999: OUTPUT«123␤»
01:29 TimToady there we go :)
01:29 nbrown joined #perl6
01:30 hovercraft joined #perl6
01:30 TimToady m: $_ = 'abcdefghijklmnopqrstuvwxyz'; s:g[.] = $/.ord - 48; .say
01:30 camelia rakudo-moar c00999: OUTPUT«495051525354555657585960​6162636465666768697071727374␤»
01:31 TimToady m: $_ = 'abcdefghijklmnopqrstuvwxyz'; s:g[.] = $/.ord - 96; .say
01:31 camelia rakudo-moar c00999: OUTPUT«1234567891011121314​151617181920212223242526␤»
01:32 BenGoldberg m: say s:g[.]
01:32 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5CzFLsTWOwâ�¤Missing assignment operatorâ�¤at /tmp/5CzFLsTWOw:1â�¤------> [32msay s:g[.][33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        colon pair (restricted)â�¤        infix stopperâ�¤Â»
01:32 BenGoldberg m: $_ = ('a'..'z').join; s:g[.] = $/.ord + 1; .say
01:32 camelia rakudo-moar c00999: OUTPUT«989910010110210310410510610710810911​0111112113114115116117118119120121122123␤»
01:33 TimToady std: s:g[.]
01:33 BenGoldberg m: $_ = ('a'..'z').join; s:g[.] = $/.succ; .say
01:33 camelia std 0f2049c: OUTPUT«[31m===[0mSORRY![31m===[0m�Missing assignment operator at /tmp/bvVgze7MwE line 1 (EOF):�------> [32ms:g[.][33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 122m�»
01:33 camelia rakudo-moar c00999: OUTPUT«No such method 'succ' for invocant of type 'Match'␤  in block  at /tmp/86E0nLLerX:1␤␤»
01:33 BenGoldberg m: $_ = ('a'..'z').join; s:g[.] = $/.Str.succ; .say
01:33 camelia rakudo-moar c00999: OUTPUT«bcdefghijklmnopqrstuvwxyzaa␤»
01:33 TimToady try $/.Str.succ
01:33 TimToady a Match object has no successor
01:34 TimToady m: $_ = ('a'..'z').join; s:g[.] = $/.Str.succ; .say
01:34 camelia rakudo-moar c00999: OUTPUT«bcdefghijklmnopqrstuvwxyzaa␤»
01:34 BenGoldberg The s[...] = ... syntax is a bit confusing.  I see what it does, but it's not intuitive.
01:35 TimToady it just makes an lvalue of the current match
01:35 TimToady you're just used to the s/// form :)
01:36 TimToady but that form is capable of only = semantics
01:36 BenGoldberg I'm used to an = doing only one assignment ;), whereas with :g, it is many assignments.
01:36 TimToady it's a kind of implicit loop
01:36 TimToady you already get many assignments when you do s:g///
01:37 TimToady so there's no reason s:g[] = expressoin can't do multiple assignments too
01:38 BenGoldberg Yeah, but the expression inside of the right side of s:g/// is enclosed in something (slashes, usually), whereas the assignment syntax ends with a ;
01:38 TimToady m: $_ = '123'; s:g[\d] -= 1; .say
01:38 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zquEBcMmNA�Malformed assignment operator�at /tmp/zquEBcMmNA:1�------> [32m$_ = '123'; s:g[\d] -=[33m�[31m 1; .say[0m�»
01:38 TimToady say waht?
01:38 BenGoldberg It's a match ;)
01:38 BenGoldberg Not an Int
01:38 TimToady that's not the problem
01:39 TimToady m: $_ = '123'; s:g[\d] += 1; .say
01:39 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/yfTwAY0jKp�Malformed assignment operator�at /tmp/yfTwAY0jKp:1�------> [32m$_ = '123'; s:g[\d] +=[33m�[31m 1; .say[0m�»
01:39 BenGoldberg m: $_ = '123'; s:g[\d] ~= 'A'; .say
01:39 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Mv76nBHdAC�Malformed assignment operator�at /tmp/Mv76nBHdAC:1�------> [32m$_ = '123'; s:g[\d] ~=[33m�[31m 'A'; .say[0m�»
01:39 TimToady someone seems to have busted it
01:39 TimToady n: $_ = '123'; s:g[\d] += 1; .say
01:39 camelia niecza v24-109-g48a8de3: OUTPUT«234␤»
01:40 BenGoldberg m: $_ = '123'; s:g[\d] = .~'A'; .say
01:40 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Tmp4f6xwQeâ�¤Assignment operator missing its expressionâ�¤at /tmp/Tmp4f6xwQe:1â�¤------> [32m$_ = '123'; s:g[\d] = .[33mâ��[31m~'A'; .say[0mâ�¤    expecting any of:â�¤        dotty method or pos…»
01:40 BenGoldberg m: $_ = '123'; s:g[\d] = ($/~'A'); .say
01:40 camelia rakudo-moar c00999: OUTPUT«1A2A3A␤»
01:40 TimToady I think when we fixed op= to allow [op]= we mighta busted somethin
01:41 TimToady m: $_ = '123'; s:g[\d] [+]= 1; .say
01:41 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lUdurAcfg3â�¤Unsupported use of brackets around replacement; in Perl 6 please use assignment syntaxâ�¤at /tmp/lUdurAcfg3:1â�¤------> [32m$_ = '123'; s:g[\d] [33mâ��[31m[+]= 1; .say[0mâ�¤    expe…»
01:41 TimToady heh
01:41 TimToady m: $_ = '123'; s:g[\d] = 1; .say
01:41 camelia rakudo-moar c00999: OUTPUT«111␤»
01:42 nbrown joined #perl6
01:45 TimToady m: $_ = '123'; s:g[\d] RR[+]= 1; .say
01:45 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/09PN0wjlHa�Malformed assignment operator�at /tmp/09PN0wjlHa:1�------> [32m$_ = '123'; s:g[\d] RR[+]=[33m�[31m 1; .say[0m�»
01:45 TimToady m: $_ = '123'; s:g[\d] RR+= 1; .say
01:45 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/wWjFqETN3c�Malformed assignment operator�at /tmp/wWjFqETN3c:1�------> [32m$_ = '123'; s:g[\d] RR+=[33m�[31m 1; .say[0m�»
01:45 TimToady m: $_ = 1; $_ RR+= 41; .say
01:45 camelia rakudo-moar c00999: OUTPUT«42␤»
01:45 TimToady that's okay
01:45 TimToady m: $_ = 1; $_ RR[+]= 41; .say
01:45 camelia rakudo-moar c00999: OUTPUT«42␤»
01:45 TimToady m: $_ = 1; $_ [+]= 41; .say
01:45 camelia rakudo-moar c00999: OUTPUT«42␤»
01:45 TimToady just busted under s[]
01:45 TimToady m: $_ = '123'; s:g[\d] RR[+=] 1; .say
01:45 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/twkfvAW3sV�Malformed assignment operator�at /tmp/twkfvAW3sV:1�------> [32m$_ = '123'; s:g[\d] RR[+=][33m�[31m 1; .say[0m�»
01:46 klapperl joined #perl6
01:46 TimToady jnthn: ^^
01:46 Akagi201 joined #perl6
01:50 TimToady or the masakbot, since it's a bug :)
01:51 TimToady you'd think the regression tests shoulda caught the, er, regression...
01:51 TimToady star: $_ = '123'; s:g[\d] += 1; .say
01:51 camelia star-{m,p} 2014.04: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Malformed assignment operator�at /tmp/tmpfile:1�------> [32m$_ = '123'; s:g[\d] +=[33m�[31m 1; .say[0m�»
01:52 TimToady or maybe it wasn't a regression?
01:53 TimToady coulda sworn that worked, but maybe I'm remembering niecza?
01:54 PZt joined #perl6
01:54 FROGGS__ joined #perl6
01:54 TimToady nominalizations &
01:56 rindolf joined #perl6
02:04 chenryn joined #perl6
02:04 dalek perl6-bench: fc85ab6 | (Geoffrey Broadwell)++ | bench:
02:04 dalek perl6-bench: Don't need to limit test tags in `bench quickstart`
02:04 dalek perl6-bench:
02:04 dalek perl6-bench: This is no longer needed now that --skip-incomplete exists and is default.
02:04 dalek perl6-bench: It could save some testing time if the user only ever wanted to compare
02:04 dalek perl6-bench: against NQP, but it seems more useful to default to testing everything
02:04 dalek perl6-bench: that can be tested for each compiler, and let `analyze` decide what data
02:04 dalek perl6-bench: to use.
02:04 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/fc85ab6ab2
02:07 xenoterracide_ joined #perl6
02:10 cooper- joined #perl6
02:15 dalek perl6-bench: e7919ed | (Geoffrey Broadwell)++ | analyze:
02:15 dalek perl6-bench: Fix old copy pasta in HTML table generation
02:15 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/e7919ed26b
02:16 lustlife joined #perl6
02:18 noganex_ joined #perl6
02:33 jnap joined #perl6
02:37 thou joined #perl6
02:46 xenoterracide_ joined #perl6
03:03 Woodi joined #perl6
03:19 gdeepi__ joined #perl6
03:20 ventica joined #perl6
03:29 hoverboard joined #perl6
03:29 water joined #perl6
03:48 ventica2 joined #perl6
03:50 nbrown joined #perl6
04:00 kurahaupo joined #perl6
04:02 kaare_ joined #perl6
04:10 slavik joined #perl6
04:25 thou joined #perl6
04:42 ventica joined #perl6
04:50 chenryn joined #perl6
04:55 labster joined #perl6
05:13 chenryn joined #perl6
05:14 thou joined #perl6
05:15 gfldex joined #perl6
05:19 kaare_ joined #perl6
05:19 water joined #perl6
05:55 [Sno] joined #perl6
06:01 denis_boyun_ joined #perl6
06:03 SamuraiJack joined #perl6
06:16 dalek perl6-bench: 563ba46 | (Geoffrey Broadwell)++ | analyze:
06:16 dalek perl6-bench: Draft implementation of summarize_results_html_history
06:16 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/563ba46583
06:21 perlfan joined #perl6
06:27 sergot timotimo: yeah I do
06:31 perlfan joined #perl6
06:31 sergot timotimo: HTTP::UserAgent (with (Open)SSL/TLS support) is usable, I'll write a blogpost about this today
06:31 darutoko joined #perl6
06:32 sergot timotimo: a lot of work left, but anyway, it is something :)
06:36 hoverboard joined #perl6
06:47 gamo joined #perl6
06:48 purkinje joined #perl6
07:01 moritz \o
07:01 moritz sergot++ # lot of work
07:02 sergot hi moritz
07:02 sergot thanks :)
07:04 zakharyas joined #perl6
07:07 chenryn joined #perl6
07:11 ventica m: say 'a'.ord;
07:11 camelia rakudo-moar c00999: OUTPUT«97␤»
07:11 ventica m: say 0x61.char;
07:11 camelia rakudo-moar c00999: OUTPUT«No such method 'char' for invocant of type 'Int'␤  in block  at /tmp/9wKhLKodwU:1␤␤»
07:11 ventica m: say 0x61.chr;
07:11 camelia rakudo-moar c00999: OUTPUT«a␤»
07:12 ventica m: print "foo";
07:12 camelia rakudo-moar c00999: OUTPUT«foo»
07:15 ventica m: for 0x2f X (0x40, 0x0) -> $b, $c { print ($b+$c).chr }
07:15 camelia rakudo-moar c00999: OUTPUT«o/»
07:22 synthetic-sky joined #perl6
07:27 silug joined #perl6
07:28 Ven joined #perl6
07:29 dayangkun joined #perl6
07:39 VitaoDoidao joined #perl6
07:39 VitaoDoidao people, may anybody help me ? how can I send the variable 'nick' of the hash 'bot' to the sub ? i've tried: irc::raw("NICK $bot{nick}");
07:40 Ven VitaoDoidao: %bot<nick> ? are you sure it's $bot ?
07:40 Ven or is it an object, and you're looking for $bot.nick ?
07:40 VitaoDoidao Ven I mean this: $bot{'nick'}='TESTEVD';
07:40 Ven VitaoDoidao: then $bot<nick>, but that probably should be %bot :).
07:41 VitaoDoidao Ven yes, 'nick' inside %bot
07:41 VitaoDoidao how can I send to irc::raw ?  irc::raw("NICK $bot{nick}") didn't work =/
07:42 Ven VitaoDoidao: I'm guessing you're a p5er. Perl6 has sigil invariance - if you want the element 0 of an array "@a", it @a[0], not $a[0] (the sigil is a part of name)
07:43 Ven so if you have a hash, you access it with `%bot{'nick'}`, or as a shortcut, `%bot<nick>`
07:44 FROGGS VitaoDoidao: what perl version are you using?
07:46 chenryn joined #perl6
07:46 silug joined #perl6
07:49 rindolf joined #perl6
07:49 ventica2 joined #perl6
07:56 gamo m: what is a postfix?
07:56 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/52ldnfiLDVâ�¤Two terms in a rowâ�¤at /tmp/52ldnfiLDV:1â�¤------> [32mwhat is a postfix[33mâ��[31m?[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤â€¦Â»
07:57 FROGGS m: my $x; say $a++; # gamo: the ++ is a postfix, like [] on arrays is
07:57 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/y75aGgcPKMâ�¤Variable '$a' is not declaredâ�¤at /tmp/y75aGgcPKM:1â�¤------> [32mmy $x; say $a++[33mâ��[31m; # gamo: the ++ is a postfix, like [] o[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
07:57 FROGGS m: my $x; say $x++; # gamo: the ++ is a postfix, like [] on arrays is
07:57 camelia rakudo-moar c00999: OUTPUT«0␤»
07:58 gamo thanks. I have an error in EOF line which doesn't make sense, then.
07:59 FROGGS gamo: can you put that code in a gist?
07:59 FROGGS my guess is that there is a missing parentheses or curly
07:59 gamo Unable to parse quote-words subscript; couldn't find right angle quote
08:00 FROGGS please show me your code :o)
08:00 moritz gamo: it could be that you're writing  $a < $b as $a<$b, and thus the < is parsed as a subscript
08:00 gamo It's a long code
08:00 moritz like in %hash<key>
08:00 moritz copy & paste for the win!
08:00 moritz (into https://gist.github.com/, not into the channel)
08:04 FROGGS TimToady: in my v5 grammar (branch nqp_to_perl6) I have the problem that the 'my' in 'my $a = 42' ends up being a <name> when it should be a scope_declarator... What is responsible for that choice?
08:05 gamo https://gist.github.com/99af027472f5b0d4917b.git
08:05 FROGGS TimToady: when I put a <!before 'my'\s> in term:sym<name> it works correctly... Does that mean that my precedence parser is borken?
08:06 FROGGS gamo: here: https://gist.github.com/anonymous/99​af027472f5b0d4917b#file-5x5e-pl-L123
08:06 FROGGS and the line below
08:06 FROGGS what moritz++ said
08:07 FROGGS put space around infix operators, like $j + 1 <= $L instead of $j+1<=$L
08:09 dmol joined #perl6
08:09 novice3141592 joined #perl6
08:09 Ven that's some p11 code right here :)
08:10 FROGGS Ven: which is valid :o)
08:10 Ven definitely valid
08:11 woosley left #perl6
08:12 ssutch joined #perl6
08:12 VitaoDoidao how can I send keys to subroutines ? it isn't working: IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>​$server{'address'},PeerPort=>$server{'port'})
08:13 moritz VitaoDoidao: Perl 6 uses . for method calls, not ->
08:13 novice3141592 how to start perl6 aside rakudo directory ( error is: "Could not find or load main class perl6") ?
08:13 FROGGS VitaoDoidao: what version of perl are you using?
08:13 moritz novice3141592: you install rakudo ("make install")
08:13 FROGGS novice3141592: that should just work... what version of rakudo do you have?
08:14 VitaoDoidao FROGGS This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-thread-multi
08:14 novice3141592 last
08:14 gamo ok, how can I write "------>     return @cand[int ⏏(@cand*rand)];
08:14 gamo
08:14 novice3141592 This is perl 5, version 16, subversion 2 (v5.16.2) built for darwin-thread-multi-2level
08:14 FROGGS VitaoDoidao: that's a Perl 6 channel...
08:14 VitaoDoidao k sry
08:14 FROGGS VitaoDoidao: np :o)
08:14 FROGGS novice3141592: no, in the rakudo dir, run ./perl6 --version
08:14 Ven why not try out Perl 6 :) ?
08:15 novice3141592 This is perl6 version 2014.07-62-gc00999a built on JVM :))
08:16 FROGGS novice3141592: nice, very recent :o)
08:16 FROGGS novice3141592: yeah, make install should do
08:16 FROGGS also, put the directory it installs the perl6-j and perl6 binary to into your PATH
08:16 novice3141592 i understand, but i did make install
08:17 FROGGS what gives you `which perl6` ?
08:17 FROGGS does that point to the same directory?
08:18 moritz novice3141592: by default, 'make install' installs it into the install/bin/ subdirectory of the rakudo dir
08:19 moritz novice3141592: that is, unless you specifified a --prefix= in the Configure.pl invocation
08:19 novice3141592 ok
08:24 Ven (don't make the same mistake I did, don't add rakudo to your path :P)
08:25 moritz Ven: there's nothing wrong with putting rakudo in your path
08:25 Ven moritz: yes it is, you can't use perl 6.
08:25 moritz Ven: you cannot? care to elaborate?
08:25 Ven it'll error out if you add rakudo to your path instead of install/bin/
08:26 moritz oh, you mean the source dir
08:26 moritz yes, that's a bad idea indeed
08:26 moritz I misunderstood
08:26 FROGGS yeah, that makes sense :o)
08:26 Ven would be surprising if I was saying "don't use perl 6", kinda.
08:27 gamo error: ------>     return @cand[int ⏏(@cand.elements * rand)];
08:28 moritz int is a type, not a prefix
08:28 moritz gamo: you can say  (...).Int
08:28 moritz gamo: or
08:28 moritz return @cand.pick
08:28 telex joined #perl6
08:28 moritz same thing, more idiomatic :-)
08:28 moritz m: say (1..20).pick
08:28 camelia rakudo-moar c00999: OUTPUT«17␤»
08:28 moritz m: say (1..20).pick
08:28 camelia rakudo-moar c00999: OUTPUT«16␤»
08:29 gamo thank you!
08:29 moritz m: say ('a'...'z').pick
08:29 camelia rakudo-moar c00999: OUTPUT«l␤»
08:29 Ven .oO( is this jnthn's 5-to-6 slides :P ?)
08:29 masak good antenoon, #perl6
08:30 moritz good masak, antenoon
08:30 virtualsue joined #perl6
08:31 * masak good, antenoon also pretty OK
08:32 masak oh, and everyone except me prefers .pick for the one-element case, but I prefer .roll ;)
08:32 Ven (roll with it !)
08:32 masak (as I prefer not to bring in the whole "without replacement" machinery unless I have to)
08:33 dakkar joined #perl6
08:37 gamo now, ./perl6 5x5e.pl hangs
08:39 moritz debug it!
08:40 kivutar joined #perl6
08:42 Ven perl6-debug to the rescue
08:42 t__ joined #perl6
08:43 moritz or simply say()-statements
08:44 moritz oh, a common case for hanging is quantifying zero-width matches in a regex
08:44 Ven who does that ?
08:44 * moritz
08:44 Woodi joined #perl6
08:44 moritz I'm not the debugger kinda guy
08:48 tgt joined #perl6
08:49 Ven that's sad, in 2014 :(
08:49 moritz debuggers aren't a 2014 thing :-)
08:50 Ven that only makes it even worse.
08:50 masak I rely on say() statements a lot, too.
08:50 masak but that's after writing plenty of tests.
08:50 moritz why? because I debug different from the way you do it?
08:50 moritz do you also feel sad for people using different OS or different editors than you do?
08:51 Ven no, they do them. I switch from one to another often enough.
08:52 Ven debugging with say is just being locked in the past. I don't remember how far perl6-debug goes, but a "real"® debugger that allows you to see code, evaluate expressions at a point of time, and jump from one callframe to another will always be better than just say()s
08:53 masak I politely disagree.
08:53 Ven but I'm definitely a beaten horse there :).
08:53 moritz if you say, it must be like that.
08:53 chenryn joined #perl6
08:53 Ven beating a dead horse, even
08:53 FROGGS I'm also a say() guy
08:54 masak I'm not sure where the "debuggers are better than say()" elitism comes from, except that if I didn't know it existed and someone told me it did, I probably wouldn't have been that surprised.
08:55 Ven you're being judgmental by calling it "elitism", though :) (not saying i'm not when I say it's being locked in the past, though)
08:56 moritz I think the argument is simply "it gives you more options, so it's better"
08:56 Ven it's not about options. It's about being tied vs being free
08:57 * moritz is free to debug with say() as long as he wants, and use other tools when say() isn't appropriate anymore
08:57 moritz freedom!
08:57 Ven you're free to answer with a non-argument, yes :-)
08:58 moritz Ven: I'm not tied if nobody or nothing ties me
08:58 pmurias joined #perl6
08:58 pmurias what package do I need under debian to get the icu required for parrot?
08:58 moritz pmurias: libicu-dev iirc
08:58 Ven moritz: you're tired because, once your program is started, you can't add, change or remove a say. You can't replace a function at runtime to test its behavior. You can't get additional informations from other variables you didn't say. You can't jump between call frames to say() other variables at previous point of time
08:59 Ven tied*.
08:59 salv0 joined #perl6
08:59 moritz pmurias: should be documented in rakudo's README somewhere
08:59 moritz Ven: but I'm also free to launch the program under the debugger the next time, should I chose to do so
08:59 Ven yes. But then, you're using the debugger, and your points don't hold true anymore.
08:59 moritz Ven: which point?
09:00 Ven "I can do that with say"
09:00 moritz Ven: my point is that, 95% of the time, say() is just fine
09:00 moritz Ven: and when I need the debugger in the other 5%, it is available to me just as it is to you
09:01 Ven Then we just disagree :-). say is fine 10% of the time, when the code just goes on after some error
09:01 moritz I'm not fighting a war against debuggers; I'm just not using them most of the time
09:02 Ven i.e. when I'm doing rails and some exception pops up, I just get a page with my call stack / the framework's, a REPL where I can type code evaluated in that one callframe, the code around that line in the callframe, the environment with params etc, ...
09:02 pmurias I'm having the icu header in /usr/include/x86_64-linux-gnu/unicode and parrot is searching in /usr/include/unicode
09:02 moritz and now we're just in the realm of personal preferences
09:02 moritz pmurias: yes, needs a symlink; either parrot's configure is broken, icu's config introspector
09:03 FROGGS that was meant to be fixed... :/
09:03 FROGGS (by parrot)
09:03 Ven (")
09:04 thou joined #perl6
09:04 Ven (you can say all you want in a breakpoint, you can't debug in a say, that's all)
09:04 pmurias FROGGS: I'm using an old parrot
09:04 FROGGS ahh
09:05 FROGGS yeah, symlink ftw :o)
09:05 pmurias FROGGS: I haven't update nqp-js to the newest nqp yet
09:05 pmurias * updated
09:05 FROGGS pmurias: though you could build and use a parrot 6.6.0 without problems
09:06 pmurias I'm trying to get 'perl Configure.pl --backends=parrot,js';make;make install; nqp-js -e 'say("Hello World")' to work
09:07 pmurias FROGGS: s/perl Configure.pl/perl Configure --gen-parrot/
09:07 FROGGS that sounds lovely :o)
09:09 jnthn One of the reasons perl6-debug has tracepoints as well as breakpoints is because some problems are much easier to work out if you've a dump or log and can read through it.
09:12 FROGGS pmurias: when I configure for --backends=js only, it still builds pir stuff
09:12 FROGGS ahh, it cross compiles... (still)
09:15 Vlavv joined #perl6
09:15 pmurias FROGGS: currently the build process is a bit complex
09:15 pmurias FROGGS: it uses a installed nqp-p which I think needs to be built from the nqp-js repo
09:15 FROGGS ahh
09:16 pmurias I'm working on getting <perl Configure.pl --backends=parrot,js;make;make install; nqp-js -e 'say("Hello World")' > to work
09:16 FROGGS is it planned to be self hosting?
09:17 pmurias it's planned to be bootstraped at some point
09:17 FROGGS k
09:17 pmurias but the performance will likely have to be improved before it's the default option
09:17 FROGGS yeah, I see
09:17 nwc10 does that matter? How many end users build, versus how many download?
09:18 FROGGS good point
09:18 FROGGS for compiler dev purposes it matters though
09:19 nwc10 yes, good point
09:19 FROGGS you dont wanna wait 15 minutes for a single change
09:19 nwc10 fastest compiler dev backend is Moar
09:19 pmurias how much faster then parrot is it?
09:20 nwc10 IIRC for compiling the setting, factor of 2 or 3
09:20 nwc10 not sure about "this week"
09:20 nwc10 jnthn lopped a couple more seconds off on Sunday
09:27 sergot m: grammar A { token TOP { <a> } token a { a } }; say A.parse("a");
09:27 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/52lDSRGbC5â�¤Two terms in a rowâ�¤at /tmp/52lDSRGbC5:1â�¤------> [32mgrammar A { token TOP { <a> } [33mâ��[31mtoken a { a } }; say A.parse("a");[0mâ�¤    expecting any of:â�¤        statement li…»
09:28 sergot m: grammar A { token TOP { <a> }; token a { a } }; say A.parse("a");
09:28 camelia rakudo-moar c00999: OUTPUT«「a」␤ a => 「a」␤␤»
09:28 sergot m: grammar A { token TOP { <a> }; token a { a } }; say A.parse("bab");
09:28 camelia rakudo-moar c00999: OUTPUT«(Any)␤»
09:28 sergot m: grammar A { token TOP { .*? <a> .*? }; token a { a } }; say A.parse("bab");
09:28 camelia rakudo-moar c00999: OUTPUT«(Any)␤»
09:28 sergot why doesn't it work?
09:28 sergot does it not
09:33 FROGGS sergot: .*? is non-greedy, and thus it is happy to match nothing
09:34 chenryn joined #perl6
09:34 FROGGS m: grammar A { token TOP { ^ .*? <a> .*? $ }; token a { a } }; say A.parse("bab");
09:34 camelia rakudo-moar c00999: OUTPUT«「bab」␤ a => 「a」␤␤»
09:35 FROGGS this way you force it to try to match from beginning to end
09:36 FROGGS your version was happy to match 'a' alone, and then failed because .parse is meant to match everything
09:36 FROGGS m: grammar A { token TOP { .*? <a> .*? }; token a { a } }; say A.subparse("bab"); # in opposite to this
09:36 camelia rakudo-moar c00999: OUTPUT«「ba」␤ a => 「a」␤␤»
09:39 sergot FROGGS++
09:39 sergot thanks! :)
09:39 sergot m: grammar A { token TOP { <a> }; token a { a } }; say A.subparse("bab");
09:39 camelia rakudo-moar c00999: OUTPUT«#<failed match>␤»
09:41 dmol joined #perl6
09:44 liztormato joined #perl6
09:55 kurahaupo joined #perl6
09:57 pmurias what could be causing: http://pastie.org/9429047?
09:58 pmurias it works if I remove the --module-path from "./nqp-p --target=pir --module-path=gen/js/stage1/ --output=gen/js/stage1/QAST/Compiler.pir --encoding=utf8 src/vm/js/QAST/Compiler.nqp"
09:58 pmurias but gen/js/stage1 is empty
10:04 FROGGS that looks very different from my nqp... i.e. I have no QAST subdir
10:04 VitaoDoidao left #perl6
10:04 FROGGS but, I'd expect that QRegex.pir would be in stage1, because the file you compile wants it
10:05 FROGGS so the error you see might very well be just caused by the missing QRegex
10:06 pmurias QRegex?
10:08 FROGGS yes
10:09 FROGGS your backtrace points to nqp/src/HLL/Grammar.nqp:614:            ParseShared, '%!marks');
10:10 virtualsue joined #perl6
10:16 rindolf joined #perl6
10:17 pmurias is it possible to add a second directory to the search path?
10:20 masak Ven: these two facts can co-exist in the same universe: (a) debuggers are just as great as you feel they are. (b) most of the time for most of the code moritz and I debug, a debugger feels like overkill.
10:39 masak Ven: you're being hypocritical by pointing out that your counterpart is being judgemental. this discussion started out by you stating matter-of-factly that say() has no place in 2014.
10:43 xragnar_ joined #perl6
10:48 colomon printf / say debugging frequently is wildly better than using a debugger.  it depends on the kind of problem.
10:52 thou joined #perl6
10:53 masak ah, finally the "it's context-dependent" cavalry arrived.
10:55 masak maybe Ven does a whole lot of web development, where it makes more sense to use a debugger most of the time.
11:10 fhelmberger joined #perl6
11:12 FROGGS[mobile] joined #perl6
11:15 chenryn joined #perl6
11:18 carlin the debugger has been very useful the few times I've used it
11:18 carlin and the pretty colours. it's very well put together
11:19 takesako joined #perl6
11:34 colomon masak: problems that involve a lot of processing are frequently better handled by dumping output via say and then going over it with grep or a small perl script.  On the other hand, one time problems like a seg fault are frequently easily handled by the debugger.  Knowing what tool to use when is quite valuable.
11:39 masak *nod*
11:46 masak thinking back at the situations I use say(), I realize I probably should use assert() more.
11:47 rindolf Hi all.
11:48 rindolf TimToady: hi! Please let me know when you can chat.
11:48 masak rindolf: or you can just write stuff here, and TimToady will backlog over them.
11:48 rindolf masak: OK.
11:49 rindolf Well, I hope TimToady is feeling better.
11:49 masak last I heard, he still has a bubble on his eye.
11:49 masak he's stable, but couldn't change altitude, so no OSCON and no YAPC::EU.
11:51 masak timotimo, lue: [backlog] .comb is the "complement" of .split -- because together, they make up the whole original string.
11:51 rindolf And I'd like to tell him that I recently reached the realisation that both he and I used to be the Hacker King (see https://plus.google.com/+Sh​lomiFish/posts/gyrcAfAASev ) but by the time I realised it, I ended up passing the button to someone else (see the link), but I appreciate the wonderful experience of being that, and TimToday inspired me a lot.
11:51 masak similarly, infix:<%> is the complement of infix:</>.
11:52 masak though the operations for getting the original thing back differ ;)
11:52 rindolf Timbus:  and also see http://www.shlomifish.org/me/rindo​lf/#rindolf_aim_very_high_hitlower
11:52 nbrown joined #perl6
11:53 rindolf TimToady: and also see http://www.shlomifish.org/me/rindo​lf/#rindolf_aim_very_high_hitlower
11:55 Timbus been a while since that's happened
11:56 masak m: $_ = '123'; s[\d] = 7; .say
11:56 camelia rakudo-moar c00999: OUTPUT«723␤»
11:56 masak m: $_ = '123'; s:g[\d] = 7; .say
11:56 camelia rakudo-moar c00999: OUTPUT«777␤»
11:57 masak m: $_ = '123'; s:g[\d] += 1; .say
11:57 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0Ia20teBXj�Malformed assignment operator�at /tmp/0Ia20teBXj:1�------> [32m$_ = '123'; s:g[\d] +=[33m�[31m 1; .say[0m�»
11:57 * masak submits rakudobug
12:00 masak m: $_ = '123'; s[\d] += 1; .say
12:00 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/oc6TodPR96�Malformed assignment operator�at /tmp/oc6TodPR96:1�------> [32m$_ = '123'; s[\d] +=[33m�[31m 1; .say[0m�»
12:00 masak n: $_ = '123'; s[\d] += 1; .say
12:00 camelia niecza v24-109-g48a8de3: OUTPUT«223␤»
12:04 masak n: $_ = '123'; s:g[\d] += 1; .say
12:04 camelia niecza v24-109-g48a8de3: OUTPUT«234␤»
12:06 rindolf Timbus: what a mis-addressing?
12:06 dalek nqp-js: 22b6db7 | (Pawel Murias)++ | .gitignore:
12:06 dalek nqp-js: Remove bin from .gitignore as it's causing trouble with src/vm/js/bin.
12:06 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/22b6db7afd
12:06 dalek nqp-js: 7f3222b | (Pawel Murias)++ | / (2 files):
12:06 dalek nqp-js: Add missing file and add node_modules to .gitignore.
12:06 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/7f3222b6a6
12:14 mr-foobar joined #perl6
12:15 gtodd argh how do a I read STDIN into an array?    I'm doing:   for my @i = lines()  {.... }  I'm actually not using @I for anything directly I think I need it so that $_ does what I want inside the block
12:16 masak m: my @lines = lines(); say @lines.elems
12:16 camelia rakudo-moar c00999: OUTPUT«20␤»
12:16 masak gtodd: you don't need a for loop.
12:16 masak or, at least, this answers your question "argh how do I read STD into an array?"
12:17 masak if you need the for loop, please ask a new, more specific question ;)
12:20 carlin m: for lines() { say $_ }
12:20 camelia rakudo-moar c00999: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
12:21 colomon Huh, weird failure messages in the panda rebootstrap stage of the smoke test overnight.  Don't seem to have messed anything up, mind you….
12:21 colomon # Failed test 'Array of Num'
12:21 colomon # at t/04-roundtrip.t line 39
12:21 colomon #      got: [1.3, 2.8, 32323423.4, 4]
12:21 colomon # expected: [1.3, 2.8, 32323423.4, 4.0]
12:24 FROGGS colomon: I've seen that too!
12:24 FROGGS like one or two days ago...
12:24 FROGGS (with an old panda checkout)
12:25 dalek nqp-js: 534520d | (Pawel Murias)++ | / (3 files):
12:25 dalek nqp-js: Support building a nqp-p instead of using the installed one.
12:25 dalek nqp-js:
12:25 dalek nqp-js: Also now installs all the resulting .js code into node_modules when necessary.
12:25 dalek nqp-js: "perl Configure.pl --gen-parrot --backends=parrot, js; make; make test" - should work
12:25 dalek nqp-js: (It seems to fail one parrot test for some reason)
12:25 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/534520d550
12:25 * masak pays attention to http://perldoc.perl.org/perlsub.html#Signatures for the first time
12:25 masak hm, needs to be enabled manually. pity, but maybe necessary.
12:26 pmurias does our v5 mode support the new signatures?
12:27 masak bare '$' sigils and default parameters, straight from Perl 6.
12:27 masak slurpy paramaters too, but without the * before. makes sense in a Perl 5 context where everything flattens all the time.
12:27 pmurias masak: they are still experimental, there have been problems with ~~ in perl5 so they are likely trying to avoid such a situation
12:27 masak aye.
12:28 masak they are experimental, so you enable them manually, and *then* you get a warning :)
12:28 masak (which can be turned off)
12:28 FROGGS pmurias: no, not yet
12:29 masak I'm surprised they didn't go with '$param?' too -- they seem to write it as '$param=', which is just ugly.
12:30 masak but I may misunderstand that part. their only example is '$=', which I first read as, well, the variable $=
12:30 masak so it's possible this doesn't work for named parameters.
12:31 dalek nqp-js: e06cb9c | (Pawel Murias)++ | / (4 files):
12:31 dalek nqp-js: Some missing changes for the previous commit.
12:31 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/e06cb9c8c3
12:32 Alula_ joined #perl6
12:32 denis_boyun_ joined #perl6
12:34 gtodd masak: heh I want a for loop to run through an array of lines and transmogrify ;-) each line with magic .. I want to get he array from a file I guess no need for stdin perse
12:36 masak gtodd: for $filename.IO.lines -> $line { transmogrify($line) } # profit!
12:36 gtodd plus I'm golfing ... so I wanted ot do something like IO:All in perl5
12:36 gtodd yeah THAT! :-D
12:36 gtodd whee
12:36 masak not golfed at all. it's how I would do it on a normal Tuesday.
12:37 gtodd heh
12:38 gtodd I wonder if me splatting silly code around in public while learning perl6 is a good thing :-|
12:39 masak don't sweat it :)
12:39 masak we're all on some path or other.
12:39 masak searched Gmail for 'to:rakudobug@perl.org from:cmasak@gmail.com' -- 1684 hits.
12:39 masak in two years or so, I can give a '2k RT tickets' talk ;)
12:39 gtodd hahaha
12:39 masak also, seems I started prepending '[BUG] ' to things back in June 2009.
12:40 jnap joined #perl6
12:40 thou joined #perl6
12:40 masak my first actual bug report is titled "There's no way to do .elems on a List of positional captures, because internals are poking out of the Match"
12:40 masak I see I didn't have brevity down pat back then :P
12:40 gtodd errm
12:41 masak clearly that title should be "[BUG] can't do Match.elems in Rakudo" :P
12:41 gtodd compared to the past version of masak I have the advantage of better docs :-)
12:44 masak well, not even better docs will make someone an expert overnight.
12:45 raiph joined #perl6
12:47 nbrown joined #perl6
12:47 gtodd hmm  so when I read a list of IBAN numbers and validate them like this: http://codegolf.stackexchange.com/a/35323/20338
12:47 gtodd it works relaitively nicely
12:48 masak why do you insist on the 'my @i ='. you're not using the array anywhere.
12:48 masak s/\./?/
12:50 masak also, duplicate 'say ' on the second-last line -- could be factored out to the beginning of the line.
12:53 grondilu joined #perl6
12:53 * grondilu logged in after reading about the IBAN code in the log
12:54 * grondilu is confused by s///.uc
12:54 grondilu r: $_ = "foo"; say s/foo/bar/.uc
12:54 camelia rakudo-jvm c00999: OUTPUT«(timeout)»
12:54 camelia ..rakudo-{parrot,moar} c00999: OUTPUT«BAR␤»
12:55 xinming joined #perl6
12:55 * grondilu did not know that was possible, thought .subst was necessay for that.
12:57 nbrown joined #perl6
12:57 psch hi #perl6
12:57 gtodd masak: yeah that duplicate say I knew I could do that somehow ;-)  I just stuck the /\s|\-|\./ inthere to strip out the spaces "-" and "." from the string
12:57 psch the s///.uc thing there is interesting
12:57 psch apparently 's///.uc' is equivalent to $_ ~~ (s///.uc), which surprised me
12:58 colomon m: $_ = "foo"; say s/foo/bar/.uc; .say
12:58 camelia rakudo-moar c00999: OUTPUT«BAR␤bar␤»
12:59 colomon s/// returns result of substitution, .uc uppercases that result
12:59 colomon but doesn't change $_
12:59 gtodd masak: If I do 'my @i ='  (even if I'm not using @i) then $_ is mutable if I do " for lines() { ...} then I get an error about an immutable Str
12:59 psch m: my $foo = "foo"; say ($foo ~~ s/foo/bar/).uc
12:59 camelia rakudo-moar c00999: OUTPUT«TRUE␤»
12:59 psch ^- that kinda explains where i drew my conclusion from i think?
13:01 gtodd masak: I realize these are sloppy "baby perl6" workarounds for problems I am creating for myself ... but that's how idioms are invented isn't it ?  ;-)
13:01 carlin m: for lines () { say s/(.*)/$//.uc }
13:01 camelia rakudo-moar c00999: OUTPUT«Cannot call 'lines'; none of these signatures match:␤:(Cool:D: *%_)␤  in sub lines at src/gen/m-CORE.setting:14465␤  in block  at /tmp/JhDRT9bQJD:1␤␤»
13:01 carlin m: for lines() { say s/(.*)/$//.uc }
13:01 camelia rakudo-moar c00999: OUTPUT«Cannot modify an immutable Str␤  in sub infix:<=> at src/gen/m-CORE.setting:17044␤  in block  at /tmp/0fuzFMIyys:1␤␤»
13:01 carlin m: for my @a = lines() { say s/(.*)/$//.uc }
13:01 camelia rakudo-moar c00999: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤»
13:02 masak m: for my @ = lines() { s/.//; .say }
13:02 camelia rakudo-moar c00999: OUTPUT«éad slán ag sléibhte maorga Chontae Dhún na nGall␤gus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤uair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤ mo dhiaidh bhí gleanntáin ghlas’ Ghaot…»
13:02 masak gtodd: I see. you still don't need to name the array, though.
13:02 masak m: for [lines] { s/.//; .say }
13:03 camelia rakudo-moar c00999: OUTPUT«éad slán ag sléibhte maorga Chontae Dhún na nGall Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll; Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí I mo dhiaidh bhí gleanntáin ghlas’ Ghaoth D…»
13:03 masak gtodd: that also works, and is shorter.
13:08 gtodd oh nice
13:08 * [Coke] watched the first episode of Fringe last night, and comes in to see liz getting on a plane. yikes.
13:09 grondilu m: .say for q{s/(.**4)(.+)/$1$0/}, q{.=comb.rotate(4).join};
13:09 camelia rakudo-moar c00999: OUTPUT«s/(.**4)(.+)/$1$0/␤.=comb.rotate(4).join␤»
13:09 gtodd masak: I was looking for @_ but it won't work in the "mainline" of a script
13:09 grondilu m: say .chars for q{s/(.**4)(.+)/$1$0/}, q{.=comb.rotate(4).join};
13:09 camelia rakudo-moar c00999: OUTPUT«18␤21␤»
13:10 masak I don't think that .= does what you think it does.
13:10 masak it only applies to the first method call, not to the entire chain.
13:11 grondilu oh yeah, forgot about that
13:11 masak m: say "abcdefghijk".comb[4..*,^4].join
13:11 camelia rakudo-moar c00999: OUTPUT«efghijk␤»
13:12 masak hm.
13:12 masak m: say "abcdefghijk".comb[4..10,^4].join
13:12 camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
13:13 dalek nqp-js: a11e3df | (Pawel Murias)++ | tools/build/ (2 files):
13:13 dalek nqp-js: Avoid unnecesarry installation of node modules.
13:13 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/a11e3dfdf7
13:13 grondilu m: say "abc def ghi jk".comb[4..10,^4].join
13:13 camelia rakudo-moar c00999: OUTPUT«def ghiabc ␤»
13:13 grondilu m: say "abc def ghi jk".comb(/<alpha>/)[4..10,^4].join
13:13 camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
13:14 grondilu isn't there a shortcut for <alpha>?
13:14 pmurias FROGGS: 'perl Configure.pl --backends=parrot,js;make;make test' should now work correctly
13:14 moritz \o/
13:14 grondilu m: say "abc def ghi jk".comb(/\a/)[4..10,^4].join
13:14 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/6AmKPe7V9iâ�¤Unrecognized backslash sequence: '\a'â�¤at /tmp/6AmKPe7V9i:1â�¤------> [32msay "abc def ghi jk".comb(/\[33mâ��[31ma/)[4..10,^4].join[0mâ�¤    expecting any of:â�¤        method argu…»
13:14 masak grondilu: \w is close but not the same.
13:14 FROGGS pmurias: nice! lemme test it :o)
13:15 masak pmurias: wow! pmurias++
13:15 grondilu oh, javascript backend now??
13:16 pmurias it's not yet complete and it currently emits horrible code
13:16 grondilu will it be visible on https://github.com/coke/perl6-roast-d​ata/blob/master/perl6_pass_rates.csv soon?
13:16 pmurias it's only for nqp atm
13:16 grondilu ok
13:16 grondilu pmurias++ anyway
13:17 grondilu m: say "abc def ghi jk".comb(/\a/)[4..*,^4].join
13:17 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9F1sYlexzvâ�¤Unrecognized backslash sequence: '\a'â�¤at /tmp/9F1sYlexzv:1â�¤------> [32msay "abc def ghi jk".comb(/\[33mâ��[31ma/)[4..*,^4].join[0mâ�¤    expecting any of:â�¤        method argum…»
13:17 grondilu m: say "abc def ghi jk".comb(/\</)[4..*,^4].join
13:17 camelia rakudo-moar c00999: OUTPUT«␤»
13:17 grondilu m: say "abc def ghi jk".comb(/\w/)[4..*,^4].join
13:17 camelia rakudo-moar c00999: OUTPUT«efghijk␤»
13:17 grondilu m: say "abc def ghi jk".comb(/<alpha>/)[4..*,^4].join
13:17 camelia rakudo-moar c00999: OUTPUT«efghijk␤»
13:18 grondilu meh
13:18 masak yeah, I expected that to work.
13:18 grondilu m: say (my @ = ^10)[3..*,1,2]
13:18 camelia rakudo-moar c00999: OUTPUT«3 4 5 6 7 8 9␤»
13:18 moritz sorry, I'm late for the fun; what do you want to achieve?
13:18 pmurias FROGGS: if you encounter any problems mention them, as I have only tested it on my machine so there might be portability problems
13:18 masak moritz: golfed way to "rotate" first four chars to the end of string.
13:19 grondilu moritz: golfing IBAN code
13:19 moritz m: say 'abcdefghijk'.comb.rotate(4).join
13:19 camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
13:19 moritz m: say 'abcdefghijk'.ords
13:19 camelia rakudo-moar c00999: OUTPUT«97 98 99 100 101 102 103 104 105 106 107␤»
13:19 moritz m: say 'abcdefghijk'.ords.rotate(4).chrs
13:19 camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
13:20 masak heh, same length ;)
13:20 moritz m: say chrs 'abcdefghijk'.ords.rotate(4)
13:20 camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
13:21 grondilu m: say ~'abcdefghijk'.ords.rotate(4)
13:21 camelia rakudo-moar c00999: OUTPUT«101 102 103 104 105 106 107 97 98 99 100␤»
13:21 grondilu oops
13:21 grondilu m: say ~'abcdefghijk'.comb.rotate(4)
13:21 camelia rakudo-moar c00999: OUTPUT«e f g h i j k a b c d␤»
13:22 grondilu *
13:23 moritz m: say !'abcdefghijk'.comb.rotate(4)
13:23 camelia rakudo-moar c00999: OUTPUT«False␤»
13:23 moritz m: say |'abcdefghijk'.comb.rotate(4)
13:23 camelia rakudo-moar c00999: OUTPUT«efghijkabcd␤»
13:23 chenryn joined #perl6
13:23 moritz wrong rod the first time :-)
13:23 timotimo pmurias: way cool that we can now test it easily :)
13:24 grondilu there is a prefix:<|>?
13:24 moritz to interpolate stuff into argument lists
13:24 masak m: say (|'abc'.comb).^name
13:25 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/suqOKYTh2L�Variable '&prefix:<|>' is not declared�at /tmp/suqOKYTh2L:1�------> [32msay ([33m�[31m|'abc'.comb).^name[0m�»
13:25 masak oh, right.
13:25 masak m: say |'abc'.comb
13:25 camelia rakudo-moar c00999: OUTPUT«abc␤»
13:25 grondilu oh yeah, I don't use that often
13:25 masak moritz++
13:26 isBEKaml joined #perl6
13:26 grondilu not sure why that glues everything when converting to a string, though.
13:26 sergot m: my %l = (<a b>, <c d>).map({ $_[0] => $_[1] }); say %l.perl;
13:27 camelia rakudo-moar c00999: OUTPUT«("c" => Failure.new(exception => X::OutOfRange.new(what => "Index", got => 1, range => 0..0, comment => Any)), "a" => Failure.new(exception => X::OutOfRange.new(what => "Index", got => 1, range => 0..0, comment => Any)), "d" => Failure.new(exception => X::…»
13:27 masak grondilu: because `say 'a', 'b', 'c'` does, too.
13:27 moritz it doesn't convert to a string :-)
13:27 sergot oh, it wasn't a priv msg to camelia
13:27 grondilu oh yeah, my bad
13:28 grondilu so it's actually called for what it's made for.  Neat.
13:28 moritz (golfing is really just cheating as an art form)
13:29 grondilu well, the problem is that we wanted to change $_ at this point, not just print it.
13:30 grondilu so you do want a side-effect, I think.
13:31 grondilu anyway if you guys find a nice golf for IBAN, let me remind you there's a RC entry about it:  http://rosettacode.org/wiki/IBAN#Perl_6
13:32 Ven joined #perl6
13:32 gtodd grondilu: I put one there just now
13:33 Ven masak: indeed, my internship is web dev.
13:33 masak gtodd: not gonna write your golf for you, but I think your best chance to make it short is to make it one single statement: `say ... ?? ... !! for [lines]`
13:33 Ven but even when I do C, scala, C#, or the like, I keep being in a debugger ...
13:33 gtodd grondilu: trying to shorten it ....   (  s:g/\s|\-|\.// ) sigh
13:33 isBEKaml Hmm - I didn't expect to see camelia singing an Irish song. What happened to the Austrian national anthem? :-)
13:34 masak isBEKaml: Austrian national anthem is so 2009 ;)
13:34 gtodd masak: yeah I tried that (to get rid of the {} etc) but it gives me errors ... similar to what happens when there's invalid data ...
13:34 isBEKaml masak: hey, that's a national anthem! It can never go out of vogue :)
13:35 Ven masak: they went with $= or $abc = because it's just "a default but you don't actually assign a value"
13:35 Ven $a = null, if you will
13:36 sergot people, who want to help me with this: https://github.com/sergot/p6-rosettacode-test ? :)
13:36 Ven ooh :)
13:36 sergot a future project, just wanted to give an idea
13:37 sergot any volunteers?
13:37 carlin does rosettacode run mediawiki?
13:37 sergot yes
13:37 masak Ven: yes, I see that rationale. still, an infix op with no rhs is... un-Perlish, if you will.
13:37 erkan joined #perl6
13:37 erkan joined #perl6
13:38 Ven masak: yes, yes. I'm just explaining because I learned about it during YAPC::NA
13:38 carlin sergot: it looks like you're parsing the HTML you could use the API to get the pages
13:38 masak Ven: we had that in Perl 6 once (infix:<..> for infinite ranges), but we realized it was a Bad Idea.
13:38 moritz s/infix/postfix/
13:38 Ven sergot: you want to download each of them every X time, and run them every Y ? or at the same time ?
13:39 moritz if the RHS is missing, it's a postfix
13:39 masak moritz: that sounds like multi-pass parsing to me.
13:39 masak moritz: no, it was literally an infix op where you could skip the rhs.
13:39 Ven LL(*) :P
13:39 masak moritz: clearly this was before TimToady realized the importance of self-clocking :P
13:40 * Ven realizes again the irclog is 2 hour before him
13:40 moritz masak: independently of how you implement it, you don't know if there's a term or an infix expected after it
13:41 pmurias masak: self-clocking?
13:41 sergot carlin: oh, nice idea
13:41 masak pmurias: intricate dance of terms and ops, orchestrated by operand type.
13:41 sergot Ven: I've just created this repo, wanted to test HTTP::userAgent in action
13:42 masak er, *operator type
13:42 sergot Ven: I have no specific plans, but the first idea was to capture every P6 code from particular task and run it
13:42 sergot or save it into t/ dir and then run it using prove
13:43 carlin sergot: http://rosettacode.org/mw/api.php?action=que​ry&amp;list=categorymembers&amp;cmtitle=Cate​gory:Perl_6&amp;cmlimit=max&amp;format=json
13:43 Ven no timestamp,tho :)
13:43 sergot carlin: nice
13:44 sergot carlin: would be great if we could get only the p6 code from particular task :)
13:45 sergot but I doubt it's possible using api
13:49 carlin it is possible to get the text for a specific section
13:49 carlin eg. http://rosettacode.org/mw/index.php?title=​100_doors&amp;action=edit&amp;section=146
13:49 carlin and then mayne parse the code between <lang perl6></lang> blocks
13:49 carlin *maybe
13:50 carlin trying to remember the tricks, been ages since I've used this API
13:52 sergot oh, that's nice
13:52 sergot carlin++
13:53 carlin http://rosettacode.org/mw/api.php?action=query&​amp;prop=revisions&amp;rvprop=content&amp;rvsec​tion=146&amp;titles=100_doors&amp;format=json
13:53 sergot carlin++
13:53 sergot awesome!
13:54 sergot the project is really easy now :)
13:54 sergot and relatively fast
13:54 molaf joined #perl6
13:57 carlin trick is finding the section number for "Perl 6" on each page, I'm sure there's an easy way to get the section number by title
13:57 btyler joined #perl6
13:57 carlin but I can't remember or figure out how
13:59 thou joined #perl6
13:59 nbrown joined #perl6
14:01 carlin tehre we go
14:01 carlin http://rosettacode.org/mw/ap​i.php?action=parse&amp;text={{:100_doors}}&prop=sections&format=json
14:01 carlin you do text={{:page_name}}
14:01 carlin {{ }} imports the text from the page
14:01 carlin :page_name tells it to get "page_name" from the default main namespace
14:01 carlin by default {{ }} imports from the Tempalte: namespace
14:02 Alula_ joined #perl6
14:04 Ven carlin: that's dogslow tho
14:05 sergot yeah
14:05 gtodd grondilu: the country code validator part of my perl6 IBAN codegolf is going to add 300 chars to my answer :-D ... I think ...
14:06 gtodd grondilu: I started it in perl5 since I was going to do the whole thing in perl5 until I noticed I'd need bignum (not allowed?!) or 100 chars of my own function to do mod 97 ...
14:10 gtodd grondilu: I just read numbers and two letter country code sequences into a hash for verification $c{$2}=$1while("SUPER LONG STRING HERE")=~/(\d.)(\D*)/g)  ... so will want to do that in perl6 too ...
14:12 sergot carlin: thanks, if you have some free time, feel free to join me
14:12 sergot carlin: I won't be able to finish this project until 19th Sep tho
14:13 sergot of*
14:13 sergot Aug*
14:14 carlin there doesn't seem to be a way to get section numbers without doing parse, which is odd :/
14:15 PerlJam Too bad rosettacode doesn't have it's own API that sits atop mediawiki's.
14:15 gtodd PerlJam: isn't there a perl5 module that lets you fiddle with rosettacode?
14:16 gtodd PerlJam: oh wait it just lets you fiddle with a local copy
14:21 masak PerlJam: never too late to create an API on top of another ;)
14:25 hoelzro does this seem like a reasonable use of leading comments? sub foo(#|{one} Str $first, #|{two} Int $second) {...}
14:25 spider-mario joined #perl6
14:27 masak yes.
14:28 masak I think that kind of thing is even in S26, no?
14:28 masak or is the example only lagging comments?
14:32 hoelzro leading comments are specified to associate with the declaration beginning on the next line, iirc
14:32 hoelzro I think that the usage makes sense as well, but I wanted others' input
14:33 treehug88 joined #perl6
14:33 masak yes, I think it makes a whole lot of sense.
14:33 PerlJam makes sense but isn't very readable :)
14:34 masak I see that S26 talks about "the start of the line immediately [before/after] [the declarator comment]"
14:34 PerlJam also, S26:288 does say that ... what masak just said
14:34 synopsebot Link: http://perlcabal.org/syn/S26.html#line_288
14:34 mathw I have no idea what they tell me
14:34 masak I think that makes sense for #| and #= but not for #|`() and #=`()
14:35 masak but OTOH, I don't have an immediate fix.
14:35 PerlJam er,  #|`()  ?
14:36 masak oh, er, no `
14:36 PerlJam I wonder if that might lead to some confusion
14:36 chenryn joined #perl6
14:36 masak yeah.
14:36 [Coke] pmurias, grondilu: I will add it the minute it can run any spec tests. :)
14:36 masak we should find something that's easy to reason about.
14:39 jnap1 joined #perl6
14:42 pecastro joined #perl6
14:44 chenryn joined #perl6
14:45 dalek rakudo-star-daily: 00e340d | coke++ | log/ (14 files):
14:45 dalek rakudo-star-daily: today (automated commit)
14:45 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/00e340d59f
14:45 dalek perl6-roast-data: ff0e611 | coke++ | / (5 files):
14:45 dalek perl6-roast-data: today (automated commit)
14:45 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/ff0e611a38
14:46 [Coke] pmurias: do you have a "how to build the cross compiler" readme somewhere? I can see if you happen to run any tests yet. :)
14:48 [Coke] (host07 has node already, yah.)
14:48 carlin would Test.pm work yet?
14:48 Ven it's nqp-only, afaik
14:49 [Coke] ah, right, still early days.
14:59 hoverboard joined #perl6
15:02 [Coke] jvm down to 20 failures, moar is clean, parrot is up to 1708 failures.
15:05 carlin oh dear
15:05 carlin is parrot at "nailed to the perch" stage yet?
15:06 woolfy joined #perl6
15:07 tadzik it's sleeping
15:08 PerlJam carlin: no, it still has active developers.
15:08 PerlJam maybe "developer"
15:08 moritz one gsoc student, one mentor
15:09 moritz and some release manager(s)
15:09 pmurias what is the parrot gsoc project?
15:09 carlin oh wait, parakudo had 0 fails yesterday?
15:10 robinsmidsrod joined #perl6
15:11 Ven pmurias: vtable opt, or something.
15:11 [Coke] yes.
15:11 Ven pmurias: https://www.google-melange.com/gsoc/project/det​ails/google/gsoc2014/chirag14/5717271485874176
15:11 [Coke] carlin: puts is dead. niecza is in a coma. rakudo.parrot was just hit by a bus today.
15:11 [Coke] *pugs
15:11 Ven [Coke]: how many parrot failures yesterday :) ?
15:12 [Coke] 11:09 < carlin> oh wait, parakudo had 0 fails yesterday?
15:12 Ven hahaha then it's alright, a bus can be fixed :P
15:12 [Coke] 7/27, not quite yesterday.
15:13 [Coke] between rakudo 8db87b5 and 319a78b, the number of failures jumped.
15:13 Ven well, it'd be surprising if so much stuff changed in how perl 6 should behave, right ?
15:13 Ven might be a parrot-specific bit missing ? Just a bold guess
15:14 [Coke] um, what happened to commit 319a78b ??
15:14 [Coke] did somebody force push to nom?
15:15 FROGGS [Coke]: I know that timotimo did once a few days ago... but I can see that commit on github
15:15 pmurias [Coke]: hit by a bus? it lost it's main developer?
15:15 [Coke] ah, whew.
15:15 [Coke] pmurias: NO
15:16 [Coke] it was merely colorful language. parrot tests started failing 2 days ago.
15:16 pmurias I misread it "as parrot was just hit by a bus"
15:16 [Coke] went from 0 fails to 1856 fails to 1708 fails.
15:16 [Coke] no, that's what I meant to say, yes. but just in the context of https://github.com/coke/perl6-roast-d​ata/blob/master/perl6_pass_rates.csv
15:16 [Coke] and esp. with the comparison with the other two.
15:17 [Coke] and I hadn't git fetch'd, duh.
15:17 [Coke] (whew)
15:17 [Coke] most likely culprit is 9515bb7
15:18 kaare_ joined #perl6
15:19 pmurias FROGGS: did building nqp-js work?
15:20 * [Coke] starts a bisect.
15:20 FROGGS pmurias: sorry was away... running 'make' right now
15:20 FROGGS [Coke]++
15:21 xinming joined #perl6
15:24 FROGGS pmurias:
15:24 FROGGS mkdir -p gen/js/stage2
15:24 FROGGS ./nqp-p src/vm/js/bin/cross-compile.nqp gen/js/stage2/QRegex.nqp gen/js/stage2/ QRegex NQPCORE 1
15:24 FROGGS "load_bytecode" couldn't find file 'QAST/Compiler.pbc'
15:24 FROGGS :o(
15:29 xinming joined #perl6
15:30 MilkmanDan joined #perl6
15:31 treehug88 joined #perl6
15:33 cognome joined #perl6
15:35 Akagi201_ joined #perl6
15:38 pmurias FROGGS: hmm, looking into that
15:42 pmurias FROGGS: ls gen/parrot/QAST?
15:42 pmurias FROGGS: Could you run "ls gen/parrot/QAST"
15:43 FROGGS pmurias: there is no QAST subfolder
15:46 FROGGS pmurias: but I've got a gen/js/stage1/QAST/Compiler.pbc
15:47 pmurias it seems so files disappeared
15:47 pmurias s/so/some
15:47 pmurias did you start with a clean checkout?
15:48 dmol joined #perl6
15:48 FROGGS pmurias: yes
15:49 pmurias you didn't delete gen/parrot?
15:49 FROGGS no :o)
15:50 FROGGS nqp-js$ LC_ALL=C git status
15:50 FROGGS # On branch master
15:50 FROGGS nothing to commit, working directory clean
15:52 pmurias what happens if you 'rm -fr gen/js/stage1' and run make again?
15:54 FROGGS (it still compiles)
15:55 FROGGS pmurias: that seems to do the trick
15:55 FROGGS now I get to: sh: 1: npm: not found
15:55 FROGGS (installing it now)
15:59 chenryn joined #perl6
16:00 aoseki joined #perl6
16:03 rurban joined #perl6
16:04 btyler_ joined #perl6
16:08 FROGGS pmurias: Error: Cannot find module '/home/froggs/dev/nqp-js/node_modules/nqp-​runtime-node/node_modules/sleep/build.js'
16:08 FROGGS pmurias: https://gist.github.com/FR​OGGS/cb1f2ab1fb5da325663a
16:10 chenryn joined #perl6
16:15 tgt_ joined #perl6
16:17 psch FROGGS: you might have to symlink nodejs to node in your PATH - i know i had to do that, with the error "npm WARN This failure might be due to the use of legacy binary "node""
16:17 tgt joined #perl6
16:18 psch pmurias: i get as far as you pasted here a bit ago: 'Can not get attribute '%!marks' declared in class 'ParseShared' with this object'
16:19 tgt_ joined #perl6
16:21 tgt joined #perl6
16:21 pmurias psch: could you paste the entire output from the 'make' command so I can see when it fails?
16:22 FROGGS TimToady: for 'my $a' the EXPR will just parse it as termish which invokes <term>... so I wonder why term:sym<name> is preferred over term:sym<scope_declarator> :/
16:22 psch pmurias: make works for me. it fails when i try to run the "it has to be run like this" command from the README
16:22 FROGGS psch: ahh, and I installed node right before that :o)
16:23 FROGGS I'll uninstall node then and do the symlink... though that should not be the solution
16:23 psch FROGGS: you need node, but debian supplies /usr/bin/nodejs instead of /usr/bin/node
16:23 psch i symlinked /usr/bin/nodejs to ~/bin/node, fwiw
16:24 pmurias the debian package node is some strange ham radio thing that 3 people use
16:25 denis_boyun_ joined #perl6
16:25 FROGGS psch: I see
16:25 psch FROGGS: the alternative is apparently nodejs-legacy, which does the symlinking itself
16:26 FROGGS but still, can't we use nodejs instead?
16:26 psch (i just found that out from here: https://groups.google.com/for​um/#!topic/Nodejs/Z8F8uDXY8XE)
16:26 psch apparently the node-people themselves aren't unified in whether debian is wrong or not
16:27 timo joined #perl6
16:28 FROGGS :/
16:28 pmurias FROGGS: your problem is that some packages seem to be broken on nodejs
16:30 pmurias FROGGS: did symlinking fix the problem?
16:31 timotimo hm, my screen session died
16:31 timotimo what did i miss?
16:31 pmurias FROGGS is trying to build nqp-js
16:32 pmurias but some node.js modules don't built
16:32 pmurias likely due to debian developers crippling his node.js
16:33 timotimo mhm :\
16:37 pmurias FROGGS: I could try to make those modules optional but it seems something is wrong with your node.js?
16:37 pmurias FROGGS: maybe you could try installing node.js from source?
16:39 sjn_roadie joined #perl6
16:40 dmol joined #perl6
16:45 beastd joined #perl6
16:51 psch FROGGS: this might be obvious by now, you need the package nodejs or nodejs-legacy to get the node.js interpreter, which the former supplies as /usr/bin/nodejs and the latter as /usr/bin/node as a symlink to /usr/bin/nodejs
16:56 pmurias psch: his problem seems to be that node modules with a C part don't work
16:57 psch pmurias: that might be as well, i'm just adding what i did to make it work on debian
16:57 psch fsvo "work"
16:58 psch https://gist.github.com/pe​schwa/edaa138349b060598488 <- this value of "work", actually
16:58 psch installing libgmp was another thing i had to do iirc
17:01 takesako joined #perl6
17:02 dmol joined #perl6
17:02 nbrown joined #perl6
17:05 Rotwang joined #perl6
17:07 sjn_ joined #perl6
17:08 timotimo http://www.reddit.com/r/perl/comments​/2bzulc/rakudojvm_put_out_to_pasture/ - i think this ought to properly explain to people what's going on, eh?
17:10 pippo joined #perl6
17:10 pippo o/ #perl6!
17:11 pippo m: my $b = 10; 'a' x 10 ~~ /a ** $b/;
17:11 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bWS9wxLHJ8â�¤Quantifier quantifies nothingâ�¤at /tmp/bWS9wxLHJ8:1â�¤------> [32mmy $b = 10; 'a' x 10 ~~ /a ** [33mâ��[31m$b/;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopper…»
17:11 pippo m: 'a' x 10 ~~ /a ** 10/;
17:11 timotimo (if you looked at that link a few minutes ago, refresh. i posted another bit of text)
17:11 camelia rakudo-moar c00999: ( no output )
17:11 pippo m: 'a' x 10 ~~ /a ** 10/; say $/;
17:11 camelia rakudo-moar c00999: OUTPUT«「aaaaaaaaaa」␤␤»
17:12 pippo timotimo: yes I did!! :-)) I am refeshing now...
17:16 pippo o/
17:17 pippo left #perl6
17:19 bjz_ joined #perl6
17:21 carlin carlosdelrey sure is commited to hating perl6 for some reason :/
17:22 akaseki joined #perl6
17:27 Akagi201 joined #perl6
17:30 sjn_roadie joined #perl6
17:31 TimToady s///.uc if relying on buggy, non-spec behavior, and will break in the future if you expect it to return the entire string rather than the Match
17:31 TimToady s/if/is/
17:31 yeltzooo joined #perl6
17:32 timotimo carlin: yup, "redditor for 2 months" and exclusively comments about spreading hateful speech about perl6
17:32 timotimo and it seems to be the case that that's the same person who's been trolling on perlmonks for quite a while
17:34 flussence don't worry, his head will explode sooner or later, either from his ego or a vein popping
17:35 TimToady .oO(...then you win.)
17:35 timotimo i wouldn't wish that upon them
17:35 timotimo i wish that person finds a better meaning in life than to spread hate about other people's work
17:36 TimToady well, not the first illigitimi we've non-carborundumed...
17:36 timotimo i wonder if we should upvote that post just so that people see how ridiculous carlosdelreys trolling is ... will people actually read the comments rather than just the title?
17:38 TimToady s/illigitimi/illigitimus/ I guess
17:39 flussence I wonder if someone should just poke the reddit admins about this, since I've observed anyone that doesn't agree with this person seems to end up with a disproportionately massive number of downvotes over the space of a few minutes.
17:39 TimToady So put it in the quotes files as: Well, he's not the first illigitimus we've non-carborundumed. :)
17:40 TimToady unless it's a she
17:41 PerlJam she's the first illigitimus we've non-carborundumed?
17:41 PerlJam ;)
17:42 TimToady we've had she's before too
17:42 TimToady but it's mostly he's
17:43 timotimo m: say "he's".comb.rotate(1).join
17:43 camelia rakudo-moar c00999: OUTPUT«e'sh␤»
17:43 timotimo m: say "he's".comb.rotate(-1).join
17:43 TimToady 'sides, she wouldn't be an -us
17:43 camelia rakudo-moar c00999: OUTPUT«she'␤»
17:43 TimToady illigititma or some such
17:44 TimToady *illigitima
17:44 PerlJam freudian slip?
17:44 TimToady .oO(freudian typo)
17:45 carlin "... who edits out everything from the IRC logs that could possibly make anyone in the inner circle look bad"
17:45 carlin ^ 5 upvotes
17:45 carlin how does anyone take this person seriously?
17:46 flussence those 5 upvotes are all from the same sockpuppet accounts they use to downvote everyone else; nobody right-minded could agree with that :)
17:49 [Sno] joined #perl6
17:57 PerlJam #perl6--  (now I'm reading the thread too)
17:59 FROGGS pmurias: I was able to 'make' it after installing nodejs-legacy
18:04 FROGGS m: my regex foo { <?{ say &?ROUTINE }> <?> }; say "foo" ~~ foo
18:04 camelia rakudo-moar c00999: OUTPUT«foo␤Not enough positional parameters passed; got 0 but expected 1␤  in regex foo at /tmp/nzwnIr5byb:1␤  in block  at /tmp/nzwnIr5byb:1␤␤»
18:05 vendethiel .oO( somebody edits the IRC logs ? Can I ask him to make me sound smart, pretty please ? )
18:05 FROGGS *g*
18:06 TimToady FROGGS: see S05:45; either you're losing under some tiebreaker, or rakudo's tiebreaking is buggy
18:06 synopsebot Link: http://perlcabal.org/syn/S05.html#line_45
18:06 TimToady (adding \s is specifically invoking rule 1 wrt normal identifiers)
18:06 TimToady but STD's my doesn't win that way
18:07 TimToady it's probably losing under rule 3 or 4
18:07 FROGGS hmmm
18:08 FROGGS it is all declared in on grammar though...
18:08 go|dfish joined #perl6
18:08 masak moritz: if I make a custom class, and I want objects of that class to serialize themselves when encountered by to-json, what do I do?
18:08 FROGGS and term:sym<name> is declared later
18:09 FROGGS maybe it is number 5...
18:09 vendethiel TimToady: I kinda recall a case where STD had a very good parsing of <> and rakudo was failing ? I think rakudo was seeing the qw operator then a term (2 terms in a row); but STD managed to parse it well. some memory of that ?
18:09 FROGGS though I still don't understand why it worked when it was an nqp module... the regex engine is identical
18:10 FROGGS the difference now is that my grammar does not inherit from HLL::Grammar anymore
18:10 TimToady as I say, could be a bug in the impl of the rules too
18:10 FROGGS yeah... too many possibilities :/
18:11 FROGGS grammar debugger does not work for slangs unfortunately
18:12 PerlJam vendethiel: you mean like in RT #121843 ?
18:12 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=121843
18:13 jnthn Oh, for fucks sake. Rakudo JVM is *not* put out to pasture. The last major new backend specific feature added to Rakudo was async sockets, which Rakudo JVM had within a month of Moar and they actually *work better* on the JVM than they do on Moar.
18:13 jnthn Talk about selective quoting.
18:13 masak moritz: ah, found it. "just declare another multi to-json" :)
18:13 jnthn Or crappy research.
18:13 masak moritz++
18:13 jnthn Or, well, utter malice, given who we're talking about.
18:17 masak supernovus: ping
18:18 masak jnthn: please let us help you shield you from trolls. don't want you to waste cycles on them :/
18:19 TimToady 1: First they ignore you.  2: Then they laugh at you.  3: Then they fight you.  4: ???  5: Profit!   <-- We're at stage 4. :)
18:20 TimToady FROGGS: you'll have to use a 'say'  :P
18:20 nwc10 I hope this doesn't involve stealing more than 100% of the world's underwear supplies
18:20 FROGGS TimToady: guess what :P
18:21 nwc10 someone at the startup I was working for in 2000 calculated that we could be profitable, but only if we cornered 120% of the market
18:21 nwc10 at least, for socks
18:21 masak well, aim high, that's what I always say.
18:22 TimToady socks are usually low
18:22 TimToady ever since the last sock market crash
18:23 FROGGS jnthn: where are the rules shown at S05:45 implemented?
18:23 synopsebot Link: http://perlcabal.org/syn/S05.html#line_45
18:23 nwc10 I see many puns looming in our near future
18:23 nwc10 and most are going to be pants
18:24 jnthn FROGGS: In the NFA impl, largely. Though 5 is a case of "wtf, I don't even..."
18:24 jnthn And I'm not sure if we get 2 right
18:24 TimToady and that could be the difference here
18:24 FROGGS jnthn: and we do 3?
18:24 TimToady 'my' should win over \w\w
18:25 jnthn FROGGS: I think that falls out of normal method dispatch semantics
18:25 * FROGGS starts to cry
18:25 FROGGS ahh
18:25 TimToady or at lest over \w+
18:25 jnthn FROGGS: The NFAs are caulcuated per class
18:25 TimToady *least
18:25 jnthn And I think we take care to visit/add things in a sensible enough order.
18:26 carlin it's a good thing that Perl6 doesn't have enough valid criticisms that they have to fabricate some
18:26 FROGGS m: grammar G { proto token foo {*}; token foo:sym<name> { <?{ say "&?ROUTINE.name()" }> \w+ }; token foo:sym<my> { <?{ say "&?ROUTINE.name()" }> <sym> } }; say G.parse('my');
18:26 camelia rakudo-moar c00999: OUTPUT«No such method 'TOP' for invocant of type 'G'␤  in method parse at src/gen/m-CORE.setting:13266␤  in block  at /tmp/FlNWZSRofi:1␤␤»
18:27 FROGGS m: grammar G { token TOP { <foo> }; proto token foo {*}; token foo:sym<name> { <?{ say "&?ROUTINE.name()" }> \w+ }; token foo:sym<my> { <?{ say "&?ROUTINE.name()" }> <sym> } }; say G.parse('my');
18:27 camelia rakudo-moar c00999: OUTPUT«foo:sym<name>␤「my」␤ foo => 「my」␤␤»
18:27 FROGGS ha!
18:27 TimToady p6: 'my' ~~ / \w* {say 1} | 'my' {say 2} /
18:28 camelia rakudo-{parrot,jvm,moar} c00999: OUTPUT«1␤»
18:28 camelia ..niecza v24-109-g48a8de3: OUTPUT«2␤»
18:28 TimToady niecza++
18:28 FROGGS sometimes I hate niecza :/
18:28 FROGGS (for being that good)
18:29 jnthn Oh
18:29 jnthn I know a hack approach to impl that.
18:29 FROGGS jnthn: the decision what rule to choose is done in the C code, right?
18:29 jnthn No
18:29 jnthn Well, yes
18:29 jnthn But don't change it there
18:30 FROGGS okay...
18:30 jnthn Just hack the NFA builder to look at the alternatives for literal prefixe
18:30 jnthn *prefixes
18:30 aoseki joined #perl6
18:30 jnthn And then add them in order of longest literal prefix
18:30 jnthn Hmm
18:30 jnthn Maybe :)
18:30 FROGGS err
18:30 brrt joined #perl6
18:30 jnthn Or mebbe we should do it in the NFA thing.
18:30 * FROGGS reads that again
18:30 jnthn Yeah, the transtivie thing may get us in trouble
18:30 TimToady n: 'my' ~~ / m\w {say 1} | 'my' {say 2} /
18:30 camelia niecza v24-109-g48a8de3: OUTPUT«2␤»
18:31 jnthn Not sure how longest literal prefix rule interacts with transitivity? TimToady? :)
18:32 * TimToady doesn't see the problem, offhand
18:32 FROGGS jnthn: do you mean mergesubrule by nfa builder?
18:33 FROGGS or mergesubstates perhaps
18:33 jnthn token foo { 'b' <bar> | \w+ }; token bar { ar }; 'bars' ~~ /<foo>/
18:33 jnthn uh, 'bar' :)
18:33 TimToady looks like 3 literal chars to me
18:33 jnthn OK
18:34 masak tadzik: ping
18:34 jnthn Then we probably will most cleanly handle it in the NFA interpreter.
18:35 FROGGS jnthn: can you point me towards it? ó.ò
18:35 yeltzooo joined #perl6
18:35 masak tadzik++ :D
18:36 tadzik :)
18:36 masak tadzik: that was the quickest merge I've ever seen.
18:36 TimToady but if you hadn't changed 'bars' to 'bar', the \w+ would win, of course
18:36 tadzik I get my emails quickly :D
18:36 masak tadzik: thanks; we needed this for a sekkrit project.
18:36 tadzik I just saw the subject line and said "ok, fairy nuff" :)
18:37 raiph joined #perl6
18:37 masak haha
18:37 masak it was an easy change.
18:38 jnthn TimToady: Yes, realized that just after I wrote it :)
18:38 jnthn FROGGS: NFA.c or so in MoarVM
18:38 vendethiel PerlJam++ # wow, don't know how you managed to find it
18:38 ventica joined #perl6
18:39 denis_boyun joined #perl6
18:40 Possum joined #perl6
18:40 PerlJam vendethiel: complete luck.  I was reading RT earlier today and looked at that ticket.
18:41 FROGGS ahh! comments ftw!
18:41 Possum joined #perl6
18:41 FROGGS /* If we got multiple fates at this offset, sort them by the
18:41 FROGGS * declaration order (represented by the fate number). In the
18:41 FROGGS * future, we'll want to factor in longest literal prefix too. */
18:41 PerlJam FROGGS: so ... it's the future?  :)
18:42 ventica2 joined #perl6
18:42 FROGGS PerlJam: depends... I mean, first I must solve this puzzle
18:43 dmol joined #perl6
18:43 TimToady FROGGS++ is trying to redistribute the future more equitably :)
18:45 * [Coke] finds that one of his github commits is linked to from r/perl6. huh.
18:46 FROGGS [Coke]: about pugs?
18:47 raiph .tell timotimo timotimo++ # p6weekly ... week 28 ... week 30+31 two weeks later ... should that be week 29+30?)
18:47 yoleaux raiph: I'll pass your message to timotimo.
18:51 timotimo oops :)
18:51 yoleaux 18:47Z <raiph> timotimo: timotimo++ # p6weekly ... week 28 ... week 30+31 two weeks later ... should that be week 29+30?)
18:51 raiph timotimo++ # for reddit responses
18:52 SamuraiJack joined #perl6
18:52 vendethiel raiph++ # posting my tutoriel to /r/perl6
18:52 vendethiel I actually was just checking out since you guys were talking about reddit earlier ...
18:54 brrt joined #perl6
18:54 btyler joined #perl6
18:58 yeltzooo joined #perl6
18:58 ventica2 joined #perl6
18:59 gfldex joined #perl6
19:02 Ven joined #perl6
19:04 Ven To mark a class "abstract, I should just make it a role ?
19:05 masak moritz: my to-json idea didn't pan out, for obvious-in-retrospect reasons :(
19:07 Ven m: role A { method m { say 1 } }; class B { method m { say 2 } }; B.new.m # shouldn't this error out ?
19:07 camelia rakudo-moar c00999: OUTPUT«2␤»
19:07 Ven it's only in the case of a multi dispatch ?
19:07 FROGGS Ven: why?
19:07 FROGGS should B do A?
19:07 Ven I forgot the does. my bad
19:08 PerlJam Ven: no, even assuming you meant to say "class B does A"
19:08 Ven m: role A { multi method say { say 1 } }; class B does A { multi method say { say 2 } }; B.new.say
19:08 camelia rakudo-moar c00999: OUTPUT«Ambiguous call to 'say'; these signatures all match:␤:(B: *%_)␤:(B: *%_)␤  in block  at /tmp/sra0igDfM2:1␤␤»
19:08 FROGGS only for multis, yes
19:10 jnthn Yeah, bringing in multis from a role adds them to the candidate list
19:11 jnthn That said, we could make it a compile-time error at compose of the class rather than waiting until runtime given those are clearly in conflict.
19:12 PerlJam btw, is the COMPOSE phaser implemented?
19:12 TimToady ny
19:12 Ven isn't
19:22 * hoelzro .oO( we are the knights who say NYI )
19:27 moritz masak: what was your to-json idea?
19:27 masak moritz: to simply add a new 'multi to-json' for my own data type.
19:27 masak moritz: but it doesn't work out, because the scope in my code and the scope in JSON::Tiny are different.
19:32 Ven m: lazy for ^3 { say 1}; 1
19:32 camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤»
19:32 Ven m: @m := lazy for ^3 { say 1}; 1
19:32 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/EkbGWmWkWpâ�¤Variable '@m' is not declaredâ�¤at /tmp/EkbGWmWkWp:1â�¤------> [32m@m[33mâ��[31m := lazy for ^3 { say 1}; 1[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
19:32 Ven m: my @m := lazy for ^3 { say 1}; 1 # ENOMY
19:32 camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤»
19:33 * Ven doesn't really understand lazy, then.
19:33 Ven m: gather for ^3 { say 1 }; lazy gather for ^3 { say 2 }; # ?
19:33 camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤2␤2␤2␤»
19:34 * TimToady suspects lazy is parsed but nyi
19:34 TimToady it's kinda waiting on the list context refactor
19:35 Ven TimToady: should *all* my examples work, though ?
19:35 Ven that also means eager is kinda useless, uh ? except for `eager 1..*` :P
19:35 TimToady at the moment, it's usually better to stick with the implicit context, and not try to brute force it differently
19:36 Ven I'm just wondering if eager brings something to the table *right now*, not what it should do in specs :). I'm sure they have a purpose
19:36 TimToady unless you really need to force order of side effects
19:37 TimToady but in FP you don't usually use side effects, so in FP 'eager' is useless, theoretically speaking :)
19:37 Ven m: my @a = 1, 2, { say "fetch"; $^a + $^b } ... * > 30; say "alive"
19:37 camelia rakudo-moar c00999: OUTPUT«fetch␤fetch␤fetch␤fetch␤fetch␤fetch␤alive␤»
19:37 Ven uh.
19:37 TimToady and even if you put a 'lazy', a sink context outside of that will make it eager again, probably
19:39 TimToady but I think your 'my @m' above indicates a bug, or a nyi
19:40 TimToady m: @m := (for ^3 { say 1}); 1
19:40 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/LkRQkgXTrdâ�¤Variable '@m' is not declaredâ�¤at /tmp/LkRQkgXTrd:1â�¤------> [32m@m[33mâ��[31m := (for ^3 { say 1}); 1[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
19:40 TimToady m: my @m := (for ^3 { say 1}); 1
19:40 camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤»
19:40 TimToady that seems like a bug
19:41 TimToady constant thrice = do for ^3 { say 1}; 1
19:41 TimToady m: constant thrice = do for ^3 { say 1}; 1
19:41 camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤»
19:41 TimToady n: constant thrice = do for ^3 { say 1}; 1
19:41 camelia niecza v24-109-g48a8de3: OUTPUT«1␤1␤1␤»
19:42 TimToady m: constant thrice = do for ^3,3 { say 1}; 1
19:42 camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤1␤»
19:42 TimToady m: constant thrice = lazy for ^3,3 { say 1}; 1
19:42 camelia rakudo-moar c00999: OUTPUT«1␤1␤1␤1␤»
19:43 TimToady m: constant thrice = gather for ^3,3 { say 1; take $_ }; 1
19:43 camelia rakudo-moar c00999: ( no output )
19:44 TimToady well, you can force it lazy with gather/take anyway
19:46 cognominal http://2014.jsconf.eu/speakers/vyac​heslav-egorov-invokedynamic-js.html
19:52 tony-o is that you?
19:52 TimToady sometimes
19:52 TimToady oh, you're talking to cognominal, so not this time :)
19:53 tony-o haha :)
19:57 colomon joined #perl6
19:57 anaeem1 joined #perl6
20:04 nbrown joined #perl6
20:31 brrt joined #perl6
20:35 dwarring joined #perl6
20:36 pmurias FROGGS: does 'make test' pass tests?
20:37 FROGGS pmurias: All tests successful.
20:38 FROGGS pmurias++
20:39 dalek roast: 6afa585 | (David Warring david.warring@gmail.com)++ | integration/99problems-41-to-50.t:
20:39 dalek roast: unfudged P46. Switched from p5 regex to grammars
20:39 dalek roast: review: https://github.com/perl6/roast/commit/6afa58580e
20:42 dalek nqp-js: 1256c3f | (Pawel Murias)++ | README.pod:
20:42 dalek nqp-js: Update README.
20:42 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/1256c3fee0
20:42 hoelzro FROGGS, pmurias: is that for nqp-js?
20:42 hoelzro (the tests, I mean)
20:42 FROGGS hoelzro: yes
20:42 pmurias it's a subset of nqp-js tests
20:42 hoelzro cool
20:43 pmurias * a subset of nqp test
20:43 hoelzro I unfortunately couldn't get it to build on my machine last night =(
20:43 psch pmurias: i get 1/47 failed for 60-bigint.t
20:43 hoelzro pmurias: do you intend to rebase on origin/master? I think the branch diverged in January, right?
20:44 Akagi201 joined #perl6
20:44 pmurias hoelzro: yes
20:45 pmurias hoelzro: the build process last night was really crazy
20:46 pmurias psch: could you nopaste the result of './nqp-js t/nqp/60-bigint.t?'
20:46 psch pmurias: not ok 22 - pow 0 ** large_number # maybe architecture?
20:47 pmurias psch: re the problem with the command from the readme, I'm sorry, I forgot to update the README
20:47 raiph .oO( p6re ... rakudo packaged so that by default it ignores {braced content} that doesn't start with `use v6;` or more generally `use langx;`)
20:47 hoelzro maybe I'll try rebasing tonight; I think that the version of parrot nqp-js needs is too old for my system
20:48 psch pmurias: https://gist.github.com/pe​schwa/150ce4c48f64247c6b7c # complete output
20:49 pmurias psch: what architecture do you use?
20:49 pmurias hoelzro: that would be great
20:49 psch pmurias: i'm on 32bit 686-pae
20:50 pmurias it's 64bit here
20:57 pmurias psch: http://pastie.org/9430104
20:57 pmurias psch: you could try running it with './nqp-js pasted-file.nqp'
20:59 psch $ ./nqp-js pastie.nqp
20:59 psch not ok 1 - pow 0 ** large_number
20:59 psch # 1
21:02 [Coke] haters gonna hate.
21:04 avuserow pmurias++ # nqp-js hacking
21:07 FROGGS it looks like we do the opposite of #4 of S05:45 :o( (from debugging the NFA)
21:07 synopsebot Link: http://perlcabal.org/syn/S05.html#line_45
21:08 jnthn oh...
21:08 jnthn wait, *earliest* wins?
21:08 jnthn Bah. :)
21:08 jnthn Well, we keep track of the order methods are added. Will just have to iterate them in reverse. :)
21:09 FROGGS jnthn: doing it in reverse order breaks my one-liner :/
21:10 FROGGS but I'd also guess that my topmost rules win :o)
21:10 FROGGS and btw, the NFA picks the rule I want, but it doesn't get run
21:14 Akagi201 joined #perl6
21:15 pmurias psch: could you try that? http://pastie.org/9430174
21:16 pmurias what architecture does camelia run under?
21:17 avuserow m: say $*OS.perl
21:17 camelia rakudo-moar c00999: OUTPUT«"linux"␤Saw 1 call to deprecated code during execution.␤=====================================​===========================================␤$*OS called at:␤  src/gen/m-CORE.setting, line 6255␤Please use $*DISTRO.name instead.␤---------------------…»
21:17 avuserow m: say $*DISTRO.perl
21:17 camelia rakudo-moar c00999: OUTPUT«Distro.new(release => "3.8.0-19-generic", is-win => Bool::False, path-sep => ":", name => "linux", auth => "unknown", version => Version.new('3.2.0.37.generic'), signature => Blob, desc => Str)␤»
21:18 pmurias 64 or 32 bit?
21:18 avuserow was hoping that'd be in there :)
21:18 psch pmurias: i've updated the gist; the output of the latest pastie of yours is at the bottom.  i also fiddled a bit with iterator the exponent downwards, that's the second file
21:18 avuserow m: my int $i = 0; say +~$i
21:18 camelia rakudo-moar c00999: OUTPUT«0␤»
21:18 psch s/iterator/iterating/
21:19 [Coke] oh. I wonder if I can incorporate the rakudo-jvm-in-eclipse work to run perl6 from coldfusion.
21:19 psch pmurias: maybe 5.97**18 is meaningful to you - i don't really see why that's when it should start working though
21:21 psch eh, nvm, gisthub orders the file by name... the latest pastie is at the top then :)
21:22 pmurias psch: it's the same big number I get
21:22 Ven joined #perl6
21:23 FROGGS jnthn: ahh, now I understand why the reverse order fails... it does not think 'use v5' is about a version anymore, but it thinks it is a longname
21:23 FROGGS and thus fails to load v5 aka Perl5.pm
21:24 vendethiel TimToady: uh. adding something to the range made it lazy ... ???
21:24 vendethiel or was it the $_ inside
21:24 raiph Q to #perl6: How might I do slurpandparseurl("http://pastebin.com/kp4eECVk") where the functionality is to get the CSV data (not the whole web page) turned in to a list of lists or somesuch? I gotta run now but hope to have a go tomorrow and will look for answers. tiafaa.
21:24 avuserow pmurias: looks like 64-bit on camelia, though I'm unsure what perl6 variable exposes that. I cheated to find out :)
21:24 virtualsue joined #perl6
21:25 jnthn FROGGS: Ah...hmmm
21:26 jnthn FROGGS: I guess the current setup works well for alternations but not methods...
21:27 FROGGS probably...
21:27 hoverboard joined #perl6
21:27 FROGGS but I don't get that:
21:27 FROGGS 2 fates[0]=21, edge_info[0].act=2
21:27 FROGGS ...
21:27 FROGGS 2 fates[7]=22, edge_info[7].act=2
21:27 FROGGS QRegex::Cursor:323 #22 invoking term:sym<name>
21:27 FROGGS number 21 is the term:sym<scope_declarator>
21:27 FROGGS so in theory it would run that first
21:28 FROGGS but the code in NQP just runs the last candidate...
21:31 FROGGS also MVM_nfa_run_proto returns an array with 21 in slot 0 and 22 in  slot 7
21:31 avuserow m: say $*KERNEL.perl # looks like arch is NYI :(
21:31 camelia rakudo-moar c00999: OUTPUT«Kernel.new(release => "#30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013", name => "linux", auth => "unknown", version => Version.new('30.Ubuntu.SMP.We​d.May.1.16.35.23.UTC.2013'), signature => Blob, desc => Str)␤»
21:32 FROGGS ahh wait, the code in NQP pops >.<
21:32 FROGGS jnthn: so the order is fine and according to spec...
21:33 jnthn oh, and then we traverse it in the wrong order? :)
21:33 FROGGS no, all is good
21:33 jnthn ah :)
21:33 jnthn heh
21:33 jnthn I'm actually looking at alternation code-gen at the moment
21:33 FROGGS except that the rule I want should be in slot seven, but is not
21:35 avuserow oh!
21:35 avuserow m: say $*KERNEL.arch
21:35 camelia rakudo-moar c00999: OUTPUT«x86_64␤»
21:37 timotimo heyo avuserow :)
21:38 itz joined #perl6
21:39 carlin m: say $*KERNEL.^methods
21:39 camelia rakudo-moar c00999: OUTPUT«BUILD name version release hardware arch bits signals gist Str <anon> <anon> <anon>␤»
21:39 Ven m: quietly 1
21:39 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zFk8CnMRBiâ�¤Undeclared routine:â�¤    quietly used at line 1â�¤â�¤Â»
21:39 Ven oh :(
21:40 masak m: undeclared 1
21:40 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Rsp3Lwg4tvâ�¤Undeclared routine:â�¤    undeclared used at line 1â�¤â�¤Â»
21:46 cooper_ joined #perl6
21:52 cooper_ joined #perl6
21:53 FROGGS jnthn: I found it
21:54 dalek roast: 2a9f6c1 | (David Warring david.warring@gmail.com)++ | integration/99problems-61-to-70.t:
21:54 dalek roast: is() => is_deeply + tweaks
21:54 dalek roast: review: https://github.com/perl6/roast/commit/2a9f6c1c5b
21:54 FROGGS jnthn: the condition here is too restrictive when one candidate joins a list of fates: https://github.com/MoarVM/MoarVM/blo​b/master/src/6model/reprs/NFA.c#L482
21:55 avuserow o/ timotimo
21:56 jnthn Too restrictive in what sense?
21:56 FROGGS jnthn: it does not resort the list of candidates if only one is added
21:57 jnthn But the logic in there is only sorting the new ones
21:59 FROGGS and if the new one is declared later in your code it should go into slot zero so it is the last thing we run
21:59 FROGGS but it won't go in slot zero because we do not sort beginning from zero
22:00 [Coke] .tell jnthn
22:00 yoleaux [Coke]: I don't know what you want me to say to jnthn.
22:00 [Coke] .tell jnthn st07:~/sandbox/perl6-roast-data/rakudo.parrot$
22:00 yoleaux [Coke]: I'll pass your message to jnthn.
22:01 FROGGS O.o
22:01 FROGGS he is right here
22:01 TimToady um, yeah
22:01 [Coke] bad paste.
22:01 [Coke] jnthn: the recent massive parrot failures are coming from:
22:01 FROGGS .tell [Coke] he is right here :P
22:01 yoleaux FROGGS: I'll pass your message to [Coke].
22:01 [Coke] 9515bb7636d2352a68bf770d80964f5907526fbc
22:01 yoleaux 22:01Z <FROGGS> [Coke]: he is right here :P
22:03 Mouq joined #perl6
22:07 lizmat joined #perl6
22:08 FROGGS damn, it fails to build nqp when I let it sort all fates :o(
22:09 TimToady it's not bug compatible!
22:09 FROGGS so, is it wrong to sort all fates?
22:10 jnthn FROGGS: I think so
22:10 yoleaux 22:00Z <[Coke]> jnthn: st07:~/sandbox/perl6-roast-data/rakudo.parrot$
22:10 FROGGS okay, then I turn around that fate list and then shift instead of pop in NQP...
22:11 FROGGS I dunno how that works out with the stage0
22:12 FROGGS yeah, explodes
22:13 TimToady is there a parallel structure somewhere that needs to stay in sync?
22:13 FROGGS probably in nqp
22:13 TimToady fates are kinda like actions, and attach to a particular matcher
22:13 FROGGS the $!states in NFA.nqp
22:14 FROGGS I also wonder about that here:
22:14 FROGGS MVMint64 char_fates = total_fates - prev_fates;
22:14 FROGGS for (i = total_fates - char_fates; i < total_fates; i++)
22:15 TimToady sure looks like it's traversing the final n
22:15 Akagi201 joined #perl6
22:15 FROGGS i is prev_fates initially, no?
22:16 TimToady hmm, yeah, that's a bit stinky
22:16 FROGGS and total_fates - char_fates appears three times
22:16 TimToady why are we calculating char_fates, only to use it to get back to prev_fates?
22:17 FROGGS https://github.com/MoarVM/MoarVM/blo​b/master/src/6model/reprs/NFA.c#L482
22:17 TimToady unless something was inserted at the front
22:17 FROGGS char_fates itself is used once
22:22 dalek nqp: a2a5b72 | jnthn++ | src/vm/moar/QAST/QAST (2 files):
22:22 dalek nqp: Build alternation offset arrays statically.
22:22 dalek nqp:
22:22 dalek nqp: Before, we built them each time we wanted to evaluate an alternation.
22:22 dalek nqp: This cuts nearly 800,000 object allocations out during the compilation
22:22 dalek nqp: of CORE.setting, which is a measurable improvement.
22:22 dalek nqp: review: https://github.com/perl6/nqp/commit/a2a5b72031
22:23 FROGGS ohh wow
22:25 hoelzro holy crap
22:28 cooper_ joined #perl6
22:28 jnthn [Coke]: I don't immediately see why that patch should work any differnet on Parrot. I've put it on my todo list to look into it
22:30 cbk1090 joined #perl6
22:30 cbk1090 Hello everyone
22:30 FROGGS hi cbk1090
22:31 timotimo wowza!
22:31 cbk1090 So I did this and need some help with what it is and how it works....
22:31 cbk1090 @tableObj[0].record.push( Record:data => { index => 4, topic => "TEST", remarks => "A new record has been added!!!"});
22:31 cbk1090 two classes Table and Record
22:32 cbk1090 and Table does Record
22:32 FROGGS m: my @a; @a.push( Record:data => { index => 4, topic => "TEST", remarks => "A new record has been added!!!"}); say @a
22:32 camelia rakudo-moar c00999: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BGfT1gOCPw�Preceding context expects a term, but found infix => instead�at /tmp/BGfT1gOCPw:1�------> [32mmy @a; @a.push( Record:data =>[33m�[31m { index => 4, topic => "TEST", remarks [0…»
22:32 cbk1090 the output is Record => {"index" => 4, "topic" => "TEST", "remarks" => "A new record has been added!!!"}
22:32 TimToady weird, I do config with --get-nqp=master, but it keeps knocking my head off anyway
22:32 FROGGS m: my @a; @a.push( 'Record:data' => { index => 4, topic => "TEST", remarks => "A new record has been added!!!"}); say @a
22:32 TimToady *gen
22:32 camelia rakudo-moar c00999: OUTPUT«"Record:data" => {"remarks" => "A new record has been added!!!", "topic" => "TEST", "index" => 4}␤»
22:33 FROGGS cbk1090: try quoting Record:date
22:33 FROGGS data*
22:33 FROGGS TimToady: --geN-nqp
22:33 TimToady was just a typo
22:33 FROGGS ahh :/
22:33 TimToady I actually . config.status
22:34 TimToady which has it correct
22:35 FROGGS will test that tomorrow... too sleepy right now
22:35 TimToady yes, about 8% faster
22:36 cbk1090 FROGGS, so why do I have to do the quoting and what does it do for the parent object.
22:36 TimToady it's a named argument otherwise
22:37 cbk1090 I guess I'm asking what does the Record:data part mean?
22:37 FROGGS cbk1090: you have to quote it so it is clear it is a hash/pair key
22:37 FROGGS it is an identifier with an adverb
22:37 cbk1090 I guess I'm asking what does the Record:data part mean?
22:37 cbk1090 sorry bout that last one..
22:37 FROGGS :o)
22:38 TimToady though possibly it's misparsed
22:39 timotimo what is about 8% faster?
22:39 TimToady in fact, looking at your output, it is misparsed
22:39 TimToady parsing the setting after jnthn's 800000 patch
22:39 timotimo oh, neato :)
22:40 cbk1090 TimToady, yes I'm sure it is. I really have no idea what I'm doing.  Im just trying to put my ideas into Perl6 and see if they work, or move thing around till they work.
22:40 TimToady rakudo has a known bug parsing names with adverbs attached
22:40 flussence from reading the Configure.pl stuff, it appears --gen-nqp=$anything is completely ignored
22:40 TimToady huh
22:40 timotimo flussence: did you also look into the included nqp configure library?
22:40 timotimo i think it just gets passed on in @options or something
22:41 flussence yeah, it's hardcoded to use the value from tools/build/NQP_REVISION regardless.
22:41 FROGGS that can't be true
22:42 flussence well I might be misreading it, someone double check for me :)
22:42 masak 'night, #perl6
22:43 flussence o/
22:44 FROGGS flussence: you are right :/
22:46 dalek rakudo/nom: 820565b | (Tobias Leich)++ | tools/lib/NQP/Configure.pm:
22:46 dalek rakudo/nom: use --gen-nqp=<branch> if provided
22:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/820565bfe7
22:46 FROGGS not tested, but should do
22:47 TimToady there's my good deed for the day, now I can go be bad... :)
22:47 flussence r-m: say 65/77*100
22:47 camelia rakudo-moar c00999: OUTPUT«84.415584␤»
22:47 flussence (~15% speedup for me :)
22:49 timotimo thank you, froggs!
22:49 timotimo that's kind of a bad bug :|
22:49 timotimo or was
22:49 timotimo or missing feature
22:49 timotimo or something
22:49 cbk1090 joined #perl6
22:51 cbk1090 joined #perl6
22:51 carlin on this subject...
22:51 carlin it seem if I do: perl Confgure.pl --gen-moar --backends=moar --moar-option='--cc=clang', the moar-option doesn't get passed up to moar's configure
22:53 timotimo damn, i thought i fixed exactly that recently!
22:54 timotimo is that in nqp's or rakudo's configure?
22:54 carlin rakudo's
22:54 timotimo ah, hmm
22:54 FROGGS carlin: it looks good from glancing at rakudo/tools/lib/NQP/Configure.pm:438
22:54 timotimo i may only have fixed it for nqp
22:54 flussence relevant feature request: make moar's Configure.pl read a config.default like the rakudo/nqp ones do :)
22:55 brrt left #perl6
22:57 cooper_ joined #perl6
22:59 TimToady hmm, only about 1.3% faster on my other computer
23:03 [Coke] jnthn: working on a ticket.
23:04 carlin it looks like the gen_moar() in rakudo's NQP/Configure.pm never gets run
23:04 carlin NQP's does
23:04 carlin https://github.com/rakudo/rakudo/blob​/nom/tools/lib/NQP/Configure.pm#L473
23:04 carlin that line never gets hit as far as I can tell
23:05 FROGGS ahh, that explains it
23:05 FROGGS so we need to pass the moar options along
23:06 TimToady but rerunning on my first computer gets about 19% faster, so maybe some caching effects going on here
23:06 FROGGS O.o
23:06 TimToady faster than it was yesterday, not comparing specific versions
23:07 nbrown joined #perl6
23:10 [Coke] r: use Test; is(:10('01110') ,  0d1110, ":10('01110') is default decimal");
23:10 camelia rakudo-{jvm,moar} c00999: OUTPUT«ok 1 - :10('01110') is default decimal␤»
23:10 camelia ..rakudo-parrot c00999: OUTPUT«(signal )»
23:10 [Coke] jnthn: ^^
23:16 Akagi201 joined #perl6
23:17 FROGGS p: use Test; :10('01110')
23:17 camelia rakudo-parrot c00999: OUTPUT«(signal )»
23:17 ashleydev joined #perl6
23:19 TimToady p: :10('01110')
23:19 camelia rakudo-parrot c00999: ( no output )
23:19 TimToady p: use Test; 42
23:19 camelia rakudo-parrot c00999: ( no output )
23:20 TimToady p: use Test; :2('01110')
23:20 camelia rakudo-parrot c00999: OUTPUT«(signal )»
23:20 TimToady p: use Test; :2<01110>
23:20 camelia rakudo-parrot c00999: ( no output )
23:20 [Coke] RT #122436
23:20 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122436
23:32 ashleydev joined #perl6
23:47 raiph joined #perl6
23:50 dalek nqp: 1a78f63 | jnthn++ | src/QRegex/Cursor.nqp:
23:50 dalek nqp: Cache the reversed string for <after ...>.
23:50 dalek nqp:
23:50 dalek nqp: We spent around > 0.5% of CORE.setting compilation time reversing the
23:50 dalek nqp: string each time we wanted to do <after ...>. Cache it once we've done
23:50 dalek nqp: it. Means MVM_string_flip becomes too low to make the profile now.
23:50 dalek nqp: review: https://github.com/perl6/nqp/commit/1a78f63c1e
23:55 jnthn sleep &

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

Perl 6 | Reference Documentation | Rakudo