Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-05-26

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

All times shown according to UTC.

Time Nick Message
01:05 geekosaur joined #perl6-dev
01:49 ilbot3 joined #perl6-dev
01:49 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
04:59 llfourn joined #perl6-dev
05:00 astj joined #perl6-dev
05:04 samcv joined #perl6-dev
05:35 geekosaur joined #perl6-dev
06:35 [Tux] This is Rakudo version 2017.05-89-gec51e73fc built on MoarVM version 2017.05-24-gd86a35b6
06:35 [Tux] csv-ip5xs        2.873
06:35 [Tux] test            12.972
06:35 [Tux] test-t           4.286 - 4.562
06:35 [Tux] csv-parser      13.577
07:01 Geth ¦ roast: 6ecd8c2621 | (Elizabeth Mattijsen)++ | S03-operators/proper-subset.t
07:01 Geth ¦ roast: First batch of thorough tests for (<) and friends
07:01 Geth ¦ roast: review: https://github.com/perl6/roast/commit/6ecd8c2621
08:23 [TuxCM] joined #perl6-dev
08:25 jnthn morning o/
08:25 lizmat jnthn  o/
08:25 yoleaux 25 May 2017 12:07Z <CptnObvious> lizmat: mentioning it, just in case. Do not remove any files from t/spectest.data, since the same list is used by 6.c-errata test run (at least for now).
08:26 lizmat noted  :-)
08:29 * jnthn currently trying his I/O changes out on Windows
08:31 jnthn Forgot how much slower spectest is here
08:32 * lizmat forgot about Windows altogether  :-)
08:32 lizmat breakfeast&
08:33 jnthn Urgh, seems some more general test triage will be needed here
08:33 jnthn Glad I'm doing a nom spectest first to have a baseline
08:53 jnthn grr...seems somehow things are a bit busted
08:53 jnthn (with my branch)
08:53 jnthn Something to do with the precomp thing again
08:59 jnthn Oh wow
08:59 jnthn Somehow the dependency header at the top of a precomp file gets an extra \r\n
08:59 jnthn On Windows
08:59 jnthn If I manually delete that from the file then stuff all works o.O
09:06 nine But but but, I do $handle.print("\n"); How much more explict can I get?
09:06 robertle joined #perl6-dev
09:07 timotimo "an extra \r\n" sounds more like there's something that thinks it should emit two
09:08 jnthn nine: Sure, the translation of it to \r\n is OK, the fact it magically becomes \r\n\r\n is less so...if that's what's happening
09:08 jnthn I was wondering if we somehow got an "empty" dependency
09:08 jnthn But it seems not
09:08 jnthn m: say "\n".subst("\n", "\r\n")
09:08 camelia rakudo-moar ec51e7: OUTPUT: «
09:08 jnthn m: say "\n".subst("\n", "\r\n").perl
09:08 camelia rakudo-moar ec51e7: OUTPUT: «"\r\n"␤»
09:10 * jnthn pulls the :translate-nl he added to method print out of it just in case
09:11 jnthn m: my $x = 'abc'; say ($x ~ "\n").subst("\n", "\r\n").perl
09:11 camelia rakudo-moar ec51e7: OUTPUT: «"abc\r\n"␤»
09:12 jnthn eek, yes, removing the :translate-nl does indeed sort it out
09:12 Geth ¦ rakudo/nom: 25d0430ab0 | (Elizabeth Mattijsen)++ | 4 files
09:12 Geth ¦ rakudo/nom: Fix for RT #131362
09:12 Geth ¦ rakudo/nom:
09:12 Geth ¦ rakudo/nom: - X::Assignment::RO now takes a :value named instead of :typename
09:12 Geth ¦ rakudo/nom: - .message now does the type finding and value showing
09:12 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131362
09:12 Geth ¦ rakudo/nom: - provide .typename method for compatibility with some spectests
09:12 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/25d0430ab0
09:13 jnthn m: say "\n".subst("\n", "\r\n", :g)
09:13 camelia rakudo-moar ec51e7: OUTPUT: «
09:13 jnthn m: say "\n".subst("\n", "\r\n", :g).perl
09:13 camelia rakudo-moar ec51e7: OUTPUT: «"\r\n"␤»
09:13 jnthn m: my $x = 'abc'; say ($x ~ "\n").subst("\n", "\r\n", :g).perl
09:13 camelia rakudo-moar ec51e7: OUTPUT: «"abc\r\n"␤»
09:24 nine timotimo: the "bin" confusion in S22 is a rendering error! If you look at S22-package-format.pod you'll find that the topics are clearly separated.
09:24 timotimo damn!
09:24 nine timotimo: I guess it's because there's 2 headlines called "bin". One =head3 and one =head4.
09:25 timotimo ugh.
09:25 timotimo maybe rename one of them :from<bin>
09:25 nine Will do that, though it feels a bit dirty to work around that bug
09:26 timotimo it'd also make it easier to find the right one from the TOC
09:27 nine pushed
09:45 jnthn ohh...seems somehow .serialize ends up returning something terminated with \r\n already
09:49 samcv wow weird bug
09:50 jnthn ohh
09:50 jnthn It's something to do with Proc.lines
09:51 jnthn Well, Proc.out.lines
09:51 jnthn Which apparently is not breaking lines
09:51 jnthn um, and Proc doesn't have an nl-in and nl-out, just nl, which defaults to \n :S
09:51 jnthn So, fun question becomes how did this ever work before my branch
09:54 jnthn ohh
09:55 jnthn Looks like the decoder didn't get constructed with :translate-nl in IO::Pipe
09:55 jnthn Damn, that took some finding...
09:57 jnthn yay, clean make test
09:59 Geth ¦ rakudo/refactor-handle-encoding: 3e5dd7da2a | jnthn++ | 2 files
09:59 Geth ¦ rakudo/refactor-handle-encoding: Re-enable file newline translation.
09:59 Geth ¦ rakudo/refactor-handle-encoding:
09:59 Geth ¦ rakudo/refactor-handle-encoding: Side note: I believe there's an RT that asks for this as an option to
09:59 Geth ¦ rakudo/refactor-handle-encoding: `open`, which with these refactors has become LHF.
09:59 Geth ¦ rakudo/refactor-handle-encoding: review: https://github.com/rakudo/rakudo/commit/3e5dd7da2a
10:14 jnthn Grr, turns out the IO::Path.slurp fast-path I retained also needs a line translation fix...
10:14 Geth ¦ rakudo/nom: f2fca0c8c2 | (Elizabeth Mattijsen)++ | 2 files
10:14 Geth ¦ rakudo/nom: Make error on "my $x is Int" more awesomeo
10:14 Geth ¦ rakudo/nom:
10:14 Geth ¦ rakudo/nom: $ 6 'my $x is Int'
10:14 Geth ¦ rakudo/nom:   ===SORRY!=== Error while compiling -e
10:14 Geth ¦ rakudo/nom:   is trait on $-sigil variable not yet implemented. Sorry.
10:14 Geth ¦ rakudo/nom:   Did you mean: my Int $x?
10:14 Geth ¦ rakudo/nom:
10:14 Geth ¦ rakudo/nom: - as recently discussed on perl6-language
10:14 Geth ¦ rakudo/nom: - added optional "did-you-mean" parameter to X::NYI
10:14 Geth ¦ rakudo/nom: - used that in $*W.container_type_info
10:14 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f2fca0c8c2
10:14 Zoffix m: say Inf.Rat.nude
10:14 camelia rakudo-moar 25d043: OUTPUT: «(Inf 0)␤»
10:14 Zoffix m: say NaN.Rat.nude
10:14 camelia rakudo-moar 25d043: OUTPUT: «(NaN 0)␤»
10:14 Zoffix m: say NaN.Rat - NaN.Rat
10:14 camelia rakudo-moar 25d043: OUTPUT: «Type check failed in binding to parameter 'nu'; expected Int but got Num (NaN)␤  in block <unit> at <tmp> line 1␤␤»
10:15 Zoffix Really hope it's not too late to make these into 1/0 and 0/0 Rats :\
10:15 Zoffix Was reading this: https://irclog.perlgeek.de/perl6/2017-05-26#i_14638996
10:16 Zoffix And if it weren't for this special casing, our Rats would be identities always in $rat - $rat = 0
10:16 Zoffix m: my $rat = 0/0; say $rat.Num; say $rat - $rat == 0
10:16 camelia rakudo-moar 25d043: OUTPUT: «NaN␤False␤»
10:16 Zoffix m: my $rat = 0/0; say $rat.Num; say $rat - $rat == 0/0
10:16 camelia rakudo-moar 25d043: OUTPUT: «NaN␤False␤»
10:16 Zoffix Ah, OK then
10:17 lizmat afk for most of the day&
10:17 Geth ¦ rakudo/refactor-handle-encoding: 4a7029b630 | jnthn++ | src/core/IO/Path.pm
10:17 Geth ¦ rakudo/refactor-handle-encoding: The IO::Path.slurp fast-path should translate nl.
10:17 Geth ¦ rakudo/refactor-handle-encoding:
10:17 Geth ¦ rakudo/refactor-handle-encoding: Which may take away from some of its fastness, so we might want to do
10:17 Geth ¦ rakudo/refactor-handle-encoding: some measuring and just toss it altogether.
10:17 Geth ¦ rakudo/refactor-handle-encoding: review: https://github.com/rakudo/rakudo/commit/4a7029b630
10:18 Zoffix right, we special case zero-denominator rats to do .Num == .Num, so that NaN != NaN falls out of it automagically
10:28 jnthn OK, Rakudo on Windows could do with some love, but with these changes my work doesn't make things any worse. :)
10:28 jnthn And there's some passing TODOs also, like on Linux
10:29 jnthn Lunch now, and afterwards will see what attention JVM needs.
10:29 AlexDaniel joined #perl6-dev
10:31 llfourn does anyone know why these tests are triplicated?: https://github.com/perl6/roast/blob/master/S32-str/substr.t#L31
10:32 Zoffix jnthn: yeah, I plan on giving it love after IO grant is finished
10:34 Zoffix llfourn: looks like an offering to The Noodly Lord... a nice plate of copy-pasta
10:34 * Zoffix hopes we get lucky today and jnthn++ merges the handle refactor
10:34 Zoffix I'm all stocked up on coffee and ready for the final dash on the IO grant this long weekend \o/ :D
10:36 * llfourn wonders if the Noodly lord will notice if he removes his pasta
11:00 astj joined #perl6-dev
11:08 astj joined #perl6-dev
11:14 MasterDuke jnthn: i see that sequence of decont -> smrt_numify -> coerce_ni in QAST::MASTOperations.add_hll_unbox. however, i added a note() there and it doesn't get printed when i do `./nqp-m -e 'say(100000000000000009)'`
11:22 masak TimToady: I keep thinking about the `Q ({{{$expr}}})` code "thinko" in https://stackoverflow.com/questions/43561614/how-do-i-write-a-perl6-macro-to-enquote-text/
11:22 yoleaux 23 May 2017 14:20Z <lizmat> masak: looks like Mixy semantics on (<) and (<=) are tricky, e.g. would (a => -1).Mix (<) ().Mix be True or False?
11:22 yoleaux 23 May 2017 14:22Z <lizmat> masak: could be False because key "a" is missing on right hand side Mix, could be True if missing keys are considered to have value 0
11:22 masak TimToady: what *should* be the behavior of trying to put {{{ }}} in a quoting construct?
11:23 masak TimToady: I mean, we could make that one "just work" (though I'm not convinced we should)
11:23 masak lizmat: I have no easy answers :/
11:23 * jnthn back
11:24 jnthn MasterDuke: Hmm, I'd have expected it to trigger. Curious.
11:24 MasterDuke do i need to `make bootstrap-files`? or whatever that exact option is
11:25 jnthn Doubt it, 'cus the compiler would be run to comjpile your say(...)
11:25 jnthn *compile
11:26 MasterDuke btw, any reason radix returns an object array/list instead of an int one?
11:27 MasterDuke since i believe all the possible values are ints
11:27 jnthn It returns a pair of integers in the case of parsing a rational number, no?
11:28 MasterDuke nqp: my $a := nqp::radix(10, "9/7", 0, 0); say(nqp::atpos($a, 0))
11:28 camelia nqp-moarvm: OUTPUT: «9␤»
11:29 jnthn More like 9.7
11:29 MasterDuke nqp: my $a := nqp::radix(10, "9.7", 0, 0); say(nqp::atpos($a, 0))
11:29 camelia nqp-moarvm: OUTPUT: «9␤»
11:30 MasterDuke the docs just talk about return values that should be ints
11:30 MasterDuke nqp: my $a := nqp::radix(10, "9.7", 0, 0); say(nqp::atpos($a, 1))
11:30 camelia nqp-moarvm: OUTPUT: «10␤»
11:31 MasterDuke nqp: my $a := nqp::radix(10, "9.7", 0, 0); say(nqp::atpos($a, 2))
11:31 camelia nqp-moarvm: OUTPUT: «1␤»
11:46 jnthn Hm, I mighta found the JVM hang
11:47 jnthn (Longstanding bug that I tickled, if so)
11:47 jnthn This work also manages to get rid of all the #?if jvm inside of IO::Handle...
11:50 MasterDuke nice
11:52 MasterDuke has anybody tried running rakudo-j on Azure's jvm? any noticeable difference?
11:52 Geth ¦ nqp: 34835cc672 | (Jonathan Worthington)++ | src/vm/jvm/runtime/org/perl6/nqp/io/SyncHandle.java
11:52 Geth ¦ nqp: Fix nqp::readfh on JVM not setting eof.
11:52 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/34835cc672
11:56 jnthn ===SORRY!===
11:56 jnthn java.util.zip.ZipException: invalid stored block lengths
11:56 jnthn grrr
12:08 astj joined #perl6-dev
12:23 MasterDuke huh, and why doesn't nqp::split return a str array?
12:25 masak TimToady: I could see {{{ }}} working in a regexp, if the thing inserted is a regexp fragment... for some reason it's harder to rationalize with strings.
12:26 masak maybe because the code being inserted doesn't "fit" into the string.
12:41 dogbert17 o/ are we supposed to have failing spectests atm? (have two)
12:42 Zoffix dogbert17: I had open failing; I think it's due to test changes for jnthn++ upcoming handle refactor
12:43 Zoffix dogbert17: which is the other one?>
12:43 dogbert17 t/spec/S02-types/sethash.t
12:43 Zoffix Are you sure you have latest and greatest Rakudo?
12:44 dogbert17 This is Rakudo version 2017.05-91-gf2fca0c8c built on MoarVM version 2017.05-24-gd86a35b6
12:44 Zoffix m: put $*PERL.compiler.version
12:44 camelia rakudo-moar f2fca0: OUTPUT: «2017.05.91.gf.2.fca.0.c.8.c␤»
12:44 * Zoffix shrugs
12:44 dogbert17 m: my $sh = <a>.SetHash; for $sh.pairs { .value = 0; .value = 1 }  # this errors out for me
12:44 camelia rakudo-moar f2fca0: ( no output )
12:45 dogbert17 with 'MVMHash representation requires MVMString keys'
12:45 Zoffix m: put $*VM.version
12:45 camelia rakudo-moar f2fca0: OUTPUT: «2017.05.24.gd.86.a.35.b.6␤»
12:45 * Zoffix shrugs
12:45 dogbert17 Zoffix: you don't have your 32 bit machine handy by any chance?
12:46 Zoffix I do
12:46 dogbert17 could you try that snippet?
12:47 Zoffix yeah, just need to build latest commit
12:47 dogbert17 cool, thx
12:47 jnthn Arrrrghhhh....darn NIO :/
12:47 dogbert17 :)
12:47 * dogbert17 builds some coffee
12:48 Geth ¦ nqp: c93fa51b23 | (Jonathan Worthington)++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/DecoderInstance.java
12:48 Geth ¦ nqp: Don't over-size byte return buffer.
12:48 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/c93fa51b23
12:48 Geth ¦ nqp: 147dbdebb8 | (Jonathan Worthington)++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/DecoderInstance.java
12:48 Geth ¦ nqp: Fix a buffer handling fail in JVM takeLine.
12:48 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/147dbdebb8
12:50 dogbert17 gotcha ...
12:51 dogbert17 Zoffix: it's a bug
12:51 Zoffix What's the bug?
12:52 dogbert17 Zoffix: here https://gist.github.com/dogbert17/c62d7a86221849916b394edc7c1413a7
12:52 Zoffix .oO( ./perl6-ugga ??? )
12:53 Zoffix ZofBot: ugga vooga!
12:53 ZofBot Zoffix, id = c
12:53 Zoffix Makes me think of cavepeope
12:53 dogbert17 Zoffix: ugga = valgrind --no-cleanup
12:53 dogbert17 :)
12:54 dogbert17 wouldn't mind a comment from jnthn or timotimo
12:55 * dogbert17 should perhaps enable better debug info
12:57 dogbert17 ok, gist improved, looks like a MoarVM problem, https://gist.github.com/dogbert17/c62d7a86221849916b394edc7c1413a7
12:58 Zoffix $ ./perl6 -e 'my $sh = <a>.SetHash; for $sh.pairs { .value = 0; .value = 1 }'
12:58 Zoffix MVMHash representation requires MVMString keys
12:58 Zoffix $ uname -a
12:58 Zoffix Linux b-webdev-dt 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 GNU/Linux
12:58 dogbert17 that's what I get as well, try perl6-valgrind-m now
12:59 jnthn Yeah, SetHash deletes things
12:59 Zoffix ./perl6-valgrind-m: 11: ./perl6-valgrind-m: valgrind: not found
12:59 dogbert17 heh
12:59 Zoffix :) not installing it
12:59 jnthn When they get to 0
12:59 jnthn Meaning the loop modifies the hash while iterating it
12:59 dogbert17 but should it lead to invalid reads?
13:00 Zoffix m: my $sh = <a>.SetHash; for $sh.pairs { .value = 0; .value = 1 }
13:00 camelia rakudo-moar f2fca0: ( no output )
13:00 Zoffix ^ it works fine on 64-bit boxes tho
13:00 jnthn I'll get it trips valgrind too...
13:00 jnthn dogbert17: No, but that won't chance until we re-do MoarVM hashes
13:00 jnthn Or at least, probably not
13:01 jnthn I think it boils down to "this behavior upsets uthash" or some such
13:01 dogbert17 jnthn: did you see https://gist.github.com/dogbert17/c62d7a86221849916b394edc7c1413a7
13:01 jnthn Yes, that's how I could tell you what's wrong!
13:02 dogbert17 thx, perhaps the test should be changed/removed in the meantime
13:02 dogbert17 it's part of t/spec/S02-types/sethash.t
13:02 jnthn uthash has a linked list. We free something in the linked list when we delete. Then we try to find the next thing.
13:02 jnthn That attempt to find the next thing reads the freed memory
13:03 dogbert17 thx for the explanation
13:04 dogbert17 Zoffix: should we remove that test
13:04 jnthn Alrighty, I think JVM is in good enough shape...it's so slow
13:04 dogbert17 jnthn++
13:04 Zoffix \o/
13:04 jnthn So that probably means my branch is about mergeable
13:05 Zoffix That makes me very happy :)_
13:05 dogbert17 yay
13:05 Zoffix dogbert17: file a ticket, then fudge it... #?rakudo.moar skip 'RT <number here>'
13:06 dogbert17 Zoffix: will fudging really work in this case?
13:06 Zoffix dogbert17: it'll prevent the test from running
13:07 dogbert17 Zoffix: gotcha :)
13:07 Zoffix There are `todo` fudges that still run the tests but expect them to fail, and `skip` fudges that don't run the test
13:07 * dogbert17 learns new things every day
13:08 dogbert17 I'll fudge the test and report a MoarVM issue
13:18 jnthn Zoffix: Hm, did you do any work on IO::Path in the last days?
13:19 Zoffix Why?
13:19 jnthn Since yesterday evening I got 3 new test failures
13:19 jnthn t/spec/S32-io/io-path-cygwin.rakudo.moar
13:19 jnthn and unix and win
13:19 Zoffix hm, nope, didn't do anything in the past days
13:19 jnthn *sigh*
13:20 Zoffix What are the failures?
13:20 jnthn They all explode like this:
13:20 jnthn Use of uninitialized value $CWD of type Any in string context.
13:20 jnthn Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in sub plan at /home/jnthn/dev/rakudo/lib/Test.pm6 (Test) line 92
13:20 jnthn Type check failed in assignment to $!SPEC; expected IO::Spec but got Any (Any)
13:21 jnthn Oddly, that's inside of sub plan
13:22 Zoffix unrelated, but I see this line is off: https://github.com/perl6/roast/blob/master/S32-io/io-path-cygwin.t#L9
13:22 Zoffix the .IO uses undefied $!CWD
13:22 jnthn m: my $*SPEC; $*DISTRO.is-win
13:22 camelia rakudo-moar f2fca0: OUTPUT: «Type check failed in assignment to $!SPEC; expected IO::Spec but got Any (Any)␤  in block <unit> at <tmp> line 1␤␤»
13:22 jnthn Aha!
13:23 Zoffix m: my $*SPEC = IO::Spec::Cygwin; $*DISTRO.is-win
13:23 camelia rakudo-moar f2fca0: ( no output )
13:23 jnthn m: my $*SPEC; $*DISTRO
13:23 camelia rakudo-moar f2fca0: OUTPUT: «Type check failed in assignment to $!SPEC; expected IO::Spec but got Any (Any)␤  in block <unit> at <tmp> line 1␤␤»
13:23 jnthn I check $*DISTRO.is-win inside of .encode when :translate-nl is passed
13:23 jnthn Was going to optimize that later
13:23 Zoffix Ah
13:23 jnthn But maybe I'll optimize it now :P
13:23 Zoffix :)
13:24 Geth ¦ rakudo/refactor-handle-encoding: 8699f7472a | (Jonathan Worthington)++ | src/core/IO/Pipe.pm
13:24 Geth ¦ rakudo/refactor-handle-encoding: Remove old leftover line ending handling code.
13:24 Geth ¦ rakudo/refactor-handle-encoding: review: https://github.com/rakudo/rakudo/commit/8699f7472a
13:24 Geth ¦ rakudo/refactor-handle-encoding: af316bb6ba | (Jonathan Worthington)++ | src/core/IO/ArgFiles.pm
13:24 Geth ¦ rakudo/refactor-handle-encoding: Correct IO::ArgFiles.nl-in.
13:24 Geth ¦ rakudo/refactor-handle-encoding:
13:24 Geth ¦ rakudo/refactor-handle-encoding: It looks like it was passing an IO::Handle to something that wanted a
13:24 Geth ¦ rakudo/refactor-handle-encoding: VM-level handle. Either way, it should just set nl-in on IO::Handle
13:24 Geth ¦ rakudo/refactor-handle-encoding: rather than breaking its encapsulation.
13:24 Geth ¦ rakudo/refactor-handle-encoding: review: https://github.com/rakudo/rakudo/commit/af316bb6ba
13:24 Geth ¦ rakudo/refactor-handle-encoding: 452389bda3 | (Jonathan Worthington)++ | src/core/Rakudo/Internals.pm
13:24 Geth ¦ rakudo/refactor-handle-encoding: Remove now-unused method.
13:24 Geth ¦ rakudo/refactor-handle-encoding: review: https://github.com/rakudo/rakudo/commit/452389bda3
13:27 Geth ¦ rakudo/refactor-handle-encoding: 26f975b8b3 | (Jonathan Worthington)++ | tools/build/NQP_REVISION
13:27 Geth ¦ rakudo/refactor-handle-encoding: Bump NQP_REVISION for latest decoding fixes.
13:27 Geth ¦ rakudo/refactor-handle-encoding: review: https://github.com/rakudo/rakudo/commit/26f975b8b3
13:28 jnthn Yup, seems I've got a patch that'll do it
13:31 Geth ¦ rakudo/refactor-handle-encoding: 3cd056ea88 | (Jonathan Worthington)++ | src/core/Str.pm
13:31 Geth ¦ rakudo/refactor-handle-encoding: Simplify and cheapen translate-nl handling.
13:31 Geth ¦ rakudo/refactor-handle-encoding:
13:31 Geth ¦ rakudo/refactor-handle-encoding: This avoids using $*DISTRO, which in turns saves constructing it. As
13:31 Geth ¦ rakudo/refactor-handle-encoding: that breaks when there's an undefined $*SPEC in dynamic scope, this
13:31 Geth ¦ rakudo/refactor-handle-encoding: also unbreaks some regressed spectests.
13:31 Geth ¦ rakudo/refactor-handle-encoding: review: https://github.com/rakudo/rakudo/commit/3cd056ea88
13:32 jnthn Alrighty, only passing todo'd tests now :)
13:32 jnthn Time to merge? :)
13:32 Zoffix Yes!
13:32 Zoffix :D
13:33 jnthn make test and make spectest of merge into nom now running
13:36 jnthn Seems good
13:36 Geth ¦ rakudo/nom: 35 commits pushed by (Jonathan Worthington)++, jnthn++
13:36 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/compare/f2fca0c8c2...41bb13722c
13:36 Geth ¦ rakudo/nom: version bump brought these changes: https://github.com/perl6/nqp/compare/2017.05-28-gdebd8be...2017.05-44-g147dbde
13:40 Zoffix jnthn: so we no longer use libuv for sync handles?
13:40 jnthn We still use it
13:40 Zoffix oh
13:41 jnthn Not for sockets already
13:41 jnthn Like with sockets, it was a 2 step thing
13:41 Zoffix Ah, OK. The handle was encoding refactor
13:41 jnthn First, refactor the code so we handle all char-level stuff up at Perl 6 level, so the VM only has to do binary IO
13:41 jnthn Second, switch the code in the VM away from libuv
13:41 Zoffix Ah, I see :)
13:43 jnthn There's still some places that use char level VM IO however
13:43 jnthn So now I need to hunt those down
13:43 jnthn Then there's the Proc work
13:43 jnthn Which is tied in to this 'cus that is also intertwined with libuv stuff
13:43 mst ah, for sync writes libuv is a pessimisation?
13:44 Zoffix the bigger issue is "can't read from a handle opened not on the same thread"
13:44 jnthn mst: Reads also. The big problem we had, though, is that libuv handles can't move between event loops. But if you do all sync I/O via marshalling it to an event loop thread then that'd be a huge pessimisation.
13:45 mst oooh right
13:45 jnthn For async I/O ist's less of an issue
13:45 jnthn *it's
13:45 mst because for async I/O you're assuming that the important thing is avoiding waiting for the next chunk of data
13:46 jnthn Right
13:46 jnthn The other problem is that libuv does interesting things to handles, which could be a bit surprising if you used NativeCall
13:46 jnthn (Setting them into non-blocking mode)
13:47 Zoffix I got failures in t/spec/S17-procasync/stress.t "# Cannot open a handle in binary mode (:bin) and also specify an encoding"
13:47 Zoffix two passing TODOs in t/spec/S16-filehandles/io.
13:47 jnthn Yeah, there's 4 passing todos :)
13:47 Zoffix sweet
13:47 jnthn over 3 files
13:52 Geth ¦ roast: b136495e89 | (Zoffix Znet)++ | S32-io/io-handle.t
13:52 Geth ¦ roast: Change handle .encoding tests for binary
13:52 Geth ¦ roast:
13:52 Geth ¦ roast: It was made to be Nil for binary in handle refactor:
13:52 Geth ¦ roast: https://github.com/rakudo/rakudo/compare/f2fca0c8c2...41bb13722c
13:52 Geth ¦ roast:
13:52 Geth ¦ roast: The tests were added 13 days ago and are not part of 6.c-errata
13:52 Geth ¦ roast: review: https://github.com/perl6/roast/commit/b136495e89
13:54 Zoffix I see a fix for proc tests
13:54 * Zoffix hacketyhacks
13:54 jnthn Zoffix: Ah, was going to look; thanks!
13:55 jnthn Grr, I somewhat forgot that of course NQP is full of use of the char ops too :)
13:56 Geth ¦ nqp: 88d5c68ea3 | (Jonathan Worthington)++ | 7 files
13:56 Geth ¦ nqp: Kill of nqp::getcfh.
13:56 Geth ¦ nqp:
13:56 Geth ¦ nqp: No longer used in Rakudo, and was not used anywhere in NQP.
13:56 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/88d5c68ea3
14:04 Geth ¦ roast: dogbert17++ created pull request #271: Fudged three tests which upsets uthash
14:04 Geth ¦ roast: review: https://github.com/perl6/roast/pull/271
14:15 Geth ¦ rakudo/nom: 5e3fbc64d9 | (Zoffix Znet)++ | src/core/Proc.pm
14:15 Geth ¦ rakudo/nom: Fix crash on run(:bin, :out, '...') due to handle refactor
14:15 Geth ¦ rakudo/nom:
14:15 Geth ¦ rakudo/nom: Remove defaults and pass enc as type object and the end result
14:15 Geth ¦ rakudo/nom: will be the same default in handle encoding refactor:
14:15 Geth ¦ rakudo/nom: https://github.com/rakudo/rakudo/compare/f2fca0c8c2...41bb13722c
14:15 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5e3fbc64d9
14:17 Zoffix jnthn: well, ^ that fixed the original problem with the stress proc test, but seems there's also some issue with the pipes in binary mode
14:17 Zoffix $ ./perl6 -e 'my $p = run :bin, :in, $*EXECUTABLE, "-e", q|say $*IN.get|; $p.in.write: "42\n".encode;'
14:17 Zoffix write bytes requires an object with REPR MVMOSHandle (got Scalar with REPR P6opaque)
14:17 Geth ¦ roast: d35cdc2ee4 | dogbert17++ (committed by Zoffix Znet) | S02-types/sethash.t
14:17 Geth ¦ roast: Fudged three tests which upsets uthash (#271)
14:17 Geth ¦ roast:
14:17 Geth ¦ roast: See https://github.com/MoarVM/MoarVM/issues/603
14:17 Geth ¦ roast: review: https://github.com/perl6/roast/commit/d35cdc2ee4
14:18 Geth ¦ roast: 29582e15ca | (Zoffix Znet)++ | S32-io/pipe.t
14:18 Geth ¦ roast: Add test for binary pipes working right
14:18 Geth ¦ roast: review: https://github.com/perl6/roast/commit/29582e15ca
14:18 Zoffix And ^ that's the test covering the issue
14:21 Zoffix Ah, right in $bin the TWEAK don't set $!PIO
14:21 * Zoffix investigates if it should
14:22 * Zoffix tries a fix
14:22 jnthn Sorry, was away having phone meeting
14:23 Zoffix Well, I'm building now with Pipe.TWEAK having `nqp::bindattr(self, IO::Handle, '$!PIO', nqp::decont($PIO));` moved out of conditional and always setting it
14:24 jnthn oops, yes, that would be completely correct
14:24 jnthn d'oh, we musta had like zero tests for binary pipes :S
14:24 Zoffix :)
14:28 jnthn *sigh* Oh, NQP IO...
14:28 jnthn I think it's time to finally give NQP a file handle class
14:28 Geth ¦ rakudo/nom: 1f3c965dd6 | (Zoffix Znet)++ | src/core/IO/Pipe.pm
14:28 Geth ¦ rakudo/nom: Fix IO::Pipe binary mode regression
14:28 Geth ¦ rakudo/nom:
14:28 Geth ¦ rakudo/nom: Always set the $!PIO to the given pipe
14:28 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1f3c965dd6
14:28 jnthn Zoffix++
14:33 Geth ¦ roast: df5a84334d | (Zoffix Znet)++ | S16-io/basic-open.t
14:33 Geth ¦ roast: Unfudge now-passing test
14:33 Geth ¦ roast:
14:33 Geth ¦ roast: Also, clean it up a bit.
14:33 Geth ¦ roast: review: https://github.com/perl6/roast/commit/df5a84334d
14:35 Geth ¦ roast: 31579be7d6 | (Zoffix Znet)++ | S16-io/basic-open.t
14:35 Geth ¦ roast: Re-add accidentally removed word in test description
14:35 Geth ¦ roast: review: https://github.com/perl6/roast/commit/31579be7d6
14:37 Geth ¦ roast: 39d6cd9cea | (Zoffix Znet)++ | S16-filehandles/io.t
14:37 Geth ¦ roast: Unfudge now-passing tests
14:37 Geth ¦ roast:
14:37 Geth ¦ roast: Fixed by encoding refactor:
14:37 Geth ¦ roast: https://github.com/rakudo/rakudo/compare/f2fca0c8c2...41bb13722c
14:37 Geth ¦ roast: review: https://github.com/perl6/roast/commit/39d6cd9cea
14:39 Zoffix ZOFVM: Files=1247, Tests=136680, 116 wallclock secs (23.27 usr  3.09 sys + 2431.85 cusr 129.36 csys = 2587.57 CPU)
14:42 Geth ¦ roast: ee09407bd6 | (Zoffix Znet)++ | S17-procasync/kill.t
14:42 Geth ¦ roast: Refudge todo fudge as skip fudge
14:42 Geth ¦ roast:
14:42 Geth ¦ roast: Due to its randomness, the test passes ~30% of the time,
14:42 Geth ¦ roast: falsely triggering TODO PASSED output.
14:42 Geth ¦ roast: review: https://github.com/perl6/roast/commit/ee09407bd6
14:54 Zoffix ZOFVM: Files=1247, Tests=136680, 114 wallclock secs (23.57 usr  3.07 sys + 2400.45 cusr 125.70 csys = 2552.79 CPU)
14:55 Zoffix Looks like there's no negative perf impact due to encoding refactor
14:56 MasterDuke Zoffix: didn't perl6.wtf used to show the date it was built or the rakudo version at the top of the page?
14:57 Zoffix MasterDuke: yeah it did, but some of the changes to the generator got lost when we were fixing up the fails due to SETTING:: stuff
14:57 MasterDuke ok, glad to know i'm not imagining things
14:57 Zoffix zoffix@leliana/var/www/perl6.wtf/web$ ls -alF | grep src_core | tail -n1
14:57 Zoffix -rw-r--r-- 1 zoffix zoffix   1213 Apr  3 11:07 src_core_Whatever.pm.coverage.html
14:57 Zoffix current coverage is from Ap43
14:57 Zoffix *Apr3
14:59 Zoffix And gonna update it this weekend
14:59 MasterDuke cool
15:11 Zoffix hm... so how do you guys pull in changes from master when working on a branch? I just did it, but Geth didn't annouce it and I know it does for you
15:12 Zoffix And if I look at the branch commits there's a whole bunch of foo + zoffixznet commits
15:12 Zoffix I did git pull --rebase https://github.com/rakudo/rakudo/; git pull --rebase; git push
15:17 jnthn I normally git fetch origin and then git rebase origin/nom
15:17 jnthn (or origin/master in other repos)
15:18 MasterDuke i thought that's what pull --rebase does under the hood?
15:19 Geth ¦ nqp/nqp-io: 650c234413 | (Jonathan Worthington)++ | src/core/IO.nqp
15:19 Geth ¦ nqp/nqp-io: Give NQP a basic file handle class.
15:19 Geth ¦ nqp/nqp-io: review: https://github.com/perl6/nqp/commit/650c234413
15:19 Geth ¦ roast/newer-cat-handle: 41 commits pushed by (Zoffix Znet)++, (Elizabeth Mattijsen)++, usev6++, (Jonathan Worthington)++, dogbert17++
15:19 Geth ¦ roast/newer-cat-handle: review: https://github.com/perl6/roast/compare/33048a4c28...980dfc9a19
15:20 Zoffix now it did announce
15:21 Zoffix but all the commits still have the foo + zoffixznet; wonder if it's due to the `git pull --rebase` after `git rebase origin/master`
15:22 Zoffix I think I'll just merge these (when done) from a single commit by copying all the file changes. I recall duplicate  commits showing up in the changelog app last time I merged 04.3 release branch... Wouldn't want to have dozens of those :|
15:26 Zoffix https://xkcd.com/1597/
15:27 stmuk I wish I'd known about "git reflog" earlier than I did
15:29 Zoffix ZofBot: TOO COMPLEX!
15:29 ZofBot Zoffix, } is equivalent to the C-ish idiom: loop (;;) {
15:33 AlexDaniel ZofBot: no it's not
15:33 ZofBot AlexDaniel, bugtracker The bugtracker of this distribution, if any
15:35 Geth ¦ nqp/nqp-io: 7b2c4812cc | (Jonathan Worthington)++ | src/core/IO.nqp
15:35 Geth ¦ nqp/nqp-io: Add a slurp method to NQPFileHandle.
15:35 Geth ¦ nqp/nqp-io: review: https://github.com/perl6/nqp/commit/7b2c4812cc
15:35 Geth ¦ nqp/nqp-io: a240df2864 | (Jonathan Worthington)++ | src/core/IO.nqp
15:35 Geth ¦ nqp/nqp-io: Fix whitespace.
15:35 Geth ¦ nqp/nqp-io: review: https://github.com/perl6/nqp/commit/a240df2864
15:35 Geth ¦ nqp/nqp-io: b937dc95e8 | (Jonathan Worthington)++ | src/core/IO.nqp
15:35 Geth ¦ nqp/nqp-io: open/close/spew/spurt use NQPFileHandle.
15:35 Geth ¦ nqp/nqp-io: review: https://github.com/perl6/nqp/commit/b937dc95e8
15:40 Geth ¦ rakudo/newer-cat-handle: f881a7b6a6 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
15:40 Geth ¦ rakudo/newer-cat-handle: Update cat handle to encoding handle refactor
15:40 Geth ¦ rakudo/newer-cat-handle: review: https://github.com/rakudo/rakudo/commit/f881a7b6a6
15:43 Geth ¦ nqp/nqp-io: 6857b1c1ba | (Jonathan Worthington)++ | src/vm/moar/HLL/Backend.nqp
15:43 Geth ¦ nqp/nqp-io: Update profile dumper to use new handles.
15:43 Geth ¦ nqp/nqp-io:
15:43 Geth ¦ nqp/nqp-io: It was using open(...) rather than nqp::open, so really has to make
15:43 Geth ¦ nqp/nqp-io: the switch.
15:43 Geth ¦ nqp/nqp-io: review: https://github.com/perl6/nqp/commit/6857b1c1ba
15:47 * [Coke] wonders if the "nqp doesn't respect $*ERR" is anywhere near what jnthn is touching. :)
15:47 [Coke] (there's a class of things where nqp emits things on the original stderr handle instead of the HLL-overriden one)
15:50 * Zoffix feels a bit stuck
15:52 Zoffix So I have Str $.encoding; and Bool $.bin = False in CatHandle. Basically same defaults as IO::Handle. I open new handles with :$!encoding and :$!bin and that's fine, but I also want to set already-opened handles to whatever encoding Cathandle is set in... But if I pass the default $!encoding to .encoding, it'll set the encoding to binary, and not the "default"
15:53 Zoffix How do I set the "default" mode? Str $.encoding and False bin
15:55 Zoffix and IO::Handle.encoding.say now gives Nil in both when binary more or default mode :|
15:56 Zoffix ZofBot: enable extra complaining mode
15:56 ZofBot Zoffix, This is the default behavior
15:56 Zoffix Hahahahaa
16:01 MasterDuke is there any way to make [] work in NQP for list_(i|s)?
16:02 Zoffix I ended up doing .encoding($bin ?? Nil !! $encoding || 'utf-8') which isn't that great, because the majority of handles will now be re-switching encoding from 'utf-8' to 'utf-8' because the short-curcuit logic in IO::Handle.encoding doesn't catch the case when a default handle is set encoding of utf8
16:03 Zoffix .ask jnthn what if we toss IO::Handle's $!bin and add a .new method that converts `:bin` to `:encoding(Str)` ?
16:03 yoleaux Zoffix: I'll pass your message to jnthn.
16:04 Zoffix .ask jnthn and re-add default 'utf-8' to $!encoding; Then calling .encoding will only ever return Nil when the handle is in binary mode and the encoding-setting logic will shortcurcuit correctly when a default handle is asked to switch to utf8 mode
16:04 yoleaux Zoffix: I'll pass your message to jnthn.
16:05 nine stmuk: yes, git reflog can be a real life saver
16:15 MasterDuke hm, i changed the MoarVM radix op to return a list_i. i then changed all the spots in NQP that use nqp::radix to get at its results with nqp::atpos_i instead of []
16:16 perlpilot cd
16:16 MasterDuke however, i can't build NQP because the stage1 or 2 files still use the old way
16:17 MasterDuke any way to get around this?
16:18 timotimo MasterDuke: you could introduce i[ ] and s[ ] circumfixes to have list_* :)
16:18 timotimo you "make bootstrap-files"
16:18 timotimo or something
16:19 MasterDuke i tried make m-bootstrap-files, same error
16:19 MasterDuke timotimo: is there any way to make [] work in NQP for list_(i|s)?
16:19 timotimo no idea
16:21 Zoffix k, got the encoding fix that I think works out
16:24 MasterDuke .ask jnthn is there any way to make [] work in NQP for list_(i|s)?
16:24 yoleaux MasterDuke: I'll pass your message to jnthn.
16:27 Zoffix umm... nope
16:27 Zoffix ah... yup
16:31 timotimo hum?
16:32 MasterDuke `method postcircumfix:sym<[ ]>($/) { make QAST::VarWithFallback.new( :scope('positional'), $<EXPR>.ast, :fallback(default_for('$')) ); }`. huh, don't know what's happening there
16:39 brrt joined #perl6-dev
16:47 Geth ¦ rakudo/nom: 95b4e5d5c3 | (Zoffix Znet)++ | src/core/IO/Handle.pm
16:47 Geth ¦ rakudo/nom: Restructure IO::Handle binary encoding controls
16:47 Geth ¦ rakudo/nom:
16:47 Geth ¦ rakudo/nom: - Have just one knob to fiddle with: $!encoding
16:47 Geth ¦ rakudo/nom: - .new can still accept `:bin` arg to set binary mode
16:47 Geth ¦ rakudo/nom: - Settig both binary and encoding in .new now throws
16:47 Geth ¦ rakudo/nom: - Make $!encoding default to `utf8` on new, making
16:47 Geth ¦ rakudo/nom:     .encoding method's Nil always indicate binary mode
16:47 Geth ¦ rakudo/nom:     (instead of "binary or default mode")
16:47 Geth ¦ rakudo/nom: - This also now passes via short-curcuit when a handle
16:47 Geth ¦ rakudo/nom:     in default mode is asked to set 'utf8' .encoding
16:47 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/95b4e5d5c3
16:47 Zoffix .tell jnthn I ended up removing $!bin from IO::Handle; I hope it's OK: https://github.com/rakudo/rakudo/commit/95b4e5d5c3
16:47 yoleaux Zoffix: I'll pass your message to jnthn.
16:48 Zoffix ^ missing from commit message: "- Make .open's args be a way to modify the mode the handle was instantiated with, instead of conflicting with it"
16:49 Zoffix It was more or less the behaviour before the refactor.
16:52 Geth ¦ roast: e817f53fc3 | (Zoffix Znet)++ | S32-io/io-handle.t
16:52 Geth ¦ roast: Restore default handle's encoding to be utf8
16:52 Geth ¦ roast:
16:52 Geth ¦ roast: - This was the test originally added 13 days ago
16:52 Geth ¦ roast: - The check was changed to look for Nil, but that
16:52 Geth ¦ roast:     also means the handle is in binary mode, yet default
16:52 Geth ¦ roast:     mode was utf8
16:52 Geth ¦ roast: - Now we changed[^1] the default to be properly visible and
16:52 Geth ¦ roast:     .encoding method returns 'utf8' again
16:52 Geth ¦ roast:
16:52 Geth ¦ roast: [1] https://github.com/rakudo/rakudo/commit/95b4e5d5c3
16:52 Geth ¦ roast: review: https://github.com/perl6/roast/commit/e817f53fc3
16:55 * Zoffix & for 4hrs
17:17 robertle joined #perl6-dev
17:29 camelia joined #perl6-dev
17:48 japhb joined #perl6-dev
17:51 brrt joined #perl6-dev
17:54 MasterDuke hm. i guess i could create a new op (e.g., radix2), switch everything to that, then change the behavior of radix, then remove radix2 and switch back to radix
18:55 MasterDuke timotimo: any idea why i'd get `No registered operation handler for 'radix2'` when i've added radix2 to QASTOperationsMAST.nqp?
18:56 MasterDuke actually, i added it, then did `make m-bootstrap-files`, then used it
18:56 dct joined #perl6-dev
18:58 timotimo huh, that's strange
18:59 timotimo can you use it with nqp-m -e 'nqp::radix2' or something?
19:01 MasterDuke will check in a bit, one-handed just now
19:02 timotimo right
19:02 timotimo i'll be intermittently afk and on keyboard and backwards
19:05 MasterDuke doh, pebcak
19:06 * Zoffix snickers
19:07 timotimo is it your babby?
19:08 Zoffix Ah, right, baby :D :D :D
19:08 Zoffix m: say Promise.new ~~ Planned
19:08 camelia rakudo-moar 95b4e5: OUTPUT: «Cannot resolve caller Numeric(Promise: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at <tmp> line 1␤␤»
19:08 MasterDuke yeah, i'll blame her. how she learned to type git stash already i'll never know
19:09 Zoffix man, who wrote this test... to expect the above to throw :(
19:09 Zoffix Damn Zoffix... what a noob
19:10 Zoffix hm
19:10 Zoffix m: say Promise.new.status
19:10 camelia rakudo-moar 95b4e5: OUTPUT: «Planned␤»
19:11 Zoffix I guess it's normal that Promise.new ~~ Planned now gives "False"
19:12 bisectable6 joined #perl6-dev
19:12 Geth ¦ roast: f1391f9d40 | (Zoffix Znet)++ | S17-promise/basic.t
19:12 Geth ¦ roast: Fix hang test on Promise ~~ Enum
19:12 Geth ¦ roast:
19:12 Geth ¦ roast: We don't throw in smartmatches, as test expect. Test for value instead
19:12 Geth ¦ roast: of expecting exception. This still tests for the hang, which was the
19:12 Geth ¦ roast: original purpose of the test.
19:12 Geth ¦ roast:
19:12 Geth ¦ roast: The test was added[^1] 8 months ago and isn't part of 6.c language.
19:12 Geth ¦ roast:
19:12 Geth ¦ roast: [1] https://github.com/perl6/roast/commit/70aa3cf924985735e09d
19:12 Geth ¦ roast: review: https://github.com/perl6/roast/commit/f1391f9d40
19:16 Geth ¦ rakudo/nom: 43b03fc6c3 | (Zoffix Znet)++ | src/core/Numeric.pm
19:16 Geth ¦ rakudo/nom: Further fix crash in smartmatch with Numeric
19:16 Geth ¦ rakudo/nom:
19:16 Geth ¦ rakudo/nom: While the original fix[^1] for this issue solved the problem for
19:16 Geth ¦ rakudo/nom: non-numeric strings, the problem still remained for other objects
19:16 Geth ¦ rakudo/nom: that don't provide .Numeric method, like Pair:D ~~ Num:D
19:16 Geth ¦ rakudo/nom:
19:16 Geth ¦ rakudo/nom: Fix by wrapping the numerification in a `try`. Not using `.?` here,
19:16 Geth ¦ rakudo/nom: because it's broken and useless for its purpose, because it
19:16 Geth ¦ rakudo/nom: would still fail here for objects that only provide .Numeric for :U
19:16 Geth ¦ rakudo/nom:
19:16 Geth ¦ rakudo/nom: [1] https://github.com/rakudo/rakudo/commit/84b7ebdf425a25731425541f
19:16 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/43b03fc6c3
19:24 brrt joined #perl6-dev
19:33 lizmat .ask dogbert17 re d35cdc2ee408f9d84  why fudge passing tests as skip only because they show a problem in MoarVM???
19:33 yoleaux lizmat: I'll pass your message to dogbert17.
19:36 stmuk_ joined #perl6-dev
19:42 dct joined #perl6-dev
19:44 Zoffix lizmat: they crash the entire file on 32-bit boxes
19:44 lizmat ah, now *that* wasn't clear from the description
19:45 Zoffix Here's some discussion: https://irclog.perlgeek.de/perl6-dev/2017-05-26#i_14641245
19:46 lizmat ok, I see my adding a golf is pretty futile, but I'll leave it nonetheleass
19:48 lizmat odd though that similar tests for baghash / mixhash don't upset on 32 bnit ?
19:48 lizmat *bit?
19:48 [TuxCM] joined #perl6-dev
19:49 lizmat ah, I see, they don't actualy remove *and* restore in the same loop iteration
19:52 lizmat if it's considered DIHWIDT to remove and add back a key during iterating, I can live with that as well: I'll just make it die when you try that
19:52 timotimo can you wrap it in a try/catch?
19:52 timotimo oh, not if it crashes badly
19:52 timotimo only if it crashes benignly
20:12 dogbert17 .
20:12 yoleaux 19:33Z <lizmat> dogbert17: re d35cdc2ee408f9d84  why fudge passing tests as skip only because they show a problem in MoarVM???
20:12 lizmat dogbert17: Zoffix explained
20:12 dogbert17 lizmat: ah, I see that my commit message was a bit on the cryptic side, sorry about that
20:15 MasterDuke nqp: my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); while ++$i < 100_000_000 { nqp::atpos($l, 0) }; say(nqp::time_n() - $s)
20:16 camelia nqp-moarvm: OUTPUT: «3.35549545288086␤»
20:16 MasterDuke nqp: my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); while ++$i < 100_000_000 { $l[0] }; say(nqp::time_n() - $s)
20:16 camelia nqp-moarvm: OUTPUT: «2.44945096969604␤»
20:16 MasterDuke nqp: my $l := nqp::list_i(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); while ++$i < 100_000_000 { nqp::atpos_i($l, 0) }; say(nqp::time_n() - $s)
20:16 camelia nqp-moarvm: OUTPUT: «3.675372838974␤»
20:17 MasterDuke i find those ^^^ times surprising
20:18 MasterDuke should have done that before going to the trouble of making nqp::radix return a list_i, which you have to use atpos_i with
20:22 timotimo huh
20:22 timotimo is it emitting some dumb extra code like coercions?
20:22 brrt joined #perl6-dev
20:22 timotimo but that shouldn't be too slow?
20:23 lizmat MasterDuke: perhaps spesh/Jit something doesn't know about atpos_i ?
20:24 timotimo it should know about as much about it as it does atpos_o
20:25 MasterDuke oh, i wonder if i'm getting bit by that thing where it doesn't jit in the mainline of an NQP program
20:25 timotimo oh, yeah, could be
20:26 MasterDuke nqp: sub a() { my $l := nqp::list_i(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); while ++$i < 100_000_000 { nqp::atpos_i($l, 0) }; say(nqp::time_n() - $s) }; a()
20:26 camelia nqp-moarvm: OUTPUT: «0.849493980407715␤»
20:26 MasterDuke nqp: sub a() { my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); while ++$i < 100_000_000 { nqp::atpos($l, 0) }; say(nqp::time_n() - $s) }; a()
20:26 camelia nqp-moarvm: OUTPUT: «0.844730138778687␤»
20:26 MasterDuke nqp: sub a() { my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); while ++$i < 100_000_000 { $l[0] }; say(nqp::time_n() - $s) }; a()
20:26 camelia nqp-moarvm: OUTPUT: «0.324658632278442␤»
20:27 timotimo is that the same amount? it got 10x faster?
20:27 MasterDuke total times are much better, approx same relative times
20:28 timotimo wonder what the speshlog looks like, but gotta jump off the keyboard for a bit
20:28 MasterDuke well, ratio maybe a bit different, but [] is ~2.5x faster, which i wouldn't have expected
20:29 timotimo me neither
20:30 MasterDuke .ask jnthn why is postcircumfix [] so much faster than atpos in NQP? see https://irclog.perlgeek.de/perl6-dev/2017-05-26#i_14643556 for some times
20:30 yoleaux MasterDuke: I'll pass your message to jnthn.
20:54 brrt joined #perl6-dev
21:02 Geth ¦ rakudo/nom: b6c9e85357 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
21:02 Geth ¦ rakudo/nom: Fix problem with bag() (<) <a>.Bag
21:02 Geth ¦ rakudo/nom:
21:02 Geth ¦ rakudo/nom: Caught while adding tests  :-)
21:02 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b6c9e85357
21:12 Geth ¦ roast: 36b246d32a | (Elizabeth Mattijsen)++ | S03-operators/subset.t
21:12 Geth ¦ roast: Add some more tests for (<=) and friends
21:12 Geth ¦ roast: review: https://github.com/perl6/roast/commit/36b246d32a
21:12 Geth ¦ roast: 9e18ff2ee1 | (Elizabeth Mattijsen)++ | 2 files
21:12 Geth ¦ roast: Add some more tests for (<) and friends
21:12 Geth ¦ roast:
21:12 Geth ¦ roast: And some cosmetics in the (<=) tests
21:12 Geth ¦ roast: review: https://github.com/perl6/roast/commit/9e18ff2ee1
21:28 Geth ¦ roast: 1425cc6e36 | usev6++ | S16-filehandles/argfiles.t
21:28 Geth ¦ roast: [JVM] Adjust fudging (avoid hanging tests)
21:28 Geth ¦ roast: review: https://github.com/perl6/roast/commit/1425cc6e36
21:33 Zoffix ZofBot: yo, bruh! Play the tape: https://www.youtube.com/watch?v=F1YLERdt9To
21:33 ZofBot Zoffix, No magical syntax at a distance
21:34 Zoffix Coffee... Check!
21:34 Zoffix Let the IO Hackathon Begin \o/
21:39 timotimo cool
21:50 Geth ¦ nqp: robertlemmen++ created pull request #362: support hardware_concurrency op from moar and implement for jvm
21:50 Geth ¦ nqp: review: https://github.com/perl6/nqp/pull/362
21:51 Geth ¦ rakudo: robertlemmen++ created pull request #1088: set default thread pool size based on hardware
21:51 Geth ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/1088
21:56 Zoffix m: with '/tmp/foo99'.IO { .spurt: "meows"; .open.read(4).^name.say; .open(:bin).read(4).^name.say }
21:56 camelia rakudo-moar b6c9e8: OUTPUT: «Blob[uint8]␤Buf[uint8]␤»
21:56 Zoffix hehe
22:13 Zoffix m: my @arr where {.elems == 2}; @arr := [4, 2]
22:13 camelia rakudo-moar b6c9e8: OUTPUT: «Type check failed in binding; expected Positional[<anon>] but got Array ($[4, 2])␤  in block <unit> at <tmp> line 1␤␤»
22:13 Zoffix thought that'd accept two els :S
22:15 jnthn It looks like it treated the `where` like it treats `of` and decided it was about the elements...
22:15 yoleaux 16:03Z <Zoffix> jnthn: what if we toss IO::Handle's $!bin and add a .new method that converts `:bin` to `:encoding(Str)` ?
22:15 yoleaux 16:04Z <Zoffix> jnthn: and re-add default 'utf-8' to $!encoding; Then calling .encoding will only ever return Nil when the handle is in binary mode and the encoding-setting logic will shortcurcuit correctly when a default handle is asked to switch to utf8 mode
22:15 yoleaux 16:24Z <MasterDuke> jnthn: is there any way to make [] work in NQP for list_(i|s)?
22:15 yoleaux 16:47Z <Zoffix> jnthn: I ended up removing $!bin from IO::Handle; I hope it's OK: https://github.com/rakudo/rakudo/commit/95b4e5d5c3
22:15 yoleaux 20:30Z <MasterDuke> jnthn: why is postcircumfix [] so much faster than atpos in NQP? see https://irclog.perlgeek.de/perl6-dev/2017-05-26#i_14643556 for some times
22:15 jnthn Zoffix: The reason I added bin was out of concern for having a semi-predicate problem
22:16 Zoffix Which one?
22:16 jnthn I think that since you also put back 'utf-8' as a default encoding on unopened handles, you may have resolved it
22:16 Zoffix OK
22:16 jnthn Though I found it a bit harder to reason about that way...
22:17 jnthn But if you're comfortable with it this way I'm not that concerned
22:17 jnthn Your way is probably more ecosystem-safe
22:17 jnthn But when I got rid of the construction-default then you couldn't use the type object to flag up :bin
22:18 Zoffix It's just the old way was really tricky to set encoding on already opened handle. Also, .encoding would return Nil to indicate either a default or binary mode, so you had to check both .bin and .encoding; also setting .encoding('utf8') shouldn't short-curcuit on default handle
22:18 jnthn 'cus it was indistiguishable from having not picked an encoding at construction time
22:19 jnthn Really tricky?
22:19 jnthn You just called .encoding('encdoing-name'), no?
22:21 Zoffix jnthn: I mirrored the .encoding/.bin setup, so by default .encoding was a type object, but were I to pass on that type object to .encoding it would signal to switch to bin. So I had something like $bin ?? .encoding(Nil) !! .encoding($!encoding || 'utf8') and that wasn't ideal because that 'utf8' would re-set utf8 encoding on a handle, since it wasn't hitting the short-curcuit path (since by defaulkt the
22:21 Zoffix handle's encoding is a type object)
22:21 Zoffix mirrored it in Cathandle I mean
22:21 jnthn Ah, that's a decent argument
22:22 jnthn Alright, +1 for the change
22:22 jnthn It just felt odd to consider "no encoding" as an encoding. :)
22:27 MasterDuke jnthn: how does QAST::VarWithFallback(positional ) implement postcircumfix<[]> in NQP?
22:29 jnthn MasterDuke: iirc it boils down to something like nqp::ifnull([what QAST::Var would come into], [the fallback value])
22:30 MasterDuke so QAST::Var is actually implementing it?
22:30 jnthn Basically ti's the same as QAST::Var but if the lookup is null then we can substitute something else
22:30 jnthn Yeah, pretty sure the code-gen delegates to qAST::Var
22:30 jnthn And then just shows in the null check and so on
22:31 MasterDuke huh. and list_(i|s) can't use that?
22:31 jnthn No
22:31 jnthn Becuase it compiles into nqp::atpos
22:31 jnthn But those need to be accessed with nqp::atpos_i/nqp::atpos_s
22:32 MasterDuke hm, but i don't see atpos in a perf record of []
22:32 jnthn perf?
22:32 jnthn atpos is an NQP op name
22:32 MasterDuke the perf profiling tool
22:32 MasterDuke at_pos
22:33 MasterDuke i see the moar function when i use perf to profile nqp::atpos, but not with []
22:33 jnthn It pretty mush has to be using it :)
22:33 jnthn *much
22:33 MasterDuke or to get back to the reason for the question, how come [] is so much faster than explicitly using atpos?
22:34 jnthn I don't know, that surprised me
22:34 jnthn It should be slower because of the extra null check
22:35 MasterDuke a diff of the --target=mbc and then --dump shows the atpos with an extra const_i64_16,atpos_o
22:36 MasterDuke everything else is pretty much identical (except for some ids and such)
22:37 MasterDuke afk for a bit
22:47 Zoffix m: with '/tmp/foo99'.IO { .spurt: "meows"; .open.read(4).^name.say; .open(:bin).read(4).^name.say }
22:47 camelia rakudo-moar b6c9e8: OUTPUT: «Blob[uint8]␤Buf[uint8]␤»
22:47 Zoffix star: with '/tmp/foo99'.IO { .spurt: "meows"; .open.read(4).^name.say; .open(:bin).read(4).^name.say }
22:47 camelia star-m 2016.10: OUTPUT: «Buf[uint8]␤Buf[uint8]␤»
22:48 japhb encoding refactor seems to have affected LWP::Simple from the ecosystem:
22:48 japhb ===> Testing: LWP::Simple:ver('0.090'):auth('Cosimo Streppone')
22:48 japhb Cannot do 'print' on a handle in binary mode
22:49 Zoffix japhb: thanks. I'll take a look
22:49 jnthn Either we're mis-putting it in binary mode, or it is actually using .print in binary mode and will need updating
22:49 japhb Zoffix: np, thank you
22:49 jnthn (We were pretty sloppy on this stuff before.)
22:50 jnthn Funny thing is, LWP::Simple was one of the modules I tried out before merging the *sockets* parts of the changes. :)
22:50 Zoffix :D
22:50 japhb Heh
22:50 jnthn Which means it's todays part on *file handles* that has done it
22:51 jnthn (Which is kinda useful to know in that it cuts down the amount of places we need to look at.)
22:51 japhb That build is from about 3.5-4 hours ago, if the exact timing matters
22:51 jnthn Zoffix: Hmm...buf vs. blob is interesting. We should perhaps go back to buf...
22:51 Zoffix jnthn: OK.
22:52 Zoffix spectesting
22:52 jnthn Though...we should provide the option
22:52 jnthn Because in later changes, blob will have significant advantages
22:53 jnthn (In summary: I want blob to use the fixed size REPR, the shape immutability that results meaning we can avoid some copying in our I/O handling)
22:53 japhb That would definitely be nice
22:53 jnthn At the moment there's some defensive memcpy happening
22:54 jnthn Which is preferable to risking a SEGV if people do naughty things, but not really desirable :)
22:57 Geth ¦ rakudo/nom: c5398c85ef | (Zoffix Znet)++ | src/core/Rakudo/Internals/VMBackedDecoder.pm
22:57 Geth ¦ rakudo/nom: Make VMDecoder.consume-exactly-bytes use buf8
22:57 Geth ¦ rakudo/nom:
22:57 Geth ¦ rakudo/nom: Instead of blob. This reverts IO::Handle reads to return bufs,
22:57 Geth ¦ rakudo/nom: as it did before the handle encoding refactor.
22:57 Geth ¦ rakudo/nom:
22:57 Geth ¦ rakudo/nom: Per: https://irclog.perlgeek.de/perl6-dev/2017-05-26#i_14644075
22:57 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c5398c85ef
23:10 Zoffix w00t... fixed the seek bug.
23:10 Zoffix ZofBot: it's almost as if I knew what I was doing!
23:10 ZofBot Zoffix, 04 csv-ip5xs 3
23:13 jnthn Mwahaha...my evil plan of moving code from C to Perl 6 to get more people to hack on it is working :)
23:13 Zoffix :D
23:14 jnthn Now it's only so long before somebody realizes that if an Encoding::Decoder role were extracted from VMBackedDecoder and a little refactoring done, we could have userspace encodings support :)
23:14 Zoffix \o/
23:15 * japhb got asked by a bunch of C++ coders today to help with a Perl problem -- which turned out to be a bug in a 12570-line Perl 5 script.  I almost developed a facial tic, until I realized it was just a bitrotted regex.
23:16 Geth ¦ rakudo/nom: 094e77a2c2 | (Zoffix Znet)++ | src/core/IO/Handle.pm
23:16 Geth ¦ rakudo/nom: Fix regression in .seek from current
23:16 Geth ¦ rakudo/nom:
23:16 Geth ¦ rakudo/nom: Ensure we include pre-read bytes in the decoder when computing seek
23:16 Geth ¦ rakudo/nom: position when SeekFromCurrent
23:16 Geth ¦ rakudo/nom:
23:16 Geth ¦ rakudo/nom: Fixes RT#131376: https://rt.perl.org/Ticket/Display.html?id=131376
23:16 japhb Userspace encodings will be a very nice win for working with legacy files
23:16 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131376
23:16 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/094e77a2c2
23:17 Geth ¦ roast: 2804acdc43 | (Zoffix Znet)++ | S32-io/seek.t
23:17 Geth ¦ roast: Test .seek on handles opened in non-binary mode
23:17 Geth ¦ roast:
23:17 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/094e77a2c2
23:17 Geth ¦ roast: RT#131376: https://rt.perl.org/Ticket/Display.html?id=131376
23:17 Geth ¦ roast: review: https://github.com/perl6/roast/commit/2804acdc43
23:17 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131376
23:30 Geth ¦ perl6-lwp-simple: 243de4fdcc | (Zoffix Znet)++ | lib/LWP/Simple.pm
23:30 Geth ¦ perl6-lwp-simple: Fix breakage due to rakudo encoding refactor
23:30 Geth ¦ perl6-lwp-simple:
23:30 Geth ¦ perl6-lwp-simple: .print on binary handles is no longer permitted.
23:30 Geth ¦ perl6-lwp-simple:
23:30 Geth ¦ perl6-lwp-simple: Fix by removing all the cruft with handle fiddling and use IO::Path.spurt
23:30 Geth ¦ perl6-lwp-simple: review: https://github.com/perl6/perl6-lwp-simple/commit/243de4fdcc
23:30 Zoffix japhb: ^ that fixes the breakage
23:30 jnthn Zoffix++
23:30 jnthn 'night, #perl6
23:31 Zoffix night
23:35 PerlJam joined #perl6-dev
23:49 japhb Thanks Zoffix, I'll build-all with the latest and confirm on my side.

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