Perl 6 - the future is here, just unevenly distributed

IRC log for #p6dev, 2016-03-31

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

All times shown according to UTC.

Time Nick Message
01:47 ilbot3 joined #p6dev
01:47 Topic for #p6dev is now Perl 6 language and compiler development
03:27 MadcapJake_ joined #p6dev
06:18 RabidGravy joined #p6dev
06:43 [Tux] test            22.632
06:43 [Tux] test-t          12.666
06:44 [Tux] csv-parser      25.445
06:58 RabidGravy creeping down again
06:58 [Tux] yesterday was better
06:58 [Tux] test-t          12.120
08:22 |Tux| joined #p6dev
11:43 dalek rakudo/nom: 41abcd1 | lizmat++ | tools/build/makeMAGIC_INC_DEC.pl6:
11:43 dalek rakudo/nom: Hopefully last work on magic string generator
11:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/41abcd1bdb
11:43 dalek rakudo/nom: b808816 | lizmat++ | src/core/Rakudo/Internals.pm:
11:43 dalek rakudo/nom: Reimplement magic increment/decrement in Internals
11:43 dalek rakudo/nom:
11:43 dalek rakudo/nom: This serves a number of purposes:
11:43 dalek rakudo/nom: - abstract the magic inc/dec logic into generally accessible library methods
11:43 dalek rakudo/nom:   this should allow us to fix the "z" .. "ab" issue
11:43 dalek rakudo/nom: - create a fast-path for most common increments (up to 3.5x as fast)
11:43 dalek rakudo/nom: - uses generated string tables, easily maintainable for future unicode features
11:43 dalek rakudo/nom: - abstracted the "." logic out of the magic inc/dec
11:44 lizmat this was: https://github.com/rakudo/rakudo/commit/b8088169b6a2cc5d6a3995
11:44 lizmat followed by https://github.com/rakudo/rakudo/commit/535727825d9b69afb84b
11:46 timotimo oooh, 3.5x as fast
11:46 timotimo that's pretty lovely
11:46 timotimo z0ff9x.c0m!
11:48 lizmat i would posit that the magic increment "." feature should only be applicable to IO::Path, *not* to Str
11:48 jnthn lizmat: From discussion with TimToady a little back, it stays on Str too.
11:48 lizmat m: say "foo.bar".succ   # feels like a WAT to me
11:48 camelia rakudo-moar ae3a79: OUTPUT«fop.bar␤»
11:48 jnthn Every DWIM can be see as a WAT :)
11:48 timotimo m: say "192.168.0.1".succ
11:48 camelia rakudo-moar ae3a79: OUTPUT«193.168.0.1␤»
11:48 timotimo ^- THAT is a WAT :P
11:49 timotimo but if you're using a string for an ipv4 address in the first place, you may be on the way for more trouble
11:49 lizmat $ 6 'say "192.168.0.1".succ'
11:49 lizmat 192.168.1.1
11:49 timotimo hah
11:49 lizmat seems I fixed that now  ?
11:49 lizmat :-)
11:49 timotimo are you sure? :)
11:50 lizmat $ 6 'say "192.168.99.1".succ'
11:50 lizmat 192.168.100.1
11:50 timotimo well, i have no clue how the feature is described in the specs and the documentation
11:50 timotimo the behavior we have on camelia right now is what you want when you have for example a .tar.gz file
11:50 timotimo m: say "foo01.tar.gz".succ
11:50 camelia rakudo-moar ae3a79: OUTPUT«foo02.tar.gz␤»
11:50 timotimo i expect your local output would be foo01.tas.gz?
11:51 lizmat aha...  yes
11:51 lizmat hmmm... and that is *not* caught by the spectest  :-(
11:51 timotimo we probably want to keep the "left of the first dot" behavior
11:51 timotimo and add spec tests :)
11:52 lizmat fortunately, it's a 1 char fix
11:52 timotimo great!
11:55 lizmat hmmm...  still, labster assumed in 2013 that magic increment only works on the basename
11:55 lizmat as shown in the last 2 tests in t/spec/S32-io/io-path-unix.t
11:55 jnthn TimToady++ noted that the . rule is probably in the design docs
11:55 jnthn So yeah, +1 to adding tests to cover it
11:56 timotimo Perhaps more to the point, if you happen to increment a string that ends with a decimal number, it's likely to do the right thing:
11:56 timotimo $num = "123.456";
11:56 timotimo $num++;             # 124.456, not 123.457
11:57 timotimo http://design.perl6.org/S03.html#Autoincrement_precedence
11:57 jnthn That's also cute :)
11:57 timotimo Increment of a Str (in a suitable container) works similarly to Perl 5, but is generalized slightly. A scan is made for the final alphanumeric sequence in the string that is not preceded by a '.' character.
11:58 timotimo there it says "not preceded by a . character"
12:02 dalek rakudo/nom: 9c02f65 | lizmat++ | src/core/Rakudo/Internals.pm:
12:02 dalek rakudo/nom: Make magic inc/dec match spec wrt to "."
12:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9c02f65f13
12:30 |Tux| test            21.073
12:30 |Tux| test-t          12.093
12:30 |Tux| csv-parser      24.505
12:30 |Tux| :)
12:30 timotimo neat
12:31 timotimo some day we'll wiggle down below 12 using the power of noise
12:31 timotimo and maybe later we'll reach 10 :)
12:31 * |Tux| frees the butterflies
12:51 dalek rakudo/nom: 2b3d1c1 | ab5tract++ | src/Perl6/Optimizer.nqp:
12:51 dalek rakudo/nom: Fix for WhateverCodes in void context
12:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2b3d1c19f6
12:51 dalek rakudo/nom: 49a6214 | ab5tract++ | src/Perl6/Optimizer.nqp:
12:51 dalek rakudo/nom: Fold the condition into the surrounding clause
12:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/49a6214d1f
12:51 dalek rakudo/nom: b4b7fa0 | ab5tract++ | src/Perl6/Optimizer.nqp:
12:51 dalek rakudo/nom: Constrain the match to avoid ignoring multiplication
12:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b4b7fa0441
12:51 dalek rakudo/nom: 91858a6 | ab5tract++ | src/Perl6/Optimizer.nqp:
12:51 dalek rakudo/nom: Use the substring of first and last indices approach
12:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/91858a63ee
13:46 AlexDaniel joined #p6dev
13:47 skids joined #p6dev
13:57 [Tux] joined #p6dev
14:10 dalek rakudo/nom: 7d4b3a3 | coke++ | docs/release_guide.pod:
14:10 dalek rakudo/nom: reluctantly claim the next release
14:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7d4b3a3d05
14:12 [Coke] Note that the next release is going to occur the weekend of the Baltimore perl workshop.
14:12 [Coke] assuming it doesn't get delayed.
14:15 jnthn Mmm...more balti...
14:15 jnthn [Coke]++
14:16 perlpilot We need some sort of white-camel-like award so that we can give it to Coke for all of the releases he's done  :)
14:17 [Coke] eh. Just pushing buttons.
14:18 perlpilot ... when no one else would push them
14:24 timotimo baltimore?
14:24 timotimo that always used to highlight me :D
14:36 lizmat commute to Amsterdam for NLPW tomorrow
14:36 lizmat the van is loaded with camels and butterflies and a lot of books and T-shirts
14:36 lizmat &
14:37 [Coke] safe travels!
15:12 Woodi hmm, "123.456"++ finishing as not "123.457" is pity... someone was realy thinked about devs here :)  but having $ip_addr++ doing right thing would be realy mini-killer-app of Perl6, especially for IPv6...
15:14 timotimo we can't have everything at the same time
15:14 Woodi so, we have some magic-automatic here. what if there will be ways to specify what kind of Range is given and how to ++ it ?
15:14 timotimo if you're at that point, you shouldn't use .succ and .pred any more
15:14 jnthn Woodi: Just declare your own type and teach it how to succ
15:15 jnthn And then you can make ranges of it just fine
15:15 jnthn ip($a)..ip($b) or so
15:17 timotimo oh, i should have specified; at that point you shouldn't just use .succ and .pred on Str
15:20 Woodi I think such thing is AI-applied domain, just not fuzzy :)
15:28 timotimo m: say Buf[uint8].new(1, 2, 3).succ
15:28 camelia rakudo-moar 7d4b3a: OUTPUT«Method 'succ' not found for invocant of class 'Buf[uint8]'␤  in block <unit> at /tmp/cpmxLE5UvY line 1␤␤»
15:51 dalek nqp: ff4beee | (Pawel Murias)++ | src/vm/js/nqp-runtime/serialization.js:
15:51 dalek nqp: [js] Fix serialization of contexts.
15:51 dalek nqp: review: https://github.com/perl6/nqp/commit/ff4beeea04
15:51 dalek nqp: 0a8a782 | (Pawel Murias)++ | src/vm/js/Compiler.nqp:
15:51 dalek nqp: [js] Fix bug.
15:51 dalek nqp: review: https://github.com/perl6/nqp/commit/0a8a782560
15:51 dalek nqp: b403469 | (Pawel Murias)++ | src/vm/js/ (3 files):
15:51 dalek nqp: [js] Fix the way closures are handled so that nqp-js-on-js passes t/nqp/56-role.t
15:51 dalek nqp:
15:51 dalek nqp: When capturing scopes also save the outer context.
15:51 dalek nqp: Make nqp::compunitcodes return all the compiled code refs.
15:51 dalek nqp: review: https://github.com/perl6/nqp/commit/b403469d07
16:29 Woodi jnthn: ok, got it now :)
18:43 Ven joined #p6dev
19:10 Ven joined #p6dev
19:39 Ven joined #p6dev
21:00 skids joined #p6dev
22:01 lizmat joined #p6dev
22:01 AlexDaniel joined #p6dev
22:42 dalek rakudo/nom: 8863aae | TimToady++ | src/Perl6/Optimizer.nqp:
22:42 dalek rakudo/nom: Revert "Use the substring of first and last indices approach"
22:42 dalek rakudo/nom:
22:42 dalek rakudo/nom: This reverts commit 91858a63ee7711af20b53e70ef5dac3ac373e55d.
22:42 dalek rakudo/nom:
22:42 dalek rakudo/nom: Checking for textual * in the optimizer is too late; a better way
22:43 dalek joined #p6dev
22:44 timotimo are we going to do anything at all for april fools' day?
22:44 timotimo well, it might be a bit late right now
22:45 timotimo TimToady: you made the wanted stuff; can you teach me how to make p6sink smarter when it contains an if or unless with just one branch?
22:45 timotimo my tries so far have led to a mysterious "cannot look for method sink in null object" after everything i run and i can't get --ll-exception
22:46 timotimo maybe you can try to implement that and do it in just five minutes instead of my "already spent two hours"
22:46 TimToady I dunno, I ran into trouble myself there, once upon a time
22:46 TimToady there's something mysterious down in codegenland that relies on teh current v node structure
22:46 timotimo https://gist.github.com/timo/d30f9fc08daf9c6aa67f041ff02096f4 - my stuff so far
22:47 timotimo well, there's a problem where we only ever visit the first branch of the Want, ever. even though we already know we're in void context there
22:47 TimToady I tried once to optimize those away and failed
22:47 timotimo darn
22:48 TimToady maybe I know more, or more likely, I knew more at Christmas, and since forgot it :)
22:48 timotimo possibly
22:48 timotimo do you want to explain the WANTED stuff?
22:48 timotimo that's only about warning of "unnecessary use of blah"? or is there more to it?
22:49 TimToady it's about propagating sink/nonsink context down the tree
22:49 TimToady Useless use is just one, er, use of that
22:50 TimToady I basically inserted a top-down pass interleaved with the action methods bottom-up pass
22:51 TimToady so it's quite similar to how P5 propagates context ASP, in fact
22:51 TimToady ASAP
22:51 timotimo hm, OK
22:51 timotimo does that factor into what the optimizer knows as $!void_context?
22:51 TimToady as soon as we know something is wanted/unwanted, we mark the leaves below it
22:52 TimToady there are also two variants of each: wanted() WANTED() and unwanted() UNWANTED()
22:52 TimToady the uppercase one tries harder :)
22:53 timotimo "tries"?
22:53 timotimo tries to get rid of something or tries to make sure something ends up in the result?
22:53 TimToady makes sure something is marked that might otherwise be considered too unimportant to mark
22:54 TimToady the distinction is mostly just trying to save putting annotations on all kinds of nodes that won't be checked for sinkness
22:54 timotimo mhm
22:54 TimToady if nodes used an attribute instead of annotations, the distinction would be meaningless
22:54 timotimo and those long lists of letters in the :BY?
22:55 TimToady that's just figuring out who is actually doing the wanted()/unwanted() call
22:56 timotimo i find it extremely noisy visually. though to be fair it was already quite noisy before those additions
22:56 TimToady just a debugging aid that is supposed to go away unless you set the envvar
22:56 timotimo i didn't know about the envvar yet
22:57 TimToady the stuff with $wantwant
22:58 TimToady I don't think it's even compiled in right now though
22:59 TimToady but yeah, the BY stuff could probably be simplified for normal use
22:59 TimToady it was mostly a temporary expedient to solve deep mysteries :)
22:59 sortiz joined #p6dev
23:01 TimToady anyway, it shouldn't be generating a lot of string trash unless $wantwant is set
23:21 vendethiel- joined #p6dev
23:29 timotimo do you think it'd be horrible and terrible if i wrote a second dump method that lives only in Node and has special knowledge of all node types? or maybe even a sub that lives after all the node types, that would make forward declaration unnecessary
23:29 timotimo er, in order to dump to json, i mean
23:30 timotimo anyway, i'm just about ready to go to bed and have some sleeps
23:43 AlexDaniel joined #p6dev

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