»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
timotimo but beyond that ... character classes and regular matchings just turn into explosions when i try them like that 00:00
oh, perhaps because <? is then treated as "maybe a <"?
desigilname is used when you have something like @$foo? because it matches <?before <.sigil> <.sigil> > <variable>? 00:04
Mouq I've been staring at desigilname for some time trying to figure out what exactly it does :p 00:06
timotimo a :my will not cause the NFA generator to stumble, will it? 00:07
because it *could* be executing code; will the NFA look and see if there is a " = mumble mumble" at the end?
Mouq timotimo: Can you do me a favour and try `perl6 -target=parse -e1` real quick?
timotimo the same error you reported earlier 00:08
Mouq timotimo: k, thanks
timotimo ah. i was about to optimize colonpair, but it only gets called 600 times
there's about 323 actual fat arrows in src/gen/CORE.setting 00:10
but 9575 invocations of that rule 00:11
not really worth it, though
unless i can turn that into -20000 invocations :P
Mouq ':my' is always a call to the MAIN lang
00:12 Psyche^ joined
moritz note that :my is declarative, so it's not exactly a "call" 00:12
timotimo that's good
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?!
but apostrophe is a really simple rule
Mouq How about "':my' is always parsed as a MAIN lang statement 00:14
*<statement>"
moritz yes, sounds accurate
Mouq kk 00:15
timotimo tries to force an LTM so that perhaps an apostrophe call can be skipped
00:15 Psyche^_ left
timotimo no change in apostrophe calls. interesting. 00:18
diakopter hoelzro: ping 00:20
timotimo strange how often morename is attempted: 26_275 times 00:21
dalek nda: 75ae6d6 | moritz++ | lib/Panda/Common.pm:
remove usage of Hash.delete; closes issue 57
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:22
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
moritz so that call of sub if-stuff() isn't misparsed as if -stuff()
timotimo no, only happens inside identifier inside a *-ed list
moritz ok, stupid question 00:24
it looks to me like token identifier should be totally LTMed
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
yeah, i agree. how do we figure out if it's not?
moritz do the calls happen after the LTM match in an attempt to reparse to ge the captures right
timotimo (also, jnthn is hoping to turn <ident> into a builtin for the NFA)
moritz ?
and if so, can we teach it not to do that if there are no captures in the rule?
timotimo: iirc :my shouldn't upset LTM at all 00:26
timotimo yes, and that's good
also, identifier starts 52175 times, apostrophe 52521 times
it seems like it can't get around trying it at least once every time
in my intuition, the fate from the NFA is supposed to eliminate such an invocation, but what do i know? 00:27
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...
timotimo oh? that's a bummer 00:30
moritz doesn't know the difference between fates and the NFA 00:31
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
moritz oh 00:33
and because apostrophe might have an action method, it *must* be called
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
however, using in quantifier is probably a mistake, since '' is a valid quantifier :)
*in that alternation
timotimo TimToady: i will remove that {} and see if anything breaks 00:35
but first i'm comparing timings between cursless+cursless and master+nom
moritz so maybe inlining <.apostrophe> and <.ident> could speed up stuff
timotimo so master+nom gives me about 42.5 seconds for parsing the setting
moritz that's on JVM, right? 00:36
timotimo yes 00:37
i could only dream of such quick parses on parrot
it takes me 120s there
TimToady note that the JIT might be inlining it for you at some point when it notices it's hot
timotimo of course any winnings from reduced cursor allocations could be nullified by the jvms very potent GC
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
oh, perhaps identifier isn't LTM'd past because it has a [ ]* in it? 00:39
moritz but []* is declarative.
timotimo this measurement of parsing took 42.15 seconds; either that's noise or a little winning
ah, so it is.
token label is just :my $label; <identifier> ':' <?before \s> <.ws> 00:40
i'm not quite sure i understand why that <?before \s> is there, to be honest
moritz to distinguish it from thing:sym<bla>
which also has <identifier> ':' 00:41
timotimo oh, of course, <.ws> is optional whitespace
can't we turn that into just \s then, though?
timotimo tries 00:42
TimToady but the \s isn't part of the label
moritz no
timotimo : isn't either, is it?
moritz because <.ws> also parses Pod
TimToady well, more than the space :)
timotimo er, sorry
moritz TimToady: that's why it's in a <?before>, no?
timotimo i meant <?before \s> <.ws> into \s <.ws>
also, foo:#=blah is invalid? 00:43
TimToady it's dangerous to assume what <.ws> is going to do with that first whitespace
timotimo so matching \s and then <.ws> can cause unforeseen mayhem?
TimToady most keywords also require a trailing \s
timotimo: potentially 00:44
such as .ws wanting to remember where the start of the whitespace was
which it does, actually
mostly for error reporting 00:45
so your eject can end up in the wrong place
if you match \s explicitly
timotimo well, changing that changes nothing at all in the number of label cursors created
TimToady sure, because <?before> participates in LTM 00:46
timotimo oh
well, that's good then
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.
r: say 1732692 / 17829.81 00:49
camelia rakudo ccf9c4: OUTPUT«97.1794988␤»
timotimo reduction in number of cursors instantiated by inlining apostrophe into identifier
moritz that's, like, the majority, no? :-)
timotimo you're looking at the wrong half there :P 00:50
moritz :/
timotimo though to be fair i should have written "result" instead of "reduction"
TimToady STD used to inline that automatically, but I don't know if it still does
after sorear++ redid the NFA stuff 00:51
timotimo i wonder if ws can be improved any
because that's 320_860 cursor instantiations
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
timotimo no, failure cursors are currently a singleton that gets returned
but i wonder if cursors that are going to fail are being counted here
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?
TimToady finding the rest of $$$$fo
$$$$foo
timotimo so chop off lots of sigils from the beginning of a name? 00:54
TimToady after you take the initial $ off
more likely for things like @$foo
where the @ is not redundant 00:55
Mouq Oh, it actually is desigil-ing :p thank you TimToady
timotimo is that for doing things like my $foo = '$name-of-var'; my $name-of-var = 'hello world'; say $$foo?
TimToady no
timotimo good
TimToady we don't do symbolic names that way in P6
timotimo yes, we have :: for that instead, right?
TimToady so $$ turns out to be redundant
it only works with hard refs 00:56
Mouq $$$$foo just means $foo.item.item.item
which means $foo
timotimo makes sense
TimToady but $array vs @$array is meaningful
(in list context) 00:57
moritz and even though it's not a good idea, .item could be overwritten
timotimo hooray for that :)
TimToady don't give historians any ideas
timotimo the optimizer loves you for that (well, at the moment it really doesn't care, but maybe some day it will?)
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 :)
Mouq class MAny is Any { method item { self.list } }
diakopter the fabled optimizer is omnipotent and omniscient, and knows when you will halt.
TimToady "Useless use of extra $ at line 42"
diakopter "don't throw good $ after bad" 00:59
01:00 dayangkun joined
timotimo i don't think i can bring these rules down by any significant amount any more 01:01
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
i made it broken
TimToady it's easy to do that with a parser :)
TimToady thinks moritz++ is up past his bedtime 01:05
01:09 benabik left
TimToady or was :) 01:13
01:13 benabik joined
dalek p/cursless: c921a38 | jimmy++ | src/HLL/Grammar.nqp:
Fix typo
01:45
01:50 FROGGS_ joined 01:54 FROGGS left
timotimo .o(guess who can't fall asleep) 02:12
JimmyZ: how could that even work before? was that branch never taken? 02:13
i suppose there was not terribly many quotes in the setting?
JimmyZ timotimo: I think that code never be run
timotimo probably 02:14
still, good eye! :)
JimmyZ ;)
timotimo so i was wondering: maybe parse time is suffering from a few slow action methods?
but i'm not sure how to profile that
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
TimToady too much use of deep dynamic var maybe
JimmyZ Isn't there a parrot subprof run core? 02:15
timotimo i don't know if the --profile measures stuff during parsing?
JimmyZ I think --profile outputs a kcachegrind file 02:16
timotimo yes, that's right
i've tried to understand that a few times before. i'm not good at it
JimmyZ so you need kcachegrind
timotimo i have that :)
JimmyZ e
timotimo no u 02:17
:P
JimmyZ so the higher % number is slow?
timotimo perhaps; but it kind of counts child invocations as well and all that 02:18
JimmyZ I think it's good to reduce the counts 02:19
timotimo it always is ;) 02:20
JimmyZ hehe
timotimo i wonder if the profile thing is a parrot-exclusive thing?
JimmyZ It's using parrot subprof run core 02:21
so yes
timotimo ah, ok
Mouq has finally traced the --target=parse error to src/Perl6/Grammar.nqp:920 02:29
Mouq (has no clue how to fix that)
timotimo huh, 920? 02:30
as in install_lexical_symbol?
Mouq $*DECLARAND := $*W.stub_code_object('Block');
timotimo ah, ok, that's a different line for me, as i'm in a branch 02:31
it's "cannot change read-only value", right?
Mouq Eventually goes to a self.find_lexical(['Block']) in World.nqp
No, this is the "Could not locate compile-time value for symbol Block" error
perl6 --target=parse -e1
timotimo er, right 02:32
which is interesting because it should definitely have the setting outside of itself
unless the setting won't get loaded if the target is specified as --parse?!
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
Mouq Yup
02:34 cognominal left
diakopter depth of frames doesn't affect dynamic var, in moarvm at least. 02:35
02:41 pdurbin joined
Mouq may have found the issue 02:48
timotimo very cool :) 02:49
oh iforgot 02:50
there is also --rxtrace
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
BenGoldberg is thinking that there probably exist heaps and heaps of already existing jvm profiling tools 02:54
timotimo yes
hoelzro has already been working on making a class allocation profiler work well with rakudo.jvm
as in making perl6-level classes show up as what they are called instead of P6Opaque 02:56
BenGoldberg nqp: asdf(); 02:57
camelia nqp: OUTPUT«Could not find sub &asdf␤current instr.: '' pc 45 ((file unknown):1094795624) (/tmp/OaiYuOBzb1:1)␤»
BenGoldberg nqp-jvm: asdf();
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>»
BenGoldberg What are all of the 'in <anon>' thingies? 02:58
02:59 krunen joined
timotimo probably just inline blocks from ifs and fors? 02:59
dalek p: 3ea14a9 | Mouq++ | src/HLL/Compiler.nqp:
Fix --target=parse in rakudo

