Perl 6 language and compiler development 2.0 | Logs at irclog.perlgeek.de/perl6-dev/today | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
Set by moderator on 15 May 2018.
00:17 lizmat joined
Geth rakudo: zoffixznet self-assigned Type Captures Leaking out Sometimes github.com/rakudo/rakudo/issues/1596
zoffixznet self-assigned Can't use native type to parametarize a role / typecheck failure when using that type github.com/rakudo/rakudo/issues/1834

Fix for GH #1821: unexpected table failure
The failure was unexpected because the failure message reported mixed visual and non-visual column separators but such were not seen. The fix was to properly detect trailing visual column separators.
... (7 more lines)
01:01
01:57 ilbot3 joined
moderator Perl 6 language and compiler development 2.0 | Logs at irclog.perlgeek.de/perl6-dev/today | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
02:17 Zoffix joined
Zoffix CaR Grant Report for May: blogs.perl.org/users/zoffix_znet/20...-2018.html 03:25
weekly: CaR Grant Report for May: blogs.perl.org/users/zoffix_znet/20...-2018.html
notable6 Zoffix, Noted!
03:32 AlexDaniel joined 03:40 Zoffix left
samcv i was going to make a blog post about the hash security changes 04:04
maybe will finish that up tomorrow
04:22 ufobat_ joined
AlexDaniel samcv++ 04:26
|Tux| The load of my home box when running the CSV test: tux.nl/Files/20180516083457.png 06:35
.tell lizmat tux.nl/Files/20180516083457.png ← can it be that --race takes way more threads/processes than there are CPU's available? I just have 8 06:36
yoleaux |Tux|: I'll pass your message to lizmat.
|Tux| Rakudo version 2018.04.1-86-g5ce24929f - MoarVM version 2018.04.1-115-ga607c42f1
csv-ip5xs0.856 - 0.887
csv-ip5xs-208.694 - 8.868
csv-parser24.213 - 24.571
csv-test-xs-200.457 - 0.468
test8.800 - 8.919
test-t2.358 - 2.377
test-t --race0.972 - 0.992
test-t-2041.059 - 42.160
test-t-20 --race14.185 - 14.654
06:38
06:49 robertle joined 06:50 Ven`` joined 06:52 AlexDaniel joined, shareable6 joined 06:57 AlexDani` joined 07:26 AlexDani` joined 07:27 Ven`` joined 07:28 Ven`` joined 09:11 squashable6 joined 09:28 shareable6 joined 10:22 lizmat joined 10:34 Ven`` joined
lizmat weekly: www.tyil.nl/tutorials/sparrowdo-ge...g-started/ 10:36
yoleaux 15 May 2018 23:10Z <tyil> lizmat: www.reddit.com/r/ProgrammingLangua...s/dz0mmxn/ since you collect comments about perl 6
notable6 lizmat, Noted!
yoleaux 06:36Z <|Tux|> lizmat: tux.nl/Files/20180516083457.png ← can it be that --race takes way more threads/processes than there are CPU's available? I just have 8
lizmat weekly: www.reddit.com/r/ProgrammingLangua...s/dz0mmxn/ 10:37
notable6 lizmat, Noted!
lizmat weekly: blogs.perl.org/users/zoffix_znet/20...-2018.html
notable6 lizmat, Noted!
tbrowder_ hi, #perl6-dev! 10:50
can someone please merge my Rakudo PR #1826?
.tell Zoffix my Rakudo PR #1826 (which fixes your GH #1821) is ready for merging 10:52
yoleaux tbrowder_: I'll pass your message to Zoffix.
synopsebot RAKUDO#1821 [open]: github.com/rakudo/rakudo/issues/1821 Can't get Pod table formatted right
rakudo: 35afcc9c29 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | src/Perl6/Pod.nqp
Merge pull request #1826 from tbrowder/fix-gh1821

Fix for GH #1821: unexpected table failure
lizmat tbrowder_: does something else needs to get merged to get the tests ?
tbrowder_ lizmat: yes, i have a matching roast PR i can merge 10:56
lizmat tbrowder_++
Geth roast: 7605bdd4b1 | (Tom Browder)++ (committed using GitHub Web editor) | S26-documentation/07a-tables.t
Add tests for fix for GH #1821: unexpected table failure (#427)

Additional changes:
  + add tests for existing test tables that had no explicit tests
