Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-02-20

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

All times shown according to UTC.

Time Nick Message
00:11 IOninja m: say source-file
00:11 camelia rakudo-moar c1a0fa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    source-file used at line 1␤␤»
00:12 IOninja m: use XXX
00:12 camelia rakudo-moar c1a0fa: ( no output )
00:12 IOninja what the...
00:12 ggoebel joined #perl6-dev
00:42 ugexe i installed it
00:44 ugexe m: my $spec = CompUnit::DependencySpecification.new(:short-name("XXX")); say "Uninstalled $_" for grep { .so }, map  { try .repo.uninstall(.distribution) }, grep { .so }, map  { .resolve($spec) }, grep { $_ ~~ CompUnit::Repository::Installation }, $*REPO.repo-chain;
00:44 camelia rakudo-moar c1a0fa: OUTPUT: «Uninstalled /home/camelia/rakudo-m-inst-1/share/perl6/site/dist/12B1BDBA6B587552D58EA06D4B8D8BF4D6AB5248␤Uninstalled /home/camelia/rakudo-m-inst-1/share/perl6/site/dist/F3EF38A22EF96B3A81774BDFE3AD71AA22B948D7␤»
00:44 ugexe m: use XXX
00:44 camelia rakudo-moar c1a0fa: OUTPUT: «===SORRY!===␤Could not find XXX at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Reposit…»
00:59 ZzZombo use Git::Good;
01:12 IRCFrEAK joined #perl6-dev
01:12 IRCFrEAK left #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:08 japhb I've figured out a workaround to the cross-thread IO problem (https://github.com/ab5tract/Terminal-Print/blob/raw-input/lib/Terminal/Print/RawInput.pm6#L26), but the T*tris-like game (https://github.com/ab5tract/Terminal-Print/blob/raw-input/examples/tris.p6) is still showing input problems.
03:09 japhb To whit, after a few dozen moves, it stops accepting input from the TTY and only processes the timer ticks -- and if the moar process is killed, all the queued TTY input appears on the command line.
03:09 japhb *sigh*
03:09 * japhb can understand it not working at all, but working for a while and then suddenly not working doesn't make a ton of sense.
04:18 madgoat joined #perl6-dev
04:18 madgoat left #perl6-dev
05:00 awwaiid joined #perl6-dev
05:36 ZzZombo joined #perl6-dev
05:36 ZzZombo joined #perl6-dev
06:50 RabidGravy joined #perl6-dev
06:57 [Tux] With TimToady's PR applied to Slang::Tuxic:
06:57 [Tux] This is Rakudo version 2017.02-32-gc1a0fa72b built on MoarVM version 2017.02
06:57 [Tux] csv-ip5xs        2.877
06:57 [Tux] test            12.679
06:57 [Tux] test-t           4.870 - 5.039
06:57 [Tux] csv-parser      13.406
06:57 [Tux] TimToady++
07:03 TimToady :D
07:03 samcv yay it's working again :)
07:05 * TimToady can wander off to Kauaʻi tomorrow in good conscience then :)
07:31 * lizmat merged TimToady's PR
07:35 [Tux] lizmat, it also needs a version upgrade, right?
07:35 [Tux] $work calls. need to run
07:35 lizmat [Tux] ack
07:37 lizmat [Tux]: not sure
07:37 * lizmat needs to run as well
09:38 ZzZombo joined #perl6-dev
09:38 ZzZombo joined #perl6-dev
11:23 pyrimidine joined #perl6-dev
12:15 sivoais joined #perl6-dev
12:43 Geth ¦ rakudo/nom: 80e0bce9ec | (Elizabeth Mattijsen)++ | 2 files
12:43 Geth ¦ rakudo/nom: Make loops/maps with NEXT phaser about 5% faster
12:43 Geth ¦ rakudo/nom:
12:43 Geth ¦ rakudo/nom: - copy Block.fire_phaser to fire_if_phaser
12:43 Geth ¦ rakudo/nom: - remove condition from Block.fire_phaser: it is assumed it exists
12:43 Geth ¦ rakudo/nom: - adapt iterable handling to use fire_if_phaser if necessary
12:43 Geth ¦ rakudo/nom:
12:43 Geth ¦ rakudo/nom: So in a loop/map with a NEXT phaser, it is only once checked whether
12:43 Geth ¦ rakudo/nom: there is a phaser, instead of for each iteration.  This should also
12:43 Geth ¦ rakudo/nom: help inlining.
12:43 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/80e0bce9ec
12:43 lizmat partly inspired by http://blogs.perl.org/users/morandimus/2017/02/else-clauses-on-loops.html#comments
12:44 lizmat speaking of which: did we ever consider a NONE phaser that would run if a block was never iterated ?
12:44 lizmat for @a { NONE say "array was empty }
12:45 lizmat for @a { NONE say "array was empty" }
12:48 MasterDuke joined #perl6-dev
12:50 masak I pestered TimToady with questions like this some years back :)
12:50 masak I believe some of that made it back into a synopsis somewhere
12:51 lizmat fwiw, from an implementation point of view, it would be trivial
12:51 lizmat as it would just be the else on the check whether the LAST phaser should be fired
12:52 jnthn That solution has weird scoping issues, fwiw
12:53 lizmat how do you mean>?
12:53 jnthn for @as -> $a { NONE say $a }
12:53 masak I would also like to point out that (IMHO) Python has somewhat poisoned the well on this one
12:53 lizmat jnthn: gotcha
12:53 masak because the semantics of `else` on loops in Python is *not* (I repeat, *not*) "did it do zero iterations"
12:53 jnthn It wouldn't be the only place we have such an issue (QUIT and LAST in whenever blocks share it)
12:54 jnthn But it's worth at least pausing to question if we want another phaser that's vulnerable to this issue
12:54 masak I assumed it was for a long time before I learned about the `break` semantics (which does make sense, in a way)
12:55 lizmat m: my @a; my int $any; for @a { LAST $any = 1 }; say "array was empty" unless $any   # solution with LAST
12:55 camelia rakudo-moar 80e0bc: OUTPUT: «array was empty␤»
12:56 lizmat m: my @a = 42; my int $any; for @a { LAST $any = 1 }; say "array was empty" unless $any   # solution with LAST
12:56 camelia rakudo-moar 80e0bc: ( no output )
12:57 masak I think I'm against such a phaser, at least if NONE is the best name fore it we can come up with ;)
12:57 jnthn Note that this will not work out well in reative space, because LAST phasers there always fire upon the done signal, regardless of whether you got any values.
12:58 masak ok, that's also a strike against
12:59 moritz couldn't you use FIRST?
12:59 jnthn moritz: Yes, that's work out better :)
12:59 jnthn *that'd
13:00 moritz python uses an else-block for not-run loops
13:00 moritz though after the loop
13:00 moritz we could have an ELSE phaser, but I'm not favor of it
13:02 masak moritz: see above -- the semantics is *not* "for not-run loops"
13:02 masak see also a comment to that blog post
13:05 jnthn Thing is, for @a { ... }; unless @a { ... } is not actually that much of a saving over anything else we'd come up with
13:05 jnthn Only issue is if @a is actually a far longer expression
13:06 jnthn But even then it's possible to just shove that into a variable, or use a given block
13:06 jnthn Uh, I mean, is not actually much longer than...
13:09 lizmat yeah, FIRST would be better, /me spent too much time in Any-iterable-methods  :-)
13:12 jnthn Oh, other thing is if it's a one-shot iterable, of course.
13:14 IOninja m: my @a; do for @a {} or say "hi"
13:14 camelia rakudo-moar 80e0bc: OUTPUT: «hi␤»
13:14 lizmat for 0..-1 { NONE say "weird range" }
13:15 lizmat IOninja: that would be a severe performance penalty
13:21 IOninja I'd write it as if blah-blah-blah -> @a { for @a {... } } else { ... }
13:21 IOninja I saw that post on reddit with plenty of negative comments on it, so the NONE phaser feels like a YAGNI
13:24 lizmat well, my original question was whether it was ever considered
13:24 lizmat masak seemed to imply it had
13:25 lizmat jnthn's scoping point sorta clinched it for me  :-)
13:27 jnthn If there's anything that makes this an interesting problem, it's that you can't do the for lazy-thing { }; unless lazy-thing { } 'cus then you'd evaluate the lazy sequence twice, or if it's a Seq get a multiple evaluation error.
13:28 jnthn That slightly increases the desire for some kinda syntactic relief
13:28 jnthn But yeah, I agree a NONE phaser probably ain't it :)
13:29 timotimo do we get a performance boost if we "do +(for @a {})" instead of "do for @a {}"?
13:29 timotimo because in theory it can .count-only?
13:30 IOninja m: my $seq = (1...*); for @$seq { .say; last if $++ > 5 }; unless @$seq { say "hi" }
13:30 camelia rakudo-moar 80e0bc: OUTPUT: «1␤2␤3␤4␤5␤6␤7␤»
13:30 IOninja m: my $seq = ().Seq; for @$seq { .say; last if $++ > 5 }; unless @$seq { say "hi" }
13:30 camelia rakudo-moar 80e0bc: OUTPUT: «hi␤»
13:30 jnthn IOninja: That forces keeping the values around, though :)
13:30 IOninja Does it?
13:31 IOninja oh the @ thing
13:31 jnthn Yes, @$seq is sugar for $seq.cache
13:31 jnthn cd wat
13:31 jnthn oops
13:31 jnthn :)
13:31 IOninja how do you iterate over it then?
13:31 IOninja ah slip OK
13:31 jnthn |$seq
13:37 IOninja lizmat: what would cause the severe performance penalty? The `do`?
13:38 lizmat IOninja: yeah, the fact that first needs to keep all the values around
13:38 IOninja ah
13:38 lizmat also, the iterator would need to do a push-all instead of a sink-all
13:39 IOninja m: my $seq = (1...*); do for |$seq { last if $++ > 50000; $ = (); } or say "hi"; say now - INIT now
13:39 camelia rakudo-moar 80e0bc: OUTPUT: «1.2169290␤»
13:39 IOninja m: my $seq = ().Seq; do for |$seq { last if $++ > 50000; $ = (); } or say "hi"; say now - INIT now
13:39 camelia rakudo-moar 80e0bc: OUTPUT: «hi␤0.0016828␤»
13:40 IOninja m: my $seq = (1...*); for |$seq { last if $++ > 50000; $ = (); }; say now - INIT now
13:40 camelia rakudo-moar 80e0bc: OUTPUT: «1.38174933␤»
13:41 IOninja Not really a good solution though. You have to watch what you return from the loop
13:41 IOninja or the conditional will trigger wrongly
13:42 perlpilot If only "run if no iterations of the loop" could be prototyped in user-space ...
13:43 timotimo that's why i suggested the + in front
13:44 IOninja m: my $seq = (1...*); do +(for |$seq { last if $++ > 50000 }) or say "hi"; say now - INIT now
13:44 camelia rakudo-moar 80e0bc: OUTPUT: «hi␤1.2159876␤»
13:53 timotimo not faster :(
13:53 timotimo oh
13:53 timotimo probably because it still has to account for slips
13:55 IOninja m: my $seq = (1...*); do +(for |$seq { last if $++ > 50000; () }) or say "hi"; say now - INIT now
13:55 masak m: my @a; (for @a {}) || say "there were no elements to iterate over"
13:55 camelia rakudo-moar 80e0bc: OUTPUT: «1.2244475␤»
13:55 camelia rakudo-moar 80e0bc: OUTPUT: «there were no elements to iterate over␤»
13:55 timotimo m: my $seq = (1...*); do +(for |$seq -> Any --> Any { last if $++ > 50000 }) or say "hi"; say now - INIT now
13:55 camelia rakudo-moar 80e0bc: OUTPUT: «hi␤1.2278798␤»
13:55 masak lizmat: I don't remember exactly, but the proposed way to write it was something like that.
13:55 IOninja m: my @a = 42; (for @a {}) || say "there were no elements to iterate over"
13:55 camelia rakudo-moar 80e0bc: ( no output )
13:56 masak lizmat: I fuzzily remember it as being Nil and //, but I can't be sure. if it was, it isn't anymore.
13:56 IOninja m: my @a = 42; dd (for @a {}); my @b; dd (for @b {})
13:56 camelia rakudo-moar 80e0bc: OUTPUT: «(Nil,)␤()␤»
13:56 IOninja cool
13:56 timotimo right, same as using "do" i expect
13:56 IOninja No, do returns all elements
13:57 masak this also works if it's a one-shot iterable, like jnthn talked about
13:57 IOninja m: my $seq = (1...*); (for |$seq { last if $++ > 50000 }) or say "hi"; say now - INIT now
13:57 camelia rakudo-moar 80e0bc: OUTPUT: «hi␤1.1888204␤»
13:57 IOninja ehhh
13:57 IOninja Still succeptable to the return stuff
13:58 IOninja m: my @a = 42, 72; dd (for @a { $_ });
13:58 camelia rakudo-moar 80e0bc: OUTPUT: «(42, 72)␤»
13:58 IOninja Oh, it *is* same as using do
13:58 timotimo yeah
13:58 timotimo the difference between do ... and (...) is just syntactical. precedence and all that
13:58 IOninja Ah
14:25 mr_ron joined #perl6-dev
14:27 mr_ron left #perl6-dev
14:29 Geth ¦ star: 96af95be94 | (Timo Paulssen)++ | modules/json_fast
14:29 Geth ¦ star: get version 0.8 of json_fast
14:29 Geth ¦ star:
14:29 Geth ¦ star: fixes Num serialization, also implements NaN and Inf "properly"
14:29 Geth ¦ star: review: https://github.com/rakudo/star/commit/96af95be94
15:13 AlexDaniel joined #perl6-dev
15:56 MasterDuke jnthn: i've updated https://github.com/rakudo/rakudo/pull/1018 with what i thought was a fix for the jvm. it now builds, and ./perl6-j -e 'say "hi"' runs fine, but a `make install` fails and i can't run the spectests
15:57 MasterDuke here's a gist of the output i get https://gist.github.com/MasterDuke17/2c8fbc294f3c9defcf370de046af1331
15:58 MasterDuke of course if anyone at all has a suggestion for ^^^ i'm all ears
16:01 MasterDuke and the first line referenced in the backtrace is this: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/BOOTSTRAP.nqp#L2518
16:03 nine The DYNAMIC in question is probably $*RAKUDO_MODULE_DEBUG
16:05 MasterDuke line 23 of the gist? it's referencing https://github.com/rakudo/rakudo/blob/nom/src/core/stubs.pm#L38
16:54 Geth ¦ nqp: 9b67b175d8 | TimToady++ | src/QRegex/Cursor.nqp
16:54 Geth ¦ nqp: allow second arg of define_slang to be optional
16:54 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/9b67b175d8
16:55 TimToady well, third arg, really...
16:55 TimToady or fourth, even...
17:43 MasterDuke additional data point. i rebased my branch to the HEAD of nom, same behavior
17:58 robertle joined #perl6-dev
18:09 Geth ¦ roast: ronaldxs++ created pull request #240: fix fudgeandrun handling of return code from prove or perl6 run of test
18:09 Geth ¦ roast: review: https://github.com/perl6/roast/pull/240
18:12 mr_ron joined #perl6-dev
18:17 dogbert17 joined #perl6-dev
18:22 * japhb munches meusli and contemplates how to debug his input processing problems
18:22 japhb Good UGT, all
18:24 * DrForr waves from EEST.
18:31 timotimo japhb: can you output $*THREAD every time you grab characters?
18:33 japhb timotimo: Yeah, had that idea, and also putting a CATCH { .say } inside the start { ... gather characters ... } block
18:33 timotimo one thing you could try is use Thread.new instead of start { }
18:33 timotimo because then you won't be working with a thread pool
18:33 japhb Oh that's an interesting point
18:34 timotimo even if that doesn't fix it, it'll remove one or two layers of indirection for bug hunting
18:34 japhb thx, timotimo
18:49 japhb Gah, not a single one of those ideas helped.  The thread ID that I send to $*ERR never changes, the CATCH block never catches anything, and using Thread.start: instead of just start changes the initial thread ID (from 3 to 5), but otherwise makes no difference.
18:56 pyrimidine joined #perl6-dev
19:12 timotimo hm, i wonder
19:12 timotimo does $*THREAD really give you the right info?
19:13 timotimo what happens if you nativecall into a pthread function that gives you a pid/tid?
19:13 timotimo does getpid give you a different pid when you're in a thread?
19:40 MasterDuke in src/Perl6/Actions.nqp, how would i know whether i'm running on a 32 or 64 bit system?
20:34 RabidGravy I'm just llooking at RT#123282
20:34 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=123282
20:35 RabidGravy what would need to be done to make IO::Socket::INET actually pass the family parameter to the underlying implementation?
20:41 lizmat So what's all this braids stuff I've been missing the past week ?
20:41 lizmat :-)
20:42 * lizmat would appreciate a one paragraph description for the Perl 6 Weekly  :-)
20:42 lizmat git log is not as useful for this
20:42 lizmat s/as/very/
20:50 lizmat TimToady jnthn moritz masak ^^^^  please ?
20:51 mst lizmat: sounds kinda hairy
20:51 AlexDaniel joined #perl6-dev
20:52 lizmat well, I'm just glad they aren't dreadlocks, as that could get *really* confusing with multiple threads :-)
20:53 lizmat .oO( my dreadlocks deadlocked )
21:06 gfldex lizmat: as I understand it, the braids stuff gets rid of a few dynamic vars in the grammar to improve speed and sanity. It is also a foundation for more advanced feature in the future.
21:10 lizmat gfldex: thanks!
21:22 lizmat and a new Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/02/20/2017-08-evolving-slangs/
21:25 jnthn lizmat++
21:33 * lizmat goes off to chase some more jetlag away
21:34 jnthn :)
21:34 jnthn Glad you got home safely :)
21:34 jnthn Rest well
21:40 * perlpilot is slightly impressed at the Perl 6 questions on SO
21:46 moritz yes, surprisingly good questions and answers
21:46 moritz a long shot from "HOW IS ARRAY FORMD?" :-)
21:48 jnthn "USING SEQS!"
21:49 jnthn The questions are almost good enough to tempt me to sign up for SO :
21:49 jnthn *:P
23:25 b2gills You don't actually have to sign up for SO, you will just lose control of your account after the web cookie goes stale.At that point you can start another
23:28 b2gills It's better if you use an OpenID account or one of the various other similar connection options

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