Remove unless clause that doesn't load the actions if --target=parse. Was likely an optimization, but working code always beats an optimization.
03:00
timotimo i'll try to sleep again
ha! it was what i thought! ;)
BenGoldberg And, why doesn't it show file names and line numbers? (Maybe not for the <anon>s, but for the other parts)
timotimo something NYI ... 03:01
BenGoldberg ah ok 03:02
03:03 clkao left 03:05 pjcj joined 03:08 preflex left, preflex_ joined, ChanServ sets mode: +v preflex_, preflex_ is now known as preflex 03:15 clkao joined
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:18
.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.
Mouq std: my $a:a<4> = "What does this mean?"; 03:45
camelia std 7c17586: OUTPUT«ok 00:00 43m␤»
Mouq std: my $a:a(4) = "What does this mean?";
camelia std 7c17586: OUTPUT«ok 00:00 44m␤»
Mouq std: my $a:a<4> = "What does this mean?"; say $a:a<<a>> 03:46
camelia std 7c17586: OUTPUT«===SORRY!===␤Variable $a:a<<a>> is not predeclared at /tmp/Ff9CTVVJbJ line 1:␤------> y $a:a<4> = "What does this mean?"; say ⏏$a:a<<a>>␤Check failed␤FAILED 00:00 43m␤»
Mouq std: my $a:a<4> = "What does this mean?"; say $a:a<<4>>
camelia std 7c17586: OUTPUT«===SORRY!===␤Variable $a:a<<4>> is not predeclared at /tmp/DdboOGTy_T line 1:␤------> y $a:a<4> = "What does this mean?"; say ⏏$a:a<<4>>␤Check failed␤FAILED 00:00 43m␤»
03:47 benabik left 03:48 benabik joined
lue
.oO(I don't suppose NQP has an eval command, does it?)
03:49
Mouq Use NQP::Compiler.eval()? 03:51
lue Nope. Oh well, it was just me trying to avoid a few conditionals is all :) . 03:56
04:08 xilo joined 04:13 logie left
Mouq std: our $:hm<?> 04:29
camelia std 7c17586: OUTPUT«ok 00:00 41m␤»
04:29 benabik left
TimToady std only trieds to catch common semantic errors, not bizarro ones like that 04:35
*tries
Mouq But... so is $:hm<?> supposed to be valid? 04:37
r: my $:hm<?>
camelia rakudo ccf9c4: OUTPUT«===SORRY!=== Error while compiling /tmp/jFsA4dL0mY␤Cannot use placeholder parameter $:hm in the mainline␤at /tmp/jFsA4dL0mY:1␤------> my $:hm⏏<?>␤»
diakopter heh. 04:38
Mouq++ # forever will it dominate your destiny
04:40 [Sno]_ joined, baest_ joined 04:41 btyler_ joined, Maddingue joined
Mouq cannot resist... the power 04:42
04:43 sizz_ joined, mtj_- joined, pjcj_ joined 04:44 BinGOs_ joined, prammer_ joined, xilo_ joined, silug_ joined, broquain1 joined 04:45 jnthn_ joined, zamolxes_ joined 04:49 xilo left, pjcj left, btyler left, [Sno] left, denysonique left, BinGOs left, sizz left, Maddingu1 left, groky left, silug left, [Sno]_ is now known as [Sno], Bucciarati joined 04:52 groky joined, denysonique joined, denysonique left, denysonique joined 04:53 denysonique is now known as Guest33176 04:55 odoacre left 04:56 groky left, Guest33176 left 05:02 groky joined, Guest33176 joined 05:06 xenoterracide_ left 05:09 fridim_ left 05:20 odoacre joined 05:24 logie joined
moritz \o 05:29
05:29 atroxaper joined 05:34 btyler_ left
diakopter ... moritz u were just here... 05:34
my how time flies
moritz well, tonight I couldn't sleep for about 2 hours 05:35
dalek albot: 5610a08 | moritz++ | evalbot.pl:
remove commented-out code
05:46
diakopter moritz: do we need b? :) 05:49
nwc10 Out of swap. :-(
Stage jast : 23865.091
Java HotSpot(TM) Client VM warning: INFO: os::commit_memory(0x8ccf4000, 437698560, 0) failed; error='Cannot allocate memory' (errno=12)
ie wanted another 417 meg, having chewed up 1G
diakopter nwc10: happens to me sometimes on mac 05:50
05:51 SamuraiJack joined
diakopter nwc10: which jvm? 05:54
nwc10 java version "1.7.0_40"
diakopter okay, so sun, like mine 05:55
erm oracle
nwc10 yes :-)
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
it's some flaw.
since it's not deterministic 05:57
ish.
05:57 SamuraiJack left
moritz diakopter: b is sometimes useful, but I wouldn't consider it essential 05:58
diakopter nwc10: does it do that every time for you? 06:00
06:01 logie left
nwc10 diakopter: "no" :-) 06:03
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
The Raspberry Pi does not enjoy this
so, this isn't really worth attempting to diagnose as a JVM side problem
although I'm now curious whether on (say) x86 the RAM needed is also big 06:05
diakopter well, it's possible we can work around it 06:08
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:11
06:40 darutoko joined 06:44 SamuraiJack joined
dalek p: a311f5b | jimmy++ | tools/build/Makefile-Parrot.in:
Add back SHELL to Makefile-Parrot.in
06:47
06:49 FROGGS_ left 06:51 SamuraiJack_ joined 06:52 SamuraiJack left 06:54 BinGOs_ is now known as BinGOs, BinGOs left, BinGOs joined 07:01 SamuraiJack_ left
JimmyZ .\perl6.exe --target=pir --output=src\gen\RESTRICTED.setting.pir src\RESTRICTED 07:01
.setting
.\perl6.exe --target=pir --output=lib\lib.pir lib\lib.pm6
.\perl6.exe --target=pir --output=lib\Test.pir lib\Test.pm
.\perl6.exe --target=pir --output=lib\Pod\To\Text.pir lib\Pod\To\Text.pm
I still got hangs here. :(
all four
07:02 FROGGS_ joined 07:04 BenGoldberg left 07:07 dmol joined 07:08 zakharyas joined 07:15 FROGGS_ is now known as FROGGS 07:20 kaleem joined
Mouq r: sub infix:<vvv>:<^^^> (\a, \b) {return a+b}; say "Muahaha -->{4 vvv 5 ^^ 6}<--" 07:31
camelia rakudo ccf9c4: OUTPUT«Muahaha --><--␤»
diakopter wha 07:32
Mouq *^^^, but it doesn't actually call the infix right anyway
07:32 dmol left
Mouq iknowright 07:32
FROGGS r: sub infix:<vvv>:<^^^> (\a, \b) {return a+b}; say "Muahaha -->{4 vvv 5}<--" 07:35
camelia rakudo ccf9c4: OUTPUT«Muahaha -->9<--␤»
FROGGS Mouq: is infix:<vvv>:<^^^> supposed to work?
arnsholt That's odd...
r: sub infix:<vvv>:<^^^> (\a, \b) {return a+b}; say 4 vvv 5 ^^ 6 07:36
camelia rakudo ccf9c4: OUTPUT«Nil␤»
FROGGS r: sub infix:<vvv>:<^^^> (\a, \b) {return a+b}; say 4 vvv 5 + 6
camelia rakudo ccf9c4: OUTPUT«15␤»
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?
camelia rakudo ccf9c4: OUTPUT«Nil␤»
FROGGS r: say 5 ^ 6
camelia rakudo ccf9c4: OUTPUT«one(5, 6)␤»
FROGGS ahh
arnsholt Oh, ^^ is short-circuit XOR 07:38
Mouq: Maybe you wanted ** instead (exponentiation)?
07:38 sidus joined
FROGGS Mouq: It might be nice to allow it, for say infix:<??>:<!!> 07:38
Mouq r: say 5 ^^^^^^^^^^^^^^ 6 # rakudo is doing something bad here 07:39
camelia rakudo ccf9c4: OUTPUT«Nil␤»
FROGGS r: say 1 ^^ 0
Mouq arnsholt: I just reached for some symbols I didn't think were taken
camelia rakudo ccf9c4: OUTPUT«1␤»
FROGGS r: say 1 ^^^^^^^^^^^^^^^^^^ 0
camelia rakudo ccf9c4: OUTPUT«Nil␤»
FROGGS r: say 1 ^^^^^^^^^^^^^^^^ 0
camelia rakudo ccf9c4: OUTPUT«Nil␤»
07:40 cognominal joined
Mouq FROGGS: I would think that would be better as ternery:['??','!!'] / ternery:<?? !!> 07:42
*do think
*sometimes
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:44
And these would look into the category the first part of the name specifies for those things 07:47
std: say so &infix:«+» === &infix:<+> # std only seems to deal with this as much as it has to
camelia std 7c17586: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'infix:«+»' used at line 1␤Check failed␤FAILED 00:01 46m␤»
Mouq is still trying to figure out where STD defines its $¢.add_categorical() method 07:50
07:54 dmol joined
Mouq
.oO(Well, Rakudo defines it, at least)
07:54
07:55 PZt left
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«===SORRY!=== Error while compiling /tmp/9KInA4XyW3␤Two terms in a row␤at /tmp/9KInA4XyW3:1␤------> }; say "I was wrongish here -->{4 vvv 5 ⏏nnn 6}<-- rakudo++ "␤ expecting any of:␤ postfix␤ infix stopper␤ …»
07:59 salv0 joined
FROGGS I like this one: ternery:<?? !!> 08:01
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
FROGGS ahh, this is specced?
FROGGS doesn't know the spec very well 08:03
Mouq perlcabal.org/syn/S02.html#Extended_identifiers
FROGGS I dont see "ternery"
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:04
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
FROGGS yeah, but in order to convince TimToady++ you might want to show a showcase :o)
Mouq n: say so &infix:«+» === &infix:<+> 08:07
camelia niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤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) ␤…»
FROGGS ternery:<v ^>(\a, \b, \c) { (a..c).pick(b) }; say 0 v 3 ^ 100; # 22, 14, 67 08:08
might not be the best example
Mouq FROGGS: :) I need to think on this a bit 08:09
FROGGS *g*
lizmat JimmyZ: what does '.\perl6.exe -e1' do? I bet it also hangs 08:10
and good *, #perl6!
diakopter lizmat: ahoy! :)
JimmyZ lizmat: yes, also hangs 08:11
FROGGS lizmat: o/ 08:12
lizmat JimmyZ: so you thought you compiled a good rakudo, but in fact the .\perl6.exe is busted 08:13
you only see it when you try to run it...
JimmyZ it hangs with loaded settting
*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
when it hangs, does it eat all CPU on one core and does it grow very fast in memory usage ?
JimmyZ yeah, It's not easy to set a good breakpoint to get the nqp trace 08:15
it doesn't grow memory
lizmat ok, then it's not an 1..* gone haywire :-) 08:17
Mouq FROGGS: Do you want to close NQP #133? 08:18
nwc10 up the swap and try again... 08:19
FROGGS Mouq: not sure, maybe we should leave that open until we actually use a parrot release with that fix? 08:21
JimmyZ lizmat: I have an idea to debug it ... 08:23
08:23 sqirrel joined 08:29 grondilu joined
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
hoelzro hmm 08:39
moritz perl6 --backend-option=--jvm-profile
or so
hoelzro what about --jvm-opts=-something
moritz what would that do on non-jvm backends?
hoelzro probably fail and say "Not the JVM backend"
JimmyZ --vm-opt 08:40
--vm-option==
FROGGS --vm-options 08:41
:o)
JimmyZ how to 's'? 08:42
I guess multi '--vm-option=' ?
hoelzro hmm
for now
FROGGS --vm-options="--jvm-profile --blarg"
like we do for parrot
JimmyZ +1
hoelzro I could just install the profilng one as perl6-profiling
oh, that makes sense then 08:43
08:44 atroxaper left, groky left, Guest33176 left 08:46 jnthn_ is now known as jnthn
jnthn morning, #perl6 08:48
hoelzro morning jnthn
FROGGS morning jnthn
nwc10 good morning jnthn
hoelzro ah, I just learned of JAVA_TOOL_OPTIONS
08:49 fhelmberger joined
nwc10 jnthn: it really isn't sensible of me to try to build Rakudo on a Rasbperry Pi 08:49
given that I've already tested that I can built it elsewhere and copy it over
anyway, I am not proposing to (try to) build it on the satellite reciever, as that doesn't even have a toolchain 08:50
JimmyZ Does MoarVM build on Rasbperry Pi? 08:53
nwc10 ought to, but haven't tried
diakopter -options is redundant 08:58
FROGGS diakopter: how so? 09:02
diakopter b/c all the command line flags are options 09:03
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:04
but yes, all these things are options/params/args 09:05
diakopter then I think it should be backend-specific 09:06
--jvm-options, --moar-options, --squawker-options
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
09:07 groky joined
Timbus why not just pass all of them and have the backends ignore the wrong ones :o 09:08
09:08 daxim joined
FROGGS it is not that easy as it seems 09:09
Timbus is it any easier than doing some kind of backend detection in a shell script 09:10
(yes)
09:22 PZt joined 09:25 darutoko left
dalek rlito: 6ab23bb | (Flavio S. Glock)++ | / (6 files):
Perlito5 - Dumper - recursive structures
09:39
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:40
dalek rlito: d9e4b40 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - "use Data::Dumper" works
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
that dfa runs multiple NFA steps at the same time, but has more states as a result 09:43
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
timotimo en.wikipedia.org/wiki/Powerset_construction 09:44
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
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
FROGGS timotimo: link? 09:46
moritz timotimo: afaict sorear ran into an explosion of DFA states in Perl6::Grammar
timotimo that's good to know.
de.wikipedia.org/wiki/Potenzmengenkonstruktion
moritz timotimo: so he tried to lazily construct the DFA; don't know how well that worked
FROGGS yeah, that is what I fear from reading the first lines
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.
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
FROGGS :/
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
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:49
09:50 denis_boyun left
timotimo r: say 1732692 / 17829.81; say 1782981 - 1732692 09:51
camelia rakudo ccf9c4: OUTPUT«97.1794988␤50289␤»
09:51 denis_boyun joined
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
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
So we should fix it at the root cause, I suspect.
timotimo ah, so ident becomes non-declarative? i don't understand why, but it's good that you can fix the root cause
FROGGS looks like I should backlog :o)
jnthn Yeah, fixing it needs hacking in NFA.nqp ;-)
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
timotimo haha, only a little bit :)
arnsholt is having fun with indentation-based syntax 09:54
jnthn timotimo: See how alpha is handled
timotimo yes, that's what caught my eye
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!
of course it becomes non-declarative!
arnsholt Heh. I was actually meaning to ask about that 09:56
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?
it seems like $newedge is only checked for truthiness
no, i read the + as a , 09:58
arnsholt Confusing + and ,? I think you need a bigger fontsize ;)
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?
Meh. I wish the GitHub input boxes had a preview function 10:03
timotimo first prototype ready for testing :)
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?
timotimo hehe.
fortunately i have a background in CS, so i've built NFAs before.
gist.github.com/timo/d8fdd129ff87dc277c83 - this is my first attempt 10:05
hah
i should not have copypasted it out of a pager, hold on
updated
arnsholt Looks good to me
tadzik nqp::con looks a bit open-ended :)
arnsholt Oh, right 10:06
10:06 sqirrel left
arnsholt And this is why TimToady worries about end-weight =D 10:06
timotimo nobody spotted the missing "my" ;)
timotimo builds a cup of chai latte <3
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
I believe it is missing in gists though 10:08
timotimo yes :\
arnsholt I'm writing an issue, so it was just a question of me not seeing it
timotimo while i'm at it, are there other things missing NFA treatment? 10:09
dalek ecs: 126dd3b | (Elizabeth Mattijsen)++ | S32-setting-library/Containers.pod:
Mark ".exists" and ".delete" as deprecated, use ":exists" and ":delete" instead
timotimo i find this NFA implementation pleasant to work with (but not necessarily hack on, mind)
50951 - apostrophe, 50606 - identifier 10:14
seems a bit better than before, but not really by much :|
51383 - ident, 54301 - alpha
FROGGS timotimo: how do you get the counts? 10:15
timotimo 8084 - label
FROGGS: you should really backlog ;)
FROGGS meh
*g*
timotimo (especially lines containing gists that were written by jnthn)
jnthn timotimo: I'd have expected the label ones to go away, I think...
timotimo yes, my NFA must be wrong. 10:16
seems pretty simple, though: first a CCLASS_ALPHABETIC or a CODEPOINT 95, then as many CCLASS_WORD as you like
jnthn self.addedge($from, $to_mid, $EDGE_CODEPOINT, 95); 10:17
Should that $to_mid not be $midstate also, like on the line above?
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
jnthn timotimo: also it's \w+ no? 10:18
uh, \w* even
So you need an epsilon edge from mid -> to also 10:19
And one from to back to mid
timotimo ah, good point, hadn't considered that :)
can you explain why alpha does the $to := self.addedge thing? 10:20
jnthn forget what's going on there...I'd take a look at addedge 10:21
timotimo will do
it returns $to if $to is >= 0, returns a new state if $to is < 0 10:22
doesn't reduce the number of calls to apostrophe or ident, unfortunately 10:27
is the if statement to decide to use the nfa's built-in rule proper?
of course it isn't 10:28
it was missing one line and would never be executed at all ;) 10:29
guess who only now understands what $node.negate means 10:31
my caffeine will soon be cool enough for consumption :) 10:32
hoelzro so, let me get this straight. 10:34
a P6Opaque is an object that has some "native" representation (probably a chunk of memory)
it points to an STable, which is the meta-object for that P6Opaque, right?
10:35 cognominal left
timotimo er, i though the P6Opaque is the REPR that the STable points to? 10:35
10:35 cognominal joined
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
An STable typically represents a type, but really is a meta-object/REPR pairing
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)
P6opaque is a REPR, and thus a strategy for arranging memory 10:37
However, informally we often talk about objects with the P6opaque representation as just "P6opaques"
hoelzro ok 10:38
that's what I was referring to
timotimo oh, of course i can't just negate the nodes like that
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
jnthn You can't
timotimo just negating both edges makes no sense of course
well, then i'll just have to bail out of the NFA if there's a negated ident. 10:40
jnthn right
Just don't match the negated case in the if statement
timotimo will $node.negate == 0?
jnthn yeah
Or just !$node.negate
timotimo good
oooh double negation :)
jnthn tries to focus on talk prep... 10:41
(thankfully, for something next week...)
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:42
10:43 iSlug joined
timotimo i seem to still be doing it wrong, though 10:44
dalek rlito: 9a6d0a9 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - grammar - use-version fix
10:46
10:48 darutoko joined
timotimo arnsholt: do you want to look at it? 10:49
it's the same link as before on gist: gist.github.com/timo/d8fdd129ff87dc277c83 10:50
arnsholt I must admit I know absolutely nothing about the NFA stuff in NQP =)
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
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
timotimo hah, that explains it (nice save.) 10:52
arnsholt I see now it wasn't entirely unambiguous =D
dalek rlito/replito: 3857c53 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - grammar - vstring parser
10:54
Perlito/replito: 48ef9a7 | (Flavio S. Glock)++ | / (3 files):
Perlito/replito: Perlito5 - grammar - vstring/bareword disambiguation
10:54 dalek left, dalek joined, ChanServ sets mode: +v dalek 10:58 sqirrel joined 11:05 cognominal left, kivutar joined 11:06 cognominal joined
timotimo oh, i know 11:12
do i have to make a little loop? 11:13
that would explain it ...
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
moritz I think I got that for quite some time
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
moritz yes, it shells out
11:30 iSlug left
moritz my $a = qqx{$*EXECUTABLE_NAME -e "print ~(1..10).pick(5)"}; 11:30
my $b = qqx{$*EXECUTABLE_NAME -e "print ~(1..10).pick(5)"};
my $c = qqx{$*EXECUTABLE_NAME -e "print ~(1..10).pick(5)"};
ok ($a ne $b || $b ne $c), 'different results due to random random-number seed';
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
so maybe an evalserver artifact?
lizmat that could well be
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
timotimo: no (only with the theory of NFAs in general)
timotimo theory-wise my NFA seems to check out 11:34
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:35 dayangkun left 11:36 census joined
moritz dont' you need the epsilon transition to the start slot to get repetition? 11:37
timotimo i need it to the middle i thought? 11:38
because ident must not start with a number
jnthn end to middle, yes 11:39
moritz oh, right
jnthn I guess you need to make sure you have an actual end state
Oh
Or you add an arrow back to the middle itself
moritz so there's epsiolon connections between middle and end, both ways
jnthn middle -> cclass word -> middle :)
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
timotimo Unable to parse expression in blockoid; couldn't find final '}' at line 47, near "token TOP "
the error i get is probably not interpretable in itself 11:41
probably just means "oh no b0rked nfa!"
jnthn: i thought subrule gets a pre-built end state passed in? 11:43
11:43 kaleem left
timotimo ah, it may get -1 passed sometimes; and then i suppose it has to return it or something? 11:44
but i do return the value of self.addedge(..., $to) 11:45
or at least i thought i did 11:48
11:48 kivutar left 11:49 kivutar joined
timotimo nope, can't get it to work, can't think of why it would be wrong 11:52
11:52 iSlug joined 11:57 SamuraiJack_ joined
masak afternoon, #perl6 12:05
timotimo hey masak :)
are you up for a little bit of NFA debugging? :/
12:05 denis_boyun left
timotimo 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...
timotimo: but feel free to explain things to me, and I will nod and make appropriate sounds.
timotimo have the appropriate amount of fun :)
masak thank you :) 12:07
well, it is fun work... just that the operative word is "work", not "fun"...
timotimo have the appropriate amount of work, then ;) 12:08
masak haha
rn: say "have the appropriate amount of ", <work fun>.roll 12:14
camelia rakudo ccf9c4, niecza v24-95-ga6d4c5f: OUTPUT«have the appropriate amount of fun␤» 12:15
masak \o/
moritz \o/
masak we've done something right with the Perl 6 implementations :P
jnthn :P 12:20
12:21 skids left
Ulti what's the difference between pick and roll? 12:28
grondilu Ulti: pick is without reuse 12:29
jnthn r: say (1..10).pick(*); say (1..10).roll(*)
camelia rakudo ccf9c4: OUTPUT«(timeout)5 6 9 2 7 10 3 4 8 1␤» 12:30
jnthn oh, yeah :)
r: say (1..10).pick(10); say (1..10).roll(10)
camelia rakudo ccf9c4: OUTPUT«8 4 6 5 7 10 9 2 3 1␤5 8 8 7 10 5 2 4 2 5␤»
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?
Ulti ahh ok
jnthn timotimo: I don't know what it is either.
timotimo: And I odn't have time to debug it now
timotimo all right 12:31
Ulti makes sense given the verbs used
masak Ulti: historically, they were both .pick(), but .roll was spelled .pick(:replace) 12:32
Ulti: Hacker News didn't like that at all, and felt that it should be two different methods. for once, they were right. ;)
timotimo does hacker news like anything about perl6? 12:33
jnthn .roll, now :P
12:33 colomon joined
Ulti can you make pick remove elements from a list? 12:33
Timbus they like how we .roll 12:34
timotimo sure
@list[@list.pick(5)]:delete
rjbs Do I want to watch the "Future Perl Versioning Panel"?
timotimo rjbs: it was okay
moritz timotimo: that confuses indexes with elements
timotimo moritz: oh, darn
wouldn't be anything new to you if you're a regular reader on #perl6, rjbs
moritz @list[@list.keys.pick(5)]:delete 12:35
Timbus @newlist = @oldlist.pick(+@oldlist-$picknum) :3
Ulti gets increasingly hairy when you want the return value at the same time
timotimo no, it doesn't 12:36
just add :k, :kv or whatever
moritz r: my @a = <a b c d e f g>; say @a[@a.keys.pick(3)]:delete; say @a.perl
camelia rakudo ccf9c4: OUTPUT«f d b␤Array.new("a", Any, "c", Any, "e", Any, "g")␤»
Timbus huh 12:37
timotimo r: my @a = <a b c d e f g>; say @a[@a.keys.pick(3)]:delete:kv
camelia rakudo ccf9c4: OUTPUT«3 d 1 b 4 e␤»
timotimo r: my @a = <a b c d e f g>; say @a[@a.keys.pick(3)]:delete:pairs
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␤␤»
moritz timotimo: :p I believe
timotimo wasn't there something like that?
r: my @a = <a b c d e f g>; say (@a[@a.keys.pick(3)]:delete:p).perl
camelia rakudo ccf9c4: OUTPUT«$(0 => "a", 1 => "b", 3 => "d")␤»
Ulti hmm the delete didnt work with my @picked = @list[@list.keys.pick(5)]:delete:v 12:39
dalek rlito: f88e449 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - "Data::Dumper" features
moritz r: my @a = <a b c d e f g>; say @a[@a.keys.pick(3)]:delete:v; say @a.perl
camelia rakudo ccf9c4: OUTPUT«d c a␤Array.new(Any, "b", Any, Any, "e", "f", "g")␤»
moritz Ulti: looks like it worked in this example
timotimo r: my @a = <a b c d e f g>; my @picked = @a[@a.keys.pick(3)]:delete:v; say @picked; say @a;
camelia rakudo ccf9c4: OUTPUT«c e b␤a (Any) (Any) d (Any) f g␤»
timotimo seems to work to me
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␤»
Ulti so the (Any) prints as the number on my install
timotimo huh? versions etc? 12:41
Ulti R* 2013.09 on the REPL
timotimo star: my @list = 1..20; my @picked = @list[@list.keys.pick(5)]:delete:v; @picked.say; @list.say;
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␤»
timotimo okay, that's one month older, but ... o_O
moritz timotimo: that's only about 1 week old 12:42
timotimo lizmat recently made lots of progress with all those adverbs
moritz: it says 2013.08 in the evalbot version
moritz aye, lizmat++
oh
uh
I thought I'd fixed that
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 kudo/nom: 3090ed4 | (Elizabeth Mattijsen)++ | src/core/array_slice.pm:
Make sure [3,*-3]:delete works
timotimo it is to do with default values, no?
also, if your list is typed, it will not come out Any
my Str @a = <a s d f>; @a[1]:delete; say @a.perl;
r: my Str @a = <a s d f>; @a[1]:delete; say @a.perl;
camelia rakudo ccf9c4: OUTPUT«Array[Str].new("a", Any, "d", "f")␤»
Timbus lies 12:47
timotimo er, i stand corrected
or this is just NYI ;)
lizmat also: :delete will make :exists return False, assigning Any will not
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;
Timbus well that just confuses and infuriates me
camelia rakudo ccf9c4: OUTPUT«Type check failed in assignment to '@a'; expected 'Str' but got 'Any'␤ in block at /tmp/8FOVshpqIJ:1␤␤»
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;
camelia rakudo ccf9c4: OUTPUT«Array[Str].new("a", Any, Str, "f")␤False␤True␤»
Timbus not just any old Any 12:48
lizmat there was a discussion about it a week or 2 ago
assigning the default value will *not* make the element not exist
timotimo well i really don't think there should be an Any in an Array[Str], is my intuition wrong?
masak timotimo: no. 12:49
timotimo: that shouldn't even be possible, type-wise.
timotimo good, i'm not insane :)
masak timotimo: feel free to bugmit a rakudosub.
12:50 clkao left
lizmat timotimo: please do, I think I know where the pb is 12:50
12:51 clkao joined
lizmat but first need to run some errands& 12:51
timotimo holy jeebus, our hackspace is going to get a form1 3d printer 12:52
now i *must* get into 3d printing
12:57 pdurbin left
moritz wants a 3d-printed camelia! 12:59
masak wants a 3d-printed 3d printer! 13:02
(and then we send it to Mars, and then we terraform Mars, etc)
grondilu rn: gist.github.com/grondilu/6763504 13:04
camelia rakudo ccf9c4: OUTPUT«2.91632873246921e-08␤»
..niecza v24-95-ga6d4c5f: OUTPUT«2.916328732469213E-08␤»
FROGGS moritz: I have a 4d-printed hand at home, which I made using 3dsmax ten years ago
err, 3d
grondilu is confused, was expecting something around 11!
(or 9!)
13:06 robinsmidsrod left 13:08 robinsmidsrod joined
dalek rlito: 28866a5 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - js - repetition operator fix
13:08
grondilu realizes that this formula works only for small $x 13:12
moritz is that a taylor series, and the Horner schema to evaluate it? 13:13
Γ(4) is still fairly accurate, Γ(5) already 0.7 off, and Γ(6) is horrible :-) 13:14
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:16
masak .oO( is that a Horner schema in your pocket, or are you just happy to approximate me? ) 13:18
13:19 PacoAir joined
grondilu moritz: it's from rosettacode.org/wiki/Gamma_function#Perl_6 13:20
colomon n: say gamma(4) 13:21
camelia niecza v24-95-ga6d4c5f: OUTPUT«6␤»
grondilu n: gamma(4.1)
camelia ( no output )
grondilu n: say gamma(4.1)
camelia niecza v24-95-ga6d4c5f: OUTPUT«6.8126228630166761␤»
grondilu std: say &gamma; 13:22
camelia std 7c17586: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'gamma' used at line 1␤Check failed␤FAILED 00:00 44m␤»
colomon grondilu: I never got around to adding gamma to the spec. sidetracked by life
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
(imho)
colomon disagree
well, it might be nice to have a greek letter version 13:24
PerlJam good $localtime #perl6!
moritz good UTC morning, PerlJam
colomon n: say gamma(5)
camelia niecza v24-95-ga6d4c5f: OUTPUT«24␤»
grondilu but the greek letter is upper case, isn't it? Then the latinized version should be as well, shouldn't it?
moritz but we use upper-case for type names, not functions
as a convention 13:25
grondilu oh, ok
colomon and look at (for example) en.wikipedia.org/wiki/Gamma_function
it's all lowercase
except the title
13:26 iSlug left
moritz nr: say 'Γ'.lc 13:26
camelia rakudo 3090ed, niecza v24-95-ga6d4c5f: OUTPUT«γ␤»
moritz nr: say 'Γ'.lc.tc
camelia rakudo 3090ed, niecza v24-95-ga6d4c5f: OUTPUT«Γ␤»
13:27 ajr joined, ajr is now known as Guest67012 13:28 Guest67012 is now known as ajr_ 13:29 Guest-coke joined 13:34 Guest-coke left 13:37 denisboyun joined, bluescreen10 joined 13:39 btyler joined 13:47 xilo_ left
FROGGS hmmm, isnt <?before ']'> the same as <?[\]]> ? 13:47
jnthn Should be 13:48
Apart from the latter is much cheaper
FROGGS well, the latter blows up while the former does not
13:48 kaleem joined
jnthn r: say '[' ~~ /<?before ']'>/ 13:48
FROGGS in Perl6::Grammar regex term:sym<reduce>
camelia rakudo 3090ed: OUTPUT«Nil␤»
jnthn r: say '[' ~~ /<?[\]]>/ 13:49
camelia rakudo 3090ed: OUTPUT«Nil␤»
jnthn um, wtf
prn: say '[' ~~ /<?[\]]>/
camelia rakudo 3090ed, niecza v24-95-ga6d4c5f: OUTPUT«Nil␤»
..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…»
jnthn std: say '[' ~~ /<?[\]]>/
camelia std 7c17586: OUTPUT«ok 00:00 44m␤»
jnthn hm, but we dunno how STD parsed it :)
FROGGS r: say ']' ~~ /<?before ']'>/
camelia rakudo 3090ed: OUTPUT«「」␤␤» 13:50
FROGGS r: say ']' ~~ /<?[\]>/
camelia rakudo 3090ed: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/T7U3eSqp_n:1␤------> say ']' ~~ /<?[\⏏]>/␤Unrecognized regex metacharacter ? (must be quoted to match literally)␤at /tmp/T7U3eSqp_n:…»
jnthn oh! Duh!
FROGGS r: say ']' ~~ /<?[\]]>/
camelia rakudo 3090ed: OUTPUT«「]」␤␤»
FROGGS ohh
see
it is not zerowidthy or so
jnthn huh
wow, that's ungood
FROGGS ahh, really? *g* 13:51
a hint where this happens? then I'll care about that one
is it in HLL::Grammar?
jnthn I'd look at the AST first... 13:52
13:52 colomon left
jnthn QAST::Regex(:rxtype(literal) :subtype(zerowidth)) 13:52
ah 13:53
It comes out as a literal...
I get literal's compilation doesn't handle zerowidth...
*bet
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...
FROGGS nqp/src/NQP/Actions.nqp:1755: QAST::Regex.new(:rxtype<literal>, $rxname, :node($/)));
I guess it is this one
jnthn Doubt it
FROGGS yeah, me too now
jnthn It'd be in the cclass_elem or so action method in P6Regex::Actions in the nqp repo 13:55
You can probably reproduce this with just nqp, fwiw
FROGGS yes, looks like 13:57
14:05 logie joined
dalek rlito: b5b5476 | (Flavio S. Glock)++ | / (5 files):
Perlito5 - js - CODE has prototype
14:05
14:09 xenoterracide_ joined
FROGGS rn: say '[]' ~~ /<?[\[..\]]>/ # that one is already fine 14:09
14:09 lowpro30 joined
camelia rakudo 3090ed, niecza v24-95-ga6d4c5f: OUTPUT«「」␤␤» 14:09
14:13 xinming left 14:15 skids joined, xinming joined 14:16 jnap joined 14:23 jnap left
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:23
masak List::Numbers 14:24
jnthn my Numeric @things; # :P
NumberList is what I'd do if I didn't want nested packages though 14:25
masak .oO( my Little $pony )
jnthn my Corn @uni[1];
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:26
14:27 kaleem left
jnthn Well, a good example of the :: is stuff like Test::Mock, or Rakudo::Debugger 14:27
Or JSON::Tiny
tadzik it's all about namespaces 14:28
jnthn aye
tadzik I can't think of any generic Horse-related modules
but we do have Test-related, List-related etc
jnthn Horse::Eat # accidentally imported all over Europe 14:29
tadzik hihi
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.
moritz felher: I haven't seen - in class names yet 14:30
14:30 sqirrel left
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
but if the thing will never need to be split up for this, make it one word 14:31
felher FROGGS: yeah, thanks. I have not problem with namespaces. Was really just a spelling question. :) 14:32
14:32 dwarring left 14:33 denisboyun left
felher is surprised to see that IO::Path is not immutable. :) 14:36
14:36 denisboyun joined
moritz had originally envisioned it as immutable 14:36
felher moritz: what changed your mind? 14:37
moritz felher: I never did 14:39
felher: maybe somebody else changed it
felher moritz: or I maybe misread the IO::Path spec at some point and it is immutable after all. :)
moritz felher: have you found any mutating method? if yes, which? 14:40
pmichaud good morning, #perl6 14:41
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?
jnthn hi, pmichaud
felher o/ pmichaud
FROGGS hi pmichaud
jnthn pmichaud: I taught MoarVM the closure handling approach we discussed in Austin over the weekend :)
(Well, and the QAST -> MAST generator...) 14:43
pmichaud jnthn: \o/ how did it go?
moritz felher: please do
jnthn pmichaud: Fairly smoothly. Self-hosted NQP on MoarVM now passes all t/nqp
pmichaud \o/
moritz \o/ 14:44
pmichaud that's excellent. I can't wait to give it a try (soon!)
14:44 denisboyun left
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
moritz r: say 189975 / 284742
camelia rakudo 3090ed: OUTPUT«0.667183␤»
moritz wow
a third down
jnthn++ 14:47
flussence whoa, that's just from one day's work? jnthn++ 14:48
dalek ecs: 3411082 | (Felix Herrmann)++ | S32-setting-library/IO.pod:
[S32::IO] make it explicit that IO::Path.child returns a new IO::Path
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/
flussence: It may help compilation speed a bit
14:50 kivutar left
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.
flussence ooh, I have one of those
pmichaud (fewer allocations == better memory management)
jnthn Yeah, some of the changes help regexes in general
Others of them are from improvements to the NQP and P6Regex grammars
And started using same analysis to look at Rakudo's one too
I need to look at MARKER and see if I can't do something there 14:51
But I'm meant to be doing $dayjob atm :)
clkao win 12 14:53
pmichaud THIS IS $DAYJOB! :-P
14:53 LlamaRider joined
LlamaRider o/ #perl6 14:53
felher o/ 14:55
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:56
So I thought I might ask for opinions over here. 14:57
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
jnthn XPath? :) 14:58
moritz so you want to match trees, not strings?
jnthn Or something different?
moritz jnthn: my thought exactly
LlamaRider XPath is the match part, but it's too limited
I want to match trees, not a single node, and I want named captures so that I make powerful rewrite rules
dalek rlito: e6202b8 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - js - exists &sub
14:59
15:03 LlamaRider left, LlamaRider joined
LlamaRider I have a brief write-up of my current examples at github.com/dginev/Research-topics/.../RegXML.md 15:04
(also sorry for my flaky net, bus WiFi isn't optimal)
moritz LlamaRider: it's a non-trivial problem even in perl 6, I guess :-)
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.
pmichaud for that matter, I suppose the action methods could be multidispatched :) 15:07
masak ooh
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?
jnthn Or you write your pattern match with signatures :) 15:09
pmichaud multi method node($/ where $<something> eq $<else>) { ... }
moritz: I didn't follow that comment, sorry.
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.
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:12
moritz LlamaRider: the regex engine consists of regex compiler, runtime and parser (the grammar) 15:13
15:15 deyan_ joined, deyan_ left 15:16 LlamaRider left 15:21 alester joined 15:24 ksh joined 15:25 colomon joined
dalek rlito: 1d5d99f | (Flavio S. Glock)++ | / (5 files):
Perlito5 - js - exists &{"sub"}
15:25
15:28 ajr joined, ajr_ left, ajr is now known as Guest26015 15:30 Guest26015 is now known as ajr_ 15:32 zakharyas left, sorear joined
TimToady hoelzro: S19:266 already specs how to pass arguments to subsystems 15:32
synopsebot Link: perlcabal.org/syn/S19.html#line_266
hoelzro ah, thanks! 15:33
TimToady not that it's implemented that way yet
hoelzro =P
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:34
*hide 15:35
there's a clean beginning and ending so it's trivial for argument processors to strip out the arguments it isn't interested in
dalek p/cursless: 9dcee84 | (Tobias Leich)++ | src/QRegex/P6Regex/Actions.nqp:
make backslash:misc an enumcharlist