10:57
tbrowder_ lizmat: thnx. i thought i had my rakudo commit bit but apparently not :-( 10:59
11:12 Ven`` joined
AlexDaniel` Zoffix++ # the report is nice 12:02
12:26 Ven`` joined
lizmat weekly: www.reddit.com/r/ProgrammingLangua...arameters/ 12:31
notable6 lizmat, Noted!
12:33 Ven`` joined
Geth rakudo: 385308d359 | (Elizabeth Mattijsen)++ | src/core/List.pm6
Fix for R #1833

  - create a separate multi for handling Iterable:U
  - factor out handling of non-Iterables to separate candidate without -return-
12:44
synopsebot RAKUDO#1833 [open]: github.com/rakudo/rakudo/issues/1833 Spurious warning when smartmatching Slip ~~ Empty
13:10 shareable6 joined 13:12 robertle joined
lizmat hmmm... looks like you cannot run make spectest if you have Perl 5.14 :-( 13:36
something about bsd_glob not being available
afk for a few hours&
13:37 skids joined 13:59 lucasb joined
timotimo [Tux]: rakudo's ThreadPoolScheduler tries to figure out what number of worker threads is necessary/efficient. that number can exceed the number of CPU cores you have if some tasks block their thread, for example. there's an env var that lets you see what the decisions are 13:59
[Tux]: RAKUDO_SCHEDULER_DEBUG=yes is what you need to set to see it 14:00
|Tux| it just looked like over-using the CPU, which might turn out to be less efficient than aimed for 14:01
14:12 ExtraCrispy joined
timotimo what's the cpu usage percentage time gives you? 14:22
lucasb lizmat: thanks for fixing #1833 14:23
14:31 Ven`` joined 15:01 ExtraCrispy joined 16:13 robertle joined
Geth rakudo: zoffixznet self-assigned Regression exposed in Crane and other modules github.com/rakudo/rakudo/issues/1832
a36adb2ea8 | (Elizabeth Mattijsen)++ | docs/ChangeLog
17:51
samcv here's a preview of my new blog post about hash randomization. cry.nu/perl6/secure-hashing-for-moarvm/ i may need to have more info about user facing changes? but i'm not sure what to say about that 18:27
any feedback would be appreciated! 18:31
timotimo i find it slightly weird to call hashes "functions" in this context 18:32
samcv well it has an input and an output? 18:36
also wiki has an article called Hash function? en.wikipedia.org/wiki/Hash_function or is there some other way you mean
timotimo the text kind of uses hash the datastructure and hash the function all mixed up it seems like to me
samcv i mean the hash function that takes a string and creates a number 18:37
timotimo like, you wouldn't say that a function has "insertion time" or "lookup time"
samcv ah
ok in the 1st paragraph
timotimo right
samcv i see what you mean. what should i say instead?
timotimo i could have specified that %)
i'd call it "data stucture"
and maybe put more text in the rest of the article to make clear at any point which of the two you're talking about 18:38
what's a "stringer" hashing function? :D 18:47
our current one is string hashing, but this one is stringer hashing? 18:48
a little typo: "proiding" instead of "providing" in the "System Functions" section 18:49
samcv :) 18:56
releasable6 Next release in ≈2 days and ≈23 hours. 2 blockers. Please log your changes in the ChangeLog 19:00
nine What's the best way in a QAST to reuse a value? I don't just want to bindattr $!todo, but also need to call a method on that value 19:03
yoleaux 15 May 2018 20:48Z <AlexDaniel> nine: pinging you just in case :) github.com/rakudo/rakudo/issues/1832
timotimo nine: check if bindattr returns the value; bindattrinvres exists specifically so that it returns the invocant, so bindattr itself must return something different 19:10
nine timotimo: that reasoning makes an awful lot of sense :) 19:19
timotimo: unfortunately though that wouldn't help, as I already use p6bindattrinvres there to reuse the invocant 19:22
Even worse: simply calling reify-until-lazy doesn't fixes the 'my @a = |(gather { say "hello"; }), 1;' case but not the "package Foo { our @bar = 1, |0; }; dd @::Foo::('bar')[0]"
19:25 Zoffix joined
Zoffix nine: FWIW that Issue is marked as assigned 19:25
yoleaux 10:01Z <thundergnat> Zoffix: There are a total of 8 tests that specifically look for exactly 6 digits of precision for stringified representations that can't be exactly represented. EG. (2/3).Fatrat.Str is checked to be specifically 0.666667
10:05Z <thundergnat> Zoffix: As I recall there was 1 in S32-num/fatrat.t and 7 in S32-num/stringify.t. The tests exist in the errata branch too.
10:52Z <tbrowder_> Zoffix: my Rakudo PR #1826 (which fixes your GH #1821) is ready for merging
10:53Z <tbrowder_> Zoffix: my Rakudo PR #1826 (which fixes your GH #1821) is ready for merging
Zoffix And depending on whether my stuff compiles, I may have a fix for all the bugs 19:26
Including one more I found:
c: 2018.04, HEAD my @d is default(42) = 1, |2, Nil, 3; dd @d;
committable6 Zoffix, ¦2018.04: «Array @d = [1, 2, 42, 3]␤» ¦HEAD(a36adb2): «[1, 2, Any, 3]␤»
Zoffix I made Geth report Issue assignments so two devs don't accidentally work on the same issue: irclog.perlgeek.de/perl6-dev/2018-...i_16172539 19:28
Geth rakudo: b8318b8ed8 | (Elizabeth Mattijsen)++ | docs/ChangeLog
Document all of lizmat's changes for 2018.05
nine Zoffix: that's wonderful :) Now I'm just very curious to see those fixes 19:29
Zoffix nine: it's just translation of Array.STORE(Iterable) with nqp::list(@($comma_op)) playing the part of \\iterable
"couldn't find ArrayReificationTarget in SETTING." lesign 19:30
*lesigh*
lizmat if it's a translation of Array.STORE, maybe we should make it a sub in Rakudo::Internals or so ?
Zoffix It's translation to QAST
Rakudo::Internals is a Perl 6 class isn't it? 19:31
lizmat yes
Zoffix And Optimizer is NQP
lizmat true, but it could codegen a call to a special sub, rather than generating the whole logic 19:32
Zoffix Maybe do away with the sub and just optimize the assignment to Array.STORE: nqp::list(@($comma_op)) ? 19:34
So basically rewriting the slurpy infix:<,> call into nqp::list
Here's my current diff that needs ArrayReificationTarget: gist.github.com/zoffixznet/0015aa4...42916dac61 19:36
Gonna just do the Array.STORE: nqp::list and see if it's performing OK
c: 2018.04.1, HEAD for ^500 { my @a = 1, |^1000; @a.eager; Nil }; say now - ENTER now 19:42
committable6 Zoffix, ¦2018.04.1: «0.4575677␤» ¦HEAD(b8318b8): «1.20920365␤»
Zoffix Looks like even with a bug, it's now slower?
m: my @d is default(42) = 1, |2, Nil, 3; dd @d; 19:47
camelia [1, 2, Any, 3]
Zoffix I get that as Array @d = [1, slip(2,), 42, 3] now :P
nine: you didn't throw away your version, did you? 19:50
nine: trying to think of a sane way to reach ArrayReificationTarget and not getting anything good. I'm also worried of breaking 3rd release in row :} 19:51
m: my @d is default(42); use nqp; @d.STORE: nqp::list(1, |2, Nil, 3); dd @d;
camelia Array @d = [1, (2,), {}, 42, 3]
Zoffix huh
c: 2018.04 my @d is default(42); use nqp; @d.STORE: nqp::list(1, |2, Nil, 3); dd @d; 19:52
committable6 Zoffix, ¦2018.04: «Array @d = [1, (2,), {}, 42, 3]␤»
Geth ¦ rakudo: zoffixznet self-unassigned Regression exposed in Crane and other modules github.com/rakudo/rakudo/issues/1832 19:53
Zoffix hm, what if instead of reifying $!todo until lazy we call `.is-lazy` on the array itself and that'll reify it until lazy 19:59
(that likely won't address the perf loss above; not sure if that's just a sideeffect of the measuring process or a real loss)
.tell nine nevermind, my fix didn't even compile. I unassigned from the Issue and left some of my findings on it: github.com/rakudo/rakudo/issues/18...-389647098 20:01
yoleaux Zoffix: I'll pass your message to nine.
Zoffix goes to cry in solitude :) 20:04
20:04 Zoffix left
samcv weekly: cry.nu/perl6/secure-hashing-for-moarvm/ 20:32
notable6 samcv, Noted!
samcv article is live now
lizmat samcv++ 20:36
21:21 MasterDuke joined
lizmat m: use nqp; dd nqp::objectid(nqp::getattr(UNIT::,PseudoStash,q/$!ctx/)); dd nqp::objectid(nqp::getattr(UNIT::,PseudoStash,q/$!ctx/)) # somehow I assumed that I would get 2 identical numbers 21:31
camelia 54692624
54692944
lizmat but I don't, is there something I'm missinng?
jnthn nine timotimo ^^^ ?
I mean, they should share the same BootContext, no? 21:32
moritz: secure hasing ? 21:34
twitter.com/perl6org/status/996853729956679680
timotimo m: use nqp; dd nqp::objectid(nqp::decont(nqp::getattr(UNIT::,PseudoStash,q/$!ctx/))); dd nqp::objectid(nqp::decont(nqp::getattr(UNIT::,PseudoStash,q/$!ctx/)))
camelia 85329632
85329952
lizmat timotimo++ 21:35
timotimo that didn't help
lizmat ah, I thought it did :-(
timotimo this doesn't go through autoviv or something, right?
lizmat autoviv how ? 21:36
timotimo m: use nqp; dd (nqp::decont(nqp::getattr(UNIT::,PseudoStash,q/$!ctx/))).^name
camelia "BOOTContext"
lizmat fwiw, I'm trying to create a stable .WHICH for PseudoStashes 21:39
timotimo right
lizmat and I was assuming that $!ctx would be the stable thing :-)
timotimo i'd have assumed that, too 21:40
lizmat apparently, it isn't :-(
timotimo so PseudoStash is grabbing a new closure of the scope it wants every time you create one? 21:41
lizmat I have no idea... 21:42
timotimo UNIT:: compiles into "PseudoStash.new(:gimme-a-unit-please)" or something, right?
ok, so, UNIT is created by taking the current context and going outwards until a !UNIT_MARKER is seen 21:44
we don't seem to cache the objects that you get when you grab an object's outer
lizmat looks more like postcircumfix:<{ }>(PseudoStash.new,'UNIT') 21:45
timotimo aha, indeed 21:46
so the $!ctx is actually storing the starting context, not even the UNIT context
lizmat I think it stores the final context it finds: nqp::bindattr($stash, PseudoStash, '$!ctx', $ctx)
I think we could actually codegen that a bit more efficient 21:48
but that's another matter :) 21:49
jnthn lizmat: So far as I recall, ::UNIT is not a constant symbol, but rather a PseudoStash created on demand. We don't intern the context handles in the VM either. 21:54
yoleaux 01:14Z <Zoffix> jnthn: is there some trick to resolve ambiguity with `Numeric` being available twice in `class MidRat does Rational[UInt, UInt] is Rat {}.new.Numeric`... Creating a temp class that `does Rational[UInt, UInt]` and inheriting from that seems to avoid ambiguity but (*) inherits from a temp class (*) hits some bug with parametarization
lizmat goes away for some R&R
yoleaux 01:21Z <Zoffix> jnthn: more obvious example: `class A does Numeric {}; class B is A does Numeric {}.new.Numeric` I want the B's `does Numeric` to replace the effects of `A` doing Numeric. And in my case it needs to replace parametarization types. Is that doable?
13:11Z <tbrowder_> jnthn: it’s may, how does one sign up for commaide?
lizmat jnthn: so that means there is no way to get a stable .WHICH for a PseudoStash ? 21:55
jnthn lizmat: Can't immediately think of one. But why would it be a value type?
lizmat well, it would seem to me that a MY:: would be stable inside a routine 21:56
or that a UNIT:: would be stable inside a compilation unit
what I'm trying to achieve is some protection for some Perl 5 functions, such as stat() 21:57
rather than linking it to the thread ID (which is not stable in 6d so don't do that)
timotimo "inside a routine"; you mean inside a call frame, right?
lizmat timotimo: for MY:: indeed :-) 21:58
I would like to link it to the compilation unit that did the import of the subroutine
jnthn lizmat: Why does stat need protection?
lizmat stat(_)
jnthn Ah, one of those things Perl 6 doesn't have for exactly this reason :P 21:59
lizmat aka, use the buffer from the last -X or stat()
yes
jnthn Will anybody really be wanting to do that stuff either side of the lock-free await?
lizmat perhaps this is too much to ask for
jnthn I'd just tie it to the real thread and DIHWIDT if you `await` between them
lizmat well, that's true too
but perhaps in the future something from outside could cause an await 22:00
jnthn We actually did used to intern the context object but it's expensive
lizmat specifically when debugging
timotimo that's what $*AWAITER is for, though
jnthn (Made every single frame a pointer bigger, created an extra thing that had to be nulled every time around, and the vast majority of frames had no need of it) 22:01
lizmat but the context object is referring to something deeper that *is* constant, or not?
jnthn It's not
Well actually
lizmat ah
jnthn I guess it technically *is*
Because if you ask for a context object you force a frame -> heap promotion 22:02
But the fact I'm talking about such optimizations probably gives an idea of why I'm a bit reluctant to tie our hands on this. :)
lizmat I was also thinking that this would make things like finding out the Perl version of the compilation unit of the caller easier (for 6.d support) 22:03
jnthn .tell tbrowder_ By waiting for the bit of May when we start offering that. :-) We're working hard on it.
yoleaux jnthn: I'll pass your message to tbrowder_.
lizmat jnthn: ok, the issue is a lot clearer now
thundergnat Somewhat philosophical question. Should Rat.Str be able to stringify _any_ Rat to its full precision? We don't right now, I suspect because the Rat/FatRat Str method was so horribly slow. But now it is much faster and I could easily change that. 22:04
lizmat goes really afk now
thundergnat There are TODO tests in roast that suggest it should.
jnthn .tell Zoffix Well, "is default" is *an* ambiguity resolver, but it's also a bit of a smell. My feeling is that "MidRat is Rat" goes against the grain of the design here. The Rational role exists so we can have Rat and FatRat under it. 22:05
yoleaux jnthn: I'll pass your message to Zoffix.
thundergnat m: say (4.5 ** 60).Rat; #for example 22:06
camelia 1558657976916843360832062017400788597510.0588349539456355106
jnthn .tell Zoffix So my gut feeling is "wouldn't MidRat also fall under it?"
yoleaux jnthn: I'll pass your message to Zoffix.
thundergnat m: say (4.5**60).perl
camelia 1558657976916843360832062017400788597510.058834953945635510598466400011830046423710882663726806640625
thundergnat The denominator is less than 2**64 so it IS a Rat, but the current Str method chops off about 30 digits of precision. 22:07
I could unify the Rat and FatRat code paths which would return the full precision string, but it will slow Rat stringification back down about 8-10% (from the 50-100% gains I just acheived from the recent optimization commit) 22:10
If we DO want to do this, I would like to get it into this release before the faster stringification makes it into general release so it isn't a "regression". 22:11
tbrowder_ jnth: thnx, not trying to bug you, just don’t want to miss the initial signup... 22:13
yoleaux 22:03Z <jnthn> tbrowder_: By waiting for the bit of May when we start offering that. :-) We're working hard on it.
22:13 Zoffix joined
Zoffix . 22:13
yoleaux 22:05Z <jnthn> Zoffix: Well, "is default" is *an* ambiguity resolver, but it's also a bit of a smell. My feeling is that "MidRat is Rat" goes against the grain of the design here. The Rational role exists so we can have Rat and FatRat under it.
22:06Z <jnthn> Zoffix: So my gut feeling is "wouldn't MidRat also fall under it?"
Zoffix jnthn: yeah, at the end I decided to ditch MidRat altogether ( some reasons listed in grant report blogs.perl.org/users/zoffix_znet/20...-2018.html ) 22:14
*reasons that don't include all the potential hackery required to resolve the ambiguities
jnthn tbrowder_: We'll surely announce it in multiple places. :) 22:21
Zoffix: Ah, OK. Will read that when I'm not quite so tired. :) 22:23
22:36 Kaiepi joined 22:45 AlexDaniel joined 22:46 skids joined
AlexDaniel lizmat: hmmm I'm looking at the ChangeLog… 22:52
lizmat: did you know we had github.com/rakudo/rakudo/wiki/ChangeLog-Draft ? :)
I used to put a link to that page into the ChangeLog but then stopped… thinking that enough people know about it already 22:56
MoarVM always has a link though
lizmat: anyway, it's not an issue, thank you very much for documenting your commits! 22:58
23:31 lucasb joined
lucasb Reading the changelog, I just noticed this commit: github.com/rakudo/rakudo/commit/b12fba38dd3c 23:33
I worry this may masquerade this bug, that 'my str $s' holds an empty string, but 'my str @s' defaults to null pointers 23:35
(BTW, same inconsistence happens with 'my num $x' and 'my num @x', one defaults to NaN, the other defaults to 0e0) 23:36
m: my str @a; say @a[^3].perl # looks like just 3 empty strings 23:37
camelia array[str].new("", "", "")
lucasb m: my str @a; say @a[1] # but is actually null
camelia concatenate requires a concrete string, but got null
in block <unit> at <tmp> line 1
lucasb so maybe change the line: "return '<null>' if nqp::isnull_s($to-escape)" to mean as a sentinel, just to be able to print it 23:38
This is just a little detail. What is important and I wish will be addressed is the inconsistence between default values of native scalars vs native arrays 23:42