Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-09-30

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 timotimo but beyond that ... character classes and regular matchings just turn into explosions when i try them like that
00:00 timotimo oh, perhaps because <? is then treated as "maybe a <"?
00:04 timotimo desigilname is used when you have something like @$foo? because it matches <?before <.sigil> <.sigil> > <variable>?
00:06 Mouq I've been staring at desigilname for some time trying to figure out what exactly it does :p
00:07 timotimo a :my will not cause the NFA generator to stumble, will it?
00:07 timotimo because it *could* be executing code; will the NFA look and see if there is a " = mumble mumble" at the end?
00:07 Mouq timotimo: Can you do me a favour and try `perl6 -target=parse -e1` real quick?
00:08 timotimo the same error you reported earlier
00:08 Mouq timotimo: k, thanks
00:08 timotimo ah. i was about to optimize colonpair, but it only gets called 600 times
00:10 timotimo there's about 323 actual fat arrows in src/gen/CORE.setting
00:11 timotimo but 9575 invocations of that rule
00:11 timotimo not really worth it, though
00:11 timotimo unless i can turn that into -20000 invocations :P
00:11 Mouq ':my' is always a call to the MAIN lang
00:12 Psyche^ joined #perl6
00:12 moritz note that :my is declarative, so it's not exactly a "call"
00:12 timotimo that's good
00:13 moritz (well, at the time the rule is parsed it's a call, yes)
00:13 timotimo wow, apostrophe gets called 52521 times? do we even have that many identifiers with minuses in their names?!
00:13 timotimo but apostrophe is a really simple rule
00:14 Mouq How about "':my' is always parsed as a MAIN lang statement
00:14 Mouq *<statement>"
00:14 moritz yes, sounds accurate
00:14 Mouq kk
00:15 * timotimo tries to force an LTM so that perhaps an apostrophe call can be skipped
00:18 timotimo no change in apostrophe calls. interesting.
00:20 diakopter hoelzro: ping
00:21 timotimo strange how often morename is attempted: 26_275 times
00:21 dalek panda: 75ae6d6 | moritz++ | lib/Panda/Common.pm:
00:21 dalek panda: remove usage of Hash.delete; closes issue 57
00:21 dalek panda: review: https://github.com/tadzik/panda/commit/75ae6d6656
00:21 timotimo there's only 2627 lines with :: in it, though many of those have more than just one, but definitely not more than 10!
00:23 moritz timotimo: maybe apostrophe is called as a negated look-ahead after a keyword is parsed, to make sure there is a proper word boundary afterwards?
00:23 timotimo that would be a good point, let me check
00:23 moritz so that call of sub if-stuff() isn't misparsed as if  -stuff()
00:23 timotimo no, only happens inside identifier inside a *-ed list
00:24 moritz ok, stupid question
00:24 moritz it looks to me like token identifier should be totally LTMed
00:25 timotimo hm. switching '::' and :my $*QSIGIL := ''; around in the hopes of making LTM cleverer in this case didn't change anything, so either :my ... will not upset the NFA generator or it doesn't LTM at all
00:25 timotimo yeah, i agree. how do we figure out if it's not?
00:25 moritz do the calls happen after the LTM match in an attempt to reparse to ge the captures right
00:25 timotimo (also, jnthn is hoping to turn <ident> into a builtin for the NFA)
00:25 moritz ?
00:25 moritz and if so, can we teach it not to do that if there are no captures in the rule?
00:26 moritz timotimo: iirc :my shouldn't upset LTM at all
00:26 timotimo yes, and that's good
00:26 timotimo also, identifier starts 52175 times, apostrophe 52521 times
00:26 timotimo it seems like it can't get around trying it at least once every time
00:27 timotimo in my intuition, the fate from the NFA is supposed to eliminate such an invocation, but what do i know?
00:29 TimToady fates only know about alternations, not *
00:29 yoleaux 29 Sep 2013 22:15Z <jnthn> TimToady: why does quantifier:sym<{N,M}> start with an LTM-busting {} ooc? It prevents the LTM-er from seeing "no quantifier here" and so results in that rule being called everywhere there could be a quantifier...
00:29 timotimo oh? that's a bummer
00:31 * moritz doesn't know the difference between fates and the NFA
00:32 timotimo AIUI, going through the NFA gives you a list of fates, which is basically what alterations to take and they are sorted by how much they matched
00:32 * TimToady is only familiar with STD's original implementation of fates, but yes, that sounds about right
00:33 moritz oh
00:33 moritz and because apostrophe might have an action method, it *must* be called
00:34 moritz even if the NFA did all the matching there is to do
00:34 TimToady the {} ought to force {N,M} to sort after the other fates, so it shouldn't fire if anything else matched in that alternative
00:34 TimToady however, using in quantifier is probably a mistake, since '' is a valid quantifier :)
00:34 TimToady *in that alternation
00:34 timotimo TimToady: i will remove that {} and see if anything breaks
00:35 timotimo but first i'm comparing timings between cursless+cursless and master+nom
00:35 moritz so maybe inlining <.apostrophe> and <.ident> could speed up stuff
00:35 timotimo so master+nom gives me about 42.5 seconds for parsing the setting
00:36 moritz that's on JVM, right?
00:36 timotimo yes
00:37 timotimo i could only dream of such quick parses on parrot
00:37 timotimo it takes me 120s there
00:37 TimToady note that the JIT might be inlining it for you at some point when it notices it's hot
00:37 timotimo of course any winnings from reduced cursor allocations could be nullified by the jvms very potent GC
00:38 TimToady but yeah, it'd still be generating cursors I suppose
00:38 timotimo interesting. label matches 8360 times in the setting, but we don't even support labels yet
00:39 timotimo oh, perhaps identifier isn't LTM'd past because it has a [ ]* in it?
00:39 moritz but []* is declarative.
00:39 timotimo this measurement of parsing took 42.15 seconds; either that's noise or a little winning
00:39 timotimo ah, so it is.
00:40 timotimo token label is just :my $label; <identifier> ':' <?before \s> <.ws>
00:40 timotimo i'm not quite sure i understand why that <?before \s> is there, to be honest
00:40 moritz to distinguish it from thing:sym<bla>
00:41 moritz which also has <identifier> ':'
00:41 timotimo oh, of course, <.ws> is optional whitespace
00:41 timotimo can't we turn that into just \s then, though?
00:42 * timotimo tries
00:42 TimToady but the \s isn't part of the label
00:42 moritz no
00:42 timotimo : isn't either, is it?
00:42 moritz because <.ws> also parses Pod
00:42 TimToady well, more than the space :)
00:42 timotimo er, sorry
00:42 moritz TimToady: that's why it's in a <?before>, no?
00:42 timotimo i meant <?before \s> <.ws> into \s <.ws>
00:43 timotimo also, foo:#=blah is invalid?
00:43 TimToady it's dangerous to assume what <.ws> is going to do with that first whitespace
00:43 timotimo so matching \s and then <.ws> can cause unforeseen mayhem?
00:43 TimToady most keywords also require a trailing \s
00:44 TimToady timotimo: potentially
00:44 TimToady such as .ws wanting to remember where the start of the whitespace was
00:44 TimToady which it does, actually
00:45 TimToady mostly for error reporting
00:45 TimToady so your eject can end up in the wrong place
00:45 TimToady if you match \s explicitly
00:45 timotimo well, changing that changes nothing at all in the number of label cursors created
00:46 TimToady sure, because <?before> participates in LTM
00:46 timotimo oh
00:46 timotimo well, that's good then
00:47 TimToady it participates, and shuts off any more of the regex from participating
00:47 timotimo ah yes, jnthn explained that to me and apparently my brain shut off, too.
00:49 timotimo r: say 1732692 / 17829.81
00:49 camelia rakudo ccf9c4: OUTPUT«97.1794988␤»
00:49 timotimo reduction in number of cursors instantiated by inlining apostrophe into identifier
00:49 moritz that's, like, the majority, no? :-)
00:50 timotimo you're looking at the wrong half there :P
00:50 moritz :/
00:50 timotimo though to be fair i should have written "result" instead of "reduction"
00:50 TimToady STD used to inline that automatically, but I don't know if it still does
00:51 TimToady after sorear++ redid the NFA stuff
00:51 timotimo i wonder if ws can be improved any
00:51 timotimo because that's 320_860 cursor instantiations
00:52 timotimo next in line is before with 132629 instantiations, but that can hardly be helped easily
00:52 TimToady are those failure cursors?  because STD doesn't use failure cursors, it returns an empty lists of cursors
00:52 timotimo no, failure cursors are currently a singleton that gets returned
00:52 timotimo but i wonder if cursors that are going to fail are being counted here
00:53 TimToady it has to create one to descend into the rule, probably
00:53 timotimo TimToady: can you explain to Mouq and me what desigilname has to do?
00:53 TimToady finding the rest of $$$$fo
00:53 TimToady $$$$foo
00:54 timotimo so chop off lots of sigils from the beginning of a name?
00:54 TimToady after you take the initial $ off
00:54 TimToady more likely for things like @$foo
00:55 TimToady where the @ is not redundant
00:55 Mouq Oh, it actually is desigil-ing :p thank you TimToady
00:55 timotimo is that for doing things like my $foo = '$name-of-var'; my $name-of-var = 'hello world'; say $$foo?
00:55 TimToady no
00:55 timotimo good
00:55 TimToady we don't do symbolic names that way in P6
00:55 timotimo yes, we have :: for that instead, right?
00:55 TimToady so $$ turns out to be redundant
00:56 TimToady it only works with hard refs
00:56 Mouq $$$$foo just means $foo.item.item.item
00:56 Mouq which means $foo
00:56 timotimo makes sense
00:56 TimToady but $array vs @$array is meaningful
00:57 TimToady (in list context)
00:57 moritz and even though it's not a good idea, .item could be overwritten
00:57 timotimo hooray for that :)
00:57 TimToady don't give historians any ideas
00:57 timotimo the optimizer loves you for that (well, at the moment it really doesn't care, but maybe some day it will?)
00:57 moritz maybe $( ... ) could be specced to make the .item call optional if it's already a scalar container?
00:58 TimToady of course, TheDamian doesn't have to mine the irclogs to figure something like that out himownself :)
00:58 Mouq class MAny is Any { method item { self.list } }
00:58 diakopter the fabled optimizer is omnipotent and omniscient, and knows when you will halt.
00:58 TimToady "Useless use of extra $ at line 42"
00:59 diakopter "don't throw good $ after bad"
01:00 dayangkun joined #perl6
01:01 timotimo i don't think i can bring these rules down by any significant amount any more
01:03 TimToady maybe there's some way we can bend the current model such that it doesn't create a fresh cursor in a subrule until it's sure it's not going to fail right away
01:03 timotimo oh wow whoops
01:04 timotimo i made it broken
01:04 TimToady it's easy to do that with a parser :)
01:05 * TimToady thinks moritz++ is up past his bedtime
01:12 TimToady or was :)
01:13 benabik joined #perl6
01:45 dalek nqp/cursless: c921a38 | jimmy++ | src/HLL/Grammar.nqp:
01:45 dalek nqp/cursless: Fix typo
01:45 dalek nqp/cursless: review: https://github.com/perl6/nqp/commit/c921a3848b
01:50 FROGGS_ joined #perl6
02:12 timotimo .o(guess who can't fall asleep)
02:13 timotimo JimmyZ: how could that even work before? was that branch never taken?
02:13 timotimo i suppose there was not terribly many quotes in the setting?
02:13 JimmyZ timotimo: I think that code never be run
02:14 timotimo probably
02:14 timotimo still, good eye! :)
02:14 JimmyZ ;)
02:14 timotimo so i was wondering: maybe parse time is suffering from a few slow action methods?
02:14 timotimo but i'm not sure how to profile that
02:14 timotimo it would probably be a good enough start to see how much time is spent in methods of Actions and how much time is spent in the rest of parsing
02:14 TimToady too much use of deep dynamic var maybe
02:15 JimmyZ Isn't there a parrot subprof run core?
02:15 timotimo i don't know if the --profile measures stuff during parsing?
02:16 JimmyZ I think --profile outputs a kcachegrind file
02:16 timotimo yes, that's right
02:16 timotimo i've tried to understand that a few times before. i'm not good at it
02:16 JimmyZ so you need kcachegrind
02:16 timotimo i have that :)
02:16 JimmyZ e
02:17 timotimo no u
02:17 timotimo :P
02:17 JimmyZ so the higher % number is slow?
02:18 timotimo perhaps; but it kind of counts child invocations as well and all that
02:19 JimmyZ I think it's good to reduce the counts
02:20 timotimo it always is ;)
02:20 JimmyZ hehe
02:20 timotimo i wonder if the profile thing is a parrot-exclusive thing?
02:21 JimmyZ It's using parrot subprof run core
02:21 JimmyZ so yes
02:21 timotimo ah, ok
02:28 * Mouq has finally traced the --target=parse error to src/Perl6/Grammar.nqp:920
02:29 * Mouq (has no clue how to fix that)
02:30 timotimo huh, 920?
02:30 timotimo as in install_lexical_symbol?
02:30 Mouq $*DECLARAND := $*W.stub_code_object('Block');
02:30 timotimo ah, ok, that's a different line for me, as i'm in a branch
02:31 timotimo it's "cannot change read-only value", right?
02:31 Mouq Eventually goes to a self.find_lexical(['Block']) in World.nqp
02:31 Mouq No, this is the "Could not locate compile-time value for symbol Block" error
02:31 Mouq perl6 --target=parse -e1
02:32 timotimo er, right
02:32 timotimo which is interesting because it should definitely have the setting outside of itself
02:32 timotimo unless the setting won't get loaded if the target is specified as --parse?!
02:33 Mouq --target=whatever, I'm pretty sure, just tells Compiler.nqp to stop and dump when it reaches that stage
02:33 timotimo fwiw, nqp can do --target=parse
02:33 Mouq Yup
02:35 diakopter depth of frames doesn't affect dynamic var, in moarvm at least.
02:41 pdurbin joined #perl6
02:48 * Mouq may have found the issue
02:49 timotimo very cool :)
02:50 timotimo oh iforgot
02:50 timotimo there is also --rxtrace
02:53 BenGoldberg How much of the profiling tools are parrot specific?  If you were to work using the jvm-nqp, would the locations of speed bottlenecks be the same, or different?
02:53 timotimo the performance characteristics are probably different, but a speedup in either should benefit both if it's shared code
02:54 * BenGoldberg is thinking that there probably exist heaps and heaps of already existing jvm profiling tools
02:54 timotimo yes
02:54 timotimo hoelzro has already been working on making a class allocation profiler work well with rakudo.jvm
02:55 timotimo as in making perl6-level classes show up as what they are called instead of P6Opaque
02:57 BenGoldberg nqp: asdf();
02:57 camelia nqp: OUTPUT«Could not find sub &asdf␤current instr.: '' pc 45 ((file unknown):1094795624) (/tmp/OaiYuOBzb1:1)␤»
02:57 BenGoldberg nqp-jvm: asdf();
02:57 camelia nqp-jvm: OUTPUT«Lexical '&asdf' not found␤  in <anon>␤  in <anon>␤  in eval␤  in evalfiles␤  in command_eval␤  in command_line␤  in MAIN␤  in <anon>␤  in <anon>»
02:58 BenGoldberg What are all of the 'in <anon>' thingies?
02:59 krunen joined #perl6
02:59 timotimo probably just inline blocks from ifs and fors?
03:00 dalek nqp: 3ea14a9 | Mouq++ | src/HLL/Compiler.nqp:
03:00 dalek nqp: Fix --target=parse in rakudo
03:00 dalek nqp:
03:00 dalek nqp: Remove unless clause that doesn't load the actions if --target=parse.
03:00 dalek nqp: Was likely an optimization, but working code always beats an optimization.
03:00 dalek nqp: review: https://github.com/perl6/nqp/commit/3ea14a90be
03:00 timotimo i'll try to sleep again
03:00 timotimo ha! it was what i thought! ;)
03:00 BenGoldberg And, why doesn't it show file names and line numbers?  (Maybe not for the <anon>s, but for the other parts)
03:01 timotimo something NYI ...
03:02 BenGoldberg ah ok
03:05 pjcj joined #perl6
03:08 preflex_ joined #perl6
03:15 clkao joined #perl6
03:18 lue I discovered a workaround to my previous issue with when I tried factoring out the WHERE clause. Converting the pointy blocks to inner subs that I then passed along with & worked. (Why pointy blocks work as a return to the query executer and not within the actions is beyond me...)
03:25 lue .tell jnthn I was somehow able to solve that sanity check fail by converting my pointy blocks to inner subs. The pointy blocks that manipulate the DB still work as intended though.
03:25 yoleaux lue: I'll pass your message to jnthn.
03:45 Mouq std: my $a:a<4> = "What does this mean?";
03:45 camelia std 7c17586: OUTPUT«ok 00:00 43m␤»
03:45 Mouq std: my $a:a(4) = "What does this mean?";
03:45 camelia std 7c17586: OUTPUT«ok 00:00 44m␤»
03:46 Mouq std: my $a:a<4> = "What does this mean?"; say $a:a<<a>>
03:46 camelia std 7c17586: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $a:a<<a>> is not predeclared at /tmp/Ff9CTVVJbJ line 1:�------> [32my $a:a<4> = "What does this mean?"; say [33m�[31m$a:a<<a>>[0m�Check failed�FAILED 00:00 43m�»
03:46 Mouq std: my $a:a<4> = "What does this mean?"; say $a:a<<4>>
03:46 camelia std 7c17586: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $a:a<<4>> is not predeclared at /tmp/DdboOGTy_T line 1:�------> [32my $a:a<4> = "What does this mean?"; say [33m�[31m$a:a<<4>>[0m�Check failed�FAILED 00:00 43m�»
03:48 benabik joined #perl6
03:49 lue .oO(I don't suppose NQP has an eval command, does it?)
03:51 Mouq Use NQP::Compiler.eval()?
03:56 lue Nope. Oh well, it was just me trying to avoid a few conditionals is all :) .
04:08 xilo joined #perl6
04:29 Mouq std: our $:hm<?>
04:29 camelia std 7c17586: OUTPUT«ok 00:00 41m␤»
04:35 TimToady std only trieds to catch common semantic errors, not bizarro ones like that
04:35 TimToady *tries
04:37 Mouq But... so is $:hm<?> supposed to be valid?
04:37 Mouq r: my $:hm<?>
04:37 camelia rakudo ccf9c4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/jFsA4dL0mY�Cannot use placeholder parameter $:hm in the mainline�at /tmp/jFsA4dL0mY:1�------> [32mmy $:hm[33m�[31m<?>[0m�»
04:37 diakopter heh.
04:38 diakopter Mouq++ # forever will it dominate your destiny
04:40 [Sno]_ joined #perl6
04:40 baest_ joined #perl6
04:41 btyler_ joined #perl6
04:41 Maddingue joined #perl6
04:42 * Mouq cannot resist... the power
04:43 sizz_ joined #perl6
04:43 mtj_- joined #perl6
04:43 pjcj_ joined #perl6
04:44 BinGOs_ joined #perl6
04:44 prammer_ joined #perl6
04:44 xilo_ joined #perl6
04:44 silug_ joined #perl6
04:44 broquain1 joined #perl6
04:45 jnthn_ joined #perl6
04:45 zamolxes_ joined #perl6
04:49 Bucciarati joined #perl6
04:52 groky joined #perl6
04:52 denysonique joined #perl6
04:52 denysonique joined #perl6
05:01 groky joined #perl6
05:01 Guest33176 joined #perl6
05:20 odoacre joined #perl6
05:24 logie joined #perl6
05:29 moritz \o
05:29 atroxaper joined #perl6
05:34 diakopter ... moritz u were just here...
05:34 diakopter my how time flies
05:35 moritz well, tonight I couldn't sleep for about 2 hours
05:46 dalek evalbot: 5610a08 | moritz++ | evalbot.pl:
05:46 dalek evalbot: remove commented-out code
05:46 dalek evalbot: review: https://github.com/perl6/evalbot/commit/5610a08a5e
05:49 diakopter moritz: do we need b? :)
05:49 nwc10 Out of swap. :-(
05:49 nwc10 Stage jast       : 23865.091
05:49 nwc10 Java HotSpot(TM) Client VM warning: INFO: os::commit_memory(0x8ccf4000, 437698560, 0) failed; error='Cannot allocate memory' (errno=12)
05:49 nwc10 ie wanted another 417 meg, having chewed up 1G
05:50 diakopter nwc10: happens to me sometimes on mac
05:51 SamuraiJack joined #perl6
05:54 diakopter nwc10: which jvm?
05:54 nwc10 java version "1.7.0_40"
05:55 diakopter okay, so sun, like mine
05:55 diakopter erm oracle
05:55 nwc10 yes :-)
05:55 nwc10 What I'm not sure about is, even if I have more swap (can fix that) whether it would then instead run out of virtual address space
05:56 diakopter when I run it again, it doesn't use nearly as much memory
05:56 diakopter it's some flaw.
05:56 diakopter since it's not deterministic
05:57 diakopter ish.
05:58 moritz diakopter: b is sometimes useful, but I wouldn't consider it essential
06:00 diakopter nwc10: does it do that every time for you?
06:03 nwc10 diakopter: "no" :-)
06:04 nwc10 I crashed the JVM, got a system hang, plugged it into the TV and got another system hang (swap read failed, kernel attempted to kill init) and on the fourth run I got that
06:04 nwc10 The Raspberry Pi does not enjoy this
06:04 nwc10 so, this isn't really worth attempting to diagnose as a JVM side problem
06:04 nwc10 although I'm now curious whether on (say) x86 the RAM needed is also big
06:08 diakopter well, it's possible we can work around it
06:11 diakopter prolly fixed in java 8, I mean 1.8, I mean 1.1.8, I mean 1.1.1.8, I mean 1.1.1.1.8
06:40 darutoko joined #perl6
06:44 SamuraiJack joined #perl6
06:47 dalek nqp: a311f5b | jimmy++ | tools/build/Makefile-Parrot.in:
06:47 dalek nqp: Add back SHELL to Makefile-Parrot.in
06:47 dalek nqp: review: https://github.com/perl6/nqp/commit/a311f5b885
06:51 SamuraiJack_ joined #perl6
06:54 BinGOs joined #perl6
07:01 JimmyZ .\perl6.exe --target=pir  --output=src\gen\RESTRICTED.setting.pir src\RESTRICTED
07:01 JimmyZ .setting
07:01 JimmyZ .\perl6.exe --target=pir --output=lib\lib.pir lib\lib.pm6
07:01 JimmyZ .\perl6.exe --target=pir --output=lib\Test.pir lib\Test.pm
07:01 JimmyZ .\perl6.exe --target=pir --output=lib\Pod\To\Text.pir lib\Pod\To\Text.pm
07:01 JimmyZ I still got hangs here. :(
07:01 JimmyZ all four
07:02 FROGGS_ joined #perl6
07:07 dmol joined #perl6
07:08 zakharyas joined #perl6
07:19 kaleem joined #perl6
07:31 Mouq r: sub infix:<vvv>:<^^^> (\a, \b) {return a+b}; say "Muahaha -->{4 vvv 5 ^^ 6}<--"
07:31 camelia rakudo ccf9c4: OUTPUT«Muahaha --><--␤»
07:32 diakopter wha
07:32 Mouq *^^^, but it doesn't actually call the infix right anyway
07:32 Mouq iknowright
07:35 FROGGS r: sub infix:<vvv>:<^^^> (\a, \b) {return a+b}; say "Muahaha -->{4 vvv 5}<--"
07:35 camelia rakudo ccf9c4: OUTPUT«Muahaha -->9<--␤»
07:35 FROGGS Mouq: is infix:<vvv>:<^^^> supposed to work?
07:35 arnsholt That's odd...
07:36 arnsholt r: sub infix:<vvv>:<^^^> (\a, \b) {return a+b}; say 4 vvv 5 ^^ 6
07:36 camelia rakudo ccf9c4: OUTPUT«Nil␤»
07:36 FROGGS r: sub infix:<vvv>:<^^^> (\a, \b) {return a+b}; say 4 vvv 5 + 6
07:36 camelia rakudo ccf9c4: OUTPUT«15␤»
07:37 Mouq The spec isn't as precise as I'd like about extended names. So I don't know if it's *supposed* to work
07:37 FROGGS r: say 5 ^^ 6 # <--- what is that?
07:37 camelia rakudo ccf9c4: OUTPUT«Nil␤»
07:37 FROGGS r: say 5 ^ 6
07:37 camelia rakudo ccf9c4: OUTPUT«one(5, 6)␤»
07:37 FROGGS ahh
07:37 arnsholt Oh, ^^ is short-circuit XOR
07:38 arnsholt Mouq: Maybe you wanted ** instead (exponentiation)?
07:38 sidus joined #perl6
07:38 FROGGS Mouq: It might be nice to allow it, for say infix:<??>:<!!>
07:39 Mouq r: say 5 ^^^^^^^^^^^^^^ 6 # rakudo is doing something bad here
07:39 camelia rakudo ccf9c4: OUTPUT«Nil␤»
07:39 FROGGS r: say 1 ^^ 0
07:39 Mouq arnsholt: I just reached for some symbols I didn't think were taken
07:39 camelia rakudo ccf9c4: OUTPUT«1␤»
07:39 FROGGS r: say 1 ^^^^^^^^^^^^^^^^^^ 0
07:39 camelia rakudo ccf9c4: OUTPUT«Nil␤»
07:39 FROGGS r: say 1 ^^^^^^^^^^^^^^^^ 0
07:39 camelia rakudo ccf9c4: OUTPUT«Nil␤»
07:40 cognominal joined #perl6
07:42 Mouq FROGGS: I would think that would be better as ternery:['??','!!'] / ternery:<?? !!>
07:42 Mouq *do think
07:42 Mouq *sometimes
07:44 Mouq The way the spec is written, there should only be one :<unnamed> (or if there's multiple, they'd act like Positional?) and then :nam<ed> act more like Associative, if that makes sense
07:47 Mouq And these would look into the category the first part of the name specifies for those things
07:47 Mouq std: say so &infix:«+» === &infix:<+> # std only seems to deal with this as much as it has to
07:47 camelia std 7c17586: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'infix:«+»' used at line 1�Check failed�FAILED 00:01 46m�»
07:50 * Mouq is still trying to figure out where STD defines its $¢.add_categorical() method
07:54 dmol joined #perl6
07:54 Mouq .oO(Well, Rakudo defines it, at least)
07:58 Mouq r: sub infix:<vvv>:<nnn> (\a, \b) {return a+b}; say "I was wrongish here -->{4 vvv 5 nnn 6}<-- rakudo++ "
07:58 camelia rakudo ccf9c4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9KInA4XyW3â�¤Two terms in a rowâ�¤at /tmp/9KInA4XyW3:1â�¤------> [32m}; say "I was wrongish here -->{4 vvv 5 [33mâ��[31mnnn 6}<-- rakudo++ "[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤   …»
07:59 salv0 joined #perl6
08:01 FROGGS I like this one: ternery:<?? !!>
08:02 FROGGS I am just thinking about a use case where I would want something like that
08:02 Mouq By spec, ternery:<?? !!> and ternery:['??', '!!'] are (supposed to be) the same thing
08:02 FROGGS ahh, this is specced?
08:03 * FROGGS doesn't know the spec very well
08:03 Mouq http://perlcabal.org/syn/S02.html#Extended_identifiers
08:03 FROGGS I dont see "ternery"
08:04 Mouq No, I was saying in general. I don't know if you can in rakudo, but you should be able to define your own category
08:05 Mouq I don't know what you could actually *do* with that, but you know :P
08:05 diakopter well there's only so many ways to give new things to the operator precedence parser
08:05 FROGGS yeah, but in order to convince TimToady++ you might want to show a showcase :o)
08:07 Mouq n: say so &infix:«+» === &infix:<+>
08:07 camelia niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'infix:«+»' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36) â�¤â€¦Â»
08:08 FROGGS ternery:<v ^>(\a, \b, \c) { (a..c).pick(b) }; say 0 v 3 ^ 100; # 22, 14, 67
08:08 FROGGS might not be the best example
08:09 Mouq FROGGS: :) I need to think on this a bit
08:09 FROGGS *g*
08:10 lizmat JimmyZ: what does '.\perl6.exe -e1' do?   I bet it also hangs
08:10 lizmat and good *, #perl6!
08:10 diakopter lizmat: ahoy! :)
08:11 JimmyZ lizmat: yes, also hangs
08:12 FROGGS lizmat: o/
08:13 lizmat JimmyZ: so you thought you compiled a good rakudo, but in fact the .\perl6.exe is busted
08:13 lizmat you only see it when you try to run it...
08:13 JimmyZ it hangs with loaded settting
08:14 JimmyZ *setting
08:14 lizmat been there many times, have no easy way to fix apart from tracing back the changes you made and thinking about how they could create an infinite loop
08:14 lizmat when it hangs, does it eat all CPU on one core and does it grow very fast in memory usage ?
08:15 JimmyZ yeah, It's not easy to set a good breakpoint to get the nqp trace
08:15 JimmyZ it doesn't grow memory
08:17 lizmat ok, then it's not an 1..* gone haywire  :-)
08:18 Mouq FROGGS: Do you want to close NQP #133?
08:19 nwc10 up the swap and try again...
08:21 FROGGS Mouq: not sure, maybe we should leave that open until we actually use a parrot release with that fix?
08:23 JimmyZ lizmat: I have an idea to debug it ...
08:23 sqirrel joined #perl6
08:29 grondilu joined #perl6
08:38 hoelzro what's the thought on adding options to perl6 command on a per-VM basis? I was thinking about adding an option to the JVM runner to run under profiling
08:38 moritz hoelzro: as long as it's clear that it's a backend option, I think it's fine
08:38 hoelzro hmm
08:39 moritz perl6 --backend-option=--jvm-profile
08:39 moritz or so
08:39 hoelzro what about --jvm-opts=-something
08:39 moritz what would that do on non-jvm backends?
08:39 hoelzro probably fail and say "Not the JVM backend"
08:40 JimmyZ --vm-opt
08:40 JimmyZ --vm-option==
08:41 FROGGS --vm-options
08:41 FROGGS :o)
08:41 JimmyZ how to 's'?
08:42 JimmyZ I guess multi '--vm-option=' ?
08:42 hoelzro hmm
08:42 hoelzro for now
08:42 FROGGS --vm-options="--jvm-profile --blarg"
08:42 FROGGS like we do for parrot
08:42 JimmyZ +1
08:42 hoelzro I could just install the profilng one as perl6-profiling
08:43 hoelzro oh, that makes sense then
08:48 jnthn morning, #perl6
08:48 hoelzro morning jnthn
08:48 FROGGS morning jnthn
08:48 nwc10 good morning jnthn
08:48 hoelzro ah, I just learned of JAVA_TOOL_OPTIONS
08:49 fhelmberger joined #perl6
08:49 nwc10 jnthn: it really isn't sensible of me to try to build Rakudo on a Rasbperry Pi
08:49 nwc10 given that I've already tested that I can built it elsewhere and copy it over
08:50 nwc10 anyway, I am not proposing to (try to) build it on the satellite reciever, as that doesn't even have a toolchain
08:53 JimmyZ Does MoarVM build on Rasbperry Pi?
08:53 nwc10 ought to, but haven't tried
08:58 diakopter -options is redundant
09:02 FROGGS diakopter: how so?
09:03 diakopter b/c all the command line flags are options
09:04 FROGGS diakopter: but if we call it just --vm, then everybody would guess it is about *what vm* to use, not about what to pass to the vm
09:05 FROGGS but yes, all these things are options/params/args
09:06 diakopter then I think it should be backend-specific
09:06 diakopter --jvm-options, --moar-options, --squawker-options
09:07 FROGGS then you could even have all of them in, say, a makefile of some weird module, and it would pick only the right one
09:07 groky joined #perl6
09:08 Timbus why not just  pass all of them and have the backends ignore the wrong ones :o
09:08 daxim joined #perl6
09:09 FROGGS it is not that easy as it seems
09:10 Timbus is it any easier than doing some kind of backend detection in a shell script
09:10 Timbus (yes)
09:22 PZt joined #perl6
09:39 dalek Perlito: 6ab23bb | (Flavio S. Glock)++ | / (6 files):
09:39 dalek Perlito: Perlito5 - Dumper - recursive structures
09:39 dalek Perlito: review: https://github.com/fglock/Perlito/commit/6ab23bb264
09:40 timotimo FROGGS: remember how at raniw i told you the NFA couldn't be parallelised because it essentially already does all the state transitions in parallel?
09:42 dalek Perlito: d9e4b40 | (Flavio S. Glock)++ | / (3 files):
09:42 dalek Perlito: Perlito5 - "use Data::Dumper" works
09:42 dalek Perlito: review: https://github.com/fglock/Perlito/commit/d9e4b4012f
09:42 timotimo turns out i was thinking of something else; there's a method called the "power set construction" or something that turns an NFA into a bigger, but equivalent DFA
09:43 timotimo that dfa runs multiple NFA steps at the same time, but has more states as a result
09:43 timotimo perhaps it would be interesting to try that, because you could have the list of fates pre-sorted in there and the NFA is built only once at compile time, so maybe you can benefit from that pre-compilation?
09:44 nyuszika7h joined #perl6
09:44 timotimo http://en.wikipedia.org/wiki/Powerset_construction
09:45 timotimo jnthn: do you have an intuition if this would be helpful to running the NFAs?
09:45 FROGGS timotimo: I'll read that in a bit
09:45 denis_boyun joined #perl6
09:45 jnthn Maybe in some cases, maybe not in others, depends how big the state explosion is.
09:45 timotimo the german version of that has a nicer example with tables instead of the result magically appearing out of thin air
09:46 FROGGS timotimo: link?
09:46 moritz timotimo: afaict sorear ran into an explosion of DFA states in Perl6::Grammar
09:46 timotimo that's good to know.
09:46 timotimo http://de.wikipedia.org/wiki/Potenzmengenkonstruktion
09:46 moritz timotimo: so he tried to lazily construct the DFA; don't know how well that worked
09:46 FROGGS yeah, that is what I fear from reading the first lines
09:46 jnthn Remember that modern performance programming is as much about fitting stuff in cache as it is about number of instructions too, so doing a few more instructions, but traversing a smaller graph, may still be better overall.
09:47 jnthn Also, from a profiling point of view, I don't recall seeing NFA evaluation as a hot-path
09:47 timotimo i'm still not very hopeful that running the actual NFA in parallel would give a big performance boost
09:47 FROGGS :/
09:47 jnthn Meaning if you make it twice as fast, you're probably going to be looking at a percent or so win on something like CORE.setting at best.
09:48 FROGGS hmmm
09:49 FROGGS when we get a list of to-try-branches from an nfa run, does it make sense to try them in parallel? would that help?
09:51 timotimo r: say 1732692 / 17829.81; say 1782981 - 1732692
09:51 camelia rakudo ccf9c4: OUTPUT«97.1794988␤50289␤»
09:51 denis_boyun joined #perl6
09:51 FROGGS what is that?
09:51 timotimo i could get rid of this many cursors by inlining the apostrophe rule (it's just a character class with \s and -) into identifier. worth it, jnthn? seems like
09:52 jnthn I think the large number of calls to label, apostrophe and identifier may all be to do with the non-declarative <ident> bug I talked about last night
09:52 jnthn So we should fix it at the root cause, I suspect.
09:52 timotimo ah, so ident becomes non-declarative? i don't understand why, but it's good that you can fix the root cause
09:52 FROGGS looks like I should backlog :o)
09:52 jnthn Yeah, fixing it needs hacking in NFA.nqp ;-)
09:53 timotimo that's for method subrule?
09:53 arnsholt It sounded like timotimo was interested in hacking on NFA.nqp, so that should be ok =D
09:53 timotimo haha, only a little bit :)
09:54 * arnsholt is having fun with indentation-based syntax
09:54 jnthn timotimo: See how alpha is handled
09:54 timotimo yes, that's what caught my eye
09:55 jnthn Then look at the definition of ident method in Cursor.nqp maybe and contrast it to alpha and see if you can figure out how to make an NFA :)
09:55 timotimo oh, now i see it, ident is actually a method of cursor that does its own matching!
09:55 timotimo of course it becomes non-declarative!
09:56 arnsholt Heh. I was actually meaning to ask about that
09:57 arnsholt I was pondering doing something like that in NQPy to let <ws> accept newlines inside brackets
09:57 timotimo why does it pass a high number to $newedge?
09:57 timotimo it seems like $newedge is only checked for truthiness
09:57 timotimo no, i read the + as a ,
09:58 arnsholt Confusing + and ,? I think you need a bigger fontsize ;)
09:59 timotimo no, just need to finalise my waking up
09:59 arnsholt Oh, right. Still working on solving the bootstrapping problem of making coffee before you've had coffee?
10:03 arnsholt Meh. I wish the GitHub input boxes had a preview function
10:03 timotimo first prototype ready for testing :)
10:04 timotimo now i only have to figure out how to properly test the NFA it builds
10:04 FROGGS timotimo: how do you actually test that? can you paste a diff?
10:04 timotimo hehe.
10:04 timotimo fortunately i have a background in CS, so i've built NFAs before.
10:05 timotimo https://gist.github.com/timo/d8fdd129ff87dc277c83  -  this is my first attempt
10:05 timotimo hah
10:05 timotimo i should not have copypasted it out of a pager, hold on
10:05 timotimo updated
10:05 arnsholt Looks good to me
10:05 tadzik nqp::con looks a bit open-ended :)
10:05 arnsholt Oh, right
10:06 arnsholt And this is why TimToady worries about end-weight =D
10:06 timotimo nobody spotted the missing "my" ;)
10:06 * timotimo builds a cup of chai latte <3
10:07 arnsholt Oh, and there even is a preview on GitHub. It's just not a button, it's a tab above the textarea
10:07 FROGGS arnsholt: yeah, I use that often
10:08 FROGGS I believe it is missing in gists though
10:08 timotimo yes :\
10:08 arnsholt I'm writing an issue, so it was just a question of me not seeing it
10:09 timotimo while i'm at it, are there other things missing NFA treatment?
10:09 dalek specs: 126dd3b | (Elizabeth Mattijsen)++ | S32-setting-library/Containers.pod:
10:09 dalek specs: Mark ".exists" and ".delete" as deprecated, use ":exists" and ":delete" instead
10:09 dalek specs: review: https://github.com/perl6/specs/commit/126dd3b3cc
10:09 timotimo i find this NFA implementation pleasant to work with (but not necessarily hack on, mind)
10:14 timotimo 50951 - apostrophe, 50606 - identifier
10:14 timotimo seems a bit better than before, but not really by much :|
10:14 timotimo 51383 - ident, 54301 - alpha
10:15 FROGGS timotimo: how do you get the counts?
10:15 timotimo 8084 - label
10:15 timotimo FROGGS: you should really backlog ;)
10:15 FROGGS meh
10:15 FROGGS *g*
10:15 timotimo (especially lines containing gists that were written by jnthn)
10:15 jnthn timotimo: I'd have expected the label ones to go away, I think...
10:16 timotimo yes, my NFA must be wrong.
10:16 timotimo seems pretty simple, though: first a CCLASS_ALPHABETIC or a CODEPOINT 95, then as many CCLASS_WORD as you like
10:17 jnthn self.addedge($from, $to_mid, $EDGE_CODEPOINT, 95);
10:17 jnthn Should that $to_mid not be $midstate also, like on the line above?
10:17 timotimo i saw it in alpha, it looked like you could use the return value of addedge in the second argument to addedge again for some reason
10:18 jnthn timotimo: also it's \w+ no?
10:18 jnthn uh, \w* even
10:19 jnthn So you need an epsilon edge from mid -> to also
10:19 jnthn And one from to back to mid
10:19 timotimo ah, good point, hadn't considered that :)
10:20 timotimo can you explain why alpha does the $to := self.addedge thing?
10:21 jnthn forget what's going on there...I'd take a look at addedge
10:21 timotimo will do
10:22 timotimo it returns $to if $to is >= 0, returns a new state if $to is < 0
10:27 timotimo doesn't reduce the number of calls to apostrophe or ident, unfortunately
10:27 timotimo is the if statement to decide to use the nfa's built-in rule proper?
10:28 timotimo of course it isn't
10:29 timotimo it was missing one line and would never be executed at all ;)
10:31 timotimo guess who only now understands what $node.negate means
10:32 timotimo my caffeine will soon be cool enough for consumption :)
10:34 hoelzro so, let me get this straight.
10:34 hoelzro a P6Opaque is an object that has some "native" representation (probably a chunk of memory)
10:34 hoelzro it points to an STable, which is the meta-object for that P6Opaque, right?
10:35 timotimo er, i though the P6Opaque is the REPR that the STable points to?
10:35 cognominal joined #perl6
10:36 timotimo or rather, a specific P6Opaque instance is built from the repr that the STable points to?
10:36 jnthn A 6model object is a pointer to an STable plus a blob of other stuff that is organized as the REPR desires
10:36 jnthn An STable typically represents a type, but really is a meta-object/REPR pairing
10:36 jnthn The STable points to a meta-object (.HOW) which is just another object, and a REPR (which knows how to interpret the rest of the memory associated with the object)
10:37 jnthn P6opaque is a REPR, and thus a strategy for arranging memory
10:37 jnthn However, informally we often talk about objects with the P6opaque representation as just "P6opaques"
10:38 hoelzro ok
10:38 hoelzro that's what I was referring to
10:38 timotimo oh, of course i can't just negate the nodes like that
10:39 * hoelzro is trying to figure out how to get the name of a __P6Opaque* class in Java
10:39 timotimo jnthn: how would you represent "not this CCLASS, also not this CODEPOINT" in NFA? seems to me it needs a bit of magic
10:39 jnthn You can't
10:39 timotimo just negating both edges makes no sense of course
10:40 timotimo well, then i'll just have to bail out of the NFA if there's a negated ident.
10:40 jnthn right
10:40 jnthn Just don't match the negated case in the if statement
10:40 timotimo will $node.negate == 0?
10:40 jnthn yeah
10:40 jnthn Or just !$node.negate
10:40 timotimo good
10:40 timotimo oooh double negation :)
10:41 * jnthn tries to focus on talk prep...
10:41 jnthn (thankfully, for something next week...)
10:42 timotimo well, *technically* this is supposed to be an n*f*a, so i *could* just generate a codepoint edge for every one that doesn't match ALPHA or 95 ;)
10:43 iSlug joined #perl6
10:44 timotimo i seem to still be doing it wrong, though
10:46 dalek Perlito: 9a6d0a9 | (Flavio S. Glock)++ | / (3 files):
10:46 dalek Perlito: Perlito5 - grammar - use-version fix
10:46 dalek Perlito: review: https://github.com/fglock/Perlito/commit/9a6d0a9e28
10:48 darutoko joined #perl6
10:49 timotimo arnsholt: do you want to look at it?
10:50 timotimo it's the same link as before on gist: https://gist.github.com/timo/d8fdd129ff87dc277c83
10:50 arnsholt I must admit I know absolutely nothing about the NFA stuff in NQP =)
10:50 timotimo i'm now doing the "trick" where you use the return value of addedge in the next addedge, because ... maybe there's a reason to it? but even if i don't this causes parsing errors right away
10:51 timotimo you said "looks good to me" above! :P
10:51 arnsholt I was responding to your comment that you shouldn't have pasted from a pager, not commenting on the actual code =)
10:52 timotimo so, want to walk through this with me?
10:52 denysonique joined #perl6
10:52 timotimo hah, that explains it (nice save.)
10:52 arnsholt I see now it wasn't entirely unambiguous =D
10:54 dalek Perlito/replito: 3857c53 | (Flavio S. Glock)++ | / (4 files):
10:54 dalek Perlito/replito: Perlito5 - grammar - vstring parser
10:54 dalek Perlito/replito: review: https://github.com/fglock/Perlito/commit/3857c530e1
10:54 dalek Perlito/replito: 48ef9a7 | (Flavio S. Glock)++ | / (3 files):
10:54 dalek Perlito/replito: Perlito5 - grammar - vstring/bareword disambiguation
10:54 dalek joined #perl6
10:58 sqirrel joined #perl6
11:05 kivutar joined #perl6
11:06 cognominal joined #perl6
11:12 timotimo oh, i know
11:12 timotimo do i have to make a little loop?
11:13 timotimo that would explain it ...
11:29 moritz fwiw I get one spectest failure on rakudo-jvm, t/spec/S32-list/roll.t test 40
11:29 FROGGS hmm, that seems to be new
11:29 moritz I think I got that for quite some time
11:30 lizmat it's a test that succeeds if 2 random number sequences differ
11:30 FROGGS this one is not in the failure-out of my last recorded run
11:30 moritz yes, it shells out
11:30 moritz my $a = qqx{$*EXECUTABLE_NAME -e "print ~(1..10).pick(5)"};
11:30 moritz my $b = qqx{$*EXECUTABLE_NAME -e "print ~(1..10).pick(5)"};
11:30 moritz my $c = qqx{$*EXECUTABLE_NAME -e "print ~(1..10).pick(5)"};
11:30 moritz ok ($a ne $b || $b ne $c), 'different results due to random random-number seed';
11:31 lizmat if they're not different, there is a pb with the random number generator
11:31 moritz and when I just run that code from the command line, I get different results
11:31 moritz so maybe an evalserver artifact?
11:31 lizmat that could well be
11:33 timotimo moritz: do you have experience with the NFA?
11:33 moritz and the first test in t/spec/S02-magicals/pid.rakudo.jvm is a passing TODO here
11:33 moritz timotimo: no (only with the theory of NFAs in general)
11:34 timotimo theory-wise my NFA seems to check out
11:34 timotimo i've connected the start slot to a enwly created middle state with a CCLASS_ALPHABETICAL as well as a CODEPOINT for _, then from there i have an epsilon transition to the $to state as well as a CCLASS_WORD transition to the mid state again
11:36 census joined #perl6
11:37 moritz dont' you need the epsilon transition to the start slot to get repetition?
11:38 timotimo i need it to the middle i thought?
11:38 timotimo because ident must not start with a number
11:39 jnthn end to middle, yes
11:39 moritz oh, right
11:39 jnthn I guess you need to make sure you have an actual end state
11:39 jnthn Oh
11:39 jnthn Or you add an arrow back to the middle itself
11:39 moritz so there's epsiolon connections between middle and end, both ways
11:39 jnthn middle -> cclass word -> middle :)
11:40 timotimo i have an epsilon from middle to end and a cclass_word from middle to middle
11:40 jnthn ah, that could do it maybe
11:40 timotimo Unable to parse expression in blockoid; couldn't find final '}' at line 47, near "token TOP "
11:41 timotimo the error i get is probably not interpretable in itself
11:41 timotimo probably just means "oh no b0rked nfa!"
11:43 timotimo jnthn: i thought subrule gets a pre-built end state passed in?
11:44 timotimo ah, it may get -1 passed sometimes; and then i suppose it has to return it or something?
11:45 timotimo but i do return the value of self.addedge(..., $to)
11:48 timotimo or at least i thought i did
11:49 kivutar joined #perl6
11:52 timotimo nope, can't get it to work, can't think of why it would be wrong
11:52 iSlug joined #perl6
11:57 SamuraiJack_ joined #perl6
12:05 masak afternoon, #perl6
12:05 timotimo hey masak :)
12:05 timotimo are you up for a little bit of NFA debugging? :/
12:06 timotimo https://gist.github.com/timo/d8fdd129ff87dc277c83 - this is supposed to implement ident for the NFA, but it just causes pretty early explosions in nqp
12:06 masak timotimo: I think I am headed for a little bit of $dayjob...
12:06 masak timotimo: but feel free to explain things to me, and I will nod and make appropriate sounds.
12:06 timotimo have the appropriate amount of fun :)
12:07 masak thank you :)
12:07 masak well, it is fun work... just that the operative word is "work", not "fun"...
12:08 timotimo have the appropriate amount of work, then ;)
12:08 masak haha
12:14 masak rn: say "have the appropriate amount of ", <work fun>.roll
12:15 camelia rakudo ccf9c4, niecza v24-95-ga6d4c5f: OUTPUT«have the appropriate amount of fun␤»
12:15 masak \o/
12:15 moritz \o/
12:15 masak we've done something right with the Perl 6 implementations :P
12:20 jnthn :P
12:28 Ulti what's the difference between pick and roll?
12:29 grondilu Ulti: pick is without reuse
12:29 jnthn r: say (1..10).pick(*); say (1..10).roll(*)
12:30 camelia rakudo ccf9c4: OUTPUT«(timeout)5 6 9 2 7 10 3 4 8 1␤»
12:30 jnthn oh, yeah :)
12:30 jnthn r: say (1..10).pick(10); say (1..10).roll(10)
12:30 camelia rakudo ccf9c4: OUTPUT«8 4 6 5 7 10 9 2 3 1␤5 8 8 7 10 5 2 4 2 5␤»
12:30 timotimo jnthn: if you happen upon a few free seconds, care to look at my newest version of the gist? it seems to me something is wrong that i just don't know about?
12:30 Ulti ahh ok
12:30 jnthn timotimo: I don't know what it is either.
12:30 jnthn timotimo: And I odn't have time to debug it now
12:31 timotimo all right
12:31 Ulti makes sense given the verbs used
12:32 masak Ulti: historically, they were both .pick(), but .roll was spelled .pick(:replace)
12:32 masak Ulti: Hacker News didn't like that at all, and felt that it should be two different methods. for once, they were right. ;)
12:33 timotimo does hacker news like anything about perl6?
12:33 jnthn .roll, now :P
12:33 colomon joined #perl6
12:33 Ulti can you make pick remove elements from a list?
12:34 Timbus they like how we .roll
12:34 timotimo sure
12:34 timotimo @list[@list.pick(5)]:delete
12:34 rjbs Do I want to watch the "Future Perl Versioning Panel"?
12:34 timotimo rjbs: it was okay
12:34 moritz timotimo: that confuses indexes with elements
12:34 timotimo moritz: oh, darn
12:34 timotimo wouldn't be anything new to you if you're a regular reader on #perl6, rjbs
12:35 moritz @list[@list.keys.pick(5)]:delete
12:35 Timbus @newlist = @oldlist.pick(+@oldlist-$picknum) :3
12:35 Ulti gets increasingly hairy when you want the return value at the same time
12:36 timotimo no, it doesn't
12:36 timotimo just add :k, :kv or whatever
12:36 moritz r: my @a = <a b c d e f g>; say @a[@a.keys.pick(3)]:delete; say @a.perl
12:36 camelia rakudo ccf9c4: OUTPUT«f d b␤Array.new("a", Any, "c", Any, "e", Any, "g")␤»
12:37 Timbus huh
12:37 timotimo r: my @a = <a b c d e f g>; say @a[@a.keys.pick(3)]:delete:kv
12:37 camelia rakudo ccf9c4: OUTPUT«3 d 1 b 4 e␤»
12:37 timotimo r: my @a = <a b c d e f g>; say @a[@a.keys.pick(3)]:delete:pairs
12:37 camelia rakudo ccf9c4: OUTPUT«Unexpected named parameter 'pairs' passed to Array @a␤  in method gist at src/gen/CORE.setting:11818␤  in method gist at src/gen/CORE.setting:963␤  in sub say at src/gen/CORE.setting:12722␤  in block  at /tmp/SYSsy3e36I:1␤␤»
12:37 moritz timotimo: :p I believe
12:37 timotimo wasn't there something like that?
12:37 timotimo r: my @a = <a b c d e f g>; say (@a[@a.keys.pick(3)]:delete:p).perl
12:37 camelia rakudo ccf9c4: OUTPUT«$(0 => "a", 1 => "b", 3 => "d")␤»
12:39 Ulti hmm the delete didnt work with my @picked = @list[@list.keys.pick(5)]:delete:v
12:39 dalek Perlito: f88e449 | (Flavio S. Glock)++ | / (3 files):
12:39 dalek Perlito: Perlito5 - "Data::Dumper" features
12:39 dalek Perlito: review: https://github.com/fglock/Perlito/commit/f88e449efe
12:39 moritz r: my @a = <a b c d e f g>; say @a[@a.keys.pick(3)]:delete:v; say @a.perl
12:39 camelia rakudo ccf9c4: OUTPUT«d c a␤Array.new(Any, "b", Any, Any, "e", "f", "g")␤»
12:39 moritz Ulti: looks like it worked in this example
12:39 timotimo r: my @a = <a b c d e f g>; my @picked = @a[@a.keys.pick(3)]:delete:v; say @picked; say @a;
12:39 camelia rakudo ccf9c4: OUTPUT«c e b␤a (Any) (Any) d (Any) f g␤»
12:39 timotimo seems to work to me
12:40 Ulti r: my @list = 1..20; my @picked = @list[@list.keys.pick(5)]:delete:v; @picked.say; @list.say;
12:40 camelia rakudo ccf9c4: OUTPUT«12 4 19 9 13␤1 2 3 (Any) 5 6 7 8 (Any) 10 11 (Any) (Any) 14 15 16 17 18 (Any) 20␤»
12:40 Ulti so the (Any) prints as the number on my install
12:41 timotimo huh? versions etc?
12:41 Ulti R* 2013.09 on the REPL
12:41 timotimo star: my @list = 1..20; my @picked = @list[@list.keys.pick(5)]:delete:v; @picked.say; @list.say;
12:41 camelia star 2013.08: OUTPUT«4 18 17 7 8␤1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20␤»
12:41 timotimo okay, that's one month older, but ... o_O
12:42 moritz timotimo: that's only about 1 week old
12:42 timotimo lizmat recently made lots of progress with all those adverbs
12:42 timotimo moritz: it says 2013.08 in the evalbot version
12:42 moritz aye, lizmat++
12:42 moritz oh
12:42 moritz uh
12:42 moritz I thought I'd fixed that
12:46 Timbus so um. heres a thing: whats the diff betwixt @(<a s d f>)[3] = Any; and @(<a s d f>)[3]:delete. is it to do with assigning to containers.
12:46 dalek rakudo/nom: 3090ed4 | (Elizabeth Mattijsen)++ | src/core/array_slice.pm:
12:46 dalek rakudo/nom: Make sure [3,*-3]:delete works
12:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3090ed4a21
12:46 timotimo it is to do with default values, no?
12:46 timotimo also, if your list is typed, it will not come out Any
12:46 timotimo my Str  @a = <a s d f>; @a[1]:delete; say @a.perl;
12:46 timotimo r: my Str  @a = <a s d f>; @a[1]:delete; say @a.perl;
12:46 camelia rakudo ccf9c4: OUTPUT«Array[Str].new("a", Any, "d", "f")␤»
12:47 Timbus lies
12:47 timotimo er, i stand corrected
12:47 timotimo or this is just NYI ;)
12:47 lizmat also: :delete will make :exists return False, assigning Any will not
12:47 timotimo r: my Str  @a = <a s d f>; @a[1]:delete; @a[2] = Any; say @a.perl; say @a[1]:exists; say @a[2]:exists;
12:47 Timbus well that just confuses and infuriates me
12:47 camelia rakudo ccf9c4: OUTPUT«Type check failed in assignment to '@a'; expected 'Str' but got 'Any'␤  in block  at /tmp/8FOVshpqIJ:1␤␤»
12:47 timotimo r: my Str  @a = <a s d f>; @a[1]:delete; @a[2] = Str; say @a.perl; say @a[1]:exists; say @a[2]:exists;
12:47 camelia rakudo ccf9c4: OUTPUT«Array[Str].new("a", Any, Str, "f")␤False␤True␤»
12:48 Timbus not just any old Any
12:48 lizmat there was a discussion about it a week or 2 ago
12:48 lizmat assigning the default value will *not* make the element not exist
12:48 timotimo well i really don't think there should be an Any in an Array[Str], is my intuition wrong?
12:49 masak timotimo: no.
12:49 masak timotimo: that shouldn't even be possible, type-wise.
12:49 timotimo good, i'm not insane :)
12:49 masak timotimo: feel free to bugmit a rakudosub.
12:50 lizmat timotimo: please do, I think I know where the pb is
12:51 clkao joined #perl6
12:51 lizmat but first need to run some errands&
12:52 timotimo holy jeebus, our hackspace is going to get a form1 3d printer
12:52 timotimo now i *must* get into 3d printing
12:57 pdurbin left #perl6
12:59 * moritz wants a 3d-printed camelia!
13:02 * masak wants a 3d-printed 3d printer!
13:02 masak (and then we send it to Mars, and then we terraform Mars, etc)
13:04 grondilu rn: https://gist.github.com/grondilu/6763504
13:04 camelia rakudo ccf9c4: OUTPUT«2.91632873246921e-08␤»
13:04 camelia ..niecza v24-95-ga6d4c5f: OUTPUT«2.916328732469213E-08␤»
13:04 FROGGS moritz: I have a 4d-printed hand at home, which I made using 3dsmax ten years ago
13:04 FROGGS err, 3d
13:04 * grondilu is confused, was expecting something around 11!
13:04 grondilu (or 9!)
13:08 robinsmidsrod joined #perl6
13:08 dalek Perlito: 28866a5 | (Flavio S. Glock)++ | / (4 files):
13:08 dalek Perlito: Perlito5 - js - repetition operator fix
13:08 dalek Perlito: review: https://github.com/fglock/Perlito/commit/28866a51d8
13:12 * grondilu realizes that this formula works only for small $x
13:13 moritz is that a taylor series, and the Horner schema to evaluate it?
13:14 moritz Γ(4) is still fairly accurate, Γ(5) already 0.7 off, and Γ(6) is horrible :-)
13:16 moritz I wonder if there isn't a more clever way that decomposes the argument into an integer and a fractional number, uses integer factorial for the integer part, and such an approximation for the fractional part
13:18 * masak .oO( is that a Horner schema in your pocket, or are you just happy to approximate me? )
13:19 PacoAir joined #perl6
13:20 grondilu moritz: it's from http://rosettacode.org/wiki/Gamma_function#Perl_6
13:21 colomon n: say gamma(4)
13:21 camelia niecza v24-95-ga6d4c5f: OUTPUT«6␤»
13:21 grondilu n: gamma(4.1)
13:21 camelia niecza v24-95-ga6d4c5f: ( no output )
13:21 grondilu n: say gamma(4.1)
13:21 camelia niecza v24-95-ga6d4c5f: OUTPUT«6.8126228630166761␤»
13:22 grondilu std: say &gamma;
13:22 camelia std 7c17586: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'gamma' used at line 1�Check failed�FAILED 00:00 44m�»
13:22 colomon grondilu: I never got around to adding gamma to the spec.  sidetracked by life
13:23 colomon grondilu: but I did come up with a trial implementation for Niecza.
13:23 grondilu if so, it should be with a upper case (Gamma), or with the greek letter
13:23 grondilu (imho)
13:23 colomon disagree
13:24 colomon well, it might be nice to have a greek letter version
13:24 PerlJam good $localtime #perl6!
13:24 moritz good UTC morning, PerlJam
13:24 colomon n: say gamma(5)
13:24 camelia niecza v24-95-ga6d4c5f: OUTPUT«24␤»
13:24 grondilu but the greek letter is upper case, isn't it?  Then the latinized version should be as well, shouldn't it?
13:24 moritz but we use upper-case for type names, not functions
13:25 moritz as a convention
13:25 grondilu oh, ok
13:25 colomon and look at (for example) http://en.wikipedia.org/wiki/Gamma_function
13:25 colomon it's all lowercase
13:25 colomon except the title
13:26 moritz nr: say 'Γ'.lc
13:26 camelia rakudo 3090ed, niecza v24-95-ga6d4c5f: OUTPUT«γ␤»
13:26 moritz nr: say 'Γ'.lc.tc
13:26 camelia rakudo 3090ed, niecza v24-95-ga6d4c5f: OUTPUT«Γ␤»
13:27 ajr joined #perl6
13:29 Guest-coke joined #perl6
13:37 denisboyun joined #perl6
13:37 bluescreen10 joined #perl6
13:39 btyler joined #perl6
13:47 FROGGS hmmm, isnt <?before ']'> the same as <?[\]]> ?
13:48 jnthn Should be
13:48 jnthn Apart from the latter is much cheaper
13:48 FROGGS well, the latter blows up while the former does not
13:48 kaleem joined #perl6
13:48 jnthn r: say '[' ~~ /<?before ']'>/
13:48 FROGGS in Perl6::Grammar regex term:sym<reduce>
13:48 camelia rakudo 3090ed: OUTPUT«Nil␤»
13:49 jnthn r: say '[' ~~ /<?[\]]>/
13:49 camelia rakudo 3090ed: OUTPUT«Nil␤»
13:49 jnthn um, wtf
13:49 jnthn prn: say '[' ~~ /<?[\]]>/
13:49 camelia rakudo 3090ed, niecza v24-95-ga6d4c5f: OUTPUT«Nil␤»
13:49 camelia ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20120717/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** Can't loca…»
13:49 jnthn std: say '[' ~~ /<?[\]]>/
13:49 camelia std 7c17586: OUTPUT«ok 00:00 44m␤»
13:49 jnthn hm, but we dunno how STD parsed it :)
13:49 FROGGS r: say ']' ~~ /<?before ']'>/
13:50 camelia rakudo 3090ed: OUTPUT«「」␤␤»
13:50 FROGGS r: say ']' ~~ /<?[\]>/
13:50 camelia rakudo 3090ed: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter < (must be quoted to match literally)�at /tmp/T7U3eSqp_n:1�------> [32msay ']' ~~ /<?[\[33m�[31m]>/[0m�Unrecognized regex metacharacter ? (must be quoted to match literally)�at /tmp/T7U3eSqp_n:…»
13:50 jnthn oh! Duh!
13:50 FROGGS r: say ']' ~~ /<?[\]]>/
13:50 camelia rakudo 3090ed: OUTPUT«「]」␤␤»
13:50 FROGGS ohh
13:50 FROGGS see
13:50 FROGGS it is not zerowidthy or so
13:50 jnthn huh
13:50 jnthn wow, that's ungood
13:51 FROGGS ahh, really? *g*
13:51 FROGGS a hint where this happens? then I'll care about that one
13:51 FROGGS is it in HLL::Grammar?
13:52 jnthn I'd look at the AST first...
13:52 jnthn QAST::Regex(:rxtype(literal) :subtype(zerowidth))
13:53 jnthn ah
13:53 jnthn It comes out as a literal...
13:53 jnthn I get literal's compilation doesn't handle zerowidth...
13:53 jnthn *bet
13:54 moritz lateral literals!
13:54 jnthn Either fix the regex compiler or turn backslash sequences that produce a literal into an enumcharlist instead, which does support zerowidth, I guess...
13:54 FROGGS nqp/src/NQP/Actions.nqp:1755:                QAST::Regex.new(:rxtype<literal>, $rxname, :node($/)));
13:54 FROGGS I guess it is this one
13:54 jnthn Doubt it
13:54 FROGGS yeah, me too now
13:55 jnthn It'd be in the cclass_elem or so action method in P6Regex::Actions in the nqp repo
13:55 jnthn You can probably reproduce this with just nqp, fwiw
13:57 FROGGS yes, looks like
14:05 logie joined #perl6
14:05 dalek Perlito: b5b5476 | (Flavio S. Glock)++ | / (5 files):
14:05 dalek Perlito: Perlito5 - js - CODE has prototype
14:05 dalek Perlito: review: https://github.com/fglock/Perlito/commit/b5b5476b4f
14:09 xenoterracide_ joined #perl6
14:09 FROGGS rn: say '[]' ~~ /<?[\[..\]]>/ # that one is already fine
14:09 lowpro30 joined #perl6
14:09 camelia rakudo 3090ed, niecza v24-95-ga6d4c5f: OUTPUT«「」␤␤»
14:15 skids joined #perl6
14:15 xinming joined #perl6
14:16 jnap joined #perl6
14:23 jnap left #perl6
14:23 felher Whats the preffered spelling for compound class names, if there is any? e.g.: Given a class representing a list of numbers, is it NumberList, Number-List, Number-list, ... ?
14:24 masak List::Numbers
14:24 jnthn my Numeric @things; # :P
14:25 jnthn NumberList is what I'd do if I didn't want nested packages though
14:25 * masak .oO( my Little $pony )
14:25 jnthn my Corn @uni[1];
14:26 felher okay, I guess my example was not the best. But seriously, List::Numbers is good where it is applicable, but Horse::Waggon doesn't seem be as good as HorseWaggon, oder Horse-Waggon, or ...
14:27 jnthn Well, a good example of the :: is stuff like Test::Mock, or Rakudo::Debugger
14:27 jnthn Or JSON::Tiny
14:28 tadzik it's all about namespaces
14:28 jnthn aye
14:28 tadzik I can't think of any generic Horse-related modules
14:28 tadzik but we do have Test-related, List-related etc
14:29 jnthn Horse::Eat # accidentally imported all over Europe
14:29 tadzik hihi
14:29 felher jnthn: yeah, I get that. :) My problems realy just wit the names. It is, as far as I know, considered good style to name a sub do-something and not doSomething. My question is just what the normal spelling of class names is.
14:30 moritz felher: I haven't seen - in class names yet
14:30 felher moritz: okay, then I stay with camel case. Thanks. :)
14:30 FROGGS felher: depends, if it makes sense to create a group because you expect more subpackages, then make it: Horse::Brown, because there might be Horse::White
14:31 FROGGS but if the thing will never need to be split up for this, make it one word
14:32 felher FROGGS: yeah, thanks. I have not problem with namespaces. Was really just a spelling question. :)
14:36 * felher is surprised to see that IO::Path is not immutable. :)
14:36 denisboyun joined #perl6
14:36 * moritz had originally envisioned it as immutable
14:37 felher moritz: what changed your mind?
14:39 moritz felher: I never did
14:39 moritz felher: maybe somebody else changed it
14:39 felher moritz: or I maybe misread the IO::Path spec at some point and it is immutable after all. :)
14:40 moritz felher: have you found any mutating method? if yes, which?
14:41 pmichaud good morning, #perl6
14:42 moritz good am, pm
14:42 felher moritz: Ah, I just misread (or didn't read enough). I looked at IO::Path.child in the specs. But I guess its meant to say that it returns a new Path object. Mind if I make that explicit?
14:42 jnthn hi, pmichaud
14:42 felher o/ pmichaud
14:42 FROGGS hi pmichaud
14:42 jnthn pmichaud: I taught MoarVM the closure handling approach we discussed in Austin over the weekend :)
14:43 jnthn (Well, and the QAST -> MAST generator...)
14:43 pmichaud jnthn: \o/   how did it go?
14:43 moritz felher: please do
14:43 jnthn pmichaud: Fairly smoothly. Self-hosted NQP on MoarVM now passes all t/nqp
14:43 pmichaud \o/
14:44 moritz \o/
14:44 pmichaud that's excellent.  I can't wait to give it a try (soon!)
14:45 jnthn Also been having some fun with reducing Cursor allocation in the cursless branches. Last night I managed to get NQP.nqp (the concatenated src/NQP/ output) from 284742 Cursor allocations down to 189975... :)
14:46 pmichaud that will help a lot
14:46 moritz r: say 189975 / 284742
14:46 camelia rakudo 3090ed: OUTPUT«0.667183␤»
14:46 moritz wow
14:46 moritz a third down
14:47 moritz jnthn++
14:48 flussence whoa, that's just from one day's work? jnthn++
14:48 dalek specs: 3411082 | (Felix Herrmann)++ | S32-setting-library/IO.pod:
14:48 dalek specs: [S32::IO] make it explicit that IO::Path.child returns a new IO::Path
14:48 dalek specs: review: https://github.com/perl6/specs/commit/3411082ff1
14:49 flussence (also, is that going to just speed up compilation/startup, or will it make regexes faster in general?)
14:49 jnthn flussence: s/day/evening/
14:49 jnthn flussence: It may help compilation speed a bit
14:50 jnthn flussence: Especially on lower memory systems with less space to collect
14:50 pmichaud it makes regexes faster in general... which helps compilation speed.
14:50 flussence ooh, I have one of those
14:50 pmichaud (fewer allocations == better memory management)
14:50 jnthn Yeah, some of the changes help regexes in general
14:50 jnthn Others of them are from improvements to the NQP and P6Regex grammars
14:50 jnthn And started using same analysis to look at Rakudo's one too
14:51 jnthn I need to look at MARKER and see if I can't do something there
14:51 jnthn But I'm meant to be doing $dayjob atm :)
14:53 clkao win 12
14:53 pmichaud THIS IS $DAYJOB!  :-P
14:53 LlamaRider joined #perl6
14:53 LlamaRider o/ #perl6
14:55 felher o/
14:56 LlamaRider I'm hitting an interesting problem in $dayjob over and over again and it seems to be something that needs a new CPAN module in Perl5, but really could be done better in P6.
14:57 LlamaRider So I thought I might ask for opinions over here.
14:57 LlamaRider I think I need what would look like polymorphic regexes - the built-in ones being for String, and the ones I need for $dayjob being for XML
14:58 jnthn XPath? :)
14:58 moritz so you want to match trees, not strings?
14:58 jnthn Or something different?
14:58 moritz jnthn: my thought exactly
14:58 LlamaRider XPath is the match part, but it's too limited
14:58 LlamaRider I want to match trees, not a single node, and I want named captures so that I make powerful rewrite rules
14:59 dalek Perlito: e6202b8 | (Flavio S. Glock)++ | / (4 files):
14:59 dalek Perlito: Perlito5 - js - exists &sub
15:00 dalek Perlito: review: https://github.com/fglock/Perlito/commit/e6202b8abe
15:03 LlamaRider joined #perl6
15:04 LlamaRider I have a brief write-up of my current examples at https://github.com/dginev/Research-topics/blob/master/RegXML.md
15:04 LlamaRider (also sorry for my flaky net, bus WiFi isn't optimal)
15:04 moritz LlamaRider: it's a non-trivial problem even in perl 6, I guess :-)
15:06 pmichaud I think tree matching things would normally be handled either using action methods (the way the parsers do it) or by using multidispatch with unpacking signatures
15:06 masak feels like a place where combinators would help a lot.
15:07 pmichaud for that matter, I suppose the action methods could be multidispatched :)
15:07 masak ooh
15:08 pmichaud multi method node($/ where $<something> eq 'abc') { ... }
15:08 moritz but that means that the methods need to be dynamically generated per pattern, no?
15:09 jnthn Or you write your pattern match with signatures :)
15:09 pmichaud multi method node($/ where $<something> eq $<else>) { ... }
15:09 pmichaud moritz: I didn't follow that comment, sorry.
15:10 * pmichaud now wonders how many compiler action methods would be better written as multidispatch candidates
15:10 LlamaRider My feeling is that both implementing and using such an input language would be a good fit for P6. And I am particularly excited to overload ~ on LibXML elements with some such flavour of regexes.
15:12 LlamaRider But I don't know if that sounds workable - is the Regex engine just a P6 grammar? If so, I can simply write a RegXML grammar and have it looked into for XML datatypes.
15:13 moritz LlamaRider: the regex engine consists of regex compiler, runtime and parser (the grammar)
15:15 deyan_ joined #perl6
15:21 alester joined #perl6
15:24 ksh joined #perl6
15:25 colomon joined #perl6
15:25 dalek Perlito: 1d5d99f | (Flavio S. Glock)++ | / (5 files):
15:25 dalek Perlito: Perlito5 - js - exists &{"sub"}
15:25 dalek Perlito: review: https://github.com/fglock/Perlito/commit/1d5d99fd50
15:28 ajr joined #perl6
15:32 sorear joined #perl6
15:32 TimToady hoelzro: S19:266 already specs how to pass arguments to subsystems
15:32 synopsebot Link: http://perlcabal.org/syn/S19.html#line_266
15:33 hoelzro ah, thanks!
15:33 TimToady not that it's implemented that way yet
15:33 hoelzro =P
15:34 TimToady the main point of it is that we don't hid argments to subsystems inside other arguments, because then it precludes nice things like filename expansion in the shell
15:35 TimToady *hide
15:35 TimToady there's a clean beginning and ending so it's trivial for argument processors to strip out the arguments it isn't interested in
15:35 dalek nqp/cursless: 9dcee84 | (Tobias Leich)++ | src/QRegex/P6Regex/Actions.nqp:
15:35 dalek nqp/cursless: make backslash:misc an enumcharlist
15:35 dalek nqp/cursless:
15:35 dalek nqp/cursless: So <?[\]]> will actually have zerowidth.
15:35 dalek nqp/cursless: review: https://github.com/perl6/nqp/commit/9dcee84141
15:36 sqirrel joined #perl6
15:37 hoelzro objects of the same class all share a single STable, don't they?
15:37 jnthn correct
15:37 kivutar joined #perl6
15:38 TimToady depends on how you define "class", but the class that comes standard does it that way :)
15:38 hoelzro hmm
15:38 TimToady hopefully something that does it different would use a different keyword
15:38 hoelzro so why is it that all P6Opaque objects on the JVM have an STable field?  Why not just associate that data at the class level?
15:39 TimToady presumably so introspection works right
15:39 jnthn Well, yeah, you could technically shove something different in EXPORTHOW that makes class behave in another way :)
15:39 * hoelzro is still trying to figure out how to get the Perl 6 class name from a java.lang.Class object =/
15:40 ggoebel2 joined #perl6
15:40 arnsholt Is that all instances of _P6Opaque_$whatever, or all instances of P6Opaque.class?
15:40 jnthn hoelzro: The fact that P6opaque generates a JVM class for a type of a given shape is just an implementation detail.
15:40 jnthn hoelzro: The VMArray REPR is used by NQPArray, Perl6's Blobs and Bufs, etc.
15:41 masak I always thought the subsystem argument passing was horribly over-spec'd, exactly the kind of abstraction astronautism that would eventually just collapse under its own infeasability.
15:41 masak but I hadn't heard the filename expansion argument before... interesting.
15:41 jnthn hoelzro: And class A { }; class B { }; will use the same JVM type 'cus they're both element-less
15:41 jnthn ah, attribute-less
15:41 hoelzro grrr
15:41 hoelzro shit
15:41 jnthn hoelzro: The way to do it is the equivalent of obj.HOW.name(obj)
15:41 hoelzro is there any way to identify them via Java reflection?
15:41 hoelzro ah ha
15:42 hoelzro see, I can get the HOW object
15:42 TimToady masak: any sufficiently advanced technology is indistinguishable from an overdesigned system :P
15:42 hoelzro but finding the name method is proving...difficult.
15:42 jnthn hoelzro: Ops.findmethod, then Ops.invokeDirect, or something along those lines
15:42 hoelzro ah, wonderful
15:42 hoelzro jnthn++
15:43 hoelzro I spent the weekend reading up on the JVM TI
15:43 hoelzro I'm hoping to build a sort of "meta agent" for Perl 6
15:43 hoelzro so that others can write profiling agents that make use of Perl 6-specific extensions
15:44 lowpro30_ joined #perl6
15:45 jnthn nice!
15:45 hoelzro afair, Ops are the NQP ops that don't directly correspond to JVM bytecode ops, right?
15:45 jnthn Yeah
15:46 hoelzro ok, cool
15:47 TimToady masak: how the delimited options are stored is negotiable, but basic syntax is pretty well designed from a human factors point of view
15:48 hoelzro jnthn: what can I use for the ThreadContext?
15:51 jnthn hoelzro: You...don't have one?
15:51 jnthn That's a pretty rare situation :)
15:51 hoelzro I'm in JVM TI land
15:51 hoelzro I have nothing related to Perl 6 atm
15:51 arnsholt He's instrumenting the code via the JVM
15:51 jnthn OK, hm...
15:51 hoelzro yeah =)
15:51 jnthn I think there's a way to do it
15:51 benabik joined #perl6
15:51 jnthn 'cus we depend on it for threads...
15:51 jnthn But sorear++ implemented it so I don't have it in my head...
15:52 hoelzro hmm
15:52 hoelzro I'll dig into it more later then
15:52 * jnthn looks to see if he can quickly find it
15:53 * hoelzro sees getCurrentThreadContext
15:53 hoelzro I think that should do it
15:53 hoelzro I just have to see how the JVM TI + threads works
15:54 jnthn hm, there's a getCurrentThreadContext
15:54 diakopter whee
15:54 jnthn But that needs you to have a GlobalContext to call it on :)
15:54 diakopter boo
15:54 hoelzro grrrr
15:54 diakopter GETGLOBALCONTEXT
15:57 diakopter ok, who needs NFA help
15:57 diakopter whatever advice I give you, do the inverse, and then the converse, for good measure.
15:58 frdmn joined #perl6
15:58 kaare_ joined #perl6
15:58 masak and then the dual.
15:58 prammer_ joined #perl6
15:58 iSlug joined #perl6
15:59 jnthn to the death!
15:59 TimToady noel
16:00 jnthn hoelzro: I'm not seeing a thing for obtaining a globalcontext right off...
16:00 hoelzro alright
16:00 hoelzro let me know if you find anything
16:01 * hoelzro decommute &
16:02 diakopter masak: lolz
16:03 diakopter jnthn: search the codebase for  static GlobalContext  :)
16:04 FROGGS joined #perl6
16:24 timotimo diakopter: hey. i can use your help for NFA now :)
16:25 diakopter k
16:25 diakopter like I said for the quant one, I just kept adding more edges until it worked
16:25 diakopter :)
16:26 jnthn Aha...so that's why quant looks like that! :P
16:26 timotimo https://gist.github.com/timo/d8fdd129ff87dc277c83 - this is my attempt to implement .ident in the NFA
16:26 timotimo .ident should be much simpler than quant ...
16:27 diakopter why did you guys say it's not possible to do negate? :)
16:28 timotimo well, if you want to negate a cclass + a codepoint you have to calculate the opposite character class with the added codepoint missing, too
16:28 timotimo it didn't seem to me like i wanted to add 10000 edges
16:28 diakopter why
16:29 diakopter why would you need to calculate teh opposite character class
16:29 timotimo because opposite of one edge labeled "a" in NFA would be one edge labeled "b" and one edge labeled "c" and one edg labeled "d" and one edge labeled "e" and one edge labeled "f" and one edge labeled "g" and one edge labeled "h" and ...
16:30 timotimo at least it seems to me!
16:30 timotimo er, well, that's wrong
16:30 diakopter nah just flip the output paths
16:30 timotimo opposite of one edge seems to be possible
16:30 timotimo opposite of two edges doesn't seem possible
16:30 timotimo without a big mess
16:30 pmichaud NQP's NFA engine (in its original incarnation) has a "doesn't match character" transition.
16:30 jnthn You don't need to do the negate case.
16:31 BenGoldberg joined #perl6
16:31 * masak 's head spins
16:31 jnthn <!ident> is fate
16:31 jnthn elsif $subtype eq 'zerowidth' {
16:31 jnthn if $node.negate {
16:31 jnthn self.fate($node, $from, $to)
16:31 jnthn Just fall through to that general case for negated ones
16:32 jnthn pmichaud: It still has that, fwiw :)
16:32 diakopter jnthn: I was asking *why* we didn't "need" to do the negate case
16:33 jnthn diakopter: yes, and I just explained why :)
16:33 diakopter you explained how..
16:33 jnthn < jnthn> <!ident> is fate
16:33 jnthn To clarify, so is <!foo>
16:34 diakopter okay, but why
16:34 jnthn I presume 'cus that's what S05 wants... :)
16:35 jnthn I think it's been like this since NFA.nqp was first written.
16:36 diakopter I still don't know why... do I need to read all of s05?
16:36 TimToady diakopter: /me helped write S05, and still has no clue what you're asking
16:37 jnthn TimToady: LTM semantics of <!foo>
16:37 * masak .oO( "but... what does it *mean*!?" )
16:37 diakopter why does a negation cause a fate?
16:37 TimToady I thought we were talking about negated character classes
16:37 jnthn No, we're talking about ident
16:37 TimToady and NFAs
16:37 jnthn And ident's NFA
16:37 timotimo and NFA's ident
16:37 jnthn Well, I was :)
16:37 jnthn uh, iden't sNFA? :)
16:38 diakopter oh, I thought you said NSA; never mind
16:38 timotimo mumble mumble SNAFU
16:39 timotimo okay, so at least the "if" part of my NFA generating piece for ident isn't wrong
16:39 masak ide'nt NFsA!?
16:39 hoelzro so, I assume that there's supposed to be a single GlobalContext object per JVM instance?
16:39 timotimo (because it bails out when it sees a negated or zerowidth)
16:39 timotimo but that doesn't explain how to make it not parsefail at the first opportunity :)
16:41 timotimo hoelzro: i think the evalserver fires up one GlobalContext for each thread it executes things in
16:41 hoelzro hmm
16:41 timotimo or perhaps it makes new ones for each new eval'd string
16:42 hoelzro heh
16:42 hoelzro I just had a crazy idea on how to get the GlobalContext
16:42 hoelzro I could walk the heap and find one
16:42 hoelzro that sounds *really* dodgy, though.
16:42 timotimo ouch
16:43 jnthn hoelzro: There's one per instance *unless* you're running with the eval server
16:44 hoelzro I see
16:45 timotimo diakopter: so, any more comments? :)
16:48 diakopter well, what's the problem
16:49 timotimo Unable to parse expression in blockoid; couldn't find final '}' at line 47, near "token TOP "
16:49 timotimo when it tries to use the stage2 nqp for the first time
16:52 berekuk joined #perl6
16:54 diakopter I have to unload and then reload my other brain if you expect me to be able to read someone else's code
16:55 kivutar joined #perl6
16:55 timotimo as long as you leave my brain in my head, that's all right
16:55 diakopter also, I have to remember what an edge is, and what a node is, and what a fate is, and what an epsilon is, and ...
16:55 diakopter what an NFA is
16:56 timotimo what you are, what we are
16:56 timotimo what is normal? what is home? what are cows?
16:56 diakopter .oO( what, you don't pronounce NFA "niffa"? )
16:56 timotimo what are birds?   we just don't know.
16:57 masak diakopter: for too long our graphs have had to tolerate being called "niffa". the oppression ends here and now.
16:58 diakopter nondeterministic power!
17:01 timotimo only a niffa can call another niffa niffa~
17:03 rindolf joined #perl6
17:04 iSlug joined #perl6
17:04 TimToady sorry, I'm diffa
17:05 timotimo you're all the same underneath the skin
17:05 timotimo just some of you are bigger than others
17:08 masak bigger? you biggot!
17:09 TimToady sorry, I'm littlot
17:09 diakopter cross-channel joke merge: biggar!
17:09 timotimo i'm not big into bigism; it's just a total true statement completely devoid of value!
17:09 prammer_ joined #perl6
17:10 TimToady truthioidalisticismdisestablishmentarianism
17:10 masak hemispherist!
17:11 TimToady Right.  No, Left!
17:11 diakopter No, join, no, part...
17:11 TimToady you can use "cleave" for both
17:12 diakopter cleft then
17:13 diakopter cleave it to beaver
17:15 * masak .oO( uncleftish beholding )
17:15 diakopter timotimo: try adding a begin state from from, then add the others from there
17:16 timotimo will do
17:17 diakopter if that works, I suspect it's because sometimes $from is a phantom
17:17 timotimo (add more edges until something sticks)
17:18 timotimo same error, i'm afraid
17:18 * timotimo completely kills the branch to make extra sure the error is in his ident nfa
17:20 timotimo not the whole branch, though, just the if branch
17:21 timotimo yeah, fortunately that builds
17:21 timotimo so i'm not going crazy
17:21 diakopter well that certainly doesn't prove that
17:22 sqirrel joined #perl6
17:22 timotimo right. i'm being way too optimistic
17:29 ggoebel3 joined #perl6
17:31 PZt joined #perl6
17:32 sunnavy joined #perl6
17:33 diakopter timotimo: show me the code after you added that begin state/edge
17:34 TimToady being way too optimistic is our speci-ality.
17:34 TimToady (in general)
17:38 diakopter timotimo: note there are no other addedge calls that loop a node to itself in NFA.pm
17:39 diakopter I never could figure out why it didn't work to do that (you'd think it should), but I bet it's fixed if you add another node/edge to loop through
17:39 diakopter er, NFA.nqp
17:41 mtk joined #perl6
17:43 timotimo o
17:43 timotimo that's a good tip.
17:43 diakopter believe me I tried many times in quant before I learned that lesson
17:44 diakopter jnthn: you'd probably consider it a big that the self-loop edge doesn't work...
17:44 diakopter er, bigbug
17:44 diakopter er, bug
17:45 timotimo bigug
17:45 diakopter then again, the nfa interpreter was rewritten a time or two since I last experimented
17:45 diakopter (so maybe that's not the problem)
17:47 timotimo i put in another state in the middle to make the loop longer ... it doesn't help
17:47 timotimo hold on, there's another error in there
17:49 diakopter show me the money
17:50 timotimo i'm not getting paid :(
17:50 timotimo https://gist.github.com/timo/d8fdd129ff87dc277c83 here it is
17:52 spider-mario joined #perl6
17:53 diakopter no you want the last edge from midstate to to
17:53 diakopter again, you'd think it wouldn't matter..
17:53 timotimo er, oh
17:53 diakopter but paranoia rules the day in this realm
17:54 diakopter also try it with the other one uncommented..
17:54 diakopter (but changing the other $froms to $midstate)
17:55 timotimo er
17:56 diakopter your machine is now part of the hive mind?
17:56 timotimo that diff doesn't apply cleanly, now i'm confused
17:56 timotimo i ought to draw what you mean
17:58 ajr joined #perl6
17:58 diakopter i'll paste what I mean
17:59 TimToady hmm, you're not really trying to make <!foo> participate in LTM are you?  in STD <!foo> is completely transparent to LTM
17:59 TimToady it's the opposite of <?foo> that way
18:00 diakopter timotimo: commented on it
18:00 diakopter the Ghist
18:00 masak :)
18:00 diakopter masak: ^ Ghist
18:00 masak I saw :)
18:00 diakopter yes.
18:00 diakopter yes.
18:00 * masak .oO( sitting around the fireplace, telling ghist stories )
18:01 * timotimo builds
18:01 timotimo TimToady: we are skipping anything like <!...>
18:02 timotimo this is only about making ident participate in LTM
18:02 timotimo given the amount of apostrophe calls (perhaps even fatarrow calls) there are that have no real justification, it could save us quite a lot.
18:03 timotimo diakopter: still b0rken
18:05 TimToady well, I note the STD behavior of <!foo> wrt LTM is unspecced, so I'd better spec it in any case
18:07 masak TimToady++
18:08 jnthn TimToady: It's as simple as timotimo++ said: in the profiling, it became apparent something was amiss, and I traced it down to ident not participating in LTM.
18:09 jnthn I need to $dayjob a little after dinner, but will see if I can figure out what's up with timotimo's patch afterwards :)
18:10 timotimo make rxtest  81,47s user 4,28s system 42% cpu 3:19,88 total
18:10 timotimo >_<
18:11 timotimo it decided that 8gb of ram are not enough to do any regex testing
18:12 diakopter timotimo: is this nqp or rakudo
18:14 diakopter (how are you testing this patch)
18:18 timotimo nqp on parrot
18:18 iSlug joined #perl6
18:23 diakopter timotimo: how quickly was it failing in the build?
18:24 timotimo i think the first file it tried to do
18:24 timotimo NQPP5QRegex.nqp, line 47
18:25 FROGGS it is always that file
18:26 timotimo yup
18:34 denisboyun joined #perl6
18:34 colomon joined #perl6
18:50 dalek specs: 42ac43f | larry++ | S05-regex.pod:
18:50 dalek specs: Clarify LTM of <?foo> and <!foo>
18:50 dalek specs:
18:50 dalek specs: Also straighten out some of the explication of LTM, and remove fossilized
18:50 dalek specs: discussion of sigspace that naturally falls out of our new rules now.
18:50 dalek specs: review: https://github.com/perl6/specs/commit/42ac43f1d5
18:51 FROGGS nqp: say('a' ~~ /<?[\S]>/) # jnthn, there is another one
18:51 camelia nqp: OUTPUT«a␤»
18:52 zby_home_ joined #perl6
18:52 jnthn OK, for that one we probably *have* to fix the code-gen...
18:53 jnthn (like, the backend stuff)
18:54 FROGGS I am almost through Perl6::Grammar btw (turning <?before... to <?[...
18:54 FROGGS )
18:55 jnthn \o/
18:55 jnthn How many cursors less so far? :)
18:55 FROGGS dunno :P
18:55 FROGGS need to turn on the output again
18:55 FROGGS I'll tell ya in 4minutes
18:56 FROGGS ohh wait, that is maybe half the job then, I think about 50% changes are commented atm
18:59 timotimo they're taking the NFAs to backendgard, they're taking the NFAs to backendgard ...
18:59 lue hello world o/
18:59 timotimo hellue
19:00 timotimo tell me where is patrick, for i much desire to speak with him~  tell me where is patrick, for i much desire to speak with him ...
19:01 FROGGS jnthn: TOTAL: 1756484
19:01 timotimo a backend of moarvm  -  what did you say? o_O     a backend of moarvm  -  what did you say? o_O
19:02 FROGGS r: say 1771917 - 1756484
19:02 camelia rakudo 3090ed: OUTPUT«15433␤»
19:02 timotimo that already includes the winnings we got from the nqp changes, though ... right?
19:02 masak lue! \o/
19:03 lue masak! \o/
19:03 FROGGS timotimo: This is nqp version 2013.09-55-gc921a38
19:05 timotimo so that already has some changes made by jnthn
19:05 timotimo it's not really a "so far" measurement, unless you go back to c87f86e and measure it with that
19:06 FROGGS that won't work because it needs the <?[\]]> patch
19:06 timotimo er, i mean comparing it to a rakudo-nom
19:06 timotimo anyway, i gotta run for a bit.
19:07 FROGGS ahh yes, we can do that at the end
19:07 timotimo i can do it in between :)
19:07 FROGGS hurry up o/
19:07 FROGGS :P
19:11 FROGGS nqp: say('a' ~~ /<?[\w]>/) # it is the unnegated case too
19:11 camelia nqp: OUTPUT«a␤»
19:17 jnthn Doesn't surprise me
19:18 jnthn I bet both handlen't zerowidth
19:18 masak "handlen't" :)
19:18 masak That's how you usen't English!
19:19 aindilis joined #perl6
19:19 jnthn ooh
19:19 jnthn I bet in cclass
19:19 jnthn $ops.push_pirop('add', %*REG<pos>, 1);
19:19 jnthn could become
19:19 jnthn $ops.push_pirop('add', %*REG<pos>, 1) unless $node.zerowidth;
19:19 jnthn And it'd fix it
19:20 FROGGS jnthn: sad that you still have to do stuff for $dayjob and I have to try this :P
19:20 jnthn indeed :P
19:25 FROGGS jnthn's personal buildbot says: I dies like: Error while compiling block : Error while compiling block  (source text: "{\n    my $brackets := \"<>[]()\\{}\\x[0028]\\x[0029]\\x[003C]\\x[003E]\\x[005B]\\x[005D]\\x[007B]\\..."): Error while compiling block quote_atom: Method 'zerowidth' not found for invocant of class 'QAST::Regex'
19:27 diakopter ups.
19:27 colomon joined #perl6
19:28 FROGGS err, I know what is wrong
19:28 diakopter timotimo: is there a chance it's actually dying while compiling the NFA?
19:32 diakopter timotimo: trying something :)
19:34 FROGGS jnthn++ # seems fixed
19:34 masak FROGGS++
19:38 timotimo i got myself a pack of NEApolitaner waffeln, FROGGS :)
19:38 FROGGS timotimo: it is called Ceapolitanerschnitten, sir :o)
19:39 FROGGS err, Nea*
19:39 FROGGS but maybe it helps anyway ;o)
19:40 timotimo i decided not to get the bag of DEApolitaner schnitten, because that was way too big for me
19:40 diakopter timotimo: the problem is almost certainly in the condition
19:41 timotimo you think it's being applied where it shouldn't?
19:42 diakopter or the condition is throwing an exception
19:42 timotimo now how do i get "they're taking the hobbits to isengard" out of my head?
19:42 diakopter since the hokey pokey song eleventy dozen times
19:43 timotimo i just copypasted the condition from the alpha case :(
19:43 timotimo (and added the negation case)
19:43 masak timotimo: to isengard! to isengard! gard! ga-ga-ga-gard!
19:44 diakopter well this is interesting
19:45 timotimo they're taking the commits to githubgard
19:49 timotimo diakopter: i have no idea where you got the impression that the NFA could be throwing an exception
19:49 timotimo it says "couldn't find final '}'"
19:49 timotimo called from FAILGOAL
19:49 timotimo is that different on your end?
19:49 diakopter no
19:51 diakopter trying one last thing
19:51 timotimo "one last thing" usually gets the crowd pretty psyched during a typical press conference
19:52 japhb_ joined #perl6
19:52 diakopter psyched up or psyched out?
19:52 timotimo er, the one where they're happy
19:52 diakopter heh, it compiled, and then nqp built itself in 4 seconds.
19:53 timotimo AWESOME
19:53 diakopter kidding.
19:53 timotimo i made it super quick!
19:53 timotimo aaw, man! :(
19:56 FROGGS timotimo: do not trust him
19:56 timotimo yeah, he knows my deepest dreams and teases me about it
19:57 masak truly, there is deceit in this man's heart.
19:57 diakopter _-_
19:57 * masak hugs diakopter
19:58 * diakopter cold fuses masak
19:59 masak aaaah! web tool! web tool!
20:02 dalek rakudo/nom: 4588808 | moritz++ | tools/build/NQP_REVISION:
20:02 dalek rakudo/nom: bump NQP revision
20:02 dalek rakudo/nom:
20:02 dalek rakudo/nom: because we can.
20:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/45888080cc
20:03 [Sno] joined #perl6
20:03 lue .oO(You can't run, lest the diakopters rain hellfire from the skies...)
20:18 BenGoldberg joined #perl6
20:21 timotimo diakopter: the "i'm trying one last thing" thing was part of the joke? :(
20:21 diakopter oh
20:21 diakopter it iditn'd work
20:22 timotimo aaw
20:22 diakopter erm.
20:22 diakopter didn't
20:22 diakopter that's about the worst typing error evah
20:22 masak :P
20:22 timotimo well, maybe the most
20:23 diakopter lunchY&
20:23 colomon I suspect the worst typing errors involve real and very much unintended words spelled by accident.
20:24 timotimo http://bash.org/?5300 - like this?
20:26 iSlug joined #perl6
20:26 FROGGS hehe
20:29 jnthn http://irclog.perlgeek.de/perl6/2012-11-14#i_6154515 # also memorable
20:29 lue .oO(Uh, I can explain, err... dvorak! Someone must've switched my keyboard to dvorak!)
20:30 arnsholt nqp: say("foo" ~~ /:my $x := "blech"; foo <.panic: $x>/) # Boom
20:30 camelia nqp: OUTPUT«regex assertion not terminated by angle bracket at line 2, near ": $x>/) # "␤current instr.: 'panic' pc 14693 (src/stage2/gen/NQPHLL.pir:5223) (src/stage2/gen/NQPHLL.nqp:279)␤»
20:30 arnsholt nqp: say("foo" ~~ /:my $x := "blech"; foo <.panic: "blerg">/) # No boom
20:30 camelia nqp: OUTPUT«Method 'panic' not found for invocant of class 'NQPCursor'␤current instr.: '' pc 269 ((file unknown):172891885) (/tmp/dALTfPXnUE:1)␤»
20:30 arnsholt Is that a known NQP problem?
20:31 arnsholt jnthn: Last four lines ring any bells?
20:31 jnthn arnsholt: panic comes from HLL::Grammar, not Cursor.
20:31 * masak .oO( the problem is known to be NQP-complete )
20:32 jnthn timotimo: You got latest version of your NFA patch?
20:32 lue .oO(P ≠ NP ≠ NQP)
20:32 timotimo https://gist.github.com/timo/d8fdd129ff87dc277c83 - just use diakopters comment on that gist
20:32 arnsholt jnthn: Not the lack of panic actually, but the "regex assertion not terminated by angle bracket" when the arg is a variable
20:33 jnthn oh...
20:33 jnthn I think that's NQP limitation
20:33 arnsholt I need to pass in a variable (to something other than panic, but I didn't want to stuff all of the Python grammar in there)
20:33 jnthn Pretty sure the parens form work
20:33 jnthn <.panic($x)> # should be ok
20:33 arnsholt Oh, parens. Durr. Thanks =)
20:35 masak look, adding ∅ (U+2205 EMPTY SET) makes nice people on Twitter make fun of us! https://twitter.com/stevanlittle/status/384721397462728704 :(
20:36 lizmat is that a reason not to do it ?
20:37 benabik Doing anything makes people on Twitter make fun of you.  (ftfy)
20:37 arnsholt It's a reason to be a bit disappointed, certainly
20:37 BenGoldberg rn: my \term:<∞> = Inf; say ∞;
20:37 camelia niecza v24-95-ga6d4c5f: OUTPUT«Inf␤»
20:37 camelia ..rakudo 458880: OUTPUT«===SORRY!===␤No such method 'ast' for invocant of type 'NQPMu'␤»
20:37 masak lizmat: well, I would be less sad about it if the addition didn't mirror my own feelings quite well...
20:38 masak s/the addition/the criticism/
20:38 ingy (APL COMPATABILITY)++
20:38 timotimo i bet they were never really nice to begin with
20:39 jnthn masak: When we have Unicode versions of all the other set ops in place, complaining about adding one extra term seems a little silly.
20:39 ingy children of \.ers
20:39 jnthn masak: Not to mention this is just Rakudo catching up with something Niecza added a while back, iiuc.
20:39 lue this is the moral I learned from that twitter link masak posted:
20:39 masak jnthn: and the spec catching up with the implementations.
20:39 lue r: sub prefix:<‽>($a) { !?$a }; say ‽True
20:39 camelia rakudo 458880: OUTPUT«False␤»
20:39 benabik timotimo++
20:39 jnthn masak: That's also normal here.
20:40 masak jnthn: yes, I am grumpy. and irrational.
20:40 lue (that is to say, we should have an interrobang symbol :P)
20:40 jnthn masak: Point to me where the spec says anything about Promise and Channel :)
20:40 BenGoldberg ++lue
20:40 BenGoldberg :)
20:41 lue Also, that conversation reminded me to sometime learn APL and create a parser for it in Perl 6 (or rather NQP after reading those slides :) ...)
20:41 masak lue: learning J or K these days looks like a better investment of your time.
20:41 masak lue: but maybe APL qualifies as "historically interesting".
20:42 lue Probably. But yes, the whole "APL came from a time where ASCII wasn't the standard character set" interests me a bit.
20:43 masak well, it's an interesting thought experiment, for sure.
20:43 bbkr joined #perl6
20:43 bbkr rn: my $b = bag "red" => 1, "blue" => 100000; $b.roll(8).say'
20:43 camelia rakudo 458880: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Z7954MR_91â�¤Two terms in a rowâ�¤at /tmp/Z7954MR_91:1â�¤------> [32m" => 1, "blue" => 100000; $b.roll(8).say[33mâ��[31m'[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix stopp…»
20:43 camelia ..niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0m��Confused at /tmp/soto5skadE line 1:�------> [32m" => 1, "blue" => 100000; $b.roll(8).say[33m�[31m'[0m��Parse failed��»
20:43 lue .oO(I should also code an interface to the Perl 6 SNUSP module I have lying around and release it.)
20:43 bbkr rn: my $b = bag "red" => 1, "blue" => 100000; $b.roll(8).say
20:44 camelia rakudo 458880: OUTPUT«"blue" => 100000 "blue" => 100000 "blue" => 100000 "blue" => 100000 "blue" => 100000 "red" => 1 "blue" => 100000 "blue" => 100000␤»
20:44 camelia ..niecza v24-95-ga6d4c5f: OUTPUT«blue     100000 blue     100000 red      1 red   1 red   1 red   1 blue  100000 blue     100000␤»
20:44 jnthn FROGGS: Did your cclass zerowidth patch make it in?
20:44 lue s/interface/script to utilize the module externally/
20:44 FROGGS jnthn: didn't pushed it yet I think
20:44 jnthn k
20:44 jnthn FROGGS: If you do, to curless branch is nice :)
20:44 jnthn *cursless
20:45 lizmat bbkr: you initialized the bag with 2 pairs
20:45 bbkr lizmat: I was following http://perl6advent.wordpress.com/2012/12/13/day-13-bags-and-sets/
20:45 lizmat you probably want new-fp (new from pairs)
20:45 colomon bbkr: that is obsolete
20:46 colomon rn: my $b = ("red" => 1, "blue" => 100000).Bag; $b.roll(8).say
20:46 camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«blue blue blue blue blue blue blue blue␤»
20:46 dalek nqp/cursless: 1c3c183 | (Tobias Leich)++ | src/vm/parrot/QAST/Compiler.nqp:
20:46 dalek nqp/cursless: proper handling of classes an zerowidth
20:46 dalek nqp/cursless:
20:46 dalek nqp/cursless: jnthn++, I am just his commitbot :o)
20:46 dalek nqp/cursless: review: https://github.com/perl6/nqp/commit/1c3c18352b
20:46 lizmat or indeed coerce  :-)
20:46 lizmat colomon++
20:46 colomon lizmat++ # making it work on Rakudo
20:47 bbkr r: my $b = KeyBag.new-fp( "red" => 1, "blue" => 10); $b.roll(8).say
20:47 camelia rakudo 458880: OUTPUT«blue blue blue blue blue blue blue blue␤»
20:47 bbkr r: my $b = KeyBag.new-fp( "red" => 1, "blue" => 10); $b.roll(16).say
20:47 camelia rakudo 458880: OUTPUT«blue red blue blue blue blue blue blue blue blue blue blue blue blue red blue␤»
20:47 lue (It should be obvious, but J and K remove the only fun part about APL: the crazy symbols.)
20:47 lizmat bbkr: colomon's way is probably more ideomatic
20:48 lizmat *idiomatic
20:48 bbkr indeed :) lizmat++ colomon++, thanks for instant help
20:52 masak lue: you jest, but a lot of the fun also comes from being very expressive with ad-hoc data.
20:53 lue of course. I just happen to really really like the Unicode bonus APL gives me :)
20:57 lue I'm decided. My first project on NQP post-slides is an APL interpreter.
20:57 * FROGGS .oO( ... and so was APLish born )
20:59 iSlug joined #perl6
20:59 lue :)
21:00 masak future etymologists will list "NQP implementation of" as one of the possible meanings of -ish
21:00 lue (have yet to get to Exercise 4; other non-programming projects are occupying me atm)
21:00 * lue &
21:00 timotimo .o( rakudish ... )
21:01 FROGGS can't parse the term "other non-programming projects" :P
21:01 * FROGGS .oO( radish? )
21:03 lizmat hmmmm…..radish
21:05 diakopter masak: I'm not sure patch or stevan were making fun of us
21:06 lizmat r: my @a; say @a.of  # shouldn't this be Any ?
21:06 camelia rakudo 458880: OUTPUT«(Mu)␤»
21:06 lizmat r: my %a; say %a.of  # shouldn't this be Any ?
21:06 camelia rakudo 458880: OUTPUT«(Mu)␤»
21:06 lizmat r: my $a; say $a.of  # shouldn't this be Any ?
21:06 camelia rakudo 458880: OUTPUT«No such method 'of' for invocant of type 'Any'␤  in block  at /tmp/lhA8mMfGHd:1␤␤»
21:07 lizmat r: my $a; say $a.VAR.of  # shouldn't this be Any ?
21:07 camelia rakudo 458880: OUTPUT«(Mu)␤»
21:07 jnthn No
21:07 jnthn The constraint type is Mu
21:07 jnthn Any is just the default
21:07 jnthn r: my $a = Mu; # works
21:07 camelia rakudo 458880: ( no output )
21:07 jnthn timotimo: Hm, interesting problem is interesting...
21:07 jnthn (with ident)
21:11 timotimo i'm glad
21:11 lizmat jnthn++ for setting me straight  :-)
21:13 FROGGS nqp: say('a:' ~ ("'" ~~ /<?[']>/)); say('b:' ~ ("'" ~~ /<?[\']>/)) # is that weird or is it just me?
21:13 camelia nqp: OUTPUT«a:␤b:'␤»
21:15 timotimo if it aint ascii, you quote it, no?
21:15 masak diakopter: I think they are, but lightly. which is fine.
21:15 masak diakopter: I wouldn't have bothered if I had any love for ∅.
21:16 FROGGS timotimo: both should say nothing IMO
21:16 timotimo oh, because they are lookahead, right?
21:16 FROGGS right
21:16 timotimo oops! :)
21:17 lizmat rn: say ∅
21:17 camelia niecza v24-95-ga6d4c5f: OUTPUT«set()␤»
21:17 camelia ..rakudo 458880: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/gRlQIAU8m5â�¤Two terms in a rowâ�¤at /tmp/gRlQIAU8m5:1â�¤------> [32msay [33mâ��[31m∅[0mâ�¤    expecting any of:â�¤        argument listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤        postfixâ�¤     …»
21:18 lizmat rakudo still has TTIAR for ∅, so we're not there yet
21:18 timotimo hm, what is ttiar again? this thing is almost running? :P
21:18 masak timotimo: Two Terms. In a Row.
21:19 lizmat A Row even
21:19 timotimo oh, duh, yes
21:19 masak timotimo: it's like a crash blossom for source code. :)
21:19 timotimo crash blossoms fall?
21:19 FROGGS ahh
21:20 FROGGS timotimo: the <?[\']> case is fixed loally
21:20 FROGGS locally*
21:20 masak timotimo: "Infant pulled from wrecked car
21:20 masak involved in short police pursuit"
21:20 masak timotimo: http://languagelog.ldc.upenn.edu/nll/?p=4441
21:20 FROGGS then I don't understand why one rule fails...
21:21 timotimo that's funny :)
21:22 masak language log rocks.
21:24 jnthn r: (112,114,111,116,111)>>.chr.join
21:24 camelia rakudo 458880: ( no output )
21:24 jnthn r: (112,114,111,116,111)>>.chr.join.say
21:24 camelia rakudo 458880: OUTPUT«proto␤»
21:25 timotimo proto? but that's super old!
21:25 jnthn heh, just reading NFAs by hand here :P
21:25 FROGGS jnthn: you need tools for that?
21:26 timotimo doesn't seem like he needs anything but the chr method
21:26 masak and an evalbot :)
21:26 timotimo r: (112,114,111,116,111).chrs
21:26 camelia rakudo 458880: OUTPUT«No such method 'chrs' for invocant of type 'Parcel'␤  in block  at /tmp/S2TFFY5voP:1␤␤»
21:26 * FROGGS .oO( his own unicode database will be delivered on next monday )
21:26 jnthn ergh
21:26 timotimo there's .ords, but no .chrs? ;)
21:27 jnthn FROGGS: No, I've memorized the action codes
21:27 jnthn FROGGS: Just checking I got my ascii table right
21:27 jnthn I think timotimo++'s/diakopter++'s thing was right
21:27 jnthn (for ident)
21:27 jnthn This regex with --target=ast shows the issue: /[ | foo :s bar | baz ]/
21:27 FROGGS does it actually work now?
21:27 jnthn That :s is spreading to the |
21:28 jnthn The ident addition busts the build
21:28 timotimo but there is no :s?
21:28 jnthn But it does so because it exposes another bug
21:28 timotimo ah, that's good to know
21:28 FROGGS :S
21:28 jnthn Somehow that :s affects the other branch of the alternation. I'm guessing it shouldn't.
21:29 FROGGS yay, only 570 lines to go!
21:29 diakopter trying to encode :s in the nfa?
21:29 diakopter FROGGS: no, it's :S
21:30 diakopter er, :s
21:30 jnthn No
21:30 FROGGS I know, mine was a 'smiley'
21:30 jnthn In the regex I pasted, the :s applies to the baz too somehow
21:30 jnthn This is what makes regex end up with a zero length prefix
21:30 jnthn Which sorts it below term:sym<name>
21:32 FROGGS that is fun... can we do these regexathons every monday now?
21:33 jnthn It appears that STD does the "same"
21:33 jnthn But it would not put sigspace there.
21:34 jnthn 'cus of the updated semantics.
21:35 FROGGS ha, so he just worked around it? :P
21:36 jnthn Well, more like this use case wouldn't have hit the issue
21:36 jnthn yeah, build finishes now
21:36 timotimo yaaaaay
21:37 jnthn And kills a handful more cursors off
21:37 timotimo that has been driving me crazy all day now
21:37 timotimo thank you for applying your smarts :)
21:37 jnthn yeah, it wasn't an easy find.
21:37 * FROGGS .oO( ... for a human )
21:37 jnthn Lemme try Rakudo against it now
21:37 * diakopter sends fantastical dollars your way
21:39 jnthn aww, fail
21:40 jnthn Fails building NQP::world
21:40 jnthn oh, I can guess...
21:40 timotimo aaw crud
21:40 diakopter ?
21:42 jnthn I probably should run the NQP test suite...
21:42 diakopter well what was the fix
21:42 diakopter push?
21:42 lowpro30 joined #perl6
21:42 jnthn diakopter: Oh, to get the NQP build to complete? A carefully placed :!s :)
21:43 jnthn The next issue, though, is breaking nqp::ops
21:43 diakopter smells like a workaround
21:43 timotimo that seems more like a lazy workaround
21:43 jnthn Well, yeah, 'cus the real answer is "redo sigspace"
21:43 jnthn Which is probably a couple of days of work.
21:43 diakopter pmichaud: *poke*
21:44 jnthn dammit, test fails...
21:44 timotimo oh noes :(
21:44 diakopter what needs redone about sigspace?
21:44 diakopter deeper integration?
21:45 jnthn diakopter: No, the spec changed a while back
21:46 jnthn bah, of all the things to fail...
21:46 jnthn 05-comments.t, 11-sub.t...
21:46 timotimo m)
21:46 diakopter "identification, please."  "here you go." "looks good. identification, please."
21:47 masak the benefits of statelessness!
21:47 diakopter "man without a country"
21:50 dalek nqp: 1ee57de | Mouq++ | docs/qast.markdown:
21:50 dalek nqp: Docs typo fix
21:50 dalek nqp: review: https://github.com/perl6/nqp/commit/1ee57de4b3
21:50 jnthn std: sub() { }
21:50 camelia std 7c17586: OUTPUT«[31m===[0mSORRY![31m===[0m�Word 'sub' interpreted as 'sub()' function call; please use whitespace around the parens at /tmp/jrP0rensuu line 1:�------> [32msub[33m�[31m() { }[0m�Unexpected block in infix position (two terms in a row) at /tmp/jrP0rensuu lin…»
21:50 jnthn hah
21:50 jnthn We parse fail *correctly*.
21:51 timotimo we didn't before? and that causes the test to break now?
21:51 jnthn The test is
21:51 jnthn say( (nqp::isinvokable(sub() {}) ?? 'ok 13' !! 'no 13' ) ~ '  nqp::isinvokable on sub');
21:51 timotimo hehehe
21:51 jnthn std: say( (nqp::isinvokable(sub() {}) ?? 'ok 13' !! 'no 13' ) ~ '  nqp::isinvokable on sub');
21:51 camelia std 7c17586: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse argument list at /tmp/sdWZlDXJV8 line 1:â�¤------> [32msay( (nqp::isinvokable[33mâ��[31m(sub() {}) ?? 'ok 13' !! 'no 13' ) ~ '  [0mâ�¤Couldn't find final ')'; gave up at /tmp/sdWZlDXJV8 line 1:â�¤------> [32msay( (nqp::…»
21:51 timotimo i made something work better! :D
21:51 jnthn Still some more tests to look at yet
21:52 jnthn 70-invokespec.t is guility of the exact same
22:09 benabik joined #perl6
22:10 telex joined #perl6
22:11 dalek nqp/cursless: 2e7ed82 | jnthn++ | t/nqp/ (2 files):
22:11 dalek nqp/cursless: Fix a couple of bits of busted syntax in tests.
22:11 dalek nqp/cursless:
22:11 dalek nqp/cursless: This was OK before, but is not valid Perl 6 and we get caught out when
22:11 dalek nqp/cursless: ident LTMs properly.
22:11 dalek nqp/cursless: review: https://github.com/perl6/nqp/commit/2e7ed82fff
22:11 dalek nqp/cursless: 1ecd1bd | jnthn++ | src/NQP/Grammar.nqp:
22:11 dalek nqp/cursless: Prevent sigspace leakage.
22:11 dalek nqp/cursless:
22:11 dalek nqp/cursless: Won't be needed after sigspace changes to get up to latest spec are
22:11 dalek nqp/cursless: done.
22:11 dalek nqp/cursless: review: https://github.com/perl6/nqp/commit/1ecd1bde15
22:11 dalek nqp/cursless: 9fcad7d | jnthn++ | src/NQP/Grammar.nqp:
22:11 dalek nqp/cursless: Re-order for correct LTM tie-break.
22:11 dalek nqp/cursless: review: https://github.com/perl6/nqp/commit/9fcad7d9e1
22:11 dalek nqp/cursless: 8019527 | jnthn++ | src/QRegex/NFA.nqp:
22:11 dalek nqp/cursless: Treat ident declaratively.
22:11 dalek nqp/cursless:
22:11 dalek nqp/cursless: timotimo++ and diakopter++
22:11 dalek nqp/cursless: review: https://github.com/perl6/nqp/commit/801952727d
22:11 jnthn I've good news and bad.
22:11 timotimo the bad first
22:11 timotimo so that you'll end it on a high note
22:11 jnthn The bad news is that we were already re-defining ident in Rakudo's grammar ourselves so it did get LTM semantics, so this change made no difference.
22:12 jnthn To Rakudo, that is. NQP, we saved some more Cursors :)
22:12 timotimo but the good news is we can totally remove that redefinition now and get a bit more efficiency?
22:12 jnthn The good news is that...yes, that. Working on a number.
22:12 TimToady nr: [112,114,111,116,111].chrs
22:12 camelia rakudo 458880, niecza v24-95-ga6d4c5f: ( no output )
22:12 TimToady nr: [112,114,111,116,111].chrs.say
22:12 camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«proto␤»
22:12 timotimo i was wondering how it would be able to have an override for ident
22:12 timotimo looking at the way the if works i don't see it checking if the ident refers to what the original cursor implemented
22:12 jnthn You can define it
22:13 grondilu rn: class Foo { method talk { say "hi" }; method talk-more { &.talk() xx 10 } }; Foo.talk-more
22:13 camelia niecza v24-95-ga6d4c5f: ( no output )
22:13 camelia ..rakudo 458880: OUTPUT«hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤»
22:13 TimToady I guess we want a .chrs in Any
22:13 timotimo i agree, TimToady
22:13 jnthn r: say 1785550 - 1732153
22:13 camelia rakudo 458880: OUTPUT«53397␤»
22:13 TimToady or something more generic than Array
22:14 jnthn timotimo: So, 53,000 less Cursor allocations :)
22:14 jnthn (in CORE.setting)
22:14 timotimo only from the ident change?
22:14 TimToady r: say 0x2202.chrs
22:14 camelia rakudo 458880: OUTPUT«No such method 'chrs' for invocant of type 'Int'␤  in block  at /tmp/I2azVqzrOp:1␤␤»
22:14 jnthn timotimo: yeah
22:14 jnthn timotimo: 'cus it also then called <.alpha>
22:14 jnthn timotimo: And 'cus the built-in one knows how to cheat with the fail cursor.
22:14 jnthn I think it does, anyway...
22:15 timotimo but ... i thought you said it had already been getting LTM NFA stuff?
22:15 jnthn yes, but it still gets called when it matches
22:15 timotimo ah
22:15 timotimo ah and the old one was calling .alpha
22:15 timotimo yeah, i can see how that helps
22:15 jnthn Yeah
22:15 timotimo cool beans :)
22:15 jnthn But I want to do a bit more analysis on why we still hit identifier so much
22:15 jnthn I'm wondering if there's a little more going on.
22:15 timotimo how about apostrophe?
22:16 timotimo is that still >50k?
22:16 diakopter timotimo: you might do some research to figure out what other things are causing nfa construction to abort
22:16 timotimo moi?
22:16 masak won't the visual similarity between .chars and .chrs be confusing?
22:16 timotimo hmm
22:16 jnthn 52521   apostrophe
22:16 timotimo let's call it tochrs or 2chrs instead! :P
22:16 diakopter I already don't know the difference
22:16 masak :(
22:17 timotimo jnthn: does it sound like a good idea to inline apostrophe?
22:17 diakopter inline akk the things
22:17 timotimo sounds good idea am rite?!
22:17 lue (FWIW, I always thought .chars was ambiguous to begin with)
22:17 FROGGS .graphemes?
22:18 TimToady let's fix the ambiguity between Mr. and Mrs while we're at it
22:18 FROGGS of all ppl?
22:18 timotimo you of all people?!
22:18 diakopter well, there's my mistress, and their Mistress, and then of course their HeadMistress
22:19 jnthn timotimo: Well, label is the next thing I want to understand more about
22:19 timotimo good idea.
22:19 jnthn token label {
22:19 jnthn :my $label;
22:19 jnthn <identifier> ':' <?before \s> <.ws>
22:19 jnthn }
22:19 timotimo also, i think fatarrow is getting called much more often than it should
22:20 jnthn So, <identifier> should, afaict, be declarative. And ':' sure as heck is.
22:20 diakopter <TRULYWHITEspace>
22:20 FROGGS r: say 1771917 - 1685599
22:20 camelia rakudo 458880: OUTPUT«86318␤»
22:20 timotimo should i make a measurement of nqp and rakudo-nom with only the analysis, but none of the improvements?
22:21 timotimo to get a grand total of cursors spared?
22:21 dalek rakudo/cursless: 3197a66 | jnthn++ | src/Perl6/Grammar.nqp:
22:21 dalek rakudo/cursless: Indentation fix.
22:21 dalek rakudo/cursless: review: https://github.com/rakudo/rakudo/commit/3197a664ee
22:21 dalek rakudo/cursless: b3ed16e | jnthn++ | src/Perl6/Grammar.nqp:
22:21 dalek rakudo/cursless: Remove our own hack ident definition.
22:21 dalek rakudo/cursless:
22:21 dalek rakudo/cursless: The real thing LTMs proper now; timotimo++.
22:21 dalek rakudo/cursless: review: https://github.com/rakudo/rakudo/commit/b3ed16ea91
22:21 FROGGS timotimo: that would be nice indeed
22:21 jnthn timotimo: I know that number for NQP, but yeah, for Rakudo it's worth it
22:21 timotimo will do.
22:22 jnthn Current NQP standing is:
22:22 jnthn r: say 284742 - 187149
22:22 FROGGS does anybody had run a spectest with this branch?
22:22 camelia rakudo 458880: OUTPUT«97593␤»
22:22 timotimo about a third, yeah? pretty decent
22:22 jnthn FROGGS: No :)
22:22 timotimo we wouldn't dare try :P
22:22 FROGGS hehe, me neither... well, twice just the first ten tests
22:22 jnthn make test passes, fwiw
22:24 * jnthn tries a ballsy hack in MARKER
22:26 timotimo oh no, the nqp bump moritz did makes it not work immediately
22:27 timotimo now i can do it.
22:28 FROGGS r: 1771917 - 1685593 # another 7! \o/
22:28 camelia rakudo 458880: ( no output )
22:28 FROGGS r: say 1771917 - 1685593 # another 7! \o/
22:28 camelia rakudo 458880: OUTPUT«86324␤»
22:28 timotimo just 7?
22:28 FROGGS yeah
22:28 timotimo 7 instances of begin removed causing 86k cursors removed?
22:29 FROGGS note: I have not pulled in jnthn's changed
22:29 timotimo you totes should, it has my changes in it, too :)
22:30 FOAD joined #perl6
22:30 jnthn ooh
22:30 timotimo parsing almost done
22:31 jnthn The MARKER thing maybe will work out
22:31 timotimo will it cause more than just a huge reducement in cursors?
22:31 jnthn r: 187149 - 172424
22:31 camelia rakudo 458880: ( no output )
22:31 jnthn r: say 187149 - 172424
22:31 camelia rakudo 458880: OUTPUT«14725␤»
22:31 jnthn Got rid of that many more in NQP.nqp compilation
22:31 timotimo sweet! :)
22:32 jnthn Meaning we're now > 100,000 Cursor allocations reduced there
22:32 timotimo out of 280_000 or something, right?
22:32 timotimo TOTAL: 2196370
22:32 jnthn r: say 172424 / 284742
22:32 timotimo that's core.setting before any of our work
22:32 camelia rakudo 458880: OUTPUT«0.6055447␤»
22:32 jnthn wow
22:33 timotimo when froggs merges your changes, jnthn, he'll have a very good number i'm sure
22:33 jnthn yeah
22:33 jnthn I'm about to have a new number here, I think
22:33 FROGGS I am merging already, and preparing my commit
22:34 jnthn 1640897
22:34 timotimo that's like a quarter!
22:34 jnthn r: say 2196370 - 1640897
22:34 camelia rakudo 458880: OUTPUT«555473␤»
22:34 jnthn So, we've shaved half a million Cursor allocations off CORE.setting compilation so far. :) *before* FROGGS++'s changes
22:36 dalek nqp/cursless: 30b5b18 | jnthn++ | src/HLL/Grammar.nqp:
22:36 dalek nqp/cursless: Save a ton of CURSOR allocations in MARKER.
22:36 dalek nqp/cursless: review: https://github.com/perl6/nqp/commit/30b5b18723
22:36 dalek std: 22ba881 | larry++ | STD.pm6:
22:36 dalek std: don't use LTM stopper before {N,M}
22:36 dalek std: review: https://github.com/perl6/std/commit/22ba881123
22:36 dalek std: 4cde04e | larry++ | STD.pm6:
22:36 dalek std: each alternative gets its own %*RX
22:36 dalek std: review: https://github.com/perl6/std/commit/4cde04ef10
22:37 masak 'night, #perl6
22:37 timotimo 'night masak
22:37 TimToady nghts :)
22:38 FROGGS okay, building again
22:38 FROGGS gnight masak
22:40 jnthn Of course, the big win would be doing something about this:
22:40 jnthn 320860  ws
22:41 jnthn Lemme try something...
22:41 TimToady we need token macros :)
22:41 diakopter or the sufficiently smart optimizer!
22:41 diakopter ... which, speaking of which, someone needs to ask the sufficiently smart programmer to write
22:42 timotimo hm. even with the logging disabled, i get no faster parse
22:43 FROGGS TOTAL: 1633781
22:44 FROGGS so my stuff only makes about 5k ? :o(
22:44 FROGGS maybe not even that
22:44 timotimo all of your stuff combined?
22:44 dalek rakudo/cursless: ee45039 | (Tobias Leich)++ | src/Perl6/Grammar.nqp:
22:44 dalek rakudo/cursless: changed 66 <?before ...> to <?[...]>
22:44 dalek rakudo/cursless: review: https://github.com/rakudo/rakudo/commit/ee45039414
22:44 diakopter well, jnthn might've stolen them
22:44 FROGGS yeah, maybe
22:46 jnthn um
22:46 diakopter what :)
22:46 FROGGS O.o
22:46 * FROGGS hopes he did nothing wrongish
22:46 jnthn my stupid ws optimization seems to have survived CORE.setting and helped
22:47 timotimo it was stupid in what way? :)
22:47 FROGGS phew
22:47 jnthn r: say 1640897 - 1409278
22:47 camelia rakudo 458880: OUTPUT«231619␤»
22:47 jnthn timotimo: "too simple to work" :P
22:47 diakopter the full-blown ws could definitely be inlined in nfa if it's not already
22:47 timotimo i thought nfa just recurses into everything anyway?
22:47 jnthn diakopter: ws is non-declarative 'cus ww is
22:48 timotimo oh
22:48 diakopter well we can make it optional.
22:48 * TimToady wonders if <?[s]> is constructing a new cclass every time
22:48 TimToady it might actually be slower than <?before \s>
22:49 TimToady certainly less readable; maybe a better approach is to optimize away the before cursor somehow
22:49 diakopter jnthn: but why not make non-declarative portions of things cause the nfa to abort out of otherwise declarative things
22:49 diakopter because some pathways of those things *are* declarative fully
22:50 jnthn TimToady: I know it's more optimal in Rakudo; there's no "new cclass every time" here :)
22:51 TimToady okay, but it's still less readable, methinks
22:52 TimToady diakopter: we generally want ws to stop LTM for human engineering reasons
22:52 timotimo we're down to about 3 cursors per character in the core.setting
22:52 diakopter timotimo: yeah, that needs to be about 1/10-1/100 that
22:52 jnthn Less than now, with the ws opt
22:52 timotimo :)
22:53 timotimo oh wow 230k?
22:53 diakopter timotimo: why
22:53 diakopter er
22:53 diakopter TimToady: why
22:53 TimToady because most programmers are human?
22:54 diakopter I mean, what ar ethe reasons
22:54 TimToady and expect "token" ≅ "word"
22:54 diakopter I can't read this "boxed question mark" lingo
22:55 FROGGS .u ≅
22:55 yoleaux U+2245 APPROXIMATELY EQUAL TO [Sm] (≅)
22:56 timotimo now all we need to see is if it gives us any memory improvements at all
22:56 timotimo hey, i wonder if the same treatment would help generate the perl6docs
22:56 berekuk joined #perl6
22:56 timotimo with less than thousands of gigs of ram being needed
22:56 diakopter TimToady: okay, but what if we could do NFA for purposes other than LTM semantics
22:56 FROGGS timotimo: that might be  good testcase
22:57 jnthn git st
22:57 jnthn uh..
22:57 FROGGS ww
22:58 FROGGS nothing to stash here buddy :o)
22:58 diakopter COMMAND NOT FOUND
22:58 BenGoldberg joined #perl6
22:58 FROGGS timotimo had to reply: "did you meant..."
22:58 dalek rakudo/cursless: d828773 | jnthn++ | src/Perl6/Grammar.nqp:
22:58 dalek rakudo/cursless: Special-case ws to check MARKER in a method.
22:58 dalek rakudo/cursless:
22:58 dalek rakudo/cursless: This saves creating a Cursor object and messing with highexpect in any
22:58 dalek rakudo/cursless: call where we already did match ws at this position.
22:58 dalek rakudo/cursless: review: https://github.com/rakudo/rakudo/commit/d8287730f9
22:59 jnthn I have a git st alias which is actually for status :)
22:59 FROGGS ahh
23:00 diakopter TimToady: I mean, what if we could do NFA in all the general cases except fall back in case of non-declarative path taken
23:00 tadzik git purr is my favourite
23:00 diakopter git STable
23:03 FROGGS hmmm, my rakudo "parsed" in 151s right now, which is about 10s better than nom I think
23:03 timotimo i would really like to see the proportion of action methods vs parsing
23:03 timotimo as in: time spent in each part
23:04 FROGGS TOTAL: 1319969
23:05 timotimo 1327916 is not bad, eh? :)
23:05 timotimo oh you have even less :)
23:05 FROGGS hehe, yeah
23:13 * jnthn as 1328148 with latest pull
23:13 diakopter break 6 digits!
23:13 diakopter tomorrow! :)
23:13 timotimo that would be very cool.
23:13 grondilu /quit/quit
23:14 diakopter /quit/quit/quit
23:14 timotimo /bin/quit
23:15 BenGoldberg C:\Program Files\quit.exe
23:16 timotimo C:\Dokumente und Einstellungen\timo\Saved Games\quitsim2000\bin\game.exe
23:17 diakopter u must have a virus
23:17 diakopter install mcafee 95
23:17 BenGoldberg Does the German version of Windows really use "Dokumente und Einstellungen" instead of "Documents and Settings"?  That's funny
23:17 timotimo yes, it does.
23:17 timotimo but both things kind of exist
23:17 timotimo they have something very strange in place.
23:18 timotimo it's very hard to get an actual look at what the file system actually is like
23:18 BenGoldberg Why?  Too many symbolic links?
23:18 timotimo there's so much crazy stuff in there. like suddenly a file that you see right in front of you doesn't exist because of some 64bit/32bit differences between explorer and cmd.exe or something
23:19 BenGoldberg Oh, so the files exist, but you can't see some of them
23:19 * BenGoldberg thinks, "Secret Invisible Files."
23:19 BenGoldberg :)
23:19 timotimo sometimes, sometimes the other way around
23:19 timotimo like, you see a file that doesn't exist
23:20 BenGoldberg ?
23:20 timotimo with a 64bit application, the file is there, with a 32bit application it's gone
23:21 BenGoldberg Well, presumably such a file *is* there, in the file system.  But to the 32bit program, it's invisible.  Not nonexistant.
23:21 timotimo and if you're in C:\Programme\ (or C:\Program Files\) and you write to some file, you'll get an overlay in your user's home directory that you're accessing really
23:22 BenGoldberg Your computer has been infected with the plan9 file system?
23:22 BenGoldberg :)
23:22 timotimo no, in plan9 that shit is super cool
23:23 timotimo in windows it's just WTF
23:24 BenGoldberg I've never actually used plan9... what happens when you create a file in a directory which is actually several directories "mount"ed together?
23:24 timotimo don't ask me, i don't know either :(
23:26 BenGoldberg Maybe the same thing as on Windows.
23:26 timotimo you get horribly confused? ;)
23:26 FROGGS rakudo builds at least 10s faster here
23:27 timotimo out of 130s?
23:27 FROGGS out of 160s
23:27 timotimo oh
23:27 timotimo not a huge win, but we'll definitely take what we can get
23:27 FROGGS ohh, I think that is a huge win for a day
23:28 timotimo most things we do are basically "a day of work", just takes weeks to months to either get around to it or get the idea
23:28 dalek rakudo/cursless: b9bebcc | (Tobias Leich)++ | src/Perl6/Grammar.nqp:
23:28 dalek rakudo/cursless: unbust S02-lexical-conventions/unspace.t
23:28 dalek rakudo/cursless: review: https://github.com/rakudo/rakudo/commit/b9bebcca25
23:29 FROGGS jnthn: can you explain what the difference of this commit is?
23:30 jnthn <?[\s'#']>
23:31 jnthn That is a char class that includes the char '
23:31 jnthn :)
23:31 FROGGS jnthn: I tried is as <?[\s#]> too without luck
23:31 FROGGS do I need to escape it instead?
23:31 jnthn I guess that is a comment
23:31 timotimo \# will tell you about an unallowed unspace
23:31 jnthn \# may do it, yeah
23:32 timotimo iirc
23:32 jnthn r: /<?[\s\#]>/
23:32 camelia rakudo 458880: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5Uhj72DfYz�Unspace not allowed in regex�at /tmp/5Uhj72DfYz:1�------> [32m/<?[\s\#[33m�[31m]>/[0m�»
23:32 jnthn hm, yeah
23:32 timotimo did you get to look at label?
23:33 jnthn no, I won't tonight, very tired
23:33 timotimo that's all right
23:33 Mouq std: /<?[\s\#]>/
23:33 FROGGS me too
23:33 camelia std 4cde04e: OUTPUT«ok 00:00 43m␤»
23:33 jnthn I probably need to go read more NFAs.
23:33 Mouq :p
23:33 timotimo oh my :|
23:33 jnthn To find out why they're Not F... Awesome :)
23:33 benabik joined #perl6
23:35 Mouq Well, just change nqp/src/QRegex/P6Regex/Grammar.nqp token backslash:sym<unsp> { [\s|'#'] …} to …[\s|'#'\`]…
23:36 Mouq In the cursless branch or whatever, as a quick fix
23:36 timotimo jnthn: any clue how we can trick the parrot profiler into telling us how much time is spent where in parsing and the action methods, rather than executing the program?
23:38 FROGGS r: /<?before \s|'#' >/ # this works
23:38 camelia rakudo 458880: ( no output )
23:39 TimToady Mouk: \# without ` is a valid unspace
23:39 TimToady just line-ending comment instead of embedded
23:39 Mouq I know, I was telling them to cheat while I figure out how to get it working properly :)
23:39 fridim_ joined #perl6
23:40 FROGGS Mouq: it is more about reverting than to about cheating :o)
23:41 timotimo FROGGS: have you run a full spectest? otherwise i can totally do that now.
23:42 FROGGS timotimo: I am about to, but also have local changes
23:42 timotimo ok
23:43 dalek rakudo/cursless: 3ba49a4 | (Tobias Leich)++ | src/Perl6/Grammar.nqp:
23:43 dalek rakudo/cursless: back to <?before> style when # is involved
23:43 dalek rakudo/cursless: review: https://github.com/rakudo/rakudo/commit/3ba49a4142
23:43 Mouq std: /<+([a]+[b])+[c]>/
23:43 camelia std 4cde04e: OUTPUT«ok 00:00 43m␤»
23:43 Mouq r: /<+([a]+[b])+[c]>/
23:43 camelia rakudo 458880: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter < (must be quoted to match literally)�at /tmp/FDMD8zxWo_:1�------> [32m/<+[33m�[31m([a]+[b])+[c]>/[0m�Unrecognized regex metacharacter + (must be quoted to match literally)�at /tmp/FDMD8zxWo_:…»
23:43 jnthn timotimo: Not off hand...short of running with parrot directly and passing in the profile flag
23:43 timotimo oof
23:44 timotimo i don't even know how to.
23:44 TimToady n: /<+([a]+[b])+[c]>/
23:44 camelia niecza v24-95-ga6d4c5f: ( no output )
23:45 FROGGS okay, I'm running a spectest now, only local modification is stripped leading {} in nqp's quant:{N,M}
23:45 FROGGS but I think I go looking for my pillow
23:45 TimToady n: say 'abcde' ~~ /<+([a]+[b])+[c]>+/
23:45 camelia niecza v24-95-ga6d4c5f: OUTPUT«「abc」␤␤»
23:45 TimToady niecza++
23:46 Mouq niecza++ indeed
23:47 FROGGS gnight
23:47 TimToady o/
23:48 Mouq night FROGGS
23:48 Mouq #perl6++
23:49 timotimo wow, this spectest run is very fast
23:50 timotimo it just gives "no subtests run" for almost every file
23:50 TimToady cool!
23:50 timotimo why aren't we doing this all the time? we could totally do a full spectest run per commit like this!
23:50 TimToady dunno, seems like a no-brainer
23:51 * jnthn needs sleep
23:51 jnthn 'najt, #perl6
23:51 TimToady \o
23:52 Mouq r: say '   #' ~~  /<[\s'#']>/
23:52 camelia rakudo 458880: OUTPUT«「 」␤␤»
23:52 Mouq r: say '   #' ~~  /<[\s'#']>*/
23:52 camelia rakudo 458880: OUTPUT«「   #」␤␤»
23:53 Mouq r: say '   #' ~~  /<?[\s'#']><[\s'#']>*/
23:53 camelia rakudo 458880: OUTPUT«「   #」␤␤»
23:53 Mouq r: say '#   #' ~~  /<?[\s'#']><[\s'#']>*/
23:53 camelia rakudo 458880: OUTPUT«「#   #」␤␤»
23:53 Mouq Wait, so what's the problem?
23:53 timotimo t/spec/S26-documentation/06-lists.t .......................... Failed 35/39 subtests
23:53 timotimo oh no! :(
23:54 Mouq night jnthn
23:54 timotimo haha
23:54 timotimo it errors out because it can't find v6 anywhere
23:55 timotimo that amuses me.
23:55 TimToady r: say "' #" ~~ /<?[\s'#']><[\s'#']>*/
23:55 camelia rakudo 458880: OUTPUT«「' #」␤␤»
23:56 TimToady note it matches the '
23:57 TimToady r: say "' #" ~~ /<?[\s\#]><[\s\#]>*/
23:58 camelia rakudo 458880: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/RjMvGu6FUJ�Unspace not allowed in regex�at /tmp/RjMvGu6FUJ:1�------> [32msay "' #" ~~ /<?[\s\#[33m�[31m]><[\s\#]>*/[0m�»
23:58 Mouq Oh, bluh, I'm dumb
23:58 TimToady that's a rakudobug
23:58 TimToady n: say "' #" ~~ /<?[\s\#]><[\s\#]>*/
23:58 camelia niecza v24-95-ga6d4c5f: OUTPUT«「 #」␤␤»
23:58 TimToady which niecza++ doesn't share
23:59 TimToady n: say "\\ #" ~~ /<?[\s\#]><[\s\#]>*/
23:59 camelia niecza v24-95-ga6d4c5f: OUTPUT«「 #」␤␤»
23:59 TimToady (just checking :)
23:59 TimToady the inside of [] should not be considered regex language, but cclass language

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

Perl 6 | Reference Documentation | Rakudo