So <?[\]]> will actually have zerowidth.
15:36 sqirrel joined
hoelzro objects of the same class all share a single STable, don't they? 15:37
jnthn correct
15:37 kivutar joined
TimToady depends on how you define "class", but the class that comes standard does it that way :) 15:38
hoelzro hmm
TimToady hopefully something that does it different would use a different keyword
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?
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 :)
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
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.
hoelzro: The VMArray REPR is used by NQPArray, Perl6's Blobs and Bufs, etc.
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
but I hadn't heard the filename expansion argument before... interesting.
jnthn hoelzro: And class A { }; class B { }; will use the same JVM type 'cus they're both element-less
ah, attribute-less
hoelzro grrr
shit
jnthn hoelzro: The way to do it is the equivalent of obj.HOW.name(obj)
hoelzro is there any way to identify them via Java reflection?
ah ha
see, I can get the HOW object 15:42
TimToady masak: any sufficiently advanced technology is indistinguishable from an overdesigned system :P
hoelzro but finding the name method is proving...difficult.
jnthn hoelzro: Ops.findmethod, then Ops.invokeDirect, or something along those lines
hoelzro ah, wonderful
jnthn++
I spent the weekend reading up on the JVM TI 15:43
I'm hoping to build a sort of "meta agent" for Perl 6
so that others can write profiling agents that make use of Perl 6-specific extensions
15:44 lowpro30_ joined
jnthn nice! 15:45
hoelzro afair, Ops are the NQP ops that don't directly correspond to JVM bytecode ops, right?
jnthn Yeah
hoelzro ok, cool 15:46
15:46 lowpro30 left
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:47
15:47 prammer_ left
hoelzro jnthn: what can I use for the ThreadContext? 15:48
jnthn hoelzro: You...don't have one? 15:51
That's a pretty rare situation :)
hoelzro I'm in JVM TI land
I have nothing related to Perl 6 atm
arnsholt He's instrumenting the code via the JVM
jnthn OK, hm...
hoelzro yeah =)
jnthn I think there's a way to do it
15:51 benabik joined, FROGGS left
jnthn 'cus we depend on it for threads... 15:51
But sorear++ implemented it so I don't have it in my head...
hoelzro hmm 15:52
I'll dig into it more later then
jnthn looks to see if he can quickly find it
hoelzro sees getCurrentThreadContext 15:53
I think that should do it
15:53 kivutar left
hoelzro I just have to see how the JVM TI + threads works 15:53
jnthn hm, there's a getCurrentThreadContext 15:54
diakopter whee
jnthn But that needs you to have a GlobalContext to call it on :)
diakopter boo
15:54 fhelmberger left
hoelzro grrrr 15:54
diakopter GETGLOBALCONTEXT
ok, who needs NFA help 15:57
whatever advice I give you, do the inverse, and then the converse, for good measure.
15:58 frdmn joined, kaare_ joined
masak and then the dual. 15:58
15:58 prammer_ joined, iSlug joined
jnthn to the death! 15:59
TimToady noel
jnthn hoelzro: I'm not seeing a thing for obtaining a globalcontext right off... 16:00
hoelzro alright
let me know if you find anything
hoelzro decommute & 16:01
diakopter masak: lolz 16:02
jnthn: search the codebase for static GlobalContext :) 16:03
16:04 FROGGS joined 16:11 census left 16:18 iSlug left
timotimo diakopter: hey. i can use your help for NFA now :) 16:24
diakopter k 16:25
like I said for the quant one, I just kept adding more edges until it worked
:)
jnthn Aha...so that's why quant looks like that! :P 16:26
timotimo gist.github.com/timo/d8fdd129ff87dc277c83 - this is my attempt to implement .ident in the NFA
.ident should be much simpler than quant ...
diakopter why did you guys say it's not possible to do negate? :) 16:27
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
it didn't seem to me like i wanted to add 10000 edges
diakopter why
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 ...
at least it seems to me! 16:30
er, well, that's wrong
diakopter nah just flip the output paths
timotimo opposite of one edge seems to be possible
opposite of two edges doesn't seem possible
without a big mess
pmichaud NQP's NFA engine (in its original incarnation) has a "doesn't match character" transition.
jnthn You don't need to do the negate case.
16:31 BenGoldberg joined
masak 's head spins 16:31
jnthn <!ident> is fate
elsif $subtype eq 'zerowidth' {
if $node.negate {
self.fate($node, $from, $to)
Just fall through to that general case for negated ones
pmichaud: It still has that, fwiw :) 16:32
diakopter jnthn: I was asking *why* we didn't "need" to do the negate case
jnthn diakopter: yes, and I just explained why :) 16:33
diakopter you explained how..
jnthn < jnthn> <!ident> is fate
To clarify, so is <!foo>
diakopter okay, but why 16:34
jnthn I presume 'cus that's what S05 wants... :)
I think it's been like this since NFA.nqp was first written. 16:35
16:35 dmol left
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
jnthn TimToady: LTM semantics of <!foo> 16:37
masak .oO( "but... what does it *mean*!?" )
diakopter why does a negation cause a fate?
TimToady I thought we were talking about negated character classes
jnthn No, we're talking about ident
TimToady and NFAs
jnthn And ident's NFA
timotimo and NFA's ident
jnthn Well, I was :)
16:37 sqirrel left
jnthn uh, iden't sNFA? :) 16:37
diakopter oh, I thought you said NSA; never mind 16:38
timotimo mumble mumble SNAFU
okay, so at least the "if" part of my NFA generating piece for ident isn't wrong 16:39
masak ide'nt NFsA!?
hoelzro so, I assume that there's supposed to be a single GlobalContext object per JVM instance?
timotimo (because it bails out when it sees a negated or zerowidth)
but that doesn't explain how to make it not parsefail at the first opportunity :)
hoelzro: i think the evalserver fires up one GlobalContext for each thread it executes things in 16:41
hoelzro hmm
timotimo or perhaps it makes new ones for each new eval'd string
hoelzro heh 16:42
I just had a crazy idea on how to get the GlobalContext
I could walk the heap and find one
that sounds *really* dodgy, though.
timotimo ouch
jnthn hoelzro: There's one per instance *unless* you're running with the eval server 16:43
hoelzro I see 16:44
timotimo diakopter: so, any more comments? :) 16:45
diakopter well, what's the problem 16:48
timotimo Unable to parse expression in blockoid; couldn't find final '}' at line 47, near "token TOP " 16:49
when it tries to use the stage2 nqp for the first time
16:51 berekuk left 16:52 berekuk joined
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
16:55 kivutar joined
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 ...
what an NFA is
timotimo what you are, what we are 16:56
what is normal? what is home? what are cows?
diakopter
.oO( what, you don't pronounce NFA "niffa"? )
timotimo what are birds? we just don't know.
masak diakopter: for too long our graphs have had to tolerate being called "niffa". the oppression ends here and now. 16:57
diakopter nondeterministic power! 16:58
16:59 prammer_ left
timotimo only a niffa can call another niffa niffa~ 17:01
17:03 rindolf joined 17:04 iSlug joined
TimToady sorry, I'm diffa 17:04
17:05 kivutar left
timotimo you're all the same underneath the skin 17:05
just some of you are bigger than others
masak bigger? you biggot! 17:08
TimToady sorry, I'm littlot 17:09
diakopter cross-channel joke merge: biggar!
timotimo i'm not big into bigism; it's just a total true statement completely devoid of value!
17:09 prammer_ joined
TimToady truthioidalisticismdisestablishmentarianism 17:10
masak hemispherist!
TimToady Right. No, Left! 17:11
diakopter No, join, no, part...
TimToady you can use "cleave" for both
diakopter cleft then 17:12
cleave it to beaver 17:13
masak .oO( uncleftish beholding ) 17:15
diakopter timotimo: try adding a begin state from from, then add the others from there
timotimo will do 17:16
diakopter if that works, I suspect it's because sometimes $from is a phantom 17:17
timotimo (add more edges until something sticks)
same error, i'm afraid 17:18
timotimo completely kills the branch to make extra sure the error is in his ident nfa
not the whole branch, though, just the if branch 17:20
yeah, fortunately that builds 17:21
so i'm not going crazy
17:21 ajr_ left
diakopter well that certainly doesn't prove that 17:21
17:22 sqirrel joined
timotimo right. i'm being way too optimistic 17:22
17:27 mtk left 17:29 ggoebel3 joined, PZt left 17:31 PZt joined 17:32 sunnavy joined 17:33 ggoebel2 left
diakopter timotimo: show me the code after you added that begin state/edge 17:33
TimToady being way too optimistic is our speci-ality. 17:34
(in general)
diakopter timotimo: note there are no other addedge calls that loop a node to itself in NFA.pm 17:38
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
er, NFA.nqp
17:41 mtk joined
timotimo o 17:43
that's a good tip.
diakopter believe me I tried many times in quant before I learned that lesson
jnthn: you'd probably consider it a big that the self-loop edge doesn't work... 17:44
er, bigbug
er, bug
timotimo bigug 17:45
diakopter then again, the nfa interpreter was rewritten a time or two since I last experimented
(so maybe that's not the problem)
timotimo i put in another state in the middle to make the loop longer ... it doesn't help 17:47
hold on, there's another error in there
diakopter show me the money 17:49
timotimo i'm not getting paid :( 17:50
gist.github.com/timo/d8fdd129ff87dc277c83 here it is
17:52 spider-mario joined
diakopter no you want the last edge from midstate to to 17:53
again, you'd think it wouldn't matter..
timotimo er, oh
diakopter but paranoia rules the day in this realm
also try it with the other one uncommented.. 17:54
(but changing the other $froms to $midstate)
timotimo er 17:55
17:56 colomon left
diakopter your machine is now part of the hive mind? 17:56
timotimo that diff doesn't apply cleanly, now i'm confused
i ought to draw what you mean
17:58 ajr joined
diakopter i'll paste what I mean 17:58
17:58 ajr is now known as Guest53544, Guest53544 is now known as ajr_
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
it's the opposite of <?foo> that way
diakopter timotimo: commented on it 18:00
the Ghist
masak :)
diakopter masak: ^ Ghist
masak I saw :)
diakopter yes.
masak .oO( sitting around the fireplace, telling ghist stories )
timotimo builds 18:01
TimToady: we are skipping anything like <!...>
this is only about making ident participate in LTM 18:02
given the amount of apostrophe calls (perhaps even fatarrow calls) there are that have no real justification, it could save us quite a lot.
diakopter: still b0rken 18:03
18:03 daxim left
TimToady well, I note the STD behavior of <!foo> wrt LTM is unspecced, so I'd better spec it in any case 18:05
18:05 iSlug left
masak TimToady++ 18:07
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:08
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:09
timotimo make rxtest 81,47s user 4,28s system 42% cpu 3:19,88 total 18:10
>_<
it decided that 8gb of ram are not enough to do any regex testing 18:11
diakopter timotimo: is this nqp or rakudo 18:12
(how are you testing this patch) 18:14
timotimo nqp on parrot 18:18
18:18 iSlug joined 18:19 darutoko left
diakopter timotimo: how quickly was it failing in the build? 18:23
timotimo i think the first file it tried to do 18:24
NQPP5QRegex.nqp, line 47
FROGGS it is always that file 18:25
timotimo yup 18:26
18:34 denisboyun joined, colomon joined
dalek ecs: 42ac43f | larry++ | S05-regex.pod:
Clarify LTM of <?foo> and <!foo>

