MasterDuke IOninja: message for you in #moarvm 02:22
samcv MasterDuke, gonna fix that right now 04:36
getstrfromname in parse-names
MasterDuke samcv++ 04:43
samcv MasterDuke, for bonus points we can implement the op in java gist.github.com/samcv/f385f19111df...6d3610fc6f 04:46
there is already some groundwork done on that. mostly just look at the comment. the gist itself was just to show arnsholt what the function in perl 6 would be written as
might take a look at that tonight if i have time 04:47
though i've never addad java ops before, only minor edits to other parts
MasterDuke i've never done it either, good luck! but i'm off to sleep now, later... 04:48
Geth rakudo/nom: b1444c8a1b | (Samantha McVey)++ | src/core/Str.pm
get JVM compiling again. parse-names workaround

JVM does not have getstrfromname, so we call chr and codepointfromname instead.
04:50
nqp: 358931c824 | (Samantha McVey)++ | 2 files
Implement getstrfromname on JVM
05:48
[Tux] This is Rakudo version 2017.02-178-gb1444c8a1 built on MoarVM version 2017.02-20-g773711e1 07:08
csv-ip5xs 2.755
test 12.830
test-t 5.029 - 5.121
csv-parser 13.065
samcv should be able to remove the #?if on jvm that uses nqp::codepointfromname to use getstrfromname. hope you have been well [Tux] 07:38
[Tux] I have. I think :)
samcv thinking is half the battle
Geth nqp: 37543adf73 | (Bart Wiegmans)++ | t/moar/51-jit-div_i.t
Add testcase for div_i in JIT

Apparently has a negative number bug
10:19
travis-ci NQP build failed. Bart Wiegmans 'Add testcase for div_i in JIT 10:22
travis-ci.org/perl6/nqp/builds/208143370 github.com/perl6/nqp/compare/35893...543adf7333
timotimo t/moar/51-jit-div_i.t .................. Failed 1/1 subtests - oh no, that's an unexpected result of adding that test!
IOninja lol, that's only cause the test is wrong 10:45
m: say -1 / 10 10:46
camelia -0.1
dogbert17_ RT #130925 looks like a blocker :)
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130925
IOninja and it moves it down to -1
timotimo m: say -1 div 10 10:47
camelia -1
jnthn dogbert17_: Think it evaded the spam blocker...
jnthn marks it as spam
IOninja too late
dogbert17_ that was fast :) 10:48
jnthn If only all bugs just needed clicking an S to fix! :) 10:51
IOninja timotimo: oh, sorry... Just woke up. I do see it now it tests for != -1 as as a failure mode
m: use nqp; for ^100_000 { my $y = nqp::div_i(-1, 10); die "$_" if $y != -1 } 10:52
camelia 207
in block <unit> at <tmp> line 1
IOninja It's same bug that MasterDuke exposed when changing something to div_i innit?
timotimo looks just like 10:53
samcv how do you guys generate those nqp bump logs 11:15
i want the fancy too
IOninja git log --oneline 2017.02-gwhatever HEAD 11:17
where the whatever is the current version used
samcv nice
timotimo you don't need to put a .. there? 11:18
IOninja oh maybe 11:19
could be ... too
lizmat moritz IOninja: www.0racle.info/articles/matplotlib_in_p6_intro # tweetable ?
IOninja twetted (from my account; don't have access to the P6Feed one) 11:20
samcv IOninja, that didn't work 11:21
I did `git log --oneline 2017.02-39-g2780ed7` and the list contains hundreds of commits instead of just between 11:22
oh oops
maybe have to have `git log --oneline HEAD 2017.02-39-g2780ed7`? 11:23
moritz IOninja: do you want access to the perl6org account? 11:25
anyway, retweeted for now 11:26
twitter helpfully offers to "Translate from Swedish" :-)
IOninja moritz: not really :) 11:28
My own account is plenty distractive :)
samcv oh it needs a `..` that's what you guys were meaning by that :) would have been nice if git log -h was more informative 11:29
IOninja git log --oneline 2017.02-39-g2780ed7...HEAD will probably work 11:30
samcv yeah that does work 11:32
DrForr I got Polish with one of my remarks. 11:33
timotimo oops? 11:34
DrForr "Yep. jgoff!bvc!{uiowa,grinnell}!edu" # Translate from Polish 11:35
Geth rakudo/nom: 2125d4d304 | (Samantha McVey)++ | 2 files
Have Emoji_Modifier_Base return Bool instead of int with uniprop
rakudo/nom: version bump brought these changes: github.com/perl6/nqp/compare/2017....-g37543adf
dc198924ff | (Samantha McVey)++ | tools/build/NQP_REVISION

