IOninja m: say source-file 00:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
source-file used at line 1
IOninja m: use XXX 00:12
camelia ( no output )
IOninja what the...
ugexe i installed it 00:42
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 Uninstalled /home/camelia/rakudo-m-inst-1/share/perl6/site/dist/12B1BDBA6B587552D58EA06D4B8D8BF4D6AB5248
Uninstalled /home/camelia/rakudo-m-inst-1/share/perl6/site/dist/F3EF38A22EF96B3A81774BDFE3AD71AA22B948D7
ugexe m: use XXX
camelia ===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
ZzZombo use Git::Good; 00:59
japhb I've figured out a workaround to the cross-thread IO problem (github.com/ab5tract/Terminal-Print....pm6#L26), but the T*tris-like game (github.com/ab5tract/Terminal-Print...s/tris.p6) is still showing input problems. 03:08
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
*sigh*
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.
[Tux] With TimToady's PR applied to Slang::Tuxic: 06:57
This is Rakudo version 2017.02-32-gc1a0fa72b built on MoarVM version 2017.02
csv-ip5xs 2.877
test 12.679
test-t 4.870 - 5.039
csv-parser 13.406
TimToady++
TimToady :D 07:03
samcv yay it's working again :)
TimToady can wander off to Kauaʻi tomorrow in good conscience then :) 07:05
lizmat merged TimToady's PR 07:31
[Tux] lizmat, it also needs a version upgrade, right? 07:35
$work calls. need to run
lizmat [Tux] ack
[Tux]: not sure 07:37
lizmat needs to run as well
Geth rakudo/nom: 80e0bce9ec | (Elizabeth Mattijsen)++ | 2 files
Make loops/maps with NEXT phaser about 5% faster

  - copy Block.fire_phaser to fire_if_phaser
  - remove condition from Block.fire_phaser: it is assumed it exists
  - adapt iterable handling to use fire_if_phaser if necessary
So in a loop/map with a NEXT phaser, it is only once checked whether there is a phaser, instead of for each iteration. This should also help inlining.
12:43
lizmat partly inspired by blogs.perl.org/users/morandimus/201...l#comments
speaking of which: did we ever consider a NONE phaser that would run if a block was never iterated ? 12:44
for @a { NONE say "array was empty }
for @a { NONE say "array was empty" } 12:45
masak I pestered TimToady with questions like this some years back :) 12:50
I believe some of that made it back into a synopsis somewhere
lizmat fwiw, from an implementation point of view, it would be trivial 12:51
as it would just be the else on the check whether the LAST phaser should be fired
jnthn That solution has weird scoping issues, fwiw 12:52
lizmat how do you mean>? 12:53
jnthn for @as -> $a { NONE say $a }
masak I would also like to point out that (IMHO) Python has somewhat poisoned the well on this one
lizmat jnthn: gotcha
masak because the semantics of `else` on loops in Python is *not* (I repeat, *not*) "did it do zero iterations"
jnthn It wouldn't be the only place we have such an issue (QUIT and LAST in whenever blocks share it)
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)
lizmat m: my @a; my int $any; for @a { LAST $any = 1 }; say "array was empty" unless $any # solution with LAST 12:55
camelia array was empty
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 ( no output )
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.
masak ok, that's also a strike against 12:58
moritz couldn't you use FIRST? 12:59
jnthn moritz: Yes, that's work out better :)
*that'd
moritz python uses an else-block for not-run loops 13:00
though after the loop
we could have an ELSE phaser, but I'm not favor of it
masak moritz: see above -- the semantics is *not* "for not-run loops" 13:02
see also a comment to that blog post
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
Only issue is if @a is actually a far longer expression
But even then it's possible to just shove that into a variable, or use a given block 13:06
Uh, I mean, is not actually much longer than...
lizmat yeah, FIRST would be better, /me spent too much time in Any-iterable-methods :-) 13:09
jnthn Oh, other thing is if it's a one-shot iterable, of course. 13:12
IOninja m: my @a; do for @a {} or say "hi" 13:14
camelia hi
lizmat for 0..-1 { NONE say "weird range" }
IOninja: that would be a severe performance penalty 13:15
IOninja I'd write it as if blah-blah-blah -> @a { for @a {... } } else { ... } 13:21
I saw that post on reddit with plenty of negative comments on it, so the NONE phaser feels like a YAGNI
lizmat well, my original question was whether it was ever considered 13:24
masak seemed to imply it had
jnthn's scoping point sorta clinched it for me :-) 13:25
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:27
That slightly increases the desire for some kinda syntactic relief 13:28
But yeah, I agree a NONE phaser probably ain't it :)
timotimo do we get a performance boost if we "do +(for @a {})" instead of "do for @a {}"? 13:29
because in theory it can .count-only?
IOninja m: my $seq = (1...*); for @$seq { .say; last if $++ > 5 }; unless @$seq { say "hi" } 13:30
camelia 1
2
3
4
5
6
7
IOninja m: my $seq = ().Seq; for @$seq { .say; last if $++ > 5 }; unless @$seq { say "hi" }
camelia hi
jnthn IOninja: That forces keeping the values around, though :)
IOninja Does it?
oh the @ thing 13:31
jnthn Yes, @$seq is sugar for $seq.cache
cd wat
oops
:)
IOninja how do you iterate over it then?
ah slip OK
jnthn |$seq
IOninja lizmat: what would cause the severe performance penalty? The `do`? 13:37
lizmat IOninja: yeah, the fact that first needs to keep all the values around 13:38
IOninja ah
lizmat also, the iterator would need to do a push-all instead of a sink-all
IOninja m: my $seq = (1...*); do for |$seq { last if $++ > 50000; $ = (); } or say "hi"; say now - INIT now 13:39
camelia 1.2169290
IOninja m: my $seq = ().Seq; do for |$seq { last if $++ > 50000; $ = (); } or say "hi"; say now - INIT now
camelia hi
0.0016828
IOninja m: my $seq = (1...*); for |$seq { last if $++ > 50000; $ = (); }; say now - INIT now 13:40
camelia 1.38174933
IOninja Not really a good solution though. You have to watch what you return from the loop 13:41
or the conditional will trigger wrongly
perlpilot If only "run if no iterations of the loop" could be prototyped in user-space ... 13:42
timotimo that's why i suggested the + in front 13:43
IOninja m: my $seq = (1...*); do +(for |$seq { last if $++ > 50000 }) or say "hi"; say now - INIT now 13:44
camelia hi
1.2159876
timotimo not faster :( 13:53
oh
probably because it still has to account for slips
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"
camelia 1.2244475
there were no elements to iterate over
timotimo m: my $seq = (1...*); do +(for |$seq -> Any --> Any { last if $++ > 50000 }) or say "hi"; say now - INIT now
camelia hi
1.2278798
masak lizmat: I don't remember exactly, but the proposed way to write it was something like that.
IOninja m: my @a = 42; (for @a {}) || say "there were no elements to iterate over"
camelia ( no output )
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 {})
camelia (Nil,)
()
IOninja cool
timotimo right, same as using "do" i expect
IOninja No, do returns all elements
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
camelia hi
1.1888204
IOninja ehhh
Still succeptable to the return stuff
m: my @a = 42, 72; dd (for @a { $_ }); 13:58
camelia (42, 72)
IOninja Oh, it *is* same as using do
timotimo yeah
the difference between do ... and (...) is just syntactical. precedence and all that
IOninja Ah
Geth star: 96af95be94 | (Timo Paulssen)++ | modules/json_fast
get version 0.8 of json_fast