Also straighten out some of the explication of LTM, and remove fossilized discussion of sigspace that naturally falls out of our new rules now.
18:50
FROGGS nqp: say('a' ~~ /<?[\S]>/) # jnthn, there is another one 18:51
camelia nqp: OUTPUT«a␤»
18:52 zby_home_ joined
jnthn OK, for that one we probably *have* to fix the code-gen... 18:52
(like, the backend stuff) 18:53
FROGGS I am almost through Perl6::Grammar btw (turning <?before... to <?[... 18:54
)
jnthn \o/ 18:55
How many cursors less so far? :)
FROGGS dunno :P
need to turn on the output again
I'll tell ya in 4minutes
18:55 rindolf left
FROGGS ohh wait, that is maybe half the job then, I think about 50% changes are commented atm 18:56
timotimo they're taking the NFAs to backendgard, they're taking the NFAs to backendgard ... 18:59
lue hello world o/
timotimo hellue
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:00
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
FROGGS r: say 1771917 - 1756484 19:02
camelia rakudo 3090ed: OUTPUT«15433␤»
timotimo that already includes the winnings we got from the nqp changes, though ... right?
masak lue! \o/
lue masak! \o/ 19:03
19:03 SamuraiJack_ left
FROGGS timotimo: This is nqp version 2013.09-55-gc921a38 19:03
timotimo so that already has some changes made by jnthn 19:05
it's not really a "so far" measurement, unless you go back to c87f86e and measure it with that
FROGGS that won't work because it needs the <?[\]]> patch 19:06
timotimo er, i mean comparing it to a rakudo-nom
anyway, i gotta run for a bit.
FROGGS ahh yes, we can do that at the end 19:07
timotimo i can do it in between :)
FROGGS hurry up o/
:P
19:08 iSlug left 19:09 colomon left
FROGGS nqp: say('a' ~~ /<?[\w]>/) # it is the unnegated case too 19:11
camelia nqp: OUTPUT«a␤»
jnthn Doesn't surprise me 19:17
I bet both handlen't zerowidth 19:18
masak "handlen't" :)
That's how you usen't English!
19:19 aindilis joined
jnthn ooh 19:19
I bet in cclass
$ops.push_pirop('add', %*REG<pos>, 1);
could become
$ops.push_pirop('add', %*REG<pos>, 1) unless $node.zerowidth;
And it'd fix it
FROGGS jnthn: sad that you still have to do stuff for $dayjob and I have to try this :P 19:20
jnthn indeed :P
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:25
diakopter ups. 19:27
19:27 colomon joined
FROGGS err, I know what is wrong 19:28
diakopter timotimo: is there a chance it's actually dying while compiling the NFA?
19:29 spider-mario left
diakopter timotimo: trying something :) 19:32
19:33 sqirrel left
FROGGS jnthn++ # seems fixed 19:34
masak FROGGS++ 19:35
timotimo i got myself a pack of NEApolitaner waffeln, FROGGS :) 19:38
19:38 sidus left
FROGGS timotimo: it is called Ceapolitanerschnitten, sir :o) 19:38
err, Nea* 19:39
but maybe it helps anyway ;o)
timotimo i decided not to get the bag of DEApolitaner schnitten, because that was way too big for me 19:40
19:40 japhb_ left
diakopter timotimo: the problem is almost certainly in the condition 19:40
timotimo you think it's being applied where it shouldn't? 19:41
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?
diakopter since the hokey pokey song eleventy dozen times
timotimo i just copypasted the condition from the alpha case :( 19:43
(and added the negation case)
masak timotimo: to isengard! to isengard! gard! ga-ga-ga-gard!
diakopter well this is interesting 19:44
timotimo they're taking the commits to githubgard 19:45
diakopter: i have no idea where you got the impression that the NFA could be throwing an exception 19:49
it says "couldn't find final '}'"
called from FAILGOAL
is that different on your end?
diakopter no
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
diakopter psyched up or psyched out? 19:52
timotimo er, the one where they're happy
diakopter heh, it compiled, and then nqp built itself in 4 seconds.
timotimo AWESOME 19:53
diakopter kidding.
timotimo i made it super quick!
aaw, man! :(
19:55 BenGoldberg left
FROGGS timotimo: do not trust him 19:56
timotimo yeah, he knows my deepest dreams and teases me about it
masak truly, there is deceit in this man's heart. 19:57
diakopter _-_
masak hugs diakopter
diakopter cold fuses masak 19:58
masak aaaah! web tool! web tool! 19:59
20:01 PZt left
dalek kudo/nom: 4588808 | moritz++ | tools/build/NQP_REVISION:
bump NQP revision

because we can.
20:02
20:02 [Sno] left 20:03 [Sno] joined
lue
.oO(You can't run, lest the diakopters rain hellfire from the skies...)
20:03
20:04 kaare_ left 20:13 denisboyun left 20:18 BenGoldberg joined
timotimo diakopter: the "i'm trying one last thing" thing was part of the joke? :( 20:21
diakopter oh
it iditn'd work
timotimo aaw 20:22
diakopter erm.
didn't
that's about the worst typing error evah
masak :P
timotimo well, maybe the most
diakopter lunchY& 20:23
colomon I suspect the worst typing errors involve real and very much unintended words spelled by accident.
timotimo bash.org/?5300 - like this? 20:24
20:26 iSlug joined
FROGGS hehe 20:26
jnthn 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!)
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)␤»
arnsholt nqp: say("foo" ~~ /:my $x := "blech"; foo <.panic: "blerg">/) # No boom
camelia nqp: OUTPUT«Method 'panic' not found for invocant of class 'NQPCursor'␤current instr.: '' pc 269 ((file unknown):172891885) (/tmp/dALTfPXnUE:1)␤»
arnsholt Is that a known NQP problem?
jnthn: Last four lines ring any bells? 20:31
jnthn arnsholt: panic comes from HLL::Grammar, not Cursor.
masak .oO( the problem is known to be NQP-complete )
jnthn timotimo: You got latest version of your NFA patch? 20:32
lue
.oO(P ≠ NP ≠ NQP)
timotimo gist.github.com/timo/d8fdd129ff87dc277c83 - just use diakopters comment on that gist
arnsholt jnthn: Not the lack of panic actually, but the "regex assertion not terminated by angle bracket" when the arg is a variable
jnthn oh... 20:33
I think that's NQP limitation
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)
jnthn Pretty sure the parens form work
<.panic($x)> # should be ok
arnsholt Oh, parens. Durr. Thanks =)
masak look, adding ∅ (U+2205 EMPTY SET) makes nice people on Twitter make fun of us! twitter.com/stevanlittle/status/38...7462728704 :( 20:35
lizmat is that a reason not to do it ? 20:36
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
BenGoldberg rn: my \term:<∞> = Inf; say ∞;
camelia niecza v24-95-ga6d4c5f: OUTPUT«Inf␤»
..rakudo 458880: OUTPUT«===SORRY!===␤No such method 'ast' for invocant of type 'NQPMu'␤»
masak lizmat: well, I would be less sad about it if the addition didn't mirror my own feelings quite well...
20:37 iSlug left
masak s/the addition/the criticism/ 20:38
ingy (APL COMPATABILITY)++
timotimo i bet they were never really nice to begin with
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
jnthn masak: Not to mention this is just Rakudo catching up with something Niecza added a while back, iiuc.
lue this is the moral I learned from that twitter link masak posted:
masak jnthn: and the spec catching up with the implementations.
lue r: sub prefix:<‽>($a) { !?$a }; say ‽True
camelia rakudo 458880: OUTPUT«False␤»
benabik timotimo++
jnthn masak: That's also normal here.
masak jnthn: yes, I am grumpy. and irrational. 20:40
lue (that is to say, we should have an interrobang symbol :P)
jnthn masak: Point to me where the spec says anything about Promise and Channel :)
BenGoldberg ++lue
:)
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.
lue: but maybe APL qualifies as "historically interesting".
lue Probably. But yes, the whole "APL came from a time where ASCII wasn't the standard character set" interests me a bit. 20:42
masak well, it's an interesting thought experiment, for sure. 20:43
20:43 bbkr joined
bbkr rn: my $b = bag "red" => 1, "blue" => 100000; $b.roll(8).say' 20:43
camelia rakudo 458880: OUTPUT«===SORRY!=== Error while compiling /tmp/Z7954MR_91␤Two terms in a row␤at /tmp/Z7954MR_91:1␤------> " => 1, "blue" => 100000; $b.roll(8).say⏏'␤ expecting any of:␤ method arguments␤ postfix␤ infix stopp…»
..niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Confused at /tmp/soto5skadE line 1:␤------> " => 1, "blue" => 100000; $b.roll(8).say⏏'␤␤Parse failed␤␤»
lue
.oO(I should also code an interface to the Perl 6 SNUSP module I have lying around and release it.)
bbkr rn: my $b = bag "red" => 1, "blue" => 100000; $b.roll(8).say
camelia rakudo 458880: OUTPUT«"blue" => 100000 "blue" => 100000 "blue" => 100000 "blue" => 100000 "blue" => 100000 "red" => 1 "blue" => 100000 "blue" => 100000␤» 20:44
..niecza v24-95-ga6d4c5f: OUTPUT«blue 100000 blue 100000 red 1 red 1 red 1 red 1 blue 100000 blue 100000␤»
jnthn FROGGS: Did your cclass zerowidth patch make it in?
lue s/interface/script to utilize the module externally/
FROGGS jnthn: didn't pushed it yet I think
jnthn k
FROGGS: If you do, to curless branch is nice :)
*cursless
lizmat bbkr: you initialized the bag with 2 pairs 20:45
bbkr lizmat: I was following perl6advent.wordpress.com/2012/12/1...-and-sets/
lizmat you probably want new-fp (new from pairs)
colomon bbkr: that is obsolete
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␤»
dalek p/cursless: 1c3c183 | (Tobias Leich)++ | src/vm/parrot/QAST/Compiler.nqp:
proper handling of classes an zerowidth

  jnthn++, I am just his commitbot :o)