Changes pulled in: 37543adf Add testcase for div_i in JIT 358931c8 Implement getstrfromname on JVM f749428e [js] Remove rest of our bitrotted CPS coroutine implementation. 028c91f8 [js] Remove ChunkCPS, a leftover from our bitrotted CPS transform style code emitting. ... (15 more lines)
rakudo/nom: version bump brought these changes: github.com/perl6/nqp/compare/2017....-g37543adf
9da50e352f | (Elizabeth Mattijsen)++ | src/core/IO/Handle.pm

  - makes IO::Handle.lines about 10% faster, specifically for larger files
  - creates dedicated iterators for using IO::Handle internals if possible
  - reverts back to old "get" method for subclasses
  - dedicated sink-all will just close, or seek to end
MasterDuke lizmat++ would the same thing work for IO::ArgFiles? 12:16
lizmat probably, but I'm not touching IO::ArgFiles while IOninja is working in that area
also: this sorta conflicts with IO::CatPath and IO::CatHandle 12:17
I see IO::ArgFiles as a special case of IO::CatPath/CatHandle really
MasterDuke ah, interesting 12:18
dogbert17_ m: my $foo = '42'; $foo.subst-mutate: /^'ba'/ # oldie 12:28
camelia (timeout)
dogbert17_ RT #127135 if anyone is interested 12:29
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127135
IOninja s: '', 'subst-mutate', \() 12:32
SourceBaby IOninja, Something's wrong: ā¤ERR: Could not find candidate that can do \()ā¤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29ā¤ in block <unit> at -e line 6ā¤ā¤
IOninja s: '', 'subst-mutate'
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/9da5...ol.pm#L193
IOninja s: '', 'subst-mutate', \(/^/, '')
SourceBaby IOninja, Something's wrong: ā¤ERR: Could not find candidate that can do \(/^/, "")ā¤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29ā¤ in block <unit> at -e line 6ā¤ā¤
IOninja dogbert17_: that's cause Cool candidate is a multi. Move proto to Str and make Cool candidate an only method: github.com/rakudo/rakudo/blob/9da5...#L193-L197 12:34
dogbert17_ IOninja: must be a regression
IOninja mc: 42.subst-mutate <a> 12:35
committable6 IOninja, gist.github.com/7b7982694fd5218756...1bcac091bd
IOninja mc: 42.subst-mutate: <a>
committable6 IOninja, Ā¦2015.12: Ā«Cannot call subst-mutate(Int: Str); none of these signatures match:ā¤ ($self is rw: |c is raw)ā¤ in block <unit> at /tmp/0nqYCt6GWb line 1ā¤ Ā«exit code = 1Ā»Ā»
dogbert17_ I can look at it later today unless someone beats me to it :) 12:36
MasterDuke m: my @f; @f[0,0].map({$_ += 1}); say @f 12:43
camelia [1]
MasterDuke m: my @f = 0; @f[0,0].map({$_ += 1}); say @f
camelia [2]
MasterDuke m: my @f; @f[0].map({$_ += 1}); say @f
camelia Cannot assign to an immutable value
in block <unit> at <tmp> line 1
IOninja lizmat: what's IO::CatPath and IO::CatHandle? I don't see them: gist.github.com/zoffixznet/7d93b0c...bd77eda180 12:44
MasterDuke those first two are RT #83280
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=83280
MasterDuke IOninja: pretty sure they're in/from her newio branch 12:45
lizmat github.com/rakudo/rakudo/commit/a2...baa04ce76e # the demise of IO::CatPath/CatHandle
no, not part of newio branch
IOninja Thanks.
MasterDuke: that's what I was grepping. 12:46
MasterDuke doh
IOninja Haha. 12:51
IOninja is amused to see ā‰¤, ā‰„, ā‰  being discussed the same day when CatPath was removed: irclog.perlgeek.de/perl6/2016-01-09#i_11860216
There must be a temporal link between ā‰¤, ā‰„, ā‰  and CatPaths :P 12:52
IOninja spots a Zoffix in the log 12:53
Huh, so they were removed after 6.c release? :o
lizmat yes, but before 2016.01 12:56
so it wouldn't be in a Rakudo * or an official release
IOninja ah 12:57
lizmat I think we need a way to tell an iterator we're done, even when it's not exhausted 13:03
$ 6 'my $h = open("words"); my @a = $h.lines(:close).head(5); dd @a, $h.opened'
Array @a = ["A", "a", "aa", "aal", "aalii"]
Bool::True
jnthn .lines has a :close? 13:04
lizmat so, even though I told .lines to close the handle, it will not do so, because it never gets exhausted
jnthn thought that was only on .slurp-rest
lizmat well, it is actually internally to be used by IO::Path.lines
but that may be the source issue I guess
but even for the IO::Path case: it opens the path, and creates a Seq which will close the handle when it is exhausted 13:06
except it will never be when chained with something like .head
or [0..$limit-1] for that matter
so I was thinking: maybe the Iterator class needs a "done" method 13:07
by default that would be a null op
jnthn This'll end in tears, I suspect
lizmat ok
jnthn Can always put a DESTROY in the Iterator 13:08
lizmat so do you have another suggestion for handling "words".IO.lines.head(5) ?
6 'for ^1000 { my @a = open("words").lines(10,:close) }'
Failed to open file /Users/liz/Github/rakudo.moar/words: too many open files
^^ probably won't fix that 13:09
but it would help
jnthn Note that any kind of close operation would need to be transitive also 13:10
moritz for ^1000 { my @a = given open("words") { LEAVE .close; .lines.head(5) } } 13:11
jnthn On error cases as well as success cases
.close would be the right name for this, if we were to add it
lizmat on the Iterator role you mean ? 13:12
jnthn But it...just goes against the general spirit of iterators, which is that when you lose interest you just stop iterating
Yes
lizmat well, then we shouldn't use iterators on file handles / sockets :-)
jnthn Well, it's fine if you're not trying to use the iterator for resource management too :) 13:13
There's just so many places for this to "leak" though
I mean, for map it feels easy enough: you'd just do .close on the thing you're iterating if there's a last 13:14
But then it also needs doing if there's an exception
Every map would have to pay for the extra bit of logic/exception handler 13:15
And similar for grep, head, and...well, anything else that iterates
But even with all that
my \foo = gather { for $foo.IO.lines { .take } }; say foo.head(5) # oops 13:16
To fix *that* you'd need gather to track every single nested iteration
Note that supply/react do track every whenever inside of them for this very reason 13:17
But supplies were built from the ground up with explicit resource management in mind, because you *can't* leave reactive things to the GC: the arrows point from soruce to sink, not sink to source like in iterators. 13:18
*source
lizmat hmmm... perhaps iterators iterating over other iterators should just call "sink-all" if they don't exhaust the source iterator ? 13:20
if an iterator needs to do resource management, then it should be in the sink-all anyway
jnthn: or do you feel that's conflating too many things into one ? 13:21
jnthn I'm saying that I don't think we can accurately/reliably convey lost interest
IOninja m: (1...Inf).iterator.sink-all 13:22
jnthn And yes, I was just about to ask what about infinite things
camelia (timeout)
jnthn API design is just generally really hard, because it's not just "will this work for the obvious use case" but "will it compose well with a bunch of other things" 13:28
lizmat yeah, gotcha :-) 13:29
jnthn So adding something like .IO.lines looks really useful, 'cus it saves the open/close
lizmat except we can't close if we don't consume the Seq
completely 13:30
:-(
jnthn But composing it with .head(5) shows up the leak in the abstraction
lizmat actually [^5] has the same issue
jnthn Sadly, that case probably shows the problem as even more intractable
lizmat hmnmm... it doesn't at the moment ? 13:31
jnthn my \lines = $foo.IO.lines; say lines[^5]; say "---"; say lines[5..10];
You can't know it's time to close after the first indexing operation
Oh, one other thing to note with the DESTROY suggestion: we already do close handles that get GC'd 13:32
So that may not actually help
In fact it may make it worse by keeping the handle alive longer to call .close on :S
[Coke] (swear jar) that could be a dollar donated to the core fund, that's not a horrible idea. 13:34
IOninja huggable: swear jar 13:35
huggable IOninja, Help Perl 6. Donate (specify "Perl 6 fund" in purpose field): donate.perlfoundation.org/
IOninja Way ahead of you.
|Tux| This is Rakudo version 2017.02-181-g9da50e352 built on MoarVM version 2017.02-20-g773711e1
csv-ip5xs 2.806
test 12.407
test-t 5.062 - 5.077
csv-parser 12.784
[Coke] IOninja++
well, fuck.
jnthn Does this mean I should try to make people swear more to get funded? :)
IOninja :) 13:36
MasterDuke instead of a karma bot, we need a bot to track how much you owe?
IOninja Haha. :D
[Coke] there is another donation page somewhere. Digging. 13:37
MasterDuke taxable? 13:38
dogbert17_ IOninja: should the status for rt.perl.org/Public/Bug/Display.html?id=128717 be changed? 13:39
IOninja m: react whenever Supply.interval: 1 { .say } 13:40
camelia (timeout)0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
IOninja dogbert17_: I guess. Couldn't hurt to have a test 13:41
dogbert17_ where? 13:43
S17-supply/syntax.t ? 13:44
I guess that I can cobble something together 13:45
[Coke] RT #122471 and RT #122470 seems to have been fixed 13:48
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122471
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122470
nine Re-posting for a larger audience: Given module A which requires module B. Should after "require A; ::('B')" actually find B? 13:51
moritz no
lizmat hmmm... my first guess would have been yes
moritz though we probably need some way to make it accessible 13:52
lizmat moritz: why not?
nine Note that if A "use"s B, B is already not available.
moritz rummaging around in GLOBAL maybeƟ
s/Ɵ/?/
nine in A's user that is
moritz lizmat: because require A; only imports symbol A
lizmat moritz: a, good point :-)
moritz lizmat: and lexpads are immutable at runtime, so we can't just shove other stuff in there 13:53
Geth roast/lexical_require: 6885143ff6 | (Stefan Seifert)++ | S11-modules/require.t
No longer transitively expose require'd symbols.