fixes Num serialization, also implements NaN and Inf "properly"
14:29
MasterDuke jnthn: i've updated 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:56
here's a gist of the output i get gist.github.com/MasterDuke17/2c8fb...e046af1331 15:57
of course if anyone at all has a suggestion for ^^^ i'm all ears 15:58
and the first line referenced in the backtrace is this: github.com/rakudo/rakudo/blob/nom/....nqp#L2518 16:01
nine The DYNAMIC in question is probably $*RAKUDO_MODULE_DEBUG 16:03
MasterDuke line 23 of the gist? it's referencing github.com/rakudo/rakudo/blob/nom/...ubs.pm#L38 16:05
Geth nqp: 9b67b175d8 | TimToady++ | src/QRegex/Cursor.nqp
allow second arg of define_slang to be optional
16:54
TimToady well, third arg, really... 16:55
or fourth, even...
MasterDuke additional data point. i rebased my branch to the HEAD of nom, same behavior 17:43
Geth roast: ronaldxs++ created pull request #240:
fix fudgeandrun handling of return code from prove or perl6 run of test
18:09
japhb munches meusli and contemplates how to debug his input processing problems 18:22
Good UGT, all
DrForr waves from EEST. 18:24
timotimo japhb: can you output $*THREAD every time you grab characters? 18:31
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 { }
because then you won't be working with a thread pool
japhb Oh that's an interesting point
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
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:49
timotimo hm, i wonder 19:12
does $*THREAD really give you the right info?
what happens if you nativecall into a pthread function that gives you a pid/tid? 19:13
does getpid give you a different pid when you're in a thread?
MasterDuke in src/Perl6/Actions.nqp, how would i know whether i'm running on a 32 or 64 bit system? 19:40
RabidGravy I'm just llooking at RT#123282 20:34
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123282
RabidGravy what would need to be done to make IO::Socket::INET actually pass the family parameter to the underlying implementation? 20:35
lizmat So what's all this braids stuff I've been missing the past week ? 20:41
:-)
lizmat would appreciate a one paragraph description for the Perl 6 Weekly :-) 20:42
git log is not as useful for this
s/as/very/
TimToady jnthn moritz masak ^^^^ please ? 20:50
mst lizmat: sounds kinda hairy 20:51
lizmat well, I'm just glad they aren't dreadlocks, as that could get *really* confusing with multiple threads :-) 20:52
.oO( my dreadlocks deadlocked )
20:53
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:06
lizmat gfldex: thanks! 21:10
and a new Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/02/20/...ng-slangs/ 21:22
jnthn lizmat++ 21:25
lizmat goes off to chase some more jetlag away 21:33
jnthn :) 21:34
Glad you got home safely :)
Rest well
perlpilot is slightly impressed at the Perl 6 questions on SO 21:40
moritz yes, surprisingly good questions and answers 21:46
a long shot from "HOW IS ARRAY FORMD?" :-)
jnthn "USING SEQS!" 21:48
The questions are almost good enough to tempt me to sign up for SO : 21:49
*:P
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:25
It's better if you use an OpenID account or one of the various other similar connection options 23:28