Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-11-12

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:01 rurban1 joined #perl6
00:06 dalek rakudo-star-daily: a63ba62 | coke++ | log/ (5 files):
00:06 dalek rakudo-star-daily: today (automated commit)
00:06 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/a63ba62de1
00:06 dalek perl6-roast-data: 46d6f65 | coke++ | / (5 files):
00:06 dalek perl6-roast-data: today (automated commit)
00:06 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/46d6f652da
00:06 dalek perl6-roast-data: b71d34a | coke++ | / (5 files):
00:06 dalek perl6-roast-data: today (automated commit)
00:06 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/b71d34ad0f
00:12 Psyche^ joined #perl6
00:18 lue I'll leave it alone for today. I've got a magically called-too-often sub that's also eating my attempts at more granular debug says :(
00:41 [Coke] woolfy1++
00:41 stevan_ joined #perl6
00:42 markov joined #perl6
00:53 * timotimo has a prototype of the scan-with-boyer-moore-optimisation moritz made
00:54 timotimo for jvm
00:55 dalek roast: 0f86f36 | coke++ | S02-literals/quoting-unicode.t:
00:55 dalek roast: Fudge for niecza
00:55 dalek roast: review: https://github.com/perl6/roast/commit/0f86f36e04
00:56 dayangkun joined #perl6
00:56 timotimo ooooh, rakudo.jvm has overtaken rakudo.parrot \o/
01:04 [Coke] 2 days ago, looks like.
01:05 timotimo mhm
01:05 timotimo modules/uri doesn't seem to actually do any installing at all
01:05 timotimo causing some fallout in the following modules
01:08 timotimo a beefed up version of the artificial benchmark takes 0.6s with boyer-moore (for 10_000 match attempts)
01:08 timotimo and now i'm recompiling the before-version
01:09 colomon joined #perl6
01:10 timotimo oh, what, 10x faster?
01:10 timotimo apparently. wow.
01:10 timotimo moritz: ^^
01:11 berekuk joined #perl6
01:13 [Coke] au: you  made some pugs changes. Be happy if you could help fix the install on host06.
01:13 dalek nqp: d4e274d | (Timo Paulssen)++ | src/vm/jvm/QAST/Compiler.nqp:
01:13 dalek nqp: teach jvm how to boyer-moore for scan+literal.
01:13 dalek nqp: review: https://github.com/perl6/nqp/commit/d4e274d067
01:14 [Coke] er, *saw* you made.
01:23 rurban1 joined #perl6
01:26 woosley joined #perl6
01:26 raiph joined #perl6
01:29 rurban2 joined #perl6
01:35 thou joined #perl6
01:38 diakopter :-[
02:20 jeffreykegler joined #perl6
02:30 rurban1 joined #perl6
03:02 [Coke] both rakudo.parrot and rakudo.jvm have failing tests and could use some fudging.
03:02 [Coke] (with tickets being opened.)
03:08 lue Hm. Somehow the line "my %meths := $par.method_table($par);" causes the sub it's in to get called when it shouldn't. This is odd... (.method_table simply returns the %!methods attribute)
03:52 labster joined #perl6
03:56 davecc joined #perl6
04:06 PZt joined #perl6
04:10 SevenWolf joined #perl6
04:13 logie joined #perl6
04:20 preflex_ joined #perl6
04:29 wbill joined #perl6
04:35 kaleem joined #perl6
04:43 thou joined #perl6
05:01 logie joined #perl6
05:01 rurban1 joined #perl6
05:14 SamuraiJack_ joined #perl6
05:23 nnunley joined #perl6
05:25 dalek nqp: 93b9d50 | dwarring++ | docs/ops.markdown:
05:25 dalek nqp: move nqp::takeclosure doco to misc section
05:25 dalek nqp: review: https://github.com/perl6/nqp/commit/93b9d507a2
06:04 cognominal joined #perl6
06:15 hoelzro joined #perl6
06:18 dylanwh joined #perl6
06:20 geekosaur joined #perl6
06:22 kaleem joined #perl6
06:23 xinming joined #perl6
06:23 [Sno] joined #perl6
06:26 logie joined #perl6
06:32 darutoko joined #perl6
06:35 darutoko joined #perl6
06:56 Woodi morning everyone
06:57 Woodi "Don Knuth"++ , well deserved :)
07:04 moritz P: say 42
07:04 camelia pugs: OUTPUT«42␤»
07:16 dmol joined #perl6
07:30 brrt joined #perl6
07:30 brrt left #perl6
07:36 preflex joined #perl6
07:37 rurban1 joined #perl6
07:55 atroxaper joined #perl6
07:56 atroxaper Hello #perl6
07:56 moritz hello atroxaper
07:56 atroxaper Hello moritz
07:58 FROGGS joined #perl6
08:01 atroxaper I have a question about usiong Rakudo grammar again... Is there a way to get a part of parsed data if parsing failed? I mean if i try to call Perl6::Grammar.parse('my $b=4; b=5;', :actions(Perl6::Actions.new())); than i get "Lexical '$*LINEPOSCACHE' not found in dynamic scope"
08:01 atroxaper Hello FROGGS
08:01 FROGGS hi atroxaper
08:01 FROGGS well, you could do before calling .parse: my $*LINEPOSCACHE
08:02 FROGGS but if a match failed, you won't get a match object :/
08:03 FROGGS maybe the highwater-mark is sufficient?
08:04 atroxaper What do you mean highwater-mark?
08:06 moritz it's some way to record how far the match got
08:06 FROGGS atroxaper: the parser remembers how far it could get before failing a rule/token, so you get the right position where something is wrong, for error reporting
08:06 moritz (specific to Perl6::Grammar)
08:06 SevenWolf left #perl6
08:06 FROGGS r: my $x = 42; b # see where the marker is
08:06 camelia rakudo-parrot 2c40f6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MmBKTG4TRCâ�¤Undeclared routine:â�¤    b used at line 1â�¤â�¤Â»
08:06 camelia ..rakudo-jvm 2c40f6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/81zdeIVY3râ�¤Undeclared routine:â�¤    b used at line 1â�¤â�¤Â»
08:06 darutoko joined #perl6
08:06 FROGGS umm
08:07 atroxaper I just want to parce Perl6 code and get some structure like which NQPMatch.dump prints...
08:07 FROGGS r: sub a { } { } # see where the marker is
08:07 camelia rakudo-jvm 2c40f6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/_nBCQSRmt7�Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)�at /tmp/_nBCQSRmt7:1�------> [32msub a { } [33m�[31m{ } # see where the marker …»
08:07 camelia ..rakudo-parrot 2c40f6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Mq7hX4OxvT�Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)�at /tmp/Mq7hX4OxvT:1�------> [32msub a { } [33m�[31m{ } # see where the mark…»
08:07 FROGGS there you go
08:07 denisboyun joined #perl6
08:08 FROGGS atroxaper: then I'd propose you a) write a module that turns an NQPMatch into a Match object, or b) make it an nqp module
08:09 atroxaper FROGGS: and how can i get position where something is wrong?
08:10 zakharyas joined #perl6
08:10 iSlug joined #perl6
08:11 FROGGS atroxaper: you need to check how and where the highwater-mark is stored... and try to get your hands on it
08:12 atroxaper FROGGS: Hmmm. Ok. Thanks for hint)
08:13 FROGGS atroxaper: since I know how wonderful jnthn++ writes code, a grep for 'highwater' in nqp/src should do
08:14 atroxaper FROGGS: you are right! )
08:15 rurban joined #perl6
08:32 FROGGS timotimo++ # 10x
08:39 moritz timotimo++ is a 10x programmer! :-)
08:39 denisboyun joined #perl6
08:42 kivutar joined #perl6
08:50 woolfy1 left #perl6
08:52 lizmat good *, #perl6!
08:52 moritz \o lizmat, *
08:52 lizmat moritz o/
08:52 woolfy joined #perl6
08:53 Maddingu1 joined #perl6
09:00 hoelzro morning #perl6
09:08 fhelmberger joined #perl6
09:20 lizmat morning hoelzro!
09:24 dakkar joined #perl6
09:25 denis_boyun joined #perl6
09:41 hoelzro morning lizmat !
09:44 dayangkun joined #perl6
09:46 rurban1 joined #perl6
10:02 denis_boyun_ joined #perl6
10:07 dram joined #perl6
10:10 dram r: my $foo = "FOO"; say qq:ww/$foo "bar baz"/.perl;
10:10 camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«(("FOO",).list, "bar baz")␤»
10:11 dram r: say qq:ww/FOO "bar baz"/.perl;
10:11 camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«("FOO", "bar baz")␤»
10:11 dram Is this a bug?
10:12 moritz looks like it
10:14 dram n: my $foo = "FOO"; say qq:ww/$foo "bar baz"/.perl;
10:14 camelia niecza v24-98-g473bd20: OUTPUT«("FOO", "\"bar", "baz\"").list␤»
10:15 * FROGGS creates rakudobug
10:16 moritz FROGGS++ dram++
10:16 moritz the fix might be simply calling .list on the result (in the compiler, that is)
10:17 dram ok, i'll file a bug.
10:17 FROGGS dram: see https://rt.perl.org/Ticket/Display.html?id=1205​17&results=3923acbdcceff432e02a38c0d93413a8
10:18 dram thx.
10:18 FROGGS you could try to fix it now that I've filed the bug report for you :P
10:22 dram I'm new to perl6. just several days. :)
10:25 brrt joined #perl6
10:27 rurban joined #perl6
10:27 woosley left #perl6
10:50 rindolf joined #perl6
10:51 pernatiy joined #perl6
10:54 rurban1 joined #perl6
11:05 timotimo so I've been thinking, before i could get any sleep, that to make keeping the NFA's work is not terribly hard
11:06 timotimo first, the optimizer needs to know exactly how long the declarative prefix was, and it needs to know that the NFA has, in fact, matched this piece of the QRegex
11:06 timotimo then, it needs to analyze the positions of capture groups. if they are constant, it can generate operations that just skip N characters, if not, it has to stop its work
11:07 timotimo so it would turn [ foo (...) | bar (...) ] into a concat of skip 3, push cstack (or how it does the capturing), skip another 3, push cstack again (for the end of capture, right?) for both branches of the alt.
11:10 timotimo the tricky part is: does the NFA hang off of one of these nodes? do i have to be careful not to replace it?
11:10 timotimo i know the NFA gets created the moment the QRegex is generated in the Actions, which is long before the optimizer starts running
11:15 jaffa4 joined #perl6
11:21 timotimo what does being a 10x programmer mean? :|
11:23 brrt timotimo, i have no idea
11:23 brrt i suspect that 'management is able to get what they want 10x easier'
11:23 brrt it certainly doesn't seem to correspond to one particular attribute
11:24 timotimo that sounds more like "being a pushover" :P
11:24 brrt true
11:24 * brrt is thinking
11:25 brrt there is, i think, also some part to the 10x engineer meme that says: 'all these other guys are stupid'
11:25 timotimo i guess i'll spend the day trying to write code to analyse the absolute widths of matching thingies
11:25 brrt i.e. the implication of being a special human being
11:25 brrt or at least, that there are such special humans
11:25 brrt :-)
11:25 timotimo that doesn't sound much like a compliment to me. at least not one i'd like to get
11:26 brrt hmmm
11:26 brrt maybe i'm thinking of it in a different context
11:26 beee joined #perl6
11:26 dram_ joined #perl6
11:26 daxim_ joined #perl6
11:26 brrt perhaps the simplest way to explain it is: what used to be a 'rockstar developer
11:26 brrt '
11:27 timotimo i don't like these people :|
11:27 timotimo .o( node.js is badass rockstar tech! )
11:28 brrt neither do i
11:28 brrt things can be awesome / exciting in their own right
11:28 moritz timotimo: there's a very old meme on the internet that there are some '10x' programmers that are 10 times as efficient as the average programmer, whoever that may be
11:29 brrt but to be excited about writing callback based servers is valid, but still a bit geeky :-)
11:29 brrt … what moritz said
11:29 moritz and every month there's a blog post denying the fact that such a thing exists
11:29 brrt the question is what 'efficient' even means
11:29 brrt which is why i offered: get what management wants
11:29 moritz and two others springing up in response citing examples or anecdotes
11:30 timotimo i see
11:30 timotimo locally, rakudo-jvm is failing isDeprecated and deprecations, is that known?
11:30 timotimo it fails all of the tests
11:30 * brrt is bored by the internet
11:30 moritz timotimo: I think I've see that too
11:30 brrt bye folks :-)
11:30 moritz brrt: build a new one :-)
11:30 timotimo good
11:30 brrt would-like-too
11:31 iSlug joined #perl6
11:32 timotimo moritz: do you see an obvious flaw with my musings above?
11:33 timotimo the only thing i can think of is that there are a few dangerous things i'll have to keep in mind, like \n sometimes being 2 characters instead of 1
11:33 moritz well, you have to keep track of match lengths
11:33 moritz of all of them
11:34 moritz and there are funny things going on with case-insensitive matching
11:34 moritz /ß/i matching 'SS' and all that
11:34 FROGGS it matches the uppercase ß unicode thingy too
11:35 timotimo i don't have to keep track of all of them, it'll already be a performance benefit if i only do as much as possible
11:35 timotimo like, up until i find a match that's possibly mobile
11:35 daxim_ I call for abolishment of uc(ß) == SS
11:35 FROGGS daxim: me too
11:36 timotimo that can't be the only example, though
11:36 timotimo but good point. i'll just go with a whitelist-approach instead of a blacklist-approach then :P
11:36 moritz iirc it's the only example on the grapheme level
11:36 moritz but there are also funny things on the codepoint level
11:36 timotimo i'm working on the (wrong) assumption that we are already at grapheme-level :P
11:37 moritz like if you have a composed character, and the case-folded equivalent only exists as decomposed (does that case occur in real-life Unicode?)
11:37 timotimo because most of our regex engine does, too, i think
11:37 moritz none of it does
11:37 moritz it works all on the codepoint level :(
11:37 timotimo er
11:37 timotimo well ... :|
11:37 FROGGS but they all *should* work on grapheme level
11:38 FROGGS but only moarvm will get there I fear, right?
11:39 timotimo hopefully our jvm port will, too
11:41 FROGGS yeah, I just don't know enough of the impl. to muse about NFG
11:42 nwc10 I haven't read scrollback, but the fun one is /ss/i matches "ß".
11:42 nwc10 OK, so what are the captures for "ß" =~ /(s)(s)/i; # expressed in p5 syntax
11:42 daxim burn it! with fire!
11:43 nwc10 you can do it with other folding. that's just the most common example. (of "Unicode consortium didn't think it through")
11:44 daxim I'm going to release Lingua::DEU::Casing::Sharp_s in december
11:45 leont joined #perl6
11:46 daxim r: print "\x{1F4A9}"
11:46 camelia rakudo-parrot 2c40f6: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized backslash sequence: '\x'�at /tmp/PhWcX7u3sY:1�------> [32mprint "\[33m�[31mx{1F4A9}"[0m�Unable to parse expression in block; couldn't find final '}' �at /tmp/PhWcX7u3sY:1�------> [32mprint "\…»
11:46 camelia ..rakudo-jvm 2c40f6: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized backslash sequence: '\x'�at /tmp/vFKZ1XXmJV:1�------> [32mprint "\[33m�[31mx{1F4A9}"[0m�Unable to parse expression in block; couldn't find final '}' �at /tmp/vFKZ1XXmJV:1�------> [32mprint "\x{1…»
11:47 FROGGS r: print "\x1F4A9"
11:47 camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«💩»
11:47 daxim r: print "\x666"
11:47 camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«٦»
11:48 FROGGS r: print "\x1E9E"
11:48 camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«ẞ»
11:50 tgt joined #perl6
11:57 * timotimo made a questhub quest to organize his thoughts
11:59 go|dfish joined #perl6
12:07 moritz quest: organize my thoughts
12:08 leont Maybe interesting for perl6 people too: http://www.nntp.perl.org/group​/perl.qa/2013/11/msg13531.html
12:08 leont Not that I have much of a clue about the state of QA in perl6
12:09 moritz sounds like an awesome hackathon
12:09 moritz leont: we're much in need of QA :-)
12:12 leont I've heard the Test::Builder 2 is a rather good design (except for it using Mouse), possibly porting it over is useful.
12:13 leont A better harness may be desirable too (the current one rather reminds me of perl 5.000's, in having the minimum required features)
12:17 leont But without a good Builder, additional testing modules just wouldn't scale well
12:25 rurban1 joined #perl6
12:33 dmol joined #perl6
12:38 denis_boyun joined #perl6
12:41 * timotimo made the rakudo optimizer unfold junctions insied when, like { when Int | Str { ... } }
12:45 timotimo spectests look good, but there's not terribly many spectests for this kind of thing anyway
12:45 moritz add some :-)
12:45 timotimo r: my $_ = []; when {$^a.push(100)}|{$^a.push(200)} { say "what am i doing" }
12:45 camelia rakudo-jvm 2c40f6: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol $_â�¤    at /tmp/HHsNjTkslR:1â�¤    ------> [32mmy $_ [33mâ��[31m= []; when {$^a.push(100)}|{$^a.push(200[0mâ�¤what am i doingâ�¤Â»
12:45 camelia ..rakudo-parrot 2c40f6: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol $_â�¤    at /tmp/FkGZ_DN6AW:1â�¤    ------> [32mmy $_ [33mâ��[31m= []; when {$^a.push(100)}|{$^a.push(200[0mâ�¤what am i doingâ�¤succeed without when clauseâ�¤  in block  at gen/parrot/CORE.settin…»
12:46 timotimo r: $_ = []; when {$^a.push(100)}|{$^a.push(200)} { say "what am i doing" }
12:46 camelia rakudo-parrot 2c40f6: OUTPUT«what am i doing␤succeed without when clause␤  in block  at gen/parrot/CORE.setting:547␤  in block  at gen/parrot/CORE.setting:611␤  in block  at /tmp/Q7gX7NTN27:1␤  in any  at /tmp/Q7gX7NTN27:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146…»
12:46 camelia ..rakudo-jvm 2c40f6: OUTPUT«what am i doing␤»
12:46 timotimo r: $_ = []; when {$^a.push(100)}|{$^a.push(200)} { say "what am i doing" }; .say;
12:46 camelia rakudo-jvm 2c40f6: OUTPUT«what am i doing␤»
12:46 camelia ..rakudo-parrot 2c40f6: OUTPUT«what am i doing␤succeed without when clause␤  in block  at gen/parrot/CORE.setting:547␤  in block  at gen/parrot/CORE.setting:611␤  in block  at /tmp/3_LyQ_dxru:1␤  in any  at /tmp/3_LyQ_dxru:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146…»
12:46 timotimo r: $_ = []; when {$^a.push(100)}|{$^a.push(200)} { say "what am i doing" }; $_.say;
12:46 camelia rakudo-jvm 2c40f6: OUTPUT«what am i doing␤»
12:46 camelia ..rakudo-parrot 2c40f6: OUTPUT«what am i doing␤succeed without when clause␤  in block  at gen/parrot/CORE.setting:547␤  in block  at gen/parrot/CORE.setting:611␤  in block  at /tmp/HklmK3NmTz:1␤  in any  at /tmp/HklmK3NmTz:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146…»
12:46 timotimo well ...
12:47 timotimo r: $_ = []; given $_ { when {$^a.push(100)}|{$^a.push(200)} { say "what am i doing" }; } $_.say;
12:47 camelia rakudo-jvm 2c40f6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KBuM9FVL_yâ�¤Confusedâ�¤at /tmp/KBuM9FVL_y:1â�¤------> [32mpush(200)} { say "what am i doing" }; } [33mâ��[31m$_.say;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤      â€¦Â»
12:47 camelia ..rakudo-parrot 2c40f6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/j21uguGTV6â�¤Confusedâ�¤at /tmp/j21uguGTV6:1â�¤------> [32mpush(200)} { say "what am i doing" }; } [33mâ��[31m$_.say;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤   …»
12:47 timotimo r: $_ = []; given $_ { when {$^a.push(100)}|{$^a.push(200)} { say "what am i doing" }; }; $_.say;
12:47 camelia rakudo-parrot 2c40f6, rakudo-jvm 2c40f6: OUTPUT«what am i doing␤100␤»
12:47 timotimo seems to still "work"
12:50 timotimo well, this optimization has less chance to fail, because there's no side-effects that result from evaluating $_
12:50 timotimo ... i guess unless you make it a proxy. in which case, what the hell are you doing! :D
12:51 timotimo but even that will only evaluate $_ once
12:53 timotimo so, now that i have a rakudo commitbit, is it "easier to ask for forgiveness than for permission"?
12:53 FROGGS hmm?
12:53 moritz +1
12:54 timotimo FROGGS: i'm asking if i should push what i think is working code, or if i should ask for reviews before going ahead
12:55 FROGGS timotimo: if you are "sure" that it is all right then go ahead
12:55 markov left #perl6
12:55 FROGGS if you feel uncomfortable with it, push to a branch or so :o)
12:56 timotimo i feel comfortable with this, as soon as the spectest run has finished :)
12:56 FROGGS that is a good way to do it :o)
12:56 FROGGS timotimo: what backend are you spectesting?
12:56 FROGGS I can do the other then
12:57 timotimo jvm at the moment
12:57 dmol joined #perl6
12:58 * moritz runs a p-spectest as baseline
12:58 tgt joined #perl6
12:59 * timotimo notices he doesn't actually have the commitbit
12:59 timotimo it's now in timo/rakudo on the "when_junctions_unfold" branch
13:02 * timotimo publicizes his membership of the rakudo organisation
13:02 timotimo https://github.com/rakudo?tab=members - i'm the only one in it now :P
13:02 timotimo there's lots of concealed members in the perl6 organisation, too. FROGGS, you for example
13:03 FROGGS done
13:03 FROGGS timotimo: thanks :o)
13:07 timotimo so i'm in the organisation, but can't actually commit to the rakudo repository, huh
13:08 FROGGS you are in there due to PRs
13:08 timotimo jvm spectest looks clean
13:09 denis_boyun__ joined #perl6
13:11 timotimo i think i need zram on my desktop >_<
13:17 timotimo yeah, looks clean
13:18 * timotimo force-pushed over the branch to make a proper PR
13:19 timotimo https://github.com/rakudo/rakudo/pull/228 - feel free to pull it in
13:19 pdurbin left #perl6
13:19 * moritz loves the fact that he can now run a j-spectest and at the same time rebuild rakudo-p
13:20 * timotimo loves that he can run a j-install or j-spectest without having to rebuild rakudo-p first
13:20 timotimo moritz++ # pretty fantastic build system
13:21 dalek rakudo/nom: b0bf4d5 | (Timo Paulssen)++ | src/Perl6/Optimizer.nqp:
13:21 dalek rakudo/nom: allow junction unfolding for callmethod ACCEPTS
13:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b0bf4d5808
13:21 dalek rakudo/nom: b11094e | (Tobias Leich)++ | src/Perl6/Optimizer.nqp:
13:21 dalek rakudo/nom: Merge pull request #228 from timo/when_junctions_unfold
13:21 woolfy timotimo: congrats with your commitbit!
13:21 dalek rakudo/nom:
13:21 dalek rakudo/nom: allow junction unfolding for callmethod ACCEPTS
13:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b11094e306
13:22 timotimo woolfy: i was mistaken, i don't actually have it yet :(
13:22 woolfy oowowwwww...  too bad
13:22 tgt joined #perl6
13:22 timotimo good things come to those who wait :P
13:23 FROGGS *g*
13:23 woolfy I'll retract the congrats and put them in the fridge for you, I hope they stay good
13:26 dalek nqp: aa14903 | (Timo Paulssen)++ | src/vm/jvm/QAST/Compiler.nqp:
13:26 dalek nqp: factor out a common instruction
13:26 dalek nqp: review: https://github.com/perl6/nqp/commit/aa14903096
13:26 dalek nqp: 5a95294 | (Timo Paulssen)++ | src/vm/ (2 files):
13:26 dalek nqp: don't try to match \r\n for negated or zerowidth whitespace cclasses
13:26 dalek nqp: review: https://github.com/perl6/nqp/commit/5a952943f7
13:34 ajr joined #perl6
13:40 * timotimo is attempting to implement for @arr -> $foo, $bar? in NQP
13:42 dakkar joined #perl6
13:47 arnsholt timotimo++
13:48 timotimo how do i clear a register?
13:48 moritz clear?
13:49 moritz assign a defined value to it?
13:49 timotimo pretend i never did, so to speak
13:49 timotimo my current bug is that for 1, 2, 3, 4, 5 -> $a, $b? will give 1 2, 3 4, 5 4
13:49 timotimo because i don't clear the $b register if the list is finished
13:50 timotimo it's a _p register, if that makes a difference
13:50 moritz set it to NQPMu?
13:50 timotimo i'll try that
13:52 timotimo nqp_get_sc_object $P5006, "7A67D46DDEA3C60BB73DFB1CA4F76​715F3D1212C-1384263841.80708", 26  -  this apparently gets NQPMu; how do i emit a pirop in Operations.nqp that does the right thing?
13:52 timotimo oh, maybe there's an op i can emit that just returns NQPMu? like nqp::null?
13:52 timotimo nqp: say(nqp::null())
13:52 camelia nqp-jvm: OUTPUT«java.lang.NullPointerException␤  in  (gen/jvm/stage2/NQPCORE.setting:672)␤  in print (gen/jvm/stage2/NQPCORE.setting:671)␤  in say (gen/jvm/stage2/NQPCORE.setting:678)␤  in  (/tmp/ex7apG0lGy:1)␤  in  (gen/jvm/stage2/NQPHLL.nqp:1100)␤  in eval (gen/jvm/sta…»
13:52 camelia ..nqp-parrot: OUTPUT«Null PMC access in get_string()␤current instr.: '' pc 768 (gen/parrot/stage2/NQPCORE.setting.pir:355) (gen/parrot/stage2/NQPCORE.setting:665)␤»
13:52 camelia ..nqp-moarvm: OUTPUT«␤»
13:52 timotimo that's not quite it :|
13:53 moritz QAST::WVal.new( :value($*W.find_sym(['NQPMu'])) );
13:53 arnsholt timotimo: In the code gen, you probably want to set it to something like QAST::WVal.new( :value($*W.find_sym(['NQPMu'])) )
13:53 arnsholt Bah, sniped =)
13:53 moritz (copy&paste)++ # faster than arnsholt++ :-)
13:53 arnsholt I copy-pasted as well
13:54 arnsholt I just had to open a terminal and get to the directory and then git grep =)
13:54 timotimo can i do something like self.as_post(QAST::WVal.new(...))?
13:54 nnunley joined #perl6
13:54 moritz uhm, not sure if $*W is still around in the optimizer :(
13:55 timotimo this is not in the optimizer
13:55 arnsholt Doing this in the optimizer, though? That sounds weird...
13:55 timotimo this is in Operations.nqp
13:55 arnsholt Why does it have to be done in Operations.nqp?
13:55 moritz no idea if $*W is around then
13:56 timotimo arnsholt: because that's where 'for' is implemented.
13:57 arnsholt Oh, right. Of course
13:57 fhelmberger joined #perl6
13:57 timotimo :)
13:57 timotimo i'll see what happens if i just null the register
14:00 timotimo probably Terrible Things
14:01 logie joined #perl6
14:01 timotimo yup, NPMCA, as expected
14:03 timotimo er, i don't know how to make a QAST::Op for bind that binds into the register i have allocated for my operation
14:03 timotimo as i don't have a var to write to
14:04 timotimo maybe QAST::VM is needed here
14:04 moritz maybe a QAST::Op.new(:pirop<set>, '$P22', ....)
14:04 moritz and yes, QAST::VM then
14:04 moritz though I wonder if there shouldn't be a simpler way
14:05 timotimo i think there should be, but what do i know :)
14:06 timotimo in the worst case, the for opcode will get an argument that passes a NQPMu to it
14:06 diakopter so we were walking to breakfast and were suddenly in the middle of SUSEcon
14:06 timotimo i'll have to find out how to do the same for Moar and jvm, too :|
14:06 diakopter and tadzik is like, "is Novell still a thing?"
14:07 timotimo moritz: feel free to praise me in the blog post about the optimisation for scan + literal :D
14:07 timotimo Error while compiling op for (source text: "@a -> $a, $b? { say(\"$a $b\") }"): Method 'find_lexical' not found for invocant of class 'NQPMu'
14:08 timotimo it seems like i don't have access to $*W at this point
14:08 timotimo i may have to generate one call instruction for each number of actually existing arguments :|
14:08 arnsholt Yeah, I think $*W is set in the TOP rule, so by the time code-gen rolls around it's not there
14:08 timotimo yeah, that makes sense
14:11 diakopter so then tadzik is like "we would fit in just fine with our Perl shirts."
14:11 pernatiy joined #perl6
14:11 diakopter which isn't true, but mostly because they're all in business formal attire
14:12 ggoebel15 joined #perl6
14:13 woolfy left #perl6
14:14 diakopter woolfy: what does the oolfy stand for?
14:17 * timotimo cleaned his whiteboard
14:17 timotimo ready for some sketchion!
14:18 lizmat joined #perl6
14:19 diakopter timotimo: is that a tasty breakfast treat?
14:20 kivutar joined #perl6
14:21 timotimo it could be :)
14:28 lowpro30 joined #perl6
14:28 * timotimo made a quest for it: http://questhub.io/realm/perl/​quest/52823b309f567ab3340000c9
14:31 rurban1 joined #perl6
14:31 FROGGS I'd guess the output is "1,\n2,\n3,\n"
14:32 FROGGS like there is missing the comma after the 3 above
14:33 timotimo edited, thanks
14:33 PerlJam greetings!
14:34 moritz \o PerlJam
14:34 * PerlJam reminds everyone that advent season is nigh.
14:34 PerlJam Add yourselves to https://github.com/perl6/mu/blob/ma​ster/misc/perl6advent-2013/schedule
14:35 PerlJam read https://github.com/perl6/mu/blob/master/m​isc/perl6advent-2013/topic-brainstorming for ideas if you don't have any
14:35 PerlJam (please add to topic-brainstorming too)
14:35 * moritz has trouble finding interesting topics that haven't been chewed out in the advent before
14:35 PerlJam moritz: yeah, I know the feeling
14:35 moritz and I must be competent to write about it
14:35 PerlJam ditto
14:36 moritz so, what have I done this year in the rakudo world?
14:36 moritz build system? not a sexy topic
14:36 timotimo 1 2
14:36 timotimo 3 4
14:36 timotimo 5
14:36 timotimo \o/
14:36 FROGGS \o/
14:36 moritz a bit constant folding... not too exciting either
14:36 moritz timotimo++
14:37 lowpro30_ joined #perl6
14:37 moritz lots of small cleanups and corrections... not exciting either
14:37 PerlJam moritz: small, unsexy things, in aggregate, can be exciting :)  (probably not ever sexy though :)
14:38 dalek nqp/optional_for_arguments: 38333d3 | (Timo Paulssen)++ | src/ (3 files):
14:38 dalek nqp/optional_for_arguments: teach nqp-p about optionals in loop blocks
14:38 dalek nqp/optional_for_arguments: review: https://github.com/perl6/nqp/commit/38333d3e8d
14:38 timotimo could a post about jnthns workshop be interesting to our audience?
14:38 PerlJam timotimo: yes
14:38 timotimo feel free to play with my optional_for_arguments branch and try to break it, please
14:39 moritz labster: would you blog about dir(), File::Path etc. on the p6 advent calendar?
14:40 moritz I could write about custom EXPORT subs :-)
14:40 lue joined #perl6
14:41 moritz oh, I know what I did this year: sink context
14:41 moritz and I wish I hadn't
14:41 timotimo :(
14:42 fhelmberger joined #perl6
14:42 timotimo what did I do all year? :\
14:43 timotimo hm. i think i started my perl6 stuff a month or two before the advent calendar last year
14:44 moritz timotimo: you could blog about your experience contributing to Perl 6, as a relative newcomer
14:44 PerlJam that sounds like an excellent topic
14:44 timotimo ... no pressure! :P
14:45 kaare_ joined #perl6
14:45 raiph joined #perl6
14:46 lizmat joined #perl6
14:46 * PerlJam would like to see an advent post (or two) from lizmat about all the clean ups she's done  :)
14:46 timotimo i wish i could finish my "is nodal" work before the advent calendar
14:47 PerlJam Heck, she could re-package her YAPC::NA lightning talk and that would be awesome
14:48 PerlJam It would make an excellent Dec 1 post even
14:50 bluescreen10 joined #perl6
14:50 timotimo oh! oh crap!
14:51 timotimo i don't handle redo at all at the moment :o
14:51 timotimo if there's optional parameters, there has to be one redo for each!
14:51 timotimo (for each amount of optionals that were present)
14:51 timotimo where can i look to figure out how parrot does label calculation?
14:52 moritz label calculation? What's that?
14:53 moritz you mean in the PIR -> PBC step?
14:53 timotimo er, no
14:53 btyler joined #perl6
14:53 timotimo hopefully i could just replace the redo label just before each call
14:54 * moritz doesn't quite understand, but has to leave anyway
14:54 timotimo so, more like "label arithmetics"
14:54 timotimo a bit like "pointer arithmetics"
14:55 timotimo or i'd have to build a "dispatcher" for the redo that looks at some integer register and jumps to the right label given its value
14:55 timotimo that would suck :(
14:57 colomon Day 1 should be the state of Perl 6, shouldn't it?  talk about JVM and Moar, how to get rakudo installed these days, etc.
14:57 timotimo that's already in the schedule :)
14:57 timotimo (but not with a name)
14:58 PerlJam Well, I make Day 1 be "State of Perl 6" out of habit because I think it's a good way to start off advent.  There's nothing that says it *must* be that.
15:00 rurban1 joined #perl6
15:01 PerlJam But there should be some post that talks about the Perl 6 ecosystem in any case.
15:01 colomon there's a schedule already?
15:02 PerlJam an empty one, but yeah
15:02 PerlJam https://github.com/perl6/mu/blob/ma​ster/misc/perl6advent-2013/schedule
15:02 denis_boyun joined #perl6
15:02 PerlJam colomon: got any interesting topics you want to do for advent?
15:03 PerlJam last year the schedule came together kind of at the last minute.  That always makes me nervous.
15:03 timotimo how come there's no mention of concurrency/parallelism/asynchronicity?
15:04 colomon PerlJam: I've been pondering recoding what I've been working on in C++ in p6 and posting on it.  It would be a quick small example of how cool given / when and grammars are.
15:05 colomon PerlJam: I even have some hope I might have enough free time to write it.  ;)
15:05 PerlJam colomon: sounds excellent! :)
15:05 PerlJam timotimo: feel free to add it to the topics
15:05 PerlJam (or, better, claim a day for that topic yourself :)
15:06 timotimo i don't feel like i'm the right person to write about it
15:06 timotimo i don't have much experience in parallelism and stuff
15:07 lowpro30 joined #perl6
15:07 PerlJam A post on NativeCall for the JVM would be nice too.
15:08 kaleem joined #perl6
15:09 timotimo let's hope it's in a releasable state until then
15:10 PerlJam Even if it's just "this is almost done, but here's a tiny bit that works" I think it would use useful/interesting.
15:10 PerlJam s/use/be/
15:14 colomon PerlJam: another thought: redo the old Mandelbrot code (used twice before for Advent, I think?) using parallel code in JVM.
15:15 colomon might nicely emphasis the performance improvements we've had this year.
15:16 jeffreykegler joined #perl6
15:16 dmol joined #perl6
15:16 dalek mu: 1395dd5 | duff++ | misc/perl6advent-2013/topic-brainstorming:
15:16 dalek mu: add some topics
15:16 dalek mu: review: https://github.com/perl6/mu/commit/1395dd51ca
15:17 iSlug joined #perl6
15:18 ingy2^ joined #perl6
15:21 jeffreykegler_ joined #perl6
15:21 PerlJam Now, we just need people to claim days and topics
15:22 thou joined #perl6
15:23 tgt joined #perl6
15:29 atroxaper joined #perl6
15:30 timotimo nqp: my $num := 10; while $num > 0 { $num := $num - i; };
15:30 timotimo excellent typo ...
15:31 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«(timeout)»
15:31 PerlJam does nqp grok i?
15:31 tadzik hahaaha
15:31 timotimo i think it is NQPMu instead
15:31 timotimo nqp: say(i)
15:31 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«␤»
15:31 timotimo like everything :)
15:31 timotimo nqp: say(NQPMu)
15:31 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«␤»
15:32 tadzik well, at least ita's not i vs $i
15:32 timotimo :)
15:33 tadzik imagine my $i = 0; i < 5; $i++
15:34 tadzik dat horror
15:34 timotimo :D
15:34 woolfy joined #perl6
15:35 colomon rn: say i < 5
15:35 camelia rakudo-jvm b11094: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in any  at gen/jvm/BOOTSTRAP.nqp:1201␤  in sub infix:<<> at gen/jvm/CORE.setting:3971␤  in sub infix:<<> at gen/jvm/CORE.setting:3971␤  in block  at /tmp/81k5wPDMMc:1␤  in …»
15:35 camelia ..rakudo-parrot b11094: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1218␤  in any  at gen/parrot/BOOTSTRAP.nqp:1209␤  in method Real at gen/parrot/CORE.setting:990␤  in sub infix:<<> at gen/parrot/CORE.s…»
15:35 camelia ..niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Complex numbers are not arithmetically ordered; use cmp if you want an arbitrary order␤  at /tmp/mME5Yg143X line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/C…»
15:36 tadzik niecza wins
15:38 jnthn timotimo: I glanced your patch. It adds 8 bytes to every single QAST node for one feature we only sorta need in NQP, so in its current form it's worse than what it cures...
15:39 jnthn timotimo: I'd just assume if we do have arity > 1 set then the others were marked as optional. It may not be true, but if we didn't we're screwed anyway, and also we'll get an error like full Perl 6 gives (not enough args passed)
15:39 timotimo thanks. got a suggestion for how to make it better?
15:40 timotimo add optarity using a role that only sometimes exists?
15:40 jnthn What I just wrote? :)
15:40 jnthn No, just keep arity
15:40 jnthn And assume.
15:40 jnthn (that all but the first one are potentially optional)
15:40 timotimo wait, why?
15:40 jnthn I don't think anything else is worth the complexity.
15:40 timotimo oh
15:40 timotimo that's why
15:40 timotimo yeah, i can do that
15:41 timotimo do you have a suggestion for the redo problem?
15:41 jnthn r: my @a = 1,2,3; for @a -> $x, $y { }
15:41 camelia rakudo-parrot b11094: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at /tmp/nHohizSqqN:1␤  in any  at /tmp/nHohizSqqN:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfiles a…»
15:41 camelia ..rakudo-jvm b11094: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at gen/jvm/CORE.setting:7270␤  in block  at gen/jvm/CORE.setting:7106␤  in method gimme at gen/jvm/CORE.setting:7524␤  in block  at /tmp/bGWE2CZbHX:1␤  in any eval at gen/jv…»
15:41 jnthn Note that with what I'm suggesting you'd get a consistnet error with ^^ :)
15:41 jnthn redo problem?
15:41 timotimo yeah. at the moment i have one call for each amount of arguments the block may have populated
15:41 timotimo a redo would have to find that same call branch again
15:42 jnthn But isn't the redo handler around the call?
15:42 timotimo er, i should look closely
15:42 jnthn So you could have an approriate one for each on MoarVM as that is really cheap.
15:42 jnthn On Parrot it's different and would make things more expensive, so I guess "save an integer" or whatever...
15:43 jnthn This is turning into a lot of complexity for an edge case...
15:43 timotimo i can abort if you'd prefer
15:44 lizmat_ joined #perl6
15:44 jnthn Well, it will bite people is all. I just hadn't thought about the redo thing when saying "let's fix it"...
15:44 timotimo bite ... in what way?
15:45 jnthn Well, the bug god filed because somebody at the internals workshop actually ran into it
15:45 * colomon is worried about appeasing the bug god
15:45 timotimo :D
15:45 jnthn uh
15:45 jnthn got :D
15:45 jnthn lol
15:46 timotimo if i implement the redo thing, it won't bite people? what am i misunderstanding here?
15:46 * geekosaur was wondering...
15:46 * colomon suspects that masak is beloved by the bug god
15:46 jnthn timotimo: I'm just sayin gthat when I thought it should be fixed, I didn't think about the interaction with redo.
15:46 jnthn timotimo: And now that I do, I realize it's not as easy a fix as I'd first imagined.
15:47 timotimo but that doesn't mean i shouldn't attempt the fix, right?
15:47 jnthn I think go for it and just try to make sure the common case of for @a -> $x { ... } does not get more expensive for it.
15:47 timotimo sure thing
15:47 timotimo at the moment, the common case is still a branch that doesn't get any different code at all
15:47 timotimo i can keep it that way
15:48 jnthn Preferable, provided it doesn't lead to loads of dupe
15:48 jnthn OK, I need to go catch boats and trains and stuff
15:48 jnthn bbl
15:48 timotimo have fun!
15:48 moritz dupe, the programmer's anti-dope
15:49 atroxaper How can i call method of parent class from childe class? I don't find it in Using Perl6...
15:50 moritz self.TheParent::themethod(@args)
15:50 atroxaper moritz: cool. Thanks!
15:50 moritz or callsame/callwith, depending on the exact use case
15:51 PerlJam moritz: It's odd that you didn't lead off with callsame/callwith  :)
15:51 atroxaper Hmm... Very flexible
15:51 PerlJam perhaps it's just odd that I think callsame/callwith would be more commoon
15:51 PerlJam er, common even
15:52 moritz PerlJam: I cannot remember if call{same,with} work outside the context of multis
15:52 moritz PerlJam: which is why the other alternative seemed safer to mention first
15:52 PerlJam ah
15:53 PerlJam perhaps atroxaper really wanted nextsame/nextwith too?
15:53 PerlJam The question didn't have enough information for me to tell
15:53 jnap joined #perl6
15:54 atroxaper And one more question: whay i can't type    grammar P6Gr is Perl6::Grammar {}     ? I mean why P6Gr.parce throwing an exception?
15:54 moritz perhaps because you have misspelled 'parse'?
15:54 moritz it would help to know what exception you get
15:54 atroxaper No ;)
15:55 atroxaper No such method 'submethod_table' for invocant of type 'NQPClassHOW'
15:55 moritz atroxaper: that's likely related to Perl6::Grammar being an NQP class, not a rakudo class
15:55 moritz would be nice if it worked, though
15:56 atroxaper use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; grammar P6Gr is Perl6::Grammar {}; say P6Gr.parse('my $b=4;', :actions(Perl6::Actions.new())).dump;
15:56 atroxaper rp: use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; grammar P6Gr is Perl6::Grammar {}; say P6Gr.parse('my $b=4;', :actions(Perl6::Actions.new())).dump;
15:56 camelia rakudo-parrot b11094: OUTPUT«No such method 'submethod_table' for invocant of type 'NQPClassHOW'␤  in any  at gen/parrot/Metamodel.nqp:449␤  in any methods at gen/parrot/Metamodel.nqp:444␤  in any !protoregex_table at gen/parrot/stage2/QRegex.nqp:766␤  in any  at gen/parrot/…»
15:57 rurban1 joined #perl6
15:57 rurban1 joined #perl6
15:57 moritz in that case I'd recommend delegation, not inheritance
15:58 moritz that is, keep the NQP Perl6::Grammar as an attribute, don't inherit from it
15:59 atroxaper moritz: I am finding a way to find out a place where grammar failed (when we put some wrong stuff in parse method). And i'm thinking about overriding some method of Perl6::Grammar.
16:00 moritz atroxaper: then it's likely easier to do that in NQP code
16:01 atroxaper moritz: override panic method and get CURSOR object...
16:02 moritz though it might be an easy fix in rakudo, lemmy try something...
16:02 atroxaper How NQP code differ from Perl6? I mean what should i code? Just .nqp file?
16:02 denis_boyun joined #perl6
16:03 atroxaper moritz: And    use MyModule:from<NQP>;   Right?
16:07 atroxaper What dows 'lemmy' mean? )
16:08 telex joined #perl6
16:08 FROGGS let me
16:10 moritz atroxaper: NQP is more low level than NQP; I recommend looking at the existing example code in src/Perl6/Actions.nqp for example to get an idea how it looks
16:10 atroxaper FROGGS: oh... Ok. I am not an English guy...
16:10 FROGGS (we neither)
16:10 FROGGS err, nqp is more low level than perl6
16:10 moritz also https://6guts.wordpress.com/2013/09/17/materi​al-from-the-rakudo-and-nqp-internals-course/ has some pointers to documentation for NQP
16:10 gfldex does Perl6::Grammar throw exceptions?
16:10 FROGGS gfldex: yes
16:11 FROGGS rp: 07; # that is why we have this bug
16:11 camelia rakudo-parrot b11094: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o7 if you mean thatâ�¤    at /tmp/k3Imm_22mr:1â�¤    ------> [32m07[33mâ��[31m; # that is why we have this bug[0mâ�¤    Leading 0 does not indicate octal in Perl 6…»
16:11 FROGGS the bug is that it warns twice
16:12 atroxaper moritz: ok. thank you. I will try to inherit grammar by NQP.
16:12 tgt joined #perl6
16:14 ingy2^ joined #perl6
16:14 atroxaper moritz: I know what NQP is. I just dont know how i can write nqp module and import it in Perl6 code )
16:16 moritz atroxaper: you seem to be doing fine :-)
16:17 atroxaper moritz: glad to hear :-)
16:18 colomon PerlJam: just realized I've already written like a third of the code I was thinking I was going to have to write for the advent post I was thinking of.  ;)
16:18 tgt joined #perl6
16:19 PerlJam colomon: nice
16:20 colomon also, I think I found a major shortcoming in my C++ implementation.  :\
16:21 colomon r: say "1f".base(16)
16:21 camelia rakudo-parrot b11094: OUTPUT«No such method 'base' for invocant of type 'Str'␤  in block  at /tmp/57ANSoL8Sv:1␤  in any  at /tmp/57ANSoL8Sv:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfiles at gen/parrot/…»
16:21 camelia ..rakudo-jvm b11094: OUTPUT«No such method 'base' for invocant of type 'Str'␤  in block  at /tmp/8zyzVgMb7B:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196␤  in any…»
16:21 colomon r: say "1f".hex
16:21 camelia rakudo-parrot b11094: OUTPUT«No such method 'hex' for invocant of type 'Str'␤  in block  at /tmp/_K2yVe0vjG:1␤  in any  at /tmp/_K2yVe0vjG:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfiles at gen/parrot/s…»
16:21 moritz atroxaper: I have a local patch that gets rid of the error message (inheriting from an NQP class), but a new problem appears then
16:21 camelia ..rakudo-jvm b11094: OUTPUT«No such method 'hex' for invocant of type 'Str'␤  in block  at /tmp/tG0N9j1Hzk:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196␤  in any …»
16:21 moritz P6opaque only supports type changes where the MRO of the original type is a suffix of the MRO of the new type
16:22 colomon r: say :16("1f")
16:22 camelia rakudo-parrot b11094, rakudo-jvm b11094: OUTPUT«31␤»
16:22 * colomon does not know why he always forgets that.
16:22 moritz I don't know why the subcllass'es MRO shouldn't be a suffix of the superclasses' MRO
16:23 atroxaper MRO ?
16:23 moritz maybe related to automatically adding Mu?
16:23 moritz atroxaper: method resolution order
16:23 moritz a linearization of the tree of parent classes
16:23 raiph joined #perl6
16:25 atroxaper moritz: General i don't want to rid error message. I want to get a CURSON in that moment for getting position of cursor.
16:26 atroxaper CURSOR i mean
16:30 gfldex atroxaper: did you try to catch the excpetion?
16:30 atroxaper moritz: can i just override Perl6::Grammar.panic method to get my $cursor_class field of HLL::Grammar ? )
16:31 FROGGS moritz: I hit the same problem when trying to make v5 a proper module
16:31 colomon r: my $hex = "AFFD" ~~ / [<[0..9]> | <[A..F]>]+/; say $hex
16:31 camelia rakudo-parrot b11094, rakudo-jvm b11094: OUTPUT«「AFFD」␤␤»
16:31 colomon r: my $hex = "AFFD" ~~ / [<[0..9]> | <[A..F]>]+/; say :16($hex)
16:31 camelia rakudo-parrot b11094: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Match instead␤  in sub unbase at gen/parrot/CORE.setting:6513␤  in block  at /tmp/YZPYMJN5ss:1␤  in any  at /tmp/YZPYMJN5ss:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  …»
16:31 camelia ..rakudo-jvm b11094: OUTPUT«Nominal type check failed for parameter '$str'␤  in block  at /tmp/zzAFioQMzP:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196␤  in any c…»
16:31 colomon bug or just LTA?
16:31 FROGGS moritz: so it would be nice if we could brainstorm a bit about that, maybe with jnthn
16:32 moritz atroxaper: I have no idea
16:32 colomon r: my $hex = "AFFD" ~~ / [<[0..9]> | <[A..F]>]+/; say :16(~$hex)
16:32 moritz colomon: LTA bug :-)
16:32 camelia rakudo-parrot b11094, rakudo-jvm b11094: OUTPUT«45053␤»
16:32 atroxaper gfldex: no. but i think that catching dont help me in that case...
16:32 moritz colomon: well, kinda, (more)
16:32 moritz colomon: I think that :16(...) intentionally doesn't use Cool for its arguments
16:32 tgt_ joined #perl6
16:32 moritz colomon: so that we can catch the case where people pass integers to :16(), because they are confused
16:33 colomon ah
16:33 colomon it's obviously easy to work around...
16:33 atroxaper moritz: ok. i will try.
16:34 dalek rakudo/inherit-from-nqp-class: b7de167 | moritz++ | src/Perl6/Metamodel/MethodContainer.nqp:
16:34 dalek rakudo/inherit-from-nqp-class: inch towards making Perl 6 classes able to subclass NQP classes
16:34 dalek rakudo/inherit-from-nqp-class: review: https://github.com/rakudo/rakudo/commit/b7de167171
16:35 tgt_ joined #perl6
16:45 tadzik hah, flight from waw to london is like 50€
16:45 tadzik lpw seems more and more tempting
16:46 moritz woah
16:54 ingy3^ joined #perl6
16:58 atroxaper night #perl6
16:59 rindolf joined #perl6
17:09 dmol joined #perl6
17:26 diakopter only $1100 to fly from sfo. more and more attractive.
17:29 diakopter quietfanatic agrees with me that Lesser and Greater would be better than Less and More
17:30 diakopter since those imply direction slightly more
17:30 jnthn o/ from le train
17:30 diakopter jnthn: ahoy buggod
17:31 jnthn *groan*
17:31 diakopter jnthn: how about Lesser/Greater
17:32 jnthn context?
17:32 tadzik Gesser/Later
17:32 jnthn oh, the Increase/Decrease...
17:32 timotimo jnthn: if i handle arity > 1 like optional arity, it'll result in more verbose/cautious code in any case :(
17:33 timotimo but yeah, you're right, we would be getting a nicer error message out of the whole ordeal
17:33 tadzik well, I opened the bug because jnthn said that that should work
17:33 jnthn timotimo: Only for arity 2 things, though?
17:33 timotimo er, what?
17:33 tadzik I'll be fine with agreeing that it shouldn't :)
17:34 timotimo tadzik: i'd like it to work, though :)
17:34 jnthn timotimo: 2 or greater
17:34 diakopter oh noes
17:34 jnthn arity 1 we can assume :)
17:34 ajr joined #perl6
17:34 tadzik okayo :)
17:34 timotimo yes, 2 or greater.
17:34 tadzik jnthn: 2 or more :P
17:34 jnthn 2 or increase :P
17:34 timotimo btw, i changed the code that increases the arity of the cur_lexpad thingie from "only if it has no default" to "always"
17:34 timotimo is that dangerous?
17:35 jnthn Well, so long as it doesn'tcount names
17:36 jnthn It probably is OK, especially if tests/spectest pass
17:36 timotimo it does not count nameds, no
17:37 timotimo there is no calculated jump in parrot, is there?
17:37 jnthn yeah, I think there is a local_jump thingy
17:37 [Sno] joined #perl6
17:37 timotimo do i have to calculate bytecode widths for that?
17:37 jnthn the regex engine uses it
17:38 jnthn it's dangerous s hell
17:38 jnthn no, it's not that bad :)
17:38 timotimo heh
17:38 jnthn but I *think* you might be able to segfault things with sufficiently good use of it
17:38 jnthn Unless things got fixed...
17:39 timotimo local_jump doesn't seem to exist anywhere in src/
17:39 jnthn I don't know what it's actually called...
17:39 jnthn Look somewhere in the regex code postlude
17:39 timotimo oh, it's just jump $I123
17:40 jnthn oh :)
17:40 timotimo and i can set $I123, label_name[$offset]
17:40 trexy joined #perl6
17:41 jnthn k
17:41 timotimo huh, is that it? its usage is weird.
17:41 jnthn that looks weird to me too but I'm mostly managing to forget PIR :P
17:42 * timotimo goes with a linear search instead
17:43 * jnthn tries to remember if anybody besides timotimo++ now has worked on code-gen on every backend...
17:43 moritz jnthn: I'm pretty sure you did :-)
17:44 timotimo "worked on" is a bit much, no? :)
17:45 jnthn I...I did? :P
17:48 nebuchadnezzar joined #perl6
17:50 FROGGS joined #perl6
17:51 fhelmberger joined #perl6
17:52 jnap1 joined #perl6
17:52 moritz there are really two things you can do: work on the actual code generation framework, or do code generation for specific operations (using the previously mentioned framework)
17:52 moritz I've only ever been involved with the latter
17:53 jnthn I guess givne I designed JAST and most of MAST I've done a bit of the former :)
17:58 lowpro30_ joined #perl6
18:01 tadzik jost most :)
18:06 timotimo yeah, i also only did the latter
18:06 timotimo QAST transformations don't count, IMO
18:06 timotimo hey jnthn, can you tell me what kinds of nodes are safe to be replaced inside a tree of QRegex during optimisation time, in order not to harm the generated NFA data?
18:07 zakharyas joined #perl6
18:08 cognominal joined #perl6
18:08 jnthn timotimo: "replaced"?
18:08 * jnthn kinda needs more detial to answer :)
18:08 jnthn detail
18:09 timotimo well, can I remove, for example, a QAST::Regex( :rxtype<literal> ) out of the tree?
18:09 timotimo what about an :rxtype<alt>?
18:09 timotimo will NFA data be lost when i pull such a Regex node out of the tree?
18:11 timotimo i would like to replace nodes like literal or cclass with a new type of node that just skips ahead when i'm certain the NFA has already done the scanning of that particular node before
18:11 timotimo http://questhub.io/realm/perl/​quest/528217fd9f567a1c340000a8 - here's a writeup of my thoughts on this topic
18:13 jnthn Trouble is that you don't know if you were invoked by the NFA or not...
18:13 jnthn statically I mean
18:13 timotimo oh? what other cases are there?
18:13 jnthn What I mean is given
18:13 jnthn token foo { bar }
18:14 jnthn uh, bad exmaple
18:14 timotimo that's right. i can't do this in many cases
18:14 timotimo but in the cases where i can, i totally could :)
18:14 jnthn token foo:sym<bar> { <sym> }
18:14 timotimo like the example in the questhub quest: [ "integer: " (\d+) | "identifier: " (\w+) | "based-number: 0" (<[xob]>) (\d+) ]
18:14 jnthn Here, you *may* be in it thanks to the NFA
18:14 jnthn But it's possible somebody explicilty called it too
18:15 timotimo yes, i touched on that exact argument in my questhub quest (without a good solution)
18:15 timotimo one idea is to introduce QAST::Want into the regex system and have the nfa set a flag that triggers a different branch of the Want to be executed
18:16 jnthn I don't think that's it
18:16 jnthn Looking more generally, if we have
18:16 jnthn token foo:sym<bar> { \w+ }
18:17 ggoebel16 joined #perl6
18:17 jnthn We actually can handle that from the NFA too
18:17 jnthn But it means we need to know where the end is
18:17 jnthn I'd actually been pondering something in the other direction than you're thinking...
18:18 jnthn That is, when we make the NFA, we differentiate automatic "skip to here" point from fate
18:18 timotimo opposite or orthogonal?
18:18 jnthn And store the "skip to here" points
18:18 timotimo ah, that seems to be opposite
18:18 jnthn Well, it's mroe that we make the NFA tell us
18:18 jnthn It's generally a better design when we let things that know stuff do the telling, than let things that don't know guess ;)
18:19 timotimo yes, that's a good point.
18:19 jnthn And if we want to get REALLY cute
18:19 timotimo but that's hard, too. the NFA doesn't carry with it from where it has matched, does it?
18:19 jnthn We already generate an NFA for everything.
18:19 timotimo or where capture groups begin and end etc etc
18:19 jnthn No, capture groups would scupper it
18:19 jnthn But that still leaves quite a lot.
18:20 timotimo scupper == break?
18:20 jnthn yeah
18:20 jnthn well, force us not to do that opt
18:20 jnthn The other part of this though...
18:20 jnthn If we have a token foo { \d+ }
18:20 jnthn Nothing to do with a proto-regex
18:21 jnthn It has an NFA that can do all the matching
18:21 jnthn That is, in certain cases we can delegate to that even in non-protoregex/alternation cases.
18:21 timotimo so you want to find tokens that are completely declarative
18:21 jnthn It's not just about declarative.
18:21 timotimo and have no capture groups in them?
18:21 jnthn Well, I tink we need to separate out the two notions
18:21 jnthn Where is the end of the declarative prefix?
18:22 jnthn And where is the end of the stuff we can just let the NFA do?
18:22 jnthn e.g. before we gotta start capturing.
18:23 timotimo ah, of course
18:23 timotimo at the moment it just bails out if something is !.declarative
18:23 timotimo it should continue, but no longer count up the length of the declarative prefix
18:23 jnthn oh, I wsa more thinking the other way around
18:24 jnthn the amount we can consider skippable is a subset of what's declarative
18:24 jnthn \d+ <exponent>
18:24 jnthn That whole thing is probably all declarative
18:24 jnthn But we can only skip the \d+ 'cus the next thing captures
18:24 timotimo by skippable you mean "the QRegex implementation can rely on the NFA to have done it"?
18:24 timotimo yes, that's true
18:24 jnthn Right
18:24 jnthn There's a static and dynamic aspect here
18:25 timotimo i was thinking we could tell {} apart from {...} and let the NFA run past empty {} until it finds another stumbling block
18:25 jnthn Statically we know that it's "after the \d+" which is useful for knowing where the jump to in the generated code.
18:25 timotimo so it could, in theory, eliminate more branches?
18:25 jnthn *to
18:26 TimToady and we could, in theory, do a single capture if it starts at an abs position and ends with a known offset to the end of declarative
18:26 timotimo that's true, too
18:26 jnthn timotimo: true, but trying to keep this manageable :)
18:26 timotimo i was about to say :)
18:26 jnthn timotimo: It's not "eliminate more branches"
18:26 jnthn It's about not re-doing work.
18:27 jnthn Anyway, the harder part for us to factor is the dynamic aspect
18:27 timotimo if it's going to be me who's to implement this, it should not be a huge monolithic blob of work; instead i'd hope for a bunch of achievable milestones that all have a bit of a reward to them
18:27 TimToady well, some of them could be yaks :)
18:27 FROGGS timotimo: that was what I was thinking atm, define separate "smaller" tasks
18:27 jnthn That is, knowing wheat to set pos to
18:27 * PerlJam randomly mentions advent posts again   :)
18:28 ggoebel16 joined #perl6
18:28 timotimo PerlJam: we're too busy building castles in the sky
18:28 jnthn I'd love to tell you a lovely robust design for this but I don't have one to hand :)
18:28 diakopter TimToady: Mr Toad's Wild Ride is no more...
18:28 PerlJam timotimo: but we don't yet have flying cars to get to the sky-castles
18:28 timotimo i was thinking the approach i was suggesting is much simpler in the dynamic case
18:28 TimToady diakopter: you mean in DW, or in DL?
18:28 timotimo PerlJam: i wasn't saying what we were doing was a good idea :)
18:29 jnthn Maybe I'll have some decent thinking time tomorrow...it's mostly travel and stuff. :)
18:29 diakopter W
18:29 timotimo it would be fantastic if you could come up with a "typical jnthn design" :)
18:30 jnthn timotimo: Will ponder it a bit, given you're interested to work on it :)
18:31 TimToady well, it seems obvious to me that whatever calculates the declarative prefix has to also pass along whatever it knows about lengths and offsets that could be useful later
18:31 PerlJam "I'll solve this problem in the style of ... jnthn!"
18:31 ssutch joined #perl6
18:31 jnthn TimToady: Yes, it's how to factor that passing along :)
18:32 timotimo jnthn: if it's way too hard for me, though, i may not be up to the task just yet; but having a design almost ready to implement it is bound to help :)
18:32 TimToady alternatively, maybe the declarative bits are in their own little structure that can be scanned as a separate pass
18:33 TimToady (but I'm guessing that would be harder)
18:33 diakopter TimToady: hm, apparently?
18:34 diakopter it was 1998
18:34 diakopter meh
18:35 jnthn timotimo: Well, it may be hard in places, but I suspect I can guide you through them if so :)
18:35 ggoebel16 joined #perl6
18:36 jnthn I actually will have time to do Perl 6 things besides ranting about stuff on the channel again next week, it seems... :)
18:36 timotimo \o/
18:38 FROGGS nice :o)
18:40 dalek std: b469b42 | larry++ | STD.pm6:
18:40 dalek std: \x{} now recommends \x[]
18:40 dalek std: review: https://github.com/perl6/std/commit/b469b42326
18:40 diakopter so, the onion logo means the more you dig into it, the more you cry?
18:40 TimToady and the less there is left to cry about :)
18:43 timotimo the code may be super ugly, but i think my redo handling now works
18:43 timotimo first make it work, then make it beautiful
18:43 diakopter Melanie just suggested making a camel logo with a camelia drawn on a saddle on the camel
18:44 diakopter .. to which I replied, uhm, you're really setting up that critical pun well
18:45 timotimo i kind of wish there was a construct to go through multiple parallel lists in nqp
18:45 timotimo that could potentially also give us an optimized for @foo X @bar -> $a, $b { } for rakudo
18:45 diakopter nqp::zipzipzip
18:47 TimToady you mean Z I presume?
18:47 timotimo indeed, thinko
18:57 timotimo https://twitter.com/loltimo​/status/400336432939544576  -  i made a funny
19:07 dwarring joined #perl6
19:07 lue Can anybody tell me offhand why this line   my %meths := $par.method_table($par);  might call a sub when it shouldn't, or what NQP debugging features might help me figure that out? .method_table consists entirely of "return %!methods;"
19:08 timotimo --target=pir :P
19:09 dwarring .u §«¶·
19:09 moritz
19:10 dwarring .u §
19:10 moritz ENOYOLEAUX
19:11 timotimo nqp has a function that i really think should be exposed to perl6 to get the name of a character
19:11 tgt joined #perl6
19:11 moritz +1
19:12 dwarring seems that § and ¶ have been reclassified as punct between unicode 5.2 and 6.0
19:13 dwarring so punct tests in https://github.com/perl6/roast/​blob/master/S05-mass/charsets.t are giving variable results depending on version of icu etc
19:14 dwarring methinks I should make those punct tests todo
19:14 moritz +1
19:15 timotimo +1
19:16 diakopter +1
19:18 * dwarring another good reason to bring unicode handling into nqp core
19:18 jnthn Bring them in line with the latest
19:18 jnthn And then we can todo them by backend, when the backend is behind or inconsistent due to ICU version
19:18 jnthn I think that on Moar we have >= 6
19:19 * TimToady has been arguing against icu from the start, having found the other approach worked pretty well for P5
19:20 FROGGS no icu in moarvm \o/
19:20 timotimo +1
19:21 diakopter I can very easily port/generalize moar's unicu to the other backend
19:21 timotimo oooooh!
19:21 TimToady it's the very complexity of tracking Unicode that argues against entrusting it to a 3rd party
19:22 TimToady and it's one of the spots where P5 is still miles ahead of most other programming languages
19:25 spider-mario joined #perl6
19:25 lue .oO(  /usr/local/lib/lib»ö«.so  )
19:26 FROGGS lue: btw, I only see $foo.HOW.method_table($foo) in nqp's src
19:26 FROGGS lue: did you forgot the .HOW?
19:26 lue FROGGS: maaybe, but I don't think that's the issue. /me checks anyway
19:27 lue o.o
19:27 FROGGS O.o
19:27 lue FROGGS++
19:27 FROGGS \o/
19:27 diakopter no one reacted to my "other backend" dig
19:28 ingy2^ joined #perl6
19:28 lue diakopter: which other backend are we talking about? :P
19:28 moritz diakopter: +2 (to porting it to two other backends)
19:28 FROGGS diakopter: would make sense I guess... but I totally wanna see NFG too *g*
19:28 Util #ps in 3m
19:28 lue FROGGS: but how missing that .HOW caused the sub within which that statement was to get called immediately again is a mystery to me :/
19:29 diakopter FROGGS: well that's harder bc it's the whole string impl
19:29 FROGGS diakopter: and in moarvm only?
19:29 FROGGS (I really do like MoarVM)
19:30 FROGGS lue: I guess it wants to call .method_table on the return value of $par or so
19:31 lue FROGGS: thing is, the sub being called again is a sub within a method find_method. Without going through the method again, if the 'die'-induced backtrace is to be believed.
19:31 FROGGS diakopter: I just think that at some point it does not make soo much sense to port stuff over from MoarVM to Parrot, since, it would be a MoarVM-clone with another heartbeat then
19:32 lue FROGGS: I don't really care though, because it works now :)
19:32 FROGGS *g*
19:32 FROGGS lue: that's fine :o)
19:32 tadzik about 'which other backend': http://i2.kym-cdn.com/photos/ima​ges/original/000/483/894/463.jpg
19:32 FROGGS tadzik++
19:32 FROGGS hehe
19:33 TimToady timotimo: will your optimization make it harder to optimize when 1|2 {} to a jump table at some point?
19:34 TimToady or can the recognizer for that just run in front of this optimization?
19:35 jaffa4 WHat is the state of MoarVM?
19:35 TimToady (Perl 4 would actually make a jump table for the first character of string cases as well as for integer cases!)
19:35 diakopter jaffa4: existeth
19:35 TimToady nqp bootstrapped on it
19:36 TimToady just needs rakudo now :)
19:36 jaffa4 what does it mean that nqp bootstrapped on it?
19:37 TimToady means that nqp can compile nqp running on top of MoarVM, and use that to compile itself on top of MoarVM, and use that...
19:38 jaffa4 ok
19:38 jaffa4 It is a kind of measure of progress I see
19:38 diakopter masak: name for p5interop: Voldemoar
19:38 jaffa4 What is the advantage of MoarVm?
19:38 TimToady it's moar better!
19:39 TimToady it's designed specifically to support Perl 6
19:39 diakopter jaffa4: it has higher ground
19:39 TimToady it natively speaks p6's metamodel
19:39 jaffa4 So is it going to be faster than javavm or parrot?
19:40 diakopter someday
19:40 tadzik it's what Parrrot wanted to be when it grows u,
19:40 tadzik * up
19:40 lue .oO(MoarVM is basically Parrot timeshifted about a decade.)
19:40 diakopter both directions
19:40 FROGGS jaffa4: we are currently working on making rakudo work on it btw
19:40 FROGGS lue: and with the knowledge how a perl6 implementation looks like, to be fair
19:41 jaffa4 Is there going to be PIR for MOarvm?
19:41 FROGGS NO
19:41 TimToady making rakudo work primarily entails 1) getting the CORE setting to parse, and 2) implementing the run-time support for the semantics of those things that are beyond what npq needs
19:41 jnap1 for long lived processes, the javaVM can can really optimized, but startup isn't great.  I guess MoarVM will be faster for CLI, from my understanding. At least as a lurker here is what I've heard
19:41 FROGGS *NO PIR* *NO PROJECT EULER*
19:41 tadzik NO LOL
19:41 FROGGS (the latter is a joke)
19:42 TimToady jnap1: yes, that seems accurate
19:42 lue FROGGS: yep. The "timeshift" comment was referring to "what if Parrot design started a decade later" than anything else.
19:42 lue *more than
19:42 FROGGS jaffa4: it does not spit out yet another readable code, just to parse it again
19:42 TimToady lue: no "what if" about it :P
19:42 tadzik will moar have pir: http://i2.kym-cdn.com/photos/ima​ges/original/000/483/894/463.jpg
19:42 lue :)
19:42 FROGGS hihi
19:42 diakopter .oO( sometimes I find myself writing here, imagining chromatic reading the logs, like a convalescent reads the funny papers
19:42 diakopter )
19:43 FROGGS diakopter: I've read more of his stuff yesterday :o)
19:43 tadzik I should make an image-only faq
19:43 jaffa4 It means it will convert it into some kind of internal representation I guesrs
19:43 diakopter incl questons
19:43 FROGGS especially his Parrot-good-bye letter that I didn't know before
19:44 dalek roast: 3c83e50 | (David Warring david.warring@gmail.com)++ | S05-mass/charsets.t:
19:44 dalek roast: mark charset punct tests as todo - results varying depending on unicode version
19:44 dalek roast: review: https://github.com/perl6/roast/commit/3c83e509ba
19:44 tgt joined #perl6
19:44 FROGGS jaffa4: into instructions, as bytecode
19:44 jaffa4 SO it is interpreted
19:44 TimToady straight from MAST to bytecode
19:44 jaffa4 Like Basic?
19:44 tadzik FROGGS: is that very new?
19:45 FROGGS bytecode just means a pretty packed unreadable mess of binary data here :o)
19:45 FROGGS tadzik: no, only to me
19:45 FROGGS 2011 or so
19:45 TimToady jaffa4: it's still just a virtual machine interpreting "bytecode"
19:45 FROGGS jaffa4: Basic needs to be parsed, that does not happen with bytecode
19:45 jnthn Compiling stuff on MoarVM goes directly from a low-level tree-ish thing to bytecode
19:45 jnthn The bytecode is the spec'd interface to the VM
19:45 TimToady for some definition of "byte" that doesn't include 8-bit opcodes, I suspect
19:46 diakopter bytecode is parsed
19:46 tadzik well, what CPU is doing is basically interpreting bytecode, fsvo bytecode
19:46 FROGGS like it reads a byte, knows it is the number of an instruction, and it will straight ahead execute it or so
19:46 lue .oO(the new PIR will be MoarVM Objective Abstraction of Runtime Virtual Microcode, clearly)
19:46 TimToady is it a bytecode, or is it a wordcode?
19:46 diakopter bytecode is a lanfuage too!
19:46 jnthn TimToady: Well, yes, but it's stored as a bunch of bytes. :)
19:46 lue octetcode!
19:46 TimToady jnthn: so is the original Perl 6
19:46 jnthn :P
19:46 jaffa4 then bycode can be converted into some kind of assembly language
19:47 timotimo TimToady: i don't think so. the code that comes out is "if 1.ACCEPTS($_) || 2.ACCEPTS($_)". that should still be optimisable, probably even easier than before.
19:47 jnthn jaffa4: We do have a way to dump the bytecode into something that loosk like assembly.
19:47 jnthn jaffa4: But that's just a dumping format. Not spec'd in any way, and there's nothing to parse it.
19:47 diakopter it's cslled trollcode
19:47 lue jnthn: yet
19:47 TimToady timotimo: okay, just something to bear in mind that can make a switch statement run much faster if it's jumpable
19:48 FROGGS quick! register the MoarVM:: namespace on cpan!
19:48 FROGGS we will parse its dumpling format!
19:48 diakopter if they were still registerable
19:48 lue .oO(Incoming culinary jokes...)
19:48 diakopter jnthn doesn't know it's already parsed
19:49 FROGGS so he's the innocent one?
19:49 jnthn lue: Well, we can have something to parse it, but I ain't gonna bless it as "official" in any way :)
19:49 TimToady diakopter: shh, that's an NSA secret
19:49 diakopter it's in master; he hasn't found it yet
19:49 TimToady it's for inserting the NSA's backdoor, so please don't talk aobut it
19:49 jnthn Plus it's hardly what you'd want to write by ahnd :)
19:50 FROGGS jnthn: in contrast to pir, hahaha
19:50 jnthn I'd rather insert some backdoors for NASA so MoarVM can go into space :P
19:50 FROGGS hehe
19:50 diakopter it's pretty verbose and repetitititiively redundant
19:50 * TimToady meant NASA, yeah, that's what I meant...
19:50 FROGGS can you tell that again?
19:52 jaffa4 person of interest?
19:53 diakopter cbs comedy
19:53 TimToady .oO(pirson of interest)
19:53 diakopter procedural
19:53 diakopter not very oo
19:53 lue .oO( r: say Q:NSA{███████████████████████████████████} )
19:54 TimToady r: say Q:NSA{███████████████████████████████████}
19:54 camelia rakudo-parrot b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/HeDpixyBe4â�¤Unrecognized adverb: :NSAâ�¤at /tmp/HeDpixyBe4:1â�¤------> [32msay Q:NSA[33mâ��[31m{███████â–​ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ​███████████…»
19:54 camelia ..rakudo-jvm b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/AWWZL9Drq9â�¤Unrecognized adverb: :NSAâ�¤at /tmp/AWWZL9Drq9:1â�¤------> [32msay Q:NSA[33mâ��[31m{████████​█████████████â–​ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€¦Â»
19:54 TimToady I think that is only recognized when you're compiling yourself
19:55 timotimo TimToady: well, when someone comes up with a jump table implementation of given/when, they can ask me to revert that commit if it hinders them. for now, this is faster.
19:55 TimToady funny that whitespace coming out red...
19:55 diakopter r: say "y Q:NSA{██████████████████████████████████"
19:55 camelia rakudo-jvm b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XCcotNfc0Yâ�¤Bogus statementâ�¤at /tmp/XCcotNfc0Y:1â�¤------> [32msay "y Q:NSA{[33mâ��[31m████████â–​ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ​███████████"[0…»
19:55 camelia ..rakudo-parrot b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/IjVp7h674Râ�¤Bogus statementâ�¤at /tmp/IjVp7h674R:1â�¤------> [32msay "y Q:NSA{[33mâ��[31m████████â​–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ​–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ"…»
19:55 diakopter r: say "██████████████████████████████████"
19:55 camelia rakudo-parrot b11094, rakudo-jvm b11094: OUTPUT«██████████████████████████████████␤»
19:55 lue The only other compiler that ████████████ does that ██████ is ████M, if I re██ll.
19:55 diakopter r: say "██████████████████████████████████"; nhvh h
19:55 camelia rakudo-parrot b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ICma4THD71â�¤Undeclared routines:â�¤    h used at line 1â�¤    nhvh used at line 1â�¤â�¤Â»
19:55 camelia ..rakudo-jvm b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4be5EwdLjsâ�¤Undeclared routines:â�¤    h used at line 1â�¤    nhvh used at line 1â�¤â�¤Â»
19:55 diakopter r: say "██████████████████████████████████"; . . .
19:56 camelia rakudo-parrot b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Ht5lGp2Qusâ�¤Unsupported use of . to concatenate strings; in Perl 6 please use ~â�¤at /tmp/Ht5lGp2Qus:1â�¤------> [32m"████████████â–​ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€¦Â»
19:56 camelia ..rakudo-jvm b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/M32O1OkmYuâ�¤Unsupported use of . to concatenate strings; in Perl 6 please use ~â�¤at /tmp/M32O1OkmYu:1â�¤------> [32m"█████████████​█████████████…»
19:56 TimToady ooh, green!
19:56 jnthn why did my IRC client just turn into a weird tetris? :P
19:56 timotimo %)
19:57 lue jnthn: to train our ████ matter in preparation for The ████u██™, ██ course.
19:58 lue .oO(too bad irclog.perlgeek screws up the camelia output, this doesn't look nearly as cool there :/)
19:58 * FROGGS spectests his fix for #120517
19:58 * synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=120517
19:58 raiph joined #perl6
19:58 FROGGS lue: it is always better when it is live
19:59 TimToady yes, but as soon as we give instant replay to the refs, it had better be more accurate than their own eyes
20:00 dalek nqp/optional_for_arguments: ae3226b | (Timo Paulssen)++ | src/ (3 files):
20:00 dalek nqp/optional_for_arguments: store no optarity, assume arity > 1 means optional
20:00 dalek nqp/optional_for_arguments: review: https://github.com/perl6/nqp/commit/ae3226bb47
20:00 timotimo i'm going to clean up that ugly pile of code now :)
20:03 * TimToady wonders if CRLF should have a pre-assigned NFG codepoint^Wgraphpoint
20:05 jaffa4 if I see black stripes, is that good?
20:05 lue r: say "\r͏\n".ords # :TimToady
20:05 camelia rakudo-parrot b11094, rakudo-jvm b11094: OUTPUT«13 847 10␤»
20:06 TimToady if you get your eyes checked, you should see alternating black and white
20:06 lue jaffa4: yes, that was intentional on our parts :)
20:07 TimToady um, where does that 847 come from?
20:07 lue TimToady: COMBINING GRAPHEME JOINER of course :)
20:09 TimToady o.°
20:09 FROGGS jaffa4: that is how #perl6 works :o)
20:09 FROGGS jaffa4: welcome in our midst
20:09 lue r: say "█".unicharname; # oh wait, I no can haz
20:09 camelia rakudo-parrot b11094: OUTPUT«No such method 'unicharname' for invocant of type 'Str'␤  in block  at /tmp/5Ig6Dzklg4:1␤  in any  at /tmp/5Ig6Dzklg4:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfiles at gen/…»
20:09 camelia ..rakudo-jvm b11094: OUTPUT«No such method 'unicharname' for invocant of type 'Str'␤  in block  at /tmp/zwHl8qo1x7:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196␤ …»
20:10 lue If I vote against ICU (and stand with TimToady), does that mean I could get a .unicharname ?
20:10 FROGGS lue: unless there are other charnames the "uni" is redundant
20:11 TimToady it might be a function rather than a method, and it might work on integers, not strings
20:15 jnthn detrain, bbiab
20:15 dalek rakudo/nom: 9dfecb8 | (Tobias Leich)++ | src/core/Str.pm:
20:15 dalek rakudo/nom: fix #120517, Str:D:.words returns the one elem if it is just one
20:15 dalek rakudo/nom:
20:15 dalek rakudo/nom: This way .perl on it looks a bit nicer.
20:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9dfecb8991
20:15 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=120517
20:16 colomon joined #perl6
20:17 lue TimToady: yeah, I imagine there's a whole class of functions waiting. &charname, &cclass, &ltrdir, etc...
20:18 dalek rakudo-star-daily: 41f0a61 | coke++ | log/ (5 files):
20:18 dalek rakudo-star-daily: today (automated commit)
20:18 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/41f0a61fdf
20:19 Celelibi joined #perl6
20:21 * lue would like those functions to work on (integers&(arrays of integers|utf-y bufs/blobs))
20:21 stevan_ joined #perl6
20:23 FROGGS lue: like .chrs?
20:23 lue FROGGS: yeah, like that :)
20:24 FROGGS well, it would fit
20:24 timotimo Unable to checkout '240f8d025a72dfd9695290dde45981f238287d79' in submodule path 'modules/uri'
20:24 timotimo huh.
20:24 pecastro_ joined #perl6
20:25 dalek star: e31918b | (Timo Paulssen)++ | modules/uri:
20:25 dalek star: check out an actually existing commit in uri/
20:25 dalek star: review: https://github.com/rakudo/star/commit/e31918b22f
20:25 timotimo [Coke]: that should help with the daily star runs
20:26 dalek roast: 9010356 | (Tobias Leich)++ | S32-str/words.t:
20:26 dalek roast: test for RT #120517, Str.words.gist
20:26 dalek roast: review: https://github.com/perl6/roast/commit/901035667d
20:26 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=120517
20:28 FROGGS preflex: tell dram your bug is fixed: https://rt.perl.org/Ticket/Display.html?id=120517
20:28 preflex Consider it noted.
20:31 rurban1 joined #perl6
20:52 dalek rakudo/moar-support: f5a38f2 | nickg++ | tools/build/Makefile- (2 files):
20:52 dalek rakudo/moar-support: This fixes a build problem when you run Configure with '-backends=moar,jvm'.
20:52 dalek rakudo/moar-support:
20:52 dalek rakudo/moar-support: We make RUN_PERL6 unique to each build variant.
20:52 dalek rakudo/moar-support: review: https://github.com/rakudo/rakudo/commit/f5a38f2e97
20:56 * jnthn back
21:02 TimToady rather than handling the redo outside the block, it would be a lot simpler conceptually to just turn it into a goto to the first statement
21:03 TimToady then it doesn't interact with binding at all
21:03 TimToady or am I misunderstanding the difficulty?
21:04 timotimo are you talking about my code?
21:04 TimToady I'm talking about the discussion surrounding http://irclog.perlgeek.de/​perl6/2013-11-12#i_7848718
21:05 * TimToady assumes you're talking about the "redo" op
21:05 slavik will there be a state of the perl6 spec that is like '1.0' type of stable?
21:05 slavik or is it already there?
21:05 timotimo yes, jnthn said it's not cheap to make a new redo handler for each of the calls
21:06 TimToady I'm saying it should not be done that way in the first place
21:06 timotimo oh
21:06 timotimo well, after the first statement, it will shift items from the iterator
21:06 TimToady LABEL: loop { redo LABEL } should turn into loop { LABEL1: goto LABEL1 }
21:07 jnthn Beware LEAVE handlers :)
21:07 timotimo well, in that case i'd have to introspect the inside of the loop, which i don't know if i can manipulate freely
21:07 TimToady redo should be defined as equivalent to that goto
21:07 lue slavik: eventually Perl 6(.0.0) will be 'stable', for some definition :)
21:09 slavik yeah, I am waiting for that, moarvm and the concurrency stuffs. :)
21:09 TimToady redo should completely ignore iterators on the outside of the block, as well as phasers that leave/enter the block
21:09 TimToady it's just supposed to be a shorthand for 'goto'
21:10 TimToady trying to restart a redo from outside the block is going to be just as painful as trying to goto into a block that has an initializer
21:11 timotimo well, that's how it's been done so far in nqp
21:12 TimToady n: for 1..2 { .say; redo if rand < 0.7; LEAVE { say "oops" } }
21:12 camelia niecza v24-98-g473bd20: OUTPUT«1␤oops␤2␤oops␤2␤oops␤2␤oops␤»
21:13 jnthn Rakudo also, it keeps it in line with the rest of the control exception handlers.
21:13 jnthn Rather than making it a special case.
21:13 TimToady r: for 1..2 { .say; redo if rand < 0.7; LEAVE { say "oops" } }
21:13 camelia rakudo-jvm b11094: OUTPUT«1␤oops␤1␤oops␤2␤oops␤2␤oops␤2␤oops␤2​␤oops␤2␤oops␤2␤oops␤2␤oops␤2␤oops␤2␤oops␤2␤​oops␤2␤oops␤2␤oops␤2␤oops␤2␤oops␤2␤oops␤»
21:13 camelia ..rakudo-parrot b11094: OUTPUT«1␤oops␤2␤oops␤2␤oops␤»
21:13 timotimo well, that seems accurate
21:14 TimToady r: for 1..2 { HERE: .say; goto HERE if rand < 0.7; LEAVE { say "oops" } }
21:14 camelia rakudo-parrot b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0s0xihFsLYâ�¤Undeclared name:â�¤    HERE used at line 1â�¤Undeclared routine:â�¤    goto used at line 1â�¤â�¤Â»
21:14 camelia ..rakudo-jvm b11094: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/mCxAFpifFuâ�¤Undeclared name:â�¤    HERE used at line 1â�¤Undeclared routine:â�¤    goto used at line 1â�¤â�¤Â»
21:14 TimToady n: for 1..2 { HERE: .say; goto HERE if rand < 0.7; LEAVE { say "oops" } }
21:14 camelia niecza v24-98-g473bd20: OUTPUT«1␤1␤1␤1␤oops␤2␤oops␤»
21:14 timotimo ah, so it shouldn't give a leave for redo. gotcha.
21:14 TimToady that's how redo is supposed to work
21:14 lowpro30 joined #perl6
21:15 timotimo that's just a small bit outside of my comfort zone to fix right now
21:16 lowpro30__ joined #perl6
21:17 TimToady jnthn: seems to me the whole point of defining loop control constructs in the language is because each of them is a special case
21:20 timotimo i think Proc::Status should be mentioned in this month's changelog
21:20 timotimo FROGGS++
21:20 TimToady but in this case, it should just be handled like a goto to an implicit label, not by escaping the block in question
21:21 TimToady to the extent that goto is also a control exception at need
21:23 TimToady I think we can restrict 'redo' to work only lexotically, so we don't have to install a conjectural label on every loop, which could impact optimization
21:24 TimToady otherwise we can't unroll any loops
21:29 timotimo that sounds wise indeed.
21:30 dalek specs: 20876cc | larry++ | S04-control.pod:
21:30 dalek specs: notes on redo semantics, restrict to lexotic
21:30 dalek specs: review: https://github.com/perl6/specs/commit/20876ccda0
21:35 bluescreen10 joined #perl6
21:36 bluescreen10 joined #perl6
21:36 TimToady inlining is just one of many possible optimizations that we want to be careful not to make impossible...
21:37 dalek nqp: dba785d | (Timo Paulssen)++ | src/vm/parrot/QAST/Operations.nqp:
21:37 dalek nqp: presize list{,_*} only for 2 or more elements
21:37 dalek nqp: review: https://github.com/perl6/nqp/commit/dba785d8da
21:37 timotimo inlining and unrolling, yeah
21:37 TimToady though I suppose one could view loop unrolling as a form of inlining some of a tail recursion on the loop block
21:37 timotimo mhm
21:37 TimToady dividing a list into work pieces also plays into possibly hypering
21:38 TimToady though in that case you're trading for cores rather than memory
21:39 timotimo i think we can safely assume that many cores will be available in the future
21:39 timotimo at least 4 on normal machines. even phones have quad-cores now.
21:40 timotimo but rakudo should learn to treat memory more sparingly, i think
21:40 timotimo that doesn't mean we shouldn't do inlining. we just have to be more intelligent in other places that we have yet to find >_<
21:40 TimToady well, loop unrolling using instruction memory, not data memory
21:40 TimToady it's the data multipliers that kill you
21:41 timotimo you mean something like "8 extra bytes per QAST node" like i almost introduced into nqp? ;)
21:41 TimToady one generally doesn't store 1000000 versions of the same code, but data can easily do that
21:41 TimToady yes, well, that's data :P
21:42 timotimo that sounds entirely logical
21:42 timotimo i see you're no longer jetlagged in your brane :D
21:42 TimToady well, now it's just the innate branedamamge...
21:43 jnthn I dunno how many QAST nodes CORE.setting is, but it'll be easily in the tens of thousands, maybe rather more.
21:43 TimToady hence "multiplier"
21:43 jnthn So I tend to be kinda watchful on that stuff :)
21:43 FROGGS maybe we should run-length encode our memory :o)
21:44 timotimo say, why is arity in QAST::Node rather than QAST::Block?
21:44 FROGGS or even LZW or so
21:44 TimToady code like an unrolled loop doesn't tend to multiply unless you inline it, or unroll everything :)
21:45 TimToady is there any effort to store natives in decreasing size order?  P5 takes pains to put 32 bits before 16 bits before 8 bits...
21:45 TimToady otherwise you take alignment hits
21:45 jnthn timotimo: Good question...
21:45 timotimo jnthn: i'll try to move it into Block and see if it breaks
21:45 jnthn TimToady: Certainly various structs in Moar have had that thought out carefully
21:46 TimToady good
21:46 jnthn timotimo: Please do; it'd be good to know what breaks.
21:46 [Coke] timotimo (deprecations) known, but probably not ticketed yet.
21:46 [Coke] it's been failing on jvm since it was added.
21:46 timotimo [Coke]: very well
21:46 timotimo [Coke]: i'm looking forward to the next star daily run, since i fixed the checkout of uri
21:47 timotimo or at least i think i fixed it. i may have made it a tiny bit less good :P
21:47 raiph joined #perl6
21:47 timotimo jnthn: Error while compiling op unless: Method 'arity' not found for invocant of class 'QAST::Op' - so, should i duplicate arity in QAST::Op and have it in QAST::Block, too?
21:48 denis_boyun joined #perl6
21:48 jnthn timotimo: Um...first, let's understand what arity's an op...
21:49 timotimo i'm already looking :)
21:50 timotimo i think it's being done to calculate $*HAVE_IMM_ARG
21:50 Rotwang joined #perl6
21:51 timotimo and here it tries to find the arity of a QAST::Var, that's *certainly* not right :)
21:51 timotimo maybe it should only look at it if it nqp::istype QAST::Block
21:51 jnthn Where, ooc?
21:52 jnthn I thought the immediate stuff looked at the arity of the block
21:52 timotimo src/vm/parrot/QAST/Operations.nqp 441
21:52 jnthn Oh....is it simply that it just blindly checks arity of the children of if/unless/while/blah that can take a block with a param?
21:53 timotimo while does the same thing
21:53 jnthn And so far we always give back 0?
21:53 timotimo yes, i think so.
21:53 jnthn Yeah
21:53 jnthn Well, nqp::istype check like you check will cut it.
21:53 timotimo \o/
21:53 jnthn I'm pretty sure it will anyway
21:53 jnthn That'd be a rather nice saving.
21:53 timotimo that's 8 byte saved for a lot of QAST nodes :D
21:53 jnthn :D
21:54 timotimo how do you feel about knowing the allocation numbers for the different QAST nodes for... the setting for example?
21:55 jnthn Can't hurt.
21:55 denis_boyun joined #perl6
21:55 jnthn We may learn something from it :)
21:55 timotimo i'll whip up something
21:57 [Coke] looks like modules-test worked.
21:57 [Coke] https://github.com/coke/rakudo-star-d​aily/blob/master/log/test-modules.log
21:57 [Coke] Testing modules/Math-Model...
21:57 [Coke] Saw 1 call to deprecated code during execution.
21:57 jaffa4 what do you use guys to make slides?
21:57 dalek roast: 3531185 | (Tobias Leich)++ | S32-str/encode.t:
21:57 dalek roast: unfudge now-passing test
21:57 dalek roast: review: https://github.com/perl6/roast/commit/3531185141
21:59 timotimo Perl6/Actions also seems to blindly look at a Stmts's arity and crashes, i can fix that, too, though
22:00 timotimo hah
22:00 timotimo if nqp::defined($past.arity)
22:00 FROGGS ummm
22:01 FROGGS a nice no-op
22:01 timotimo no, a nice crash :)
22:01 FROGGS at least, in the $past
22:01 lue jaffa4: depends (I'm guessing LaTeX beamer most often). The one constant is that we tend to publish them as pdfs.
22:01 FROGGS yeah :o)
22:02 japhb___ jnthn: From the point of view of the task doing the publishing, is a publish action blocking?  In other words, can the publisher expect all current subscribers to have had a chance to look at the published item before the publish action completes?  (Apologies for likely out of date terminology, I haven't had a chance to soak up the name-mangled version of the concurrency spec.)
22:02 timotimo i don't think it should be blocking
22:02 jnthn japhb___: That makes two of us :P
22:03 japhb___ heh
22:03 jnthn japhb___: A publisher doesn't introduce any asynchrony of its own
22:03 timotimo oh
22:03 jnthn japhb___: When there was a Publisher class, which I can't remember what is called now, there was gonna be an AsyncPublisher too.
22:03 timotimo so it's blocking in the normal case
22:03 timotimo Supply, no?
22:03 jnthn timotimo: Right
22:04 japhb___ Yeah, I definitely want both use cases.
22:04 jnthn japhb___: Yeah, we should have it. It's just part of my general "don't introduce async where it ain't asked for" design sense.
22:04 timotimo .o(the duplication of QAST nodes through the autosink thingie is probably a big factor in memory usage actually)
22:05 japhb___ Sure, I'm fine with that default.
22:05 jnthn timotimo: Note that it's not duplicating the two trees in the want... :)
22:05 jnthn timotimo: As in, just referencing the same nodes, even if they dump twice.
22:05 timotimo ah, that's good
22:05 japhb___ And in fact, for the use case that spawned the question, I do want blocking behavior.  I just also have a need for async in other cases.
22:05 jnthn japhb___: Yup, both are needed in different places.
22:06 jnthn japhb___: Rx also provides both.
22:06 jnthn japhb___: The other thing we need is replay semantics.
22:06 timotimo nqp: say(105 % 10)
22:06 camelia nqp-moarvm, nqp-jvm, nqp-parrot: OUTPUT«5␤»
22:06 jnthn japhb___: uh, control over...
22:06 japhb___ jnthn: By which you mean being able to subscribe "late" and get the history, right?
22:06 jnthn japhb___: Right.
22:06 japhb___ Yep, very needed.
22:06 TimToady .oO(cockpit recorders)
22:06 timotimo like zero-mq :P
22:07 jnthn japhb___: Probably you get replay of everything as a * where you can also put a buffer size.
22:07 jnthn timotimo: Yes, this is very much in messaging pattern space.
22:08 TimToady the application probably needs a way to limit replay to avoid sending all its memory down that primrose path
22:08 japhb___ In fact, we need that semantic general enough that I'd almost say we need replay to be a method that people override to e.g. do "Remove events that logically replace old events, so as to shrink the replay to the minimum necessary to create a given state"
22:08 jnthn TimToady: Yes, "replay everything from this supply" is often overkill.
22:08 TimToady key frames, basically
22:09 japhb___ client/server game engines use state sync whenever a new client connects, and then minimal diffs when a client loses sync.
22:09 jnthn That's a nice analaygy
22:09 jnthn uh, spelt right...
22:09 jnthn :)
22:11 japhb___ .oO( method sync(:$from) { ... } )
22:12 japhb___ sync there, because it's different from replay in that the latter feels like it imposes the concept of replaying events in the same order they were initially issues, rather than getting fastest-possible resync to a published stream in progress
22:12 japhb___ *issued
22:15 jnthn Yeah, that's more window-y
22:15 timotimo jnthn: i'll have your numbers in about 4 minutes
22:15 TimToady the question is, do you want to see the whole movie again, or just get to the particular point in the movie?
22:17 FROGGS well, both
22:17 timotimo hey everybody. want to bet on how many of each QAST node type are allocated in the rakudo setting? (plus optimizer work, which adds a few nodes here and there as well)
22:17 FROGGS 4_231_456_200
22:18 timotimo what type of node would that be?
22:18 jnthn FROGGS: ffs, for a moment I thought that was timotimo posting the total :P
22:18 FROGGS ahh, that was a guess for all in total
22:18 timotimo i'll calculate that number, too
22:18 FROGGS I'd say 35% blocks
22:19 FROGGS the rest is hard to guess
22:19 timotimo java.lang.StackOverflowError
22:19 FROGGS I parse that as NaN
22:20 timotimo :)
22:20 jnthn I don't think 35% will be blocks
22:20 jnthn I think QAST::Op will be the most numerous
22:20 timotimo sounds likely
22:20 jnthn Perhaps followed by QAST::Want
22:20 timotimo followed by Var?
22:20 FROGGS well, 55% QAST::Op then :o)
22:20 timotimo ah, Want, yeah
22:20 FROGGS < 5% QAST::Regex
22:21 jnthn And lots of QAST::Var too
22:21 jnthn QAST::Stmts and QAST::Stmt will be above QAST::Var
22:22 FROGGS jnthn: you have to provide exact numbers :P
22:22 timotimo finally made the counter work %)
22:24 timotimo ~589350 nodes in total
22:25 FROGGS O.o
22:25 timotimo Var is in the lead with 123350, followed by Op with 121550
22:25 timotimo WVal, SVal and IVal: 98900, 92850, 74950
22:25 timotimo Stmts, Stmt, Want: 29350 18100 16650
22:26 timotimo Block, BVal, InlinePlaceholder: 5950 5050 1350
22:26 timotimo finally: 1050 QRegex, 150 CompUnit, 50 Node, 50 NVal
22:26 jnthn 150 CompUnit is a useful number. That tells us we run 149 BEGIN time things :)
22:27 timotimo r: say "{ (589350 - 5950) * 8 } bytes saved by timotimo++"
22:27 camelia rakudo-jvm 9dfecb: OUTPUT«(timeout)»
22:27 camelia ..rakudo-parrot 9dfecb: OUTPUT«4667200 bytes saved by timotimo++␤»
22:27 TimToady if you guys were better functional programmers there'd be fewer Vars :P
22:27 jnthn 4 MB. I'll take that.
22:27 FROGGS 4.6MB, nice timotimo++ :o)
22:27 timotimo r: say "that's {4667200 / 1024} kbytes"
22:27 camelia rakudo-parrot 9dfecb, rakudo-jvm 9dfecb: OUTPUT«that's 4557.8125 kbytes␤»
22:27 timotimo jnthn: and compile_in_context from the optimizer, i bet
22:28 FROGGS aww, way too much for a floppy :(
22:28 jnthn timotimo: Yeah, that counts as BEGIN time
22:28 timotimo 4.6 MB is far from a big amount of ram usage compared to the 2gb or what it takes most of the time :(
22:28 TimToady well, let's go for a live CD
22:28 jnthn Well, kinda... :)
22:29 FROGGS hehe, a live CD of rakudo's saved bytes :o)
22:29 timotimo r: say "timotimos computer generates about {589350 / 110} QAST Nodes per second during parse time."
22:29 camelia rakudo-parrot 9dfecb, rakudo-jvm 9dfecb: OUTPUT«timotimos computer generates about 5357.727273 QAST Nodes per second during parse time.␤»
22:30 timotimo i like { } interpolation a lot
22:31 TimToady it used to be controversial :)
22:31 FROGGS especially when you think of it as an embedded foreign language
22:31 FROGGS (about liking it)
22:31 timotimo it's powerful and if you don't like it, just use qq:!c
22:31 timotimo (is that the right spelling?)
22:32 timotimo r: say qq:!c(heyo {1 + 1}!)
22:32 camelia rakudo-jvm 9dfecb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kzu0ognnWE�Argument not allowed on negated pair�at /tmp/kzu0ognnWE:1�------> [32msay qq:!c[33m�[31m(heyo {1 + 1}!)[0m�»
22:32 camelia ..rakudo-parrot 9dfecb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/PqCPuzeMeM�Argument not allowed on negated pair�at /tmp/PqCPuzeMeM:1�------> [32msay qq:!c[33m�[31m(heyo {1 + 1}!)[0m�»
22:32 timotimo r: say qq:!c/heyo {1 + 1}!/
22:32 camelia rakudo-parrot 9dfecb, rakudo-jvm 9dfecb: OUTPUT«heyo {1 + 1}!␤»
22:32 FROGGS r: say :!c
22:32 camelia rakudo-parrot 9dfecb, rakudo-jvm 9dfecb: OUTPUT«␤»
22:32 FROGGS r: say (:!c).perl
22:32 camelia rakudo-parrot 9dfecb, rakudo-jvm 9dfecb: OUTPUT«"c" => Bool::False␤»
22:33 FROGGS I didn't know that
22:33 timotimo you didn't?!
22:34 FROGGS no
22:34 timotimo but it's so nice! :)
22:34 FROGGS looks a bit sad though
22:34 timotimo i'm pining for a commitbit :P
22:34 FROGGS don't ask me :o)
22:34 timotimo i wonder if TimToady would be able to verify that my CLA has arrived?
22:35 timotimo and give a commitbit
22:35 * TimToady has nothing to do with that end of the business
22:35 timotimo OK
22:35 FROGGS he is just our brane :o)
22:35 * TimToady isn't even sure he has a commitbit himownself
22:35 TimToady though he did turn in a CLA for Parrot lo these many years ago
22:36 FROGGS dunno if somebody else than pmichaud++ is able to
22:36 FROGGS TimToady: really?
22:36 FROGGS that is kinda weird
22:36 jnthn timotimo: I *think* I can do the commit bit part, but not the CLA check part :(
22:37 jnthn timotimo: Where'd you send it to?
22:37 FROGGS walnut I suppose
22:38 TimToady FROGGS: the early parrotfolk chided me for all the macros I put into Perl 5, and then proceeded to put a nearly identical set of macros into parrot :)
22:38 * jnthn doesn't know whos' on the receiving end of that...
22:38 timotimo FROGGS: http://t.h8.lv/0001-.arity-will-​only-be-on-QAST-Block-soon.patch would you be so kind real quick?
22:38 timotimo Karen Pauley got it
22:38 hummeleB1 joined #perl6
22:38 jnthn timotimo: Oh...she has it?
22:38 timotimo yes, she passed it on for me, she said
22:39 djanatyn joined #perl6
22:39 dalek rakudo/nom: 1371ccc | (Timo Paulssen)++ | src/Perl6/Actions.nqp:
22:39 dalek rakudo/nom: .arity will only be on QAST::Block soon.
22:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1371ccce11
22:40 FROGGS let me be your commitbot :o)
22:40 timotimo :3
22:40 timotimo many thankulations
22:40 timotimo .o( gewürz thankulatius )
22:40 FROGGS no problemotics
22:40 FROGGS hehe
22:40 colomon joined #perl6
22:40 FROGGS I don't like them :o(
22:41 dalek nqp: eada3ad | (Timo Paulssen)++ | src/ (4 files):
22:41 dalek nqp: move $!arity from Node to Block
22:41 dalek nqp:
22:41 dalek nqp: Saves about 4.6 MB of RAM when compiling the rakudo core setting
22:41 dalek nqp: review: https://github.com/perl6/nqp/commit/eada3adea7
22:42 FROGGS TimToady: I felt a bit home in Parrot land, it is so XS-ish :o)
22:42 jnthn Somebody at TPF acknowledging timotimo++'s CLA is enough for me, so I've granted the commit bit. :)
22:42 FROGGS \o/
22:45 TimToady welcome to the exclusive club...oh wait...
22:45 FROGGS hehe
22:45 FROGGS *g*
22:46 iSlug joined #perl6
22:46 Ulti was there a R* .msi that needed testing?
22:46 woolfy left #perl6
22:47 FROGGS Ulti: sort of
22:47 Ulti I guess I should try building my own at some point
22:47 jnthn TimToady: Moar has its share of macros too. Not all of which I'm glad of... :)
22:47 FROGGS Ulti: http://irclog.perlgeek.de/​perl6/2013-11-02#i_7804199
22:48 Ulti thanks FROGGS I'll give it a go
22:48 FROGGS Ulti: panda has some problem installing some modules
22:49 Ulti I'm on 64bit Windows 8 so might have a go sorting out building stuff
22:49 FROGGS but that is mostly due to outdated included modules
22:49 Ulti all my machines that run Rakudo are either OSX or Ubuntu... havent touched setting up a dev environment on Windows for more than a decade
22:49 Ulti FROGGS: ahh ok
22:49 woolfy joined #perl6
22:50 Ulti one nasty thing on windows 8 you get a great big warning banner when installing
22:50 FROGGS yeah, we need to sign it somehow :/
22:50 Ulti well it said finished...
22:51 FROGGS I think `panda install Math::RungeKutta` failed to delete a tempdir and aborted installation due to that
22:51 TimToady you can't really write portable C without a lot of macros
22:52 timotimo hm, there's no spectests for List.combinations
22:53 jnthn TimToady: Oh, I agree. Turning smallish static functions into macros rather than leaving the inliner to get them is what I'm less fond of.
22:53 berekuk joined #perl6
22:53 FROGGS and we're fudging the rakudo source code, that is the same
22:54 FROGGS jnthn: *nod*
22:54 TimToady and to be fair, there was no such inliner when Perl was first written
22:54 FROGGS AND THEN YOU EVEN HAVE TO SHOUT THEM
22:54 timotimo If the range option is taken, returns all subset combinations in order of increasing size, up to the specified max, or the size of the list, whichever is smaller.  -  i don't understand. what is the range for, now?
22:54 jnthn TimToady: Yes, but I'm talking about Moar, being written in 2013 :)
22:55 jnthn TimToady: I've read to little of the Perl 5 source to have anything agaisnt it ;)
22:55 timotimo and what if i start the range not at 0 but at, say, 5?
22:55 jnthn *too
22:55 TimToady then it throws away any combinations that are 0..4 at a time
22:55 Ulti FROGGS: I get a problem just running panda
22:56 FROGGS Ulti: what exactly?
22:56 TimToady r: say <a b c>.combinations.perl
22:56 camelia rakudo-jvm 9dfecb: OUTPUT«No such method 'combinations' for invocant of type 'Parcel'␤  in block  at /tmp/aUrIbjwi3d:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196…»
22:56 camelia ..rakudo-parrot 9dfecb: OUTPUT«No such method 'combinations' for invocant of type 'Parcel'␤  in block  at /tmp/BF2MRLDgs5:1␤  in any  at /tmp/BF2MRLDgs5:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfiles at …»
22:56 timotimo either my non-native englishness is kicking into gear here or that sentence could be reworded a bit
22:56 TimToady r: say [<a b c>].combinations.perl
22:56 camelia rakudo-jvm 9dfecb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at /tmp/wgFc3WP3vS:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:11…»
22:56 camelia ..rakudo-parrot 9dfecb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method combinations at gen/parrot/CORE.setting:7979␤  in block  at /tmp/_ATFXc2dnM:1␤  in any  at /tmp/_ATFXc2dnM:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval …»
22:57 Ulti FROGGS: Could not open C:\rakudo\bin\C:\rakudo\bin\panda.bat. Unable to open filehandle from path 'C:\rakudo\bin\C:\rakudo\bin\panda.bat'
22:57 TimToady r: say [<a b c>].combinations($_) for 0..3
22:57 camelia rakudo-parrot 9dfecb, rakudo-jvm 9dfecb: OUTPUT«␤a b c␤a b a c b c␤a b c␤»
22:57 Ulti perl6 runs fine though
22:57 FROGGS hmmm
22:58 FROGGS is "C:\rakudo\bin\" set in environment somewhere?
22:58 FROGGS (except path)
22:59 FROGGS or.. how did you invoke it? just by "panda"?
22:59 Ulti FROGGS: yeah
22:59 Ulti I invoked it from the directory as 'panda'
23:00 FROGGS hmmm, that worked on my box
23:00 BenGoldberg joined #perl6
23:00 FROGGS why should it even want to open the bat file?
23:00 Ulti im doing it from a powershell terminal though.. one sec I'll try cmd
23:00 FROGGS it should execute it to run `perl6-p panda`
23:01 FROGGS yeah, maybe... I have no powershell installed
23:01 Ulti yeah PowerShell doesn't like it but under cmd.exe everything works fine including installing Math::RungeKutta ^___^
23:02 FROGGS nice
23:02 Ulti I'll try and work out whats up with pash
23:02 FROGGS I'll install powershell these days then :o)
23:02 FROGGS cool!
23:02 FROGGS Ulti++
23:02 Ulti Windows 8.1 has it from the 'start menu' as a link
23:02 FROGGS only have XP and 7
23:02 Ulti nice to know you are forwards compatible :)
23:03 FROGGS yes :o)
23:03 Ulti compile now run an OS version later
23:03 FROGGS Windows++ here
23:03 FROGGS that is something where Windows Just Works, and linuxes are pain
23:06 dalek specs: 570c49c | larry++ | S32-setting-library/Containers.pod:
23:06 dalek specs: clarify wording of .combinations(Range)
23:06 dalek specs: review: https://github.com/perl6/specs/commit/570c49c1aa
23:07 FROGGS s/Dec/Nov/
23:07 TimToady oops
23:08 dalek specs: 7e0441c | larry++ | S32-setting-library/Containers.pod:
23:08 dalek specs: s/Dec/Nov/  FROGGS++ timotimo++
23:08 dalek specs: review: https://github.com/perl6/specs/commit/7e0441ca22
23:09 TimToady larry--
23:09 FROGGS :o)
23:09 FROGGS LEAVE; /* gnight all */
23:09 TimToady o/
23:10 rurban1 joined #perl6
23:21 timotimo r: [1, 2, 3].combinations(-1) # what should this do?
23:21 camelia rakudo-parrot 9dfecb: OUTPUT«(signal KILL)»
23:21 camelia ..rakudo-jvm 9dfecb: OUTPUT«Unhandled exception: java.lang.StackOverflowError␤  in count (gen/jvm/CORE.setting:7107)␤  in count (gen/jvm/CORE.setting)␤  in  (gen/jvm/CORE.setting:7525)␤  in reify (gen/jvm/CORE.setting)␤  in  (gen/jvm/CORE.setting:7949)␤  in reify (gen/jvm/…»
23:22 timotimo r: [1, 2, 3].combinations(0)
23:22 camelia rakudo-parrot 9dfecb, rakudo-jvm 9dfecb: ( no output )
23:23 jnthn std: LEAVE;
23:23 camelia std b469b42: OUTPUT«[31m===[0mSORRY![31m===[0m�Whitespace required after keyword at /tmp/4M843Awg8G line 1:�------> [32mLEAVE[33m�[31m;[0m�Parse failed�FAILED 00:01 120m�»
23:23 jnthn r: LEAVE;
23:23 camelia rakudo-parrot 9dfecb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/6pcNl5uiAQâ�¤Undeclared name:â�¤    LEAVE used at line 1â�¤â�¤Â»
23:23 camelia ..rakudo-jvm 9dfecb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/1yabGdR6Qhâ�¤Undeclared name:â�¤    LEAVE used at line 1â�¤â�¤Â»
23:23 jnthn Discrepancy!
23:28 logie joined #perl6
23:30 timotimo S32-list/combinations.t sounds like a good place to put combination tests?
23:30 timotimo n: say [1, 2, 3].combinations(2)
23:30 camelia niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Unable to resolve method combinations in type Array␤  at /tmp/4TSkLQkbfF line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE …»
23:30 jnthn timotimo: wfm
23:30 timotimo for tests, am i allowed to rely on the ordering of combinations?
23:31 timotimo it's not specced, right?
23:31 jnthn If it's not spec'd the no...
23:32 jnthn r: say [1, 2, 3].combinations(2)
23:32 camelia rakudo-jvm 1371cc: OUTPUT«(timeout)»
23:32 camelia ..rakudo-parrot 1371cc: OUTPUT«1 2 1 3 2 3␤»
23:32 timotimo aaw, jvm, come on ;_;
23:32 jnthn eval server gone wild I guess
23:33 timotimo r: say all([1, 2, 3]) == one([2, 1, 3]);
23:33 camelia rakudo-parrot 1371cc, rakudo-jvm 1371cc: OUTPUT«all(one(True))␤»
23:34 timotimo r: say [1, 2, 3].combinations(3);
23:34 camelia rakudo-parrot 1371cc, rakudo-jvm 1371cc: OUTPUT«1 2 3␤»
23:34 timotimo er, wha?
23:34 timotimo r: say [1, 2, 3].combinations(2);
23:34 camelia rakudo-parrot 1371cc, rakudo-jvm 1371cc: OUTPUT«1 2 1 3 2 3␤»
23:35 timotimo ah, they are supposed to be sets
23:35 timotimo i was thinking permutations
23:35 timotimo r: say [1, 2, 3].permutations(3);
23:35 camelia rakudo-jvm 1371cc: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method permutations at gen/jvm/CORE.setting:7970␤  in block  at /tmp/9f3KlR8RB7:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292…»
23:35 camelia ..rakudo-parrot 1371cc: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method permutations at gen/parrot/CORE.setting:7994␤  in block  at /tmp/RuDIFxQ4sW:1␤  in any  at /tmp/RuDIFxQ4sW:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at…»
23:35 timotimo r: say [1, 2, 3].permutations();
23:35 camelia rakudo-parrot 1371cc, rakudo-jvm 1371cc: OUTPUT«1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1␤»
23:57 dalek roast: 25ccede | (Timo Paulssen)++ | S32-list/combinations.t:
23:57 dalek roast: test List.combinations a bit.
23:57 dalek roast: review: https://github.com/perl6/roast/commit/25ccede150
23:57 dalek rakudo/nom: 5e56c98 | (L. Grondin)++ | src/core/List.pm:
23:57 dalek rakudo/nom: implement List.combinations(Range $)
23:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5e56c98fb1
23:57 dalek rakudo/nom: 7942362 | (L. Grondin)++ | src/core/List.pm:
23:57 dalek rakudo/nom: fixing indent
23:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/79423621ac
23:57 dalek rakudo/nom: 4e29ebf | (Timo Paulssen)++ | src/core/List.pm:
23:57 dalek rakudo/nom: don't stack-overflow on negative arguments
23:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4e29ebf1b9
23:58 dalek rakudo/nom: e71f994 | (Timo Paulssen)++ | t/spectest.data:
23:58 dalek rakudo/nom: run S32-list/combinations.t
23:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e71f994665
23:58 timotimo when i've already merged in commits from a pull request and push "merge pull request" on github, what happens?
23:59 timotimo i'll just try it, worst case i'll force-push immediately
23:59 jnthn timotimo: I guess it'll tell you they're already there...

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

Perl 6 | Reference Documentation | Rakudo