Given: unit class A; method load() { require B; }
And test.pl6: ... (6 more lines)
13:57
nine Ok, whith this the lexical_require branch is ready for review
[Coke] dogbert17_: ok 13:58
Woodi_ iterator is just "walker", wiki: "object that traverse container" - something in memory (or prepared in DB memory). it don't do .open or .close part. with .lines we probably flattened synatctic sugar into concrete functionality. with infinite/generated things we can just be lazy. or maybe lazy thingies can have iterator API (.next, hasNext) 14:30
...where words like "is", "don't do" should be understood like NEED or MUST in rfc documents... it's just pattern not exact clone 15:08
IOninja We already have .next (.pull-one/.pull-at-least). And currently, receiving IterationEnd implies the iterator is exhausted, which is really the same thing as `hasNext` with a singular check (the receiver checks for IterationEnd) instead of possibly multiple checks (receiver checks for .hasNext before making a call and generator checks for end of its supply before setting .hasNext and generator's supplier 15:21
checks for end before setting .hasNext and so on)
DrForr nine: I'm going to be playing a little more intensely with Inine::Python this week. Hopefully I won't find bugs, but ya never know. 15:23
IOninja And .lines does the open thing and returns a sequence whose iterator pulls out lines one by one. So, yes, it (the seq's iterator) don't do .open/.close and that's part of the problem 15:24
DrForr needs to get Perl6::Parser to use a proper iterator; terminating the loop is a little awkward at the moment. 15:25
IOninja Actually, it does do .close; the problem is when it's not exhausted 15:27
Woodi_ IOninja: I think in .lines case problem is that it do both container part and container iterator part. it's was nice all-in-one so far 15:43
IOninja FWIW, for ^1000 { for ^20 { $ = "lines".IO.lines[^2] } } doesn't have the issue. So, it'd be interesting to see a real-world case failure. 15:46
maybe opening a ton of different files in same scope and reading just the leading lines?
timotimo jnthn: would the "too many open files" problem be defeatable with a bit of logic to put pressure on the nursery whenever we consume a file handler? 16:10
i mean, i expect it would, but i'm not sure if we want to do it that way 16:11
jnthn timotimo: I don't think we should be solving language design bugs in the VM 16:14
timotimo we don't want our users to put LEAVE absolutely everywhere, though? 16:15
hmm. "close" or maybe even "discard"? 16:16
timotimo skipped reading that the first time around
IOninja jnthn: is there any reason there's no nqp::stat(...ALL) thing that would return all the stat info in one call instead of requiring a call per item of info? 16:17
Having measured anything, but someone said stat call is expensive and I'm wondering if we can get an improvement by adding an nqp::stat(ALL) thing, since some of the IO::Path methods (e.g. .rwx) end up doing like 4 stat calls per method call 16:18
jnthn IOninja: Well, in the immediate because when Rakudo was ported to MoarVM/JVM it didn't use such a thing, and we just implemented what was needed. :)
IOninja *Haven't measured
Alright. Will see if I can measure something up to see if it's worth it. 16:19
jnthn Yeah, I've heared "stat is expensive" a decent bit too ;)
One thing to keep in mind, though
IOninja boxing all the info may be more expensive? :)
jnthn On platforms where stat is not the native thing (and so emulated), it's quite costly to construct it out of many API calls 16:20
IOninja Ah
jnthn And then disreard most of the info
But yeah, .rwx doing three calls is LTA
timotimo also racy, no?
jnthn *disregard
Yeah, in the sense that everything you do with a filesystem is :) 16:21
timotimo yeah, though if you have a regular stat syscall it's atomic i expect
jnthn I mean, if $x.IO.w { open $x } is racey :)
timotimo aye
look-before-you-leap would be the answer here
er
i meant the exact opposite 16:22
jnthn But yeah, I agree we should ideally we doing a single stat call for .rwx
timotimo go me!
jnthn Yeah, it's better to just do things and cope with the fallout, because you have to to be robust anyway
nine Note: For performance and simplicity reasons, different fields in the stat structure may contain state information from different moments during the execution of the system call. For example, if st_mode or st_uid is changed by another process by calling chmod(2) or chown(2), stat() might return the old st_mode together with the new st_uid, or the old st_uid together with the new st_mode. 16:27
dogbert17_ at stat call on his $work machine (Xeon proc) take 2.40276e-07 seconds on avarage 16:28
jnthn nine: Interesting; thanks :)
dogbert17_ tested with code from docstore.mik.ua/orelly/weblinux2/mo...h11_06.htm 16:30
timotimo :D 16:32
that's rather terrible :D
but also: we're off the hook in this regard ;)
nine I guess instead of an ALL, being able to communicate the interesting fields to the VM would allow for better optimization on different platforms. Also there have already been several attempts for more fine grained stat syscalls on Linux. 16:35
IOninja true 16:36
nine lwn.net/Articles/707602/ 16:37
Geth roast: dogbert17++ created pull request #250:
Test for RT 128717
17:55
roast: 1da17b7cbf | dogbert17++ | S17-supply/syntax.t
Test for RT 128717 (#250)
17:56
nine You know you've done too much rakudo debugging when you type nqp::sayfh(nqp::getstderr(), $compunit.dump) if nqp::existskey(nqp::getenvhash(), 'DUMP'); straight without thinking or typo. 18:50
IOninja :) 18:54
geekosaur would be hacking up a macro system or preprocessor on top of that by now... 18:55
probably add nqp:: to every sub unless it started with :, and no-args stuff shorthanded as $*name -> nqp::name() 18:58
or nqp::get<name>()
geekosaur thinks that's what the computer's there for 18:59
MasterDuke m: my @f; @f[2,2,2].map({$_ += 1}); say @f 19:14
camelia [(Any) (Any) 1]
MasterDuke m: my @f = 0; @f[2,2,2].map({$_ += 1}); say @f
camelia [0 (Any) 1]
MasterDuke m: my @f; @f[0,0,0].map({$_ += 1}); say @f
camelia [1]
MasterDuke m: my @f = 4; @f[0,0,0].map({$_ += 1}); say @f 19:15
camelia [7]
MasterDuke this is RT #83280, but i'm not entirely sure it's a bug
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=83280
MasterDuke as i understand what's going on, `my @f; @f[0,0,0].map({$_ += 1}); say @f` is creating a 3-element list of what's int @f[0], and then mapping over that list and mutating the results 19:20
so in the auto-viv case, @f[0,0,0] is 3 Any's, each one gets incremented to 1, and that one gets stored back in @f[0] 19:21
IOninja m: my @f; my $a := @f[2]; ($a, $a, $a).map({$_ += 1}); say @f 19:24
camelia [(Any) (Any) 3]
MasterDuke in the pre-assigned case, @f[0,0,0] is 3 copies of the container in @f[0], it gets incremented 3 times, so ends up its pre-existing value + 3
IOninja s: [], 'AT-KEY', \(Any:U: 42) 19:26
SourceBaby IOninja, Something's wrong: ā¤ERR: ===SORRY!=== Error while compiling -eā¤Confusedā¤at -e:6ā¤------> put sourcery( [], 'AT-KEY', \(Any:U:<HERE> 42) )[1];ā¤ expecting any of:ā¤ colon pairā¤
IOninja s: Any, 'AT-KEY', \(42)
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/9da5...ny.pm#L398
IOninja m: my @f; @f[0,0,0].map({.WHICH}).say 19:28
camelia (Any|U31282552 Any|U31282552 Any|U31282552)
IOninja m: my @f; say [===] @f[0,0,0]
camelia True
IOninja m: use nqp; my @f; @f[0,0,0].map({nqp::getattr($_, Scalar, '$!whence').WHICH}).say 19:29
camelia (Block|66537888 Block|66538968 Block|66539040)
IOninja Don't get why the first which gave the same object :S 19:30
m: sub foo { my $x }; say foo.WHICH xx 3 19:31
camelia (Any|U31446392 Any|U31446392 Any|U31446392)
MasterDuke huh 19:32
IOninja Ah, OK. It just our .WHICH sucks and it doesn't see difference in $!whence or something.
MasterDuke: but yeah, the @f[2,2,2] is a slice of three different containers, they all are Any:U and update @f[2] to 1, but only the update of the (last) one sticks around. 19:34
timotimo nine: nqp has a "note" sub! \o/
IOninja m: my @f; @f[2,2,2].map({$_ += ++$}); say @f 19:35
camelia [(Any) (Any) 3]
IOninja m: my @f; @f[2,2,2].reverse.map({$_ += ++$}); say @f
camelia [(Any) (Any) 3]
IOninja m: my @f; @f[2,2,2].map({say $_ += rand}); say @f
camelia 0.912432216585864
0.312091973617792
0.756353937191424
[(Any) (Any) 0.756353937191424]
IOninja m: my @f; @f[2,2,2].reverse.map({say $_ += rand}); say @f
camelia 0.635016544973122
0.872707273829507
0.698843535049793
[(Any) (Any) 0.698843535049793]
IOninja Right.
I'll reply and reject it. I know $!whence is supposed to be removed at some point, but at least currently the behaviour makes sense to me. 19:37
MasterDuke yeah, it took looking at it for a little while, but it seemed less bug-like the more i thought about it 19:39
IOninja Hm, the more I try to explain it, the more it feels like a bug 19:50
Or more precicely: a shortcomming of the $!whence thing
m: my @f; my $a := @f[0]; my $b := @f[0]; $a = 42; say $b
camelia (Any)
IOninja m: my $z; my $a := $z; my $b := $z; $a = 42; say $b
camelia 42
lizmat IOninja: yes, $!whence has its shortcomings
IOninja lizmat: so would you say it's a bug (and the ticket should be left open)? 19:51
m: my @f; @f[0,0,0].map({$_ += 1}); say @f
camelia [1]
IOninja m: my @f = 0; @f[0,0,0].map({$_ += 1}); say @f
camelia [3]
IOninja ^ this I mean
The fact that the two don't generate same output
lizmat yeah, that's a bug I probably introduced 19:52
IOninja hehe
The original is from 2011 or something :)
lizmat m: my @f = (); @f[0,0,0].map({$_ += 1}); say @f
camelia [1]
IOninja The Any:U.AT-KEY returns a new scalar on each call
And its whence gets triggered. 19:53
MasterDuke committable6: all my @f; @f[0,0,0].map({$_ += 1}); say @f
IOninja Hm.... wonder if we can solve it with state $scalar = whencebusiness...; $scalar
And then all the calls will return the same whence?
committable6 MasterDuke, gist.github.com/7a3d1c4a740879bd7a...343a05bf59
MasterDuke committable6: all my @f = 0; @f[0,0,0].map({$_ += 1}); say @f 19:54
committable6 MasterDuke, gist.github.com/4838076a8e4114b586...7336b9184d
lizmat m: my %h; my $a := %h<a><a>; %h<a> = 42; dd %h; $a = 666; dd %h # is this correct behaviour, or should the assignment to $b die ?
camelia Hash %h = {:a(42)}
Hash %h = {:a(${:a(666)})}
IOninja o.O 19:55
jnthn We could try to catch that case, though it'd require an extra existskey check on every single hash assignment 20:01
So far as I'm concerned, it's a DIHWIDT
Geth rakudo/lexical_require: bb87aff465 | (Stefan Seifert)++ | src/core/operators.pm
Fix "require" with statement prefix phasers.

