Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-11-13

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

All times shown according to UTC.

Time Nick Message
00:00 seatek timotimo: HTTP::UserAgent is the one I settled on after poking around for a while
00:00 timotimo good
00:00 MasterDuke TimToady: thanks. i know i've wanted to interpolate into char classes before, but i don't know why it isn't allowed?
00:00 timotimo you can just interpolate an array instead, if that array is an array of characters
00:01 timotimo (it'll be slow.)
00:02 MasterDuke cool, that'll work if what i want to interpolate comes from outside the regex
00:03 timotimo that's usually what interpolating is for :)
00:05 MasterDuke well yeah, but while TimToady's solution works because i'm only capturing a single character, it wouldn't if i was capturing more, but wanted what i captured to be contents of a char class
00:06 MasterDuke i don't anticipate wanting to do that every other day or anything, just wondering about the reasoning
01:54 pyrimidine joined #perl6-dev
02:06 pyrimidine joined #perl6-dev
02:15 pyrimidine joined #perl6-dev
02:19 FROGGS_ joined #perl6-dev
02:34 pyrimidine joined #perl6-dev
02:46 pyrimidine joined #perl6-dev
02:49 ilbot3 joined #perl6-dev
02:49 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
03:54 pyrimidine joined #perl6-dev
04:06 pyrimidine joined #perl6-dev
04:13 pyrimidine joined #perl6-dev
06:52 dalek roast: 5cfffd4 | usev6++ | / (2 files):
06:52 dalek roast: Fudge failing test for rakudo-j
06:52 dalek roast: review: https://github.com/perl6/roast/commit/5cfffd419f
06:52 dalek roast: d2b9d23 | usev6++ | S09-typed-arrays/native-int.t:
06:52 dalek roast: Unfudge test for antipairs + native arrays on JVM
06:52 dalek roast: review: https://github.com/perl6/roast/commit/d2b9d23b94
07:20 dalek rakudo/nom: 37d0e46 | lizmat++ | src/core/Slip.pm:
07:20 dalek rakudo/nom: Make slip(@a) quite a bit faster.
07:20 dalek rakudo/nom:
07:20 dalek rakudo/nom: But generally, you are better off using .Slip anyway, because it avoids
07:20 dalek rakudo/nom: the overhead of the expensive argument parsing with a +args signature.
07:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/37d0e46614
08:55 [TuxCM] joined #perl6-dev
09:38 RabidGravy joined #perl6-dev
09:50 nine Damn.... camelia fails to build rakudo-j again: java.lang.RuntimeException: Missing or wrong version of dependency 'gen/jvm/stage2/QRegex.nqp'
10:40 lizmat joined #perl6-dev
12:17 MasterDuke m: grammar G { regex TOP {^^ "#" \s* "line" \s+ $<line>=(\d+) \s* [ \s (<['"]>?) $<filename>=(<-['"]>+) $0 ]? \s* $$} }; say G.parse("#line 2 foo.bar")
12:17 camelia rakudo-moar 37d0e4: OUTPUT«「#line 2 foo.bar」␤ line => 「2」␤ 0 => 「」␤ filename => 「foo.bar」␤»
12:18 MasterDuke the above is a direct translation of the Perl 5 regex to parse line directives show in the docs: /^\# \s* line \s+ (\d+) \s* (?:\s("?)([^"]+)\g2)? \s* $/x
12:19 MasterDuke however, when i stick that in NQP's src/HLL/Grammar (minus the TOP obviously), the line directives in m-CORE.setting don't get parsed
12:20 timotimo could be it doesn't even get considered from rakudo's grammar?
12:20 timotimo i.e. overwritten by other stuff
12:20 MasterDuke no, if i use something a little less flexible it works
12:21 timotimo hm, ok
12:21 timotimo could be newline-related trouble
12:21 MasterDuke this is what i've been testing with: ^^ '#' \s* 'line' \s+ $<line>=(\d+) [ \s+ $<filename>=(\S+) ]? $$
12:21 timotimo that's the one that works?
12:21 MasterDuke yep
12:22 MasterDuke as a token, not regex
12:22 timotimo well, there's your problem
12:22 timotimo rakudo has a more complicated rule ws, i think
12:22 timotimo wait, is token sigspace?
12:23 timotimo no, only rule is sigspace. never mind, then
12:23 timotimo well, what if you change the more complicated one to regex instead of token? maybe you're relying on backtracing without knowing it?
12:24 MasterDuke m: grammar G { token TOP {^^ "#" \s* "line" \s+ $<line>=(\d+) \s* [ \s (<['"]>?) $<filename>=(<-['"]>+) $0 ]? \s* $$} }; say G.parse("#line 2 foo.bar")
12:24 camelia rakudo-moar 37d0e4: OUTPUT«Nil␤»
12:24 MasterDuke i did, after seeing it didn't work as a token ^^^
12:25 timotimo um
12:25 timotimo is that $0 correct? because i don't think it is.
12:26 timotimo m: grammar G { token TOP {^^ "#" \s* "line" \s+ $<line>=(\d+) \s* [ \s (<['"]>?) $<filename>=(<-['"]>+) $1 ]? \s* $$} }; say G.parse("#line 2 foo.bar")
12:26 camelia rakudo-moar 37d0e4: OUTPUT«Nil␤»
12:26 MasterDuke it is. the first capture is named, so itn't also $0
12:26 timotimo it is also $0, because you have () instead of [] on the RHS of the =
12:26 MasterDuke m: grammar G { regex TOP {^^ "#" \s* "line" \s+ $<line>=(\d+) \s* [ \s (<['"]>?) $<filename>=(<-['"]>+) $0 ]? \s* $$} }; say G.parse("#line 2 'foo.bar'")
12:26 camelia rakudo-moar 37d0e4: OUTPUT«「#line 2 'foo.bar'」␤ line => 「2」␤ 0 => 「'」␤ filename => 「foo.bar」␤»
12:26 timotimo m: say ("heyo" ~~ / $<lol>=(.) /).perl;
12:26 camelia rakudo-moar 37d0e4: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new((:lol(Match.new(ast => Any, list => (), hash => Map.new(()), orig => "heyo", to => 1, from => 0)))), orig => "heyo", to => 1, from => 0)␤»
12:27 timotimo ok, i'm wrong, carry on.
12:28 MasterDuke ha no worries. i've now been testing so many variations of the code it's all running together, so it's good for fresh eyes to check some assumptions
12:28 timotimo have you tried running it through perl6-debug-m yet?
12:31 MasterDuke huh, that gives me Nil for the regex example that works with perl6-m
12:32 MasterDuke it matched up through the 'foo.bar', but then backs off back to the space and gives Nil
12:32 MasterDuke assuming i'm reading it correctly, i've never used it before
12:34 timotimo i'm not sure what exact code you're currently trying it with
12:34 MasterDuke m: grammar G { regex TOP {^^ "#" \s* "line" \s+ $<line>=(\d+) \s* [ \s (<['"]>?) $<filename>=(<-['"]>+) $0 ]? \s* $$} }; say G.parse("#line 2 'foo.bar'")
12:34 camelia rakudo-moar 37d0e4: OUTPUT«「#line 2 'foo.bar'」␤ line => 「2」␤ 0 => 「'」␤ filename => 「foo.bar」␤»
12:34 MasterDuke ^^^ that
12:35 timotimo m: say "bab" ~~ / (X?).$0 /
12:35 camelia rakudo-moar 37d0e4: OUTPUT«「b」␤ 0 => 「」␤»
12:35 timotimo m: say "bab" ~~ / (.?).$0 /
12:35 camelia rakudo-moar 37d0e4: OUTPUT«「bab」␤ 0 => 「b」␤»
12:35 timotimo well, that's supposed to work at least
12:54 vendethiel joined #perl6-dev
13:10 MasterDuke RT #130083 for different behavior between perl6-m and perl6-debug-m
13:10 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130083
13:11 MasterDuke there are still other things to work on in my code, so i'll back off to the less flexible token to keep making progress
13:13 TimToady joined #perl6-dev
13:18 dalek rakudo/nom: 13f6b63 | usev6++ | src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java:
13:18 dalek rakudo/nom: Check for concreteness in p6scalarfromdesc on JVM
13:18 dalek rakudo/nom:
13:18 dalek rakudo/nom: That method looks whether the decontainerized value of desc is
13:18 dalek rakudo/nom: a type object. It handles the 'null' case as well.
13:18 dalek rakudo/nom:
13:18 dalek rakudo/nom: Fixes RT #128341 and newly failing tests in S09-multidim/assign.t.
13:18 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128341
13:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/13f6b63455
13:18 dalek rakudo/nom: cdca973 | (Zoffix Znet)++ | src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java:
13:18 dalek rakudo/nom: Merge pull request #918 from usev6/rt128341
13:18 dalek rakudo/nom:
13:18 dalek rakudo/nom: Check for concreteness in p6scalarfromdesc on JVM
13:23 dalek roast: 1f31490 | usev6++ | S09- (2 files):
13:23 dalek roast: Unfudge tests for RT #128341 (rakudo-j)
13:23 dalek roast:
13:23 dalek roast: Fixed with Rakudo commit 13f6b63455.
13:23 dalek roast: review: https://github.com/perl6/roast/commit/1f31490163
13:23 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128341
13:32 lizmat joined #perl6-dev
15:38 dalek rakudo/nom: 59bb1b1 | lizmat++ | src/core/ (2 files):
15:38 dalek rakudo/nom: Make IterationEnd.perl/gist/Str show "IterationEnd"
15:38 dalek rakudo/nom:
15:38 dalek rakudo/nom: Mostly for making debugging of iterators easier.
15:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/59bb1b1471
15:42 AlexDaniel joined #perl6-dev
16:01 lizmat T-Dose shutting down&
16:23 travis-ci joined #perl6-dev
16:23 travis-ci Rakudo build failed. Elizabeth Mattijsen 'Make IterationEnd.perl/gist/Str show "IterationEnd"
16:23 travis-ci https://travis-ci.org/rakudo/rakudo/builds/175494050 https://github.com/rakudo/rakudo/compare/cdca973f4b1c...59bb1b14713b
16:23 travis-ci left #perl6-dev
16:23 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
18:12 * TimToady waves briefly...
18:12 TimToady will backlog offline
19:30 MasterDuke timotimo: i know you've worked on the profiler some. what do you think about adding sqlite as an output format? e.g., --profile-filename=example.sqlite outputs it as a sqlite database? that might make working with large profiles possible
19:46 timotimo MasterDuke: it's possible. you could probably have a piece of code in rakudo that does it (because no nativecall sugar in nqp) and install it in the compiler and call it from there
19:46 timotimo or something like that, anyway
19:58 MasterDuke timotimo: hmm, doesn't sound quite as simple as i'd hoped, but maybe i'll look into it if no one else has after i finish up this line directive stuff
20:11 pmurias joined #perl6-dev
20:12 dalek nqp: 17d9bbf | (Pawel Murias)++ | src/QAST/Node.nqp:
20:12 dalek nqp: Avoid printing out <> when we have dump ast nodes with no flags.
20:12 dalek nqp: review: https://github.com/perl6/nqp/commit/17d9bbf255
20:12 dalek nqp: 070392c | (Pawel Murias)++ | src/vm/js/Compiler.nqp:
20:12 dalek nqp: [js] Insert 'use strict'.
20:12 dalek nqp: review: https://github.com/perl6/nqp/commit/070392c223
20:12 dalek nqp: 0062c15 | (Pawel Murias)++ | src/vm/js/ (2 files):
20:12 dalek nqp: [js] Instead of looking up the sc handle/idx on every QAST::WVal use, store the value in a js variable.
20:12 dalek nqp: review: https://github.com/perl6/nqp/commit/0062c15031
20:12 dalek nqp: 8229f78 | (Pawel Murias)++ | src/vm/js/ (3 files):
20:12 dalek nqp: [js] Optimize boolification.
20:12 dalek nqp: review: https://github.com/perl6/nqp/commit/8229f78386
20:30 dalek roast: 8f856a7 | (Aleks-Daniel Jakimenko-Aleksejev)++ | S (2 files):
20:30 dalek roast: gcd operator with zeros
20:30 dalek roast: review: https://github.com/perl6/roast/commit/8f856a7803
20:54 lizmat joined #perl6-dev
21:18 MasterDuke what runs during stage mast of the rakudo build?
21:21 arnsholt NQP code mostly, I think. Outputting the Moar bytecodes
21:27 lizmat m: my @a[2;2] = ((0,1),(2,3),());   # should this fail or not ?
21:27 camelia rakudo-moar 59bb1b: ( no output )
21:28 lizmat jnthn: ^^^ one could argue the data has the wrong number of dimensions, although it actually doesn't specify any value in the out-of-bound dimension
21:30 lizmat afk&
21:31 [TuxCM] joined #perl6-dev
21:42 seatek joined #perl6-dev
21:57 MasterDuke arnsholt: thanks
21:57 MasterDuke it's interesting. m-CORE.setting is parsed twice. once during the parse stage, and again during the mast stage
22:00 timotimo "parsed"?
22:01 MasterDuke read at least and HLL::Compiler.lineof called on each line
22:01 MasterDuke what's the nqp equiv of caller[1]?
22:02 timotimo something like with nqp::callframe?
22:02 timotimo or look at the source of callframe or something
22:06 timotimo it helps when you change code to make it faster to also -Ilib
22:08 MasterDuke timotimo: ^^^ was that to me?
22:11 timotimo no, to myself
22:11 timotimo i'm looking at JSON::Fast again
22:11 timotimo it's allocating far too many BOOTCode >:(
22:14 pmurias MasterDuke: look in the nqp repo at src/vm/moar/QAST/QASTCompilerMAST.nqp:1405
22:17 MasterDuke pmurias: yeah, i didn't realize at first that compile_all_the_stmts() was called multiple times
22:26 timotimo i wish someone could swoop in and make JSON::Fast's parse-string twice as fast or something ...
22:30 timotimo or make nom-ws not allocate BOOTCode :|

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