lizmat or indeed coerce :-)
colomon++
colomon lizmat++ # making it work on Rakudo
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␤»
bbkr r: my $b = KeyBag.new-fp( "red" => 1, "blue" => 10); $b.roll(16).say
camelia rakudo 458880: OUTPUT«blue red blue blue blue blue blue blue blue blue blue blue blue blue red blue␤»
lue (It should be obvious, but J and K remove the only fun part about APL: the crazy symbols.)
lizmat bbkr: colomon's way is probably more ideomatic
*idiomatic 20:48
bbkr indeed :) lizmat++ colomon++, thanks for instant help
masak lue: you jest, but a lot of the fun also comes from being very expressive with ad-hoc data. 20:52
lue of course. I just happen to really really like the Unicode bonus APL gives me :) 20:53
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
lue :) 20:59
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)
lue &
timotimo .o( rakudish ... )
FROGGS can't parse the term "other non-programming projects" :P 21:01
FROGGS .oO( radish? )
lizmat hmmmm…..radish 21:03
21:03 benabik left 21:04 prammer_ is now known as prammer
diakopter masak: I'm not sure patch or stevan were making fun of us 21:05
lizmat r: my @a; say @a.of # shouldn't this be Any ? 21:06
camelia rakudo 458880: OUTPUT«(Mu)␤»
lizmat r: my %a; say %a.of # shouldn't this be Any ?
camelia rakudo 458880: OUTPUT«(Mu)␤»
21:06 ksh left
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␤␤»
lizmat r: my $a; say $a.VAR.of # shouldn't this be Any ? 21:07
camelia rakudo 458880: OUTPUT«(Mu)␤»
21:07 skids left
jnthn No 21:07
The constraint type is Mu
Any is just the default
r: my $a = Mu; # works
camelia ( no output )
jnthn timotimo: Hm, interesting problem is interesting...
(with ident)
timotimo i'm glad 21:11
lizmat jnthn++ for setting me straight :-)
FROGGS nqp: say('a:' ~ ("'" ~~ /<?[']>/)); say('b:' ~ ("'" ~~ /<?[\']>/)) # is that weird or is it just me? 21:13
camelia nqp: OUTPUT«a:␤b:'␤»
timotimo if it aint ascii, you quote it, no? 21:15
masak diakopter: I think they are, but lightly. which is fine.
diakopter: I wouldn't have bothered if I had any love for ∅.
FROGGS timotimo: both should say nothing IMO 21:16
timotimo oh, because they are lookahead, right?
FROGGS right
timotimo oops! :)
lizmat rn: say ∅ 21:17
camelia niecza v24-95-ga6d4c5f: OUTPUT«set()␤»
..rakudo 458880: OUTPUT«===SORRY!=== Error while compiling /tmp/gRlQIAU8m5␤Two terms in a row␤at /tmp/gRlQIAU8m5:1␤------> say ⏏∅␤ expecting any of:␤ argument list␤ prefix or term␤ prefix or meta-prefix␤ postfix␤ …»
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
masak timotimo: Two Terms. In a Row.
lizmat A Row even 21:19
timotimo oh, duh, yes
21:19 berekuk left
masak timotimo: it's like a crash blossom for source code. :) 21:19
timotimo crash blossoms fall?
FROGGS ahh
timotimo: the <?[\']> case is fixed loally 21:20
locally*
masak timotimo: "Infant pulled from wrecked car
involved in short police pursuit"
timotimo: languagelog.ldc.upenn.edu/nll/?p=4441
FROGGS then I don't understand why one rule fails...
timotimo that's funny :) 21:21
21:21 PacoAir left
masak language log rocks. 21:22
jnthn r: (112,114,111,116,111)>>.chr.join 21:24
camelia ( no output )
jnthn r: (112,114,111,116,111)>>.chr.join.say
camelia rakudo 458880: OUTPUT«proto␤»
21:24 zby_home_ left
timotimo proto? but that's super old! 21:25
jnthn heh, just reading NFAs by hand here :P
FROGGS jnthn: you need tools for that?
21:26 BenGoldberg left
timotimo doesn't seem like he needs anything but the chr method 21:26
masak and an evalbot :)
timotimo r: (112,114,111,116,111).chrs
camelia rakudo 458880: OUTPUT«No such method 'chrs' for invocant of type 'Parcel'␤ in block at /tmp/S2TFFY5voP:1␤␤»
FROGGS .oO( his own unicode database will be delivered on next monday )
jnthn ergh
timotimo there's .ords, but no .chrs? ;)
jnthn FROGGS: No, I've memorized the action codes 21:27
FROGGS: Just checking I got my ascii table right
I think timotimo++'s/diakopter++'s thing was right
(for ident)
This regex with --target=ast shows the issue: /[ | foo :s bar | baz ]/
FROGGS does it actually work now?
jnthn That :s is spreading to the | 21:28
The ident addition busts the build
timotimo but there is no :s?
jnthn But it does so because it exposes another bug
timotimo ah, that's good to know
FROGGS :S
jnthn Somehow that :s affects the other branch of the alternation. I'm guessing it shouldn't.
FROGGS yay, only 570 lines to go! 21:29
diakopter trying to encode :s in the nfa?
FROGGS: no, it's :S
er, :s 21:30
jnthn No
FROGGS I know, mine was a 'smiley'
jnthn In the regex I pasted, the :s applies to the baz too somehow
This is what makes regex end up with a zero length prefix
Which sorts it below term:sym<name>
FROGGS that is fun... can we do these regexathons every monday now? 21:32
jnthn It appears that STD does the "same" 21:33
But it would not put sigspace there.
'cus of the updated semantics. 21:34
FROGGS ha, so he just worked around it? :P 21:35
jnthn Well, more like this use case wouldn't have hit the issue 21:36
yeah, build finishes now
timotimo yaaaaay
jnthn And kills a handful more cursors off 21:37
timotimo that has been driving me crazy all day now
thank you for applying your smarts :)
jnthn yeah, it wasn't an easy find.
FROGGS .oO( ... for a human )
jnthn Lemme try Rakudo against it now
diakopter sends fantastical dollars your way
21:39 ajr_ left
jnthn aww, fail 21:39
Fails building NQP::world 21:40
oh, I can guess...
timotimo aaw crud
diakopter ?
jnthn I probably should run the NQP test suite... 21:42
diakopter well what was the fix
push?
21:42 lowpro30 joined
jnthn diakopter: Oh, to get the NQP build to complete? A carefully placed :!s :) 21:42
The next issue, though, is breaking nqp::ops 21:43
diakopter smells like a workaround
timotimo that seems more like a lazy workaround
jnthn Well, yeah, 'cus the real answer is "redo sigspace"
Which is probably a couple of days of work.
diakopter pmichaud: *poke*
jnthn dammit, test fails... 21:44
21:44 lowpro30_ left
timotimo oh noes :( 21:44
diakopter what needs redone about sigspace?
deeper integration?
jnthn diakopter: No, the spec changed a while back 21:45
bah, of all the things to fail... 21:46
05-comments.t, 11-sub.t...
timotimo m)
diakopter "identification, please." "here you go." "looks good. identification, please."
21:47 lowpro30 left
masak the benefits of statelessness! 21:47
diakopter "man without a country"
dalek p: 1ee57de | Mouq++ | docs/qast.markdown:
Docs typo fix
21:50
jnthn std: sub() { }
camelia std 7c17586: OUTPUT«===SORRY!===␤Word 'sub' interpreted as 'sub()' function call; please use whitespace around the parens at /tmp/jrP0rensuu line 1:␤------> sub⏏() { }␤Unexpected block in infix position (two terms in a row) at /tmp/jrP0rensuu lin…»
jnthn hah
We parse fail *correctly*.
timotimo we didn't before? and that causes the test to break now? 21:51
jnthn The test is
say( (nqp::isinvokable(sub() {}) ?? 'ok 13' !! 'no 13' ) ~ ' nqp::isinvokable on sub');
timotimo hehehe
jnthn std: say( (nqp::isinvokable(sub() {}) ?? 'ok 13' !! 'no 13' ) ~ ' nqp::isinvokable on sub');
camelia std 7c17586: OUTPUT«===SORRY!===␤Unable to parse argument list at /tmp/sdWZlDXJV8 line 1:␤------> say( (nqp::isinvokable⏏(sub() {}) ?? 'ok 13' !! 'no 13' ) ~ ' ␤Couldn't find final ')'; gave up at /tmp/sdWZlDXJV8 line 1:␤------> say( (nqp::…»
timotimo i made something work better! :D
jnthn Still some more tests to look at yet
70-invokespec.t is guility of the exact same 21:52
22:00 bluescreen10 left 22:07 iSlug left 22:09 benabik joined 22:10 telex joined
dalek p/cursless: 2e7ed82 | jnthn++ | t/nqp/ (2 files):
Fix a couple of bits of busted syntax in tests.

This was OK before, but is not valid Perl 6 and we get caught out when ident LTMs properly.
22:11
p/cursless: 1ecd1bd | jnthn++ | src/NQP/Grammar.nqp:
Prevent sigspace leakage.

Won't be needed after sigspace changes to get up to latest spec are done.
p/cursless: 9fcad7d | jnthn++ | src/NQP/Grammar.nqp:
Re-order for correct LTM tie-break.
p/cursless: 8019527 | jnthn++ | src/QRegex/NFA.nqp:
Treat ident declaratively.

  timotimo++ and diakopter++
jnthn I've good news and bad.
timotimo the bad first
so that you'll end it on a high note
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.
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?
jnthn The good news is that...yes, that. Working on a number.
TimToady nr: [112,114,111,116,111].chrs
camelia ( no output )
TimToady nr: [112,114,111,116,111].chrs.say
camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«proto␤»
timotimo i was wondering how it would be able to have an override for ident
looking at the way the if works i don't see it checking if the ident refers to what the original cursor implemented
jnthn You can define it
grondilu rn: class Foo { method talk { say "hi" }; method talk-more { &.talk() xx 10 } }; Foo.talk-more 22:13
camelia ( no output )
..rakudo 458880: OUTPUT«hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤»
TimToady I guess we want a .chrs in Any
timotimo i agree, TimToady
jnthn r: say 1785550 - 1732153
camelia rakudo 458880: OUTPUT«53397␤»
TimToady or something more generic than Array
jnthn timotimo: So, 53,000 less Cursor allocations :) 22:14
(in CORE.setting)
timotimo only from the ident change?
TimToady r: say 0x2202.chrs
camelia rakudo 458880: OUTPUT«No such method 'chrs' for invocant of type 'Int'␤ in block at /tmp/I2azVqzrOp:1␤␤»
jnthn timotimo: yeah
timotimo: 'cus it also then called <.alpha>
timotimo: And 'cus the built-in one knows how to cheat with the fail cursor.
I think it does, anyway...
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
timotimo ah
ah and the old one was calling .alpha
yeah, i can see how that helps
jnthn Yeah
timotimo cool beans :)
jnthn But I want to do a bit more analysis on why we still hit identifier so much
I'm wondering if there's a little more going on.
timotimo how about apostrophe?
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
timotimo moi?
masak won't the visual similarity between .chars and .chrs be confusing?
timotimo hmm
jnthn 52521 apostrophe
timotimo let's call it tochrs or 2chrs instead! :P
diakopter I already don't know the difference
masak :(
timotimo jnthn: does it sound like a good idea to inline apostrophe? 22:17
diakopter inline akk the things
timotimo sounds good idea am rite?!
lue (FWIW, I always thought .chars was ambiguous to begin with)
FROGGS .graphemes? 22:18
TimToady let's fix the ambiguity between Mr. and Mrs while we're at it
FROGGS of all ppl?
timotimo you of all people?!
diakopter well, there's my mistress, and their Mistress, and then of course their HeadMistress
jnthn timotimo: Well, label is the next thing I want to understand more about 22:19
timotimo good idea.
jnthn token label {
:my $label;
<identifier> ':' <?before \s> <.ws>
}
timotimo also, i think fatarrow is getting called much more often than it should
jnthn So, <identifier> should, afaict, be declarative. And ':' sure as heck is. 22:20
diakopter <TRULYWHITEspace>
FROGGS r: say 1771917 - 1685599
camelia rakudo 458880: OUTPUT«86318␤»
timotimo should i make a measurement of nqp and rakudo-nom with only the analysis, but none of the improvements?
to get a grand total of cursors spared? 22:21
dalek kudo/cursless: 3197a66 | jnthn++ | src/Perl6/Grammar.nqp:
Indentation fix.
kudo/cursless: b3ed16e | jnthn++ | src/Perl6/Grammar.nqp:
Remove our own hack ident definition.

The real thing LTMs proper now; timotimo++.
FROGGS timotimo: that would be nice indeed
jnthn timotimo: I know that number for NQP, but yeah, for Rakudo it's worth it
timotimo will do.
jnthn Current NQP standing is: 22:22
r: say 284742 - 187149
FROGGS does anybody had run a spectest with this branch?
camelia rakudo 458880: OUTPUT«97593␤»
timotimo about a third, yeah? pretty decent
jnthn FROGGS: No :)
timotimo we wouldn't dare try :P
FROGGS hehe, me neither... well, twice just the first ten tests
jnthn make test passes, fwiw
jnthn tries a ballsy hack in MARKER 22:24
timotimo oh no, the nqp bump moritz did makes it not work immediately 22:26
now i can do it. 22:27
FROGGS r: 1771917 - 1685593 # another 7! \o/ 22:28
camelia ( no output )
FROGGS r: say 1771917 - 1685593 # another 7! \o/
camelia rakudo 458880: OUTPUT«86324␤»
timotimo just 7?
FROGGS yeah
timotimo 7 instances of begin removed causing 86k cursors removed?
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
jnthn ooh 22:30
timotimo parsing almost done
jnthn The MARKER thing maybe will work out 22:31
timotimo will it cause more than just a huge reducement in cursors?
jnthn r: 187149 - 172424
camelia ( no output )
jnthn r: say 187149 - 172424
camelia rakudo 458880: OUTPUT«14725␤»
jnthn Got rid of that many more in NQP.nqp compilation
timotimo sweet! :)
jnthn Meaning we're now > 100,000 Cursor allocations reduced there 22:32
timotimo out of 280_000 or something, right?
TOTAL: 2196370
jnthn r: say 172424 / 284742
timotimo that's core.setting before any of our work
camelia rakudo 458880: OUTPUT«0.6055447␤»
jnthn wow 22:33
22:33 btyler left
timotimo when froggs merges your changes, jnthn, he'll have a very good number i'm sure 22:33
jnthn yeah
I'm about to have a new number here, I think
FROGGS I am merging already, and preparing my commit
jnthn 1640897 22:34
timotimo that's like a quarter!
jnthn r: say 2196370 - 1640897
camelia rakudo 458880: OUTPUT«555473␤»
jnthn So, we've shaved half a million Cursor allocations off CORE.setting compilation so far. :) *before* FROGGS++'s changes
dalek p/cursless: 30b5b18 | jnthn++ | src/HLL/Grammar.nqp:
Save a ton of CURSOR allocations in MARKER.
22:36
d: 22ba881 | larry++ | STD.pm6:
don't use LTM stopper before {N,M}
d: 4cde04e | larry++ | STD.pm6:
each alternative gets its own %*RX
masak 'night, #perl6 22:37
timotimo 'night masak
TimToady nghts :) 22:38
FROGGS okay, building again
gnight masak
jnthn Of course, the big win would be doing something about this: 22:40
320860 ws
Lemme try something... 22:41
TimToady we need token macros :)
diakopter or the sufficiently smart optimizer!
... which, speaking of which, someone needs to ask the sufficiently smart programmer to write
timotimo hm. even with the logging disabled, i get no faster parse 22:42
FROGGS TOTAL: 1633781 22:43
so my stuff only makes about 5k ? :o( 22:44
maybe not even that
timotimo all of your stuff combined?
dalek kudo/cursless: ee45039 | (Tobias Leich)++ | src/Perl6/Grammar.nqp:
changed 66 <?before ...> to <?[...]>
diakopter well, jnthn might've stolen them
FROGGS yeah, maybe
jnthn um 22:46
diakopter what :)
FROGGS O.o
FROGGS hopes he did nothing wrongish
jnthn my stupid ws optimization seems to have survived CORE.setting and helped
timotimo it was stupid in what way? :) 22:47
FROGGS phew
jnthn r: say 1640897 - 1409278
camelia rakudo 458880: OUTPUT«231619␤»
jnthn timotimo: "too simple to work" :P
diakopter the full-blown ws could definitely be inlined in nfa if it's not already
timotimo i thought nfa just recurses into everything anyway?
jnthn diakopter: ws is non-declarative 'cus ww is
timotimo oh 22:48
diakopter well we can make it optional.
TimToady wonders if <?[s]> is constructing a new cclass every time
it might actually be slower than <?before \s>
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
because some pathways of those things *are* declarative fully
jnthn TimToady: I know it's more optimal in Rakudo; there's no "new cclass every time" here :) 22:50
TimToady okay, but it's still less readable, methinks 22:51
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
diakopter timotimo: yeah, that needs to be about 1/10-1/100 that
jnthn Less than now, with the ws opt
timotimo :)
oh wow 230k? 22:53
diakopter timotimo: why
er
TimToady: why
TimToady because most programmers are human?
diakopter I mean, what ar ethe reasons 22:54
TimToady and expect "token" ≅ "word"
diakopter I can't read this "boxed question mark" lingo
FROGGS .u ≅ 22:55
yoleaux U+2245 APPROXIMATELY EQUAL TO [Sm] (≅)
timotimo now all we need to see is if it gives us any memory improvements at all 22:56
hey, i wonder if the same treatment would help generate the perl6docs
22:56 berekuk joined
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
FROGGS timotimo: that might be good testcase
jnthn git st 22:57
uh..
FROGGS ww
nothing to stash here buddy :o) 22:58
diakopter COMMAND NOT FOUND
22:58 BenGoldberg joined
FROGGS timotimo had to reply: "did you meant..." 22:58
dalek kudo/cursless: d828773 | jnthn++ | src/Perl6/Grammar.nqp:
Special-case ws to check MARKER in a method.

This saves creating a Cursor object and messing with highexpect in any call where we already did match ws at this position.
jnthn I have a git st alias which is actually for status :) 22:59
FROGGS ahh
tadzik git purr is my favourite 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
git STable
23:01 berekuk left
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
as in: time spent in each part
FROGGS TOTAL: 1319969 23:04
23:04 benabik left
timotimo 1327916 is not bad, eh? :) 23:05
oh you have even less :)
FROGGS hehe, yeah
jnthn as 1328148 with latest pull 23:13
diakopter break 6 digits!
timotimo that would be very cool.
diakopter tomorrow! :)
grondilu /quit/quit
23:13 grondilu left
diakopter /quit/quit/quit 23:14
timotimo /bin/quit
BenGoldberg C:\Program Files\quit.exe 23:15
timotimo C:\Dokumente und Einstellungen\timo\Saved Games\quitsim2000\bin\game.exe 23:16
diakopter u must have a virus 23:17
install mcafee 95
BenGoldberg Does the German version of Windows really use "Dokumente und Einstellungen" instead of "Documents and Settings"? That's funny
timotimo yes, it does.
but both things kind of exist
they have something very strange in place.
it's very hard to get an actual look at what the file system actually is like 23:18
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
BenGoldberg Why? Too many symbolic links?
Oh, so the files exist, but you can't see some of them 23:19
BenGoldberg thinks, "Secret Invisible Files."
:)
timotimo sometimes, sometimes the other way around
like, you see a file that doesn't exist
BenGoldberg ? 23:20
timotimo with a 64bit application, the file is there, with a 32bit application it's gone
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
BenGoldberg Your computer has been infected with the plan9 file system? 23:22
:)
timotimo no, in plan9 that shit is super cool
in windows it's just WTF 23:23
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:25
23:25 kay_ left
BenGoldberg Maybe the same thing as on Windows. 23:26
timotimo you get horribly confused? ;)
FROGGS rakudo builds at least 10s faster here
timotimo out of 130s? 23:27
FROGGS out of 160s
timotimo oh
not a huge win, but we'll definitely take what we can get
FROGGS ohh, I think that is a huge win for a day
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 kudo/cursless: b9bebcc | (Tobias Leich)++ | src/Perl6/Grammar.nqp:
unbust S02-lexical-conventions/unspace.t
FROGGS jnthn: can you explain what the difference of this commit is? 23:29
jnthn <?[\s'#']> 23:30
That is a char class that includes the char ' 23:31
:)
FROGGS jnthn: I tried is as <?[\s#]> too without luck
do I need to escape it instead?
jnthn I guess that is a comment
timotimo \# will tell you about an unallowed unspace
jnthn \# may do it, yeah
timotimo iirc 23:32
jnthn r: /<?[\s\#]>/
camelia rakudo 458880: OUTPUT«===SORRY!=== Error while compiling /tmp/5Uhj72DfYz␤Unspace not allowed in regex␤at /tmp/5Uhj72DfYz:1␤------> /<?[\s\#⏏]>/␤»
jnthn hm, yeah
timotimo did you get to look at label?
jnthn no, I won't tonight, very tired 23:33
timotimo that's all right
FROGGS me too
Mouq std: /<?[\s\#]>/
camelia std 4cde04e: OUTPUT«ok 00:00 43m␤»
jnthn I probably need to go read more NFAs.
Mouq :p
timotimo oh my :|
jnthn To find out why they're Not F... Awesome :)
23:33 benabik joined
Mouq Well, just change nqp/src/QRegex/P6Regex/Grammar.nqp token backslash:sym<unsp> { [\s|'#'] …} to …[\s|'#'\`]… 23:35
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?
FROGGS r: /<?before \s|'#' >/ # this works 23:38
camelia ( no output )
TimToady Mouk: \# without ` is a valid unspace 23:39
just line-ending comment instead of embedded
Mouq I know, I was telling them to cheat while I figure out how to get it working properly :)
23:39 fridim_ joined
FROGGS Mouq: it is more about reverting than to about cheating :o) 23:40
timotimo FROGGS: have you run a full spectest? otherwise i can totally do that now. 23:41
FROGGS timotimo: I am about to, but also have local changes 23:42
timotimo ok
dalek kudo/cursless: 3ba49a4 | (Tobias Leich)++ | src/Perl6/Grammar.nqp:
back to <?before> style when # is involved
23:43
Mouq std: /<+([a]+[b])+[c]>/
camelia std 4cde04e: OUTPUT«ok 00:00 43m␤»
Mouq r: /<+([a]+[b])+[c]>/
camelia rakudo 458880: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/FDMD8zxWo_:1␤------> /<+⏏([a]+[b])+[c]>/␤Unrecognized regex metacharacter + (must be quoted to match literally)␤at /tmp/FDMD8zxWo_:…»
jnthn timotimo: Not off hand...short of running with parrot directly and passing in the profile flag
timotimo oof
i don't even know how to. 23:44
TimToady n: /<+([a]+[b])+[c]>/
camelia ( no output )
FROGGS okay, I'm running a spectest now, only local modification is stripped leading {} in nqp's quant:{N,M} 23:45
but I think I go looking for my pillow
TimToady n: say 'abcde' ~~ /<+([a]+[b])+[c]>+/
camelia niecza v24-95-ga6d4c5f: OUTPUT«「abc」␤␤»
TimToady niecza++
Mouq niecza++ indeed 23:46
FROGGS gnight 23:47
TimToady o/
Mouq night FROGGS 23:48
#perl6++
timotimo wow, this spectest run is very fast 23:49
it just gives "no subtests run" for almost every file 23:50
TimToady cool!
timotimo why aren't we doing this all the time? we could totally do a full spectest run per commit like this!
TimToady dunno, seems like a no-brainer
jnthn needs sleep 23:51
'najt, #perl6
TimToady \o
Mouq r: say ' #' ~~ /<[\s'#']>/ 23:52
camelia rakudo 458880: OUTPUT«「 」␤␤»
Mouq r: say ' #' ~~ /<[\s'#']>*/
camelia rakudo 458880: OUTPUT«「 #」␤␤»
Mouq r: say ' #' ~~ /<?[\s'#']><[\s'#']>*/ 23:53
camelia rakudo 458880: OUTPUT«「 #」␤␤»
Mouq r: say '# #' ~~ /<?[\s'#']><[\s'#']>*/
camelia rakudo 458880: OUTPUT«「# #」␤␤»
Mouq Wait, so what's the problem?
timotimo t/spec/S26-documentation/06-lists.t .......................... Failed 35/39 subtests
oh no! :(
Mouq night jnthn 23:54
timotimo haha
it errors out because it can't find v6 anywhere 23:55
that amuses me.
TimToady r: say "' #" ~~ /<?[\s'#']><[\s'#']>*/
camelia rakudo 458880: OUTPUT«「' #」␤␤»
TimToady note it matches the ' 23:56
r: say "' #" ~~ /<?[\s\#]><[\s\#]>*/ 23:57
camelia rakudo 458880: OUTPUT«===SORRY!=== Error while compiling /tmp/RjMvGu6FUJ␤Unspace not allowed in regex␤at /tmp/RjMvGu6FUJ:1␤------> say "' #" ~~ /<?[\s\#⏏]><[\s\#]>*/␤» 23:58
Mouq Oh, bluh, I'm dumb
TimToady that's a rakudobug
n: say "' #" ~~ /<?[\s\#]><[\s\#]>*/
camelia niecza v24-95-ga6d4c5f: OUTPUT«「 #」␤␤»
TimToady which niecza++ doesn't share
n: say "\\ #" ~~ /<?[\s\#]><[\s\#]>*/ 23:59
camelia niecza v24-95-ga6d4c5f: OUTPUT«「 #」␤␤»
TimToady (just checking :)
the inside of [] should not be considered regex language, but cclass language