BEGIN require Test; failed with "Lexical with name 'Test' does not exist in this frame". A similar error message would come for symbols in the import list. The reason was that the statement prefix would actually lead to a QAST::Block being generated for the statement while the lexical stubs for the module name and the imported symbols were created in the block containing the phased statement. The highly specific lookup in REQUIRE_IMPORT (OUTER::CALLER::) did not find the stubs. Fix by looking in the caller's outer lexical scope, too.
20:36
roast/lexical_require: 34cbe4a5ed | (Stefan Seifert)++ | S11-modules/require.t
RT #127538 is fixed, can run these tests now.
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127538
nine I'm not sure how useful BEGIN require Foo; is, but the bug actually affected all phasers. 20:37
Does anyone want to look at the branch first or should I just merge? 20:40
IOninja
.oO( just merge... )
20:41
lizmat +1
Geth rakudo/nom: 4 commits pushed by (Stefan Seifert)++ 21:07
roast: 15b57e4361 | (Stefan Seifert)++ | S11-modules/require.t
Create lexical stubs for require'd packages

  "use" and "need" already put the loaded packages in lexical scope.
Fixing #125083 brings "require" in line with them.
roast: 729ecee014 | (Stefan Seifert)++ | S11-modules/require.t
No longer transitively expose require'd symbols.

Given: unit class A; method load() { require B; }
And test.pl6: ... (6 more lines)
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=125083
roast: 073a95fa6d | (Stefan Seifert)++ | S11-modules/require.t
RT #127538 is fixed, can run these tests now.
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127538
nine lizmat: this branch got us rid of #125083, #125084, #125951, #126658, #127538 and #130535 :) 21:25
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=125083
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=125084
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=125951
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126658
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127538
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130535
lizmat cool! 21:26
timotimo i wonder if synopsebot should consolidate multiple links into fewer messages?
perlpilot How often is someone likely to mention many RTs in a single message? 21:27
timotimo *shrug*
perlpilot I wouldn't bother with it (unless nine makes this a habit ;)
lizmat even then :-) 21:29
IOninja dogbert17_: looked closer at 130940... there's a whole ton of hanging methods. I stopped looking for more after finding 7. Basically the hang is due to the args being accepted by the Cool candidate but rejected by the Str (or whatever type Cool coerces to) candidate. That rejection loops it back to the Cool candidate and so it infiniloops. So we need to check all the Cool methods and fix it for all of 21:34
them. It's like... 3rd time now this bug occurs in a different method :(
ugexe i think TAP.pm6 is broken with the new require fixes 21:36
IOninja it has one require in it: github.com/rakudo/rakudo/blob/nom/...P.pm6#L257 21:37
nine++ fixing a ton of tickets 21:38
ugexe its that or zefs plugin for it is broke
nine ugexe: oh, that's the one tricky case for which I don't have a good solution. The "try" prefix compiles to a block, which messes with the lexicalness. 21:41
my $deserialized = do { require YAMLish; YAMLish::load-yaml("---\n$serialized...") }; should work 21:42
IOninja hm...
nine Err... my $deserialized = do { require YAMLish; YAMLish::load-yaml("---\n$serialized..."); CATCH { default { } } };
IOninja try require is pretty common tho :/
I guess here it's already fixed: github.com/zoffixznet/perl6-IRC-Cl...m6#L28-L30
nine IOninja: yes 21:43
This is also still ok: my $Foo = try require Foo; $Foo.new; 21:44
IOninja Ohhh. OK :)
Here's a grep of `try require` on ecosystem: gist.github.com/zoffixznet/bb95df0...c540c05774 21:45
nine Maybe we could detect that the QAST::Block is created for the try prefix and instead put the symbols to the outer block.
IOninja oh, but `if try require Foo { Foo.new }` won't work?
nine Phaser statement prefixes do the same already 21:46
IOninja or `if (try require Foo) { Foo.new }`
jnthn nine: We also know that thunks have type Code while blocks have type Block, fwiw
nine Read that as if try { require Foo } { Foo.new }
jnthn nine: I think we should be getting that consistently right
ugexe github.com/ugexe/zef/commit/daf268...a3e4c61bef # Fixed in zef here 21:47
IOninja And this is now broken too? github.com/perl6/perl6-lwp-simple/...pm#L53-L54
nine May actually be a one line fix :) 22:00
Sorry, two lines
IOninja :D 22:04
RabidGravy I'll test all the things tomorrow 22:08
IOninja \o/
lizmat And another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/03/06/...elative-ā‰„/ 22:10
brb
Geth rakudo/nom: 9da6de4678 | (Stefan Seifert)++ | src/Perl6/Actions.nqp
Fix try require Foo; Foo.new;

The try statement prefix compiles to a QAST::Block which would swallow the lexical symbols we created for the required package and the import list. We now detect this situation and make sure the symbols make it into the acutal code block containing the statement.
22:11
jnthn lizmat: Where did Lib::LibSSH come from, ooc? (Should be SSH::LibSSH, but I can't spot where I did it wrong...) 22:13
lizmat++ # weekly 22:14
Also, it wsa Proc::Async that got the newline translation treatement; it was already the case for file handles. :)
lizmat fixed xx 2 22:18
jnthn: I'm considering making IO::Path.lines be eager in the sense that it will read the whole file in memory, and then produce lines from that 22:36
jnthn: aka "words".IO.slurp.lines
jnthn: and then remove the :close param from IO::Handle.lines
IOninja :o 22:37
That kinda sucks. Currently you can process files gigabytes in size line-by-line without issues.
lizmat jnthn: so that we're clear on that IO::Handle.lines will never close the handle
IOninja: and you still can
open("words").lines will do that 22:38
"words".IO.lines will not
IOninja OK
lizmat is my proposal
"words".IO.lines will never leak handles, open("words").lines will
my $handle will leave .close = open("words"); for $handle.lines { } # will not leak 22:39
*.close
IOninja Makes sense. 22:40
No comments then :D
lizmat hmmm... 'will leave *.close' doesn't parse :-( 22:41
will leave { .close } does
gfldex .oO( { .close } enough ) 22:42
lizmat yeah, but seems counterintuitive not allowing whatevercode in that case
also, would be nice if somehow "open" could apply the "will leave { .close }' on the variable :-) 22:43
geekosaur will leave is kinda the wrong semantic, I'd say 23:03
you want the handle to be closed when its last reference goes away, which *usually* means whatever you stored it into went out of scope... but not always, because it may have stuffed it elsewhere as well 23:04
and I would be Grumpy if I stowed it in a hash but it got closed on return from what did the open
lizmat yeah, :-( 23:09
samcv good * 23:38
i need to finish and submit my grant proposal today. finish up the inch stone section
lizmat samcv++ 23:39
IOninja \o/
Geth rakudo/nom: 0083c4ff25 | (Elizabeth Mattijsen)++ | src/core/IO/Path.pm
Always close the handle on IO::Path.lines
23:43
rakudo/nom: 2a2e460b1e | (Elizabeth Mattijsen)++ | src/core/IO/Path.pm
Make the default for limit Whatever

so that it matches on the cheap first condition, instead of on the expensive second condition
lizmat and that concludes my hacking for today 23:44
good night, #perl6-dev!
IOninja night 23:46