Perl 6 language and compiler development | Logs at colabti.org/irclogger/irclogger_log/perl6-dev | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
Set by Zoffix on 27 July 2018.
00:46 LiruCookies joined 00:49 LiruCookies left 01:55 ecmabot12 joined 01:56 ecmabot12 left 03:28 HackMaster___ joined 03:29 HackMaster___ left 03:37 MasterDuke left 03:58 btyler left 03:59 btyler joined 04:00 p6bannerbot sets mode: +v btyler 04:04 lizmat left 04:20 Ven` joined 04:21 p6bannerbot sets mode: +v Ven` 04:24 Ven` left 05:48 dct left 05:53 AlexDaniel left 07:14 robertle joined 07:15 p6bannerbot sets mode: +v robertle 07:30 rntz26 joined, rntz26 left 08:00 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 08:05 Adagio24 joined 08:08 Adagio24 left 08:15 brrt joined 08:16 p6bannerbot sets mode: +v brrt 08:27 Eyo10 joined 08:33 Eyo10 left 08:59 eponym joined, p6bannerbot sets mode: +v eponym, eponym left 09:05 cgoncalves13 joined 09:11 Zoffix joined, p6bannerbot sets mode: +v Zoffix 09:12 cgoncalves13 left 09:16 brrt left
Zoffix .ask TimToady what's your opinion on changing 6.c spec's test that tests for "4" in this exception: `my $x = 4/0; say 42 + $x; => Attempt to divide 4 by zero using div`. There are a couple of bugs to fix and some performance benefits to reap if we don't report any particular value. We'd do so by normalizing all zero-denominator Rationals to <-1/0>, <0/0>, and <1/0> 09:17
yoleaux Zoffix: I'll pass your message to TimToady.
Zoffix .tell TimToady well, bugs could be fixed with other means, by basically slowing down the common Rational ops with edge-case logic to handle zero-denominator Rationals (ZDRs). Basically by normalizing them the check for ZDRs becomes just a denominator check (and I tried marking them with a role instead and doing MMD in the past, but dispatch ambiguities creep up due to Rational role) 09:26
yoleaux Zoffix: I'll pass your message to TimToady.
Zoffix
.oO( throw/fail in Rat.new if denominator is zero and get rid of ZDR concept entirely )
09:28
s/Rat/Rational/ 09:29
10:04 Zoffix left
Geth roast: f3b860105d | (Zoffix Znet)++ | 2 files
[v6.d REVIEW] Test actual exceptions in Bag/BagHash throwage

Orig: github.com/perl6/roast/commit/7a88a38e2
10:06
roast: 2e35d674e9 | (Zoffix Znet)++ | 2 files
[v6.d REVIEW] Test actual exceptions in Mix/MixHash throwage

Orig: github.com/perl6/roast/commit/f83f07757
10:10
10:33 sttts joined 10:37 sttts left 10:41 Ven`` joined 10:42 p6bannerbot sets mode: +v Ven`` 10:49 Ven`` left 10:50 ZPQ5 joined 10:52 ZPQ5 left 11:00 AlexDaniel left 11:59 lizmat joined, p6bannerbot sets mode: +v lizmat 12:06 cognominal-p6 joined 12:07 p6bannerbot sets mode: +v cognominal-p6
dogbert2 ZOFFLOP: t/spec/S12-meta/classhow.t 12:20
12:29 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix jnthn: does 6.d's `start` in sink context just print the exception or does it actually behave like if the exception was thrown at that point? like, is it equivalent to `start { CATCH { default { .say } }; die }` or `start { await my $p := start { die }; $p.result }`? 12:30
hm 12:31
Well, not even sure how to write the second one. How to have it non-block, but throw exception at that place
.oO( maybe that answers my question )
12:32
12:32 valloc_ joined
Geth rakudo: c14df18932 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Internals/JSON.pm6
Revert "Attempt #2 at making R:I:JSON.from-json faster"

This reverts commit c9432c20721104ced7e2408da5ba1f15ad320975.
Alas, the quick parser accepts JSON that is valid, but does not contain any curly blocks. This causes R#2299. I currently don't see a quick way to fix this in a way that doesn't leave the way open for other valid JSON to not be parsed correctly.
I guess we just need to make the NQP regex engine faster.
12:35
synopsebot R#2299 [open]: github.com/rakudo/rakudo/issues/2299 t/spec/S10-packages/require-and-use.t hangs
12:35 valloc_ left
12:43 ggoebel_ left 12:49 lucasb joined 12:50 p6bannerbot sets mode: +v lucasb 12:55 ggoebel left
Zoffix jnthn: also what happens in this case: `start { die; CATCH { when X::Meows {...} } }` ? 12:58
.oO( convert the sunk versions to `start { CATCH { default { .say } }; { die; CATCH { when X::Meows {...} } } }`
12:59
well, with `nqp::handle(ā€¦, 'CATCH', EXCEPTION(nqp::exception).say)` for the sinker catcher 13:00
timotimo it's not possible to "behave like if the exception was thrown at that point", as the call frame in that situation is probably already gone 13:33
hmm
Zoffix
.oO( how to mark a block to not show up in the list of locations of exceptions? )
$ ./perl6 -e 'use v6.d.PREVIEW; start { die }; sleep Ā½; say "meows"'
Died
in block at -e line 1
in code at -e line 1
Like I wanna get rid of the "in code"
timotimo is hidden-from-backtrace
Zoffix In QAST 13:34
timotimo hmm
Zoffix Ah, OK. It's still uses the trait 13:35
OK then, I'll use that 13:36
$*W.find_symbol(['&trait_mod:<is>'])($code,:hidden-from-backtrace) that is
lizmat Zoffix jnthn : I am living under the impression that we should *NOT* check for specific throwage in roast, to allow other Perl 6 implementations freedom in how to implement their exceptions. Am I wrong ? 13:39
Zoffix lizmat: do you mean for specific exception types or specific exception wording. Currently, the roast does test for types, but not for exact wording (tho there are some old 6.c spec tests that still do that) 13:40
And if rakudo throws X::AdHoc, then we don't spec for AdHoc, but just for generic Exception 13:41
lizmat so if we later make it more specific, then the test should change or not ?
Zoffix Yeah. 13:42
lizmat but isn't that changing the spec then ?
Zoffix lizmat: no, you'd change it in later spec versions. Earlier versions would still pass because all exceptions are of type Exception
lizmat hmmm... 13:43
Zoffix m: sub meows { die }; use Test; throws-like meows(), Exception;
camelia Died
in sub meows at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix m: sub meows { die class X::Meows is Exception {}.new }; use Test; throws-like meows(), Exception;
camelia Died with X::Meows
in sub meows at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix well, missing block around the call, but both would pass 13:44
lizmat so how is that different from using dies-ok ?
I just want to make sure that I'll be writing tests correctly in the future 13:46
because it appears I've been doing it wrong
Zoffix heh, like which ones?
lizmat like when writing tests with dies-ok that don't throw X::AdHoc
Zoffix If they don't throw X::AdHoc, then we can be more precise than dies-ok and spec the actual exception type with throws-like 13:48
Also, there's this:
m: use Test; dies-ok { (a => "a").Bog }, "passes";
camelia ok 1 - passes
Zoffix m: use Test; throws-like { (a => "a").Bog }, X::Str::Numeric
camelia 1..2
ok 1 - code dies
not ok 2 - right exception type (X::Str::Numeric)
# Failed test 'right exception type (X::Str::Numeric)'
# at /home/camelia/rakudo-m-inst-2/share/perl6/precomp/BEDCA39DF8A31F12A34A40CDB05730390C84982E/ā€¦
Zoffix And it doesn't have to be a typo, but some internal LTA error and the test would still pass even tho the error is wrong (pretty sure we already had such a case in the past) 13:49
I mean, dies-ok is not wrong. It's just more precise to use something else.
Same with `is-deeply foo(), ().Seq`. It's not precise enough to spec that the return type is a `Seq`, because if it's a `List` the test would still pass
m: use Test; is-deeply (), ().Seq 13:50
camelia ok 1 -
Zoffix (there's an `is-eqv` helper in Test::Utils)
lizmat we've had many cases of tests passing for that reason in the past
Zoffix And `is` is crap for many tests ( twitter.com/zoffix/status/1041318801197989888 )
lizmat but again, I was under the impression we didn't want to enforce so much on other implementations 13:51
because, let's face it, the X:: namespace is pretty ad-hoc collection of classes, roles and methods
Zoffix That was only for exact text content of exceptions. I don't recall any discussions for avoiding exception types at all.
Yeah, it's quite a mess. 13:52
lizmat ah, ok, well, then I probably misremember
Zoffix lizmat: but you bring up a good point. Maybe we should avoid speccing new exceptions in 6.d. But... will we review them later at all or will it be a mess forever?
lizmat good question 13:53
Zoffix and change all the new tests to `Exception` for now
lizmat but in the case of the Bag test just changed
the difference between X::Str::Numeric and X::Numeric::CannotConvert seems minimal 13:54
the latter being a more general case of the former
Zoffix
.oO( nested exception types: X::QuantHashCreation.new: :why(X::Numeric::CannotConvert.new) )
13:55
Like when I filed R#2300 I thought "why ain't it some single exception", but then thought "well, actually I do want to know exactly why the creation failed" 13:56
synopsebot R#2300 [closed]: github.com/rakudo/rakudo/issues/2300 [6.d review] Inconsistent exceptions from Bag/Mix creation throwage
lizmat so I feel we should maybe put more effort in unifying similar exceptions before codifying them in roast
Zoffix +1
Geth 6.d-prep: 69a7d9c5e5 | (Zoffix Znet)++ (committed using GitHub Web editor) | TODO/README.md
Add TODO: Throw out / Appendicize Exception Tests

  colabti.org/irclogger/irclogger_log...09-21#l142
13:58
Zoffix $ ./perl6 -e 'use v6.d.PREVIEW; sub { start { die } }(); sleep Ā½; say "meows"' 14:01
meows
14:01 pmurias joined
Zoffix this doesn't die. Attaching handler only when `start` is in sink context without using `.sink` kinda smelly. 14:02
14:02 p6bannerbot sets mode: +v pmurias 14:03 p6bannerbot left 14:04 p6bannerbot joined, ChanServ sets mode: +o p6bannerbot 14:09 [NC]22 joined 14:12 [NC]22 left
Zoffix timotimo: hm, I actually managed to get it to "behave like if the exception was thrown at that point" :) 14:18
By accident :P I was trying to get custom exception handlers to work, but looks like .handle-exception method exits the program too 14:19
m: use nqp; nqp::handle(die, 'CATCH', nqp::getcomp('perl6').handle-exception: nqp::exception) 14:21
camelia Died
in block <unit> at <tmp> line 1
Zoffix that one
timotimo oh, huh. 14:24
Geth rakudo: 369068aed0 | (Elizabeth Mattijsen)++ | src/core/Match.pm6
Make make an only

Not sure why it should be a multi. Having it have to do a getlexcaller sure doesn't help. This appears to have a marginal improvement on R:I:J.from-json
14:33
14:35 patrickb joined
Zoffix lizmat: that will probably fail `make test`: github.com/rakudo/rakudo/blob/mast...unt.t#L270 14:35
lizmat: it was made a multi back when we made everything a multi so users could override stuff or something 14:36
lizmat make test was clean for me
14:36 p6bannerbot sets mode: +v patrickb, brrt joined
Zoffix Ah, ok 14:36
lizmat as make spectest and make stresstest
there maybe some ecosystem fallout, but then we can revert 14:37
14:37 p6bannerbot sets mode: +v brrt
lizmat in any case, "make" is *very* specific 14:37
Zoffix yeah 14:38
lizmat and since it is use a lot in (slow) grammars, I thought it would be helpful
Zoffix +1
lizmat especially since it skips an extra getlexref 14:39
Zoffix m: sub foo {}; dd &foo.dispatchees.head.count
camelia Cannot resolve caller head(List: ); none of these signatures match:
(Any:D: *%_)
(Any:D: Callable:D $w, *%_)
(Any:D: $n, *%_)
in block <unit> at <tmp> line 1
Zoffix Ah, it's a List:U
lizmat cycling&
14:43 pmurias left 14:44 pmurias joined, p6bannerbot sets mode: +v pmurias 14:49 brrt left 15:00 maxxer10 joined
Zoffix ZOFVM: Files=1309, Tests=153185, 169 wallclock secs (26.36 usr 3.97 sys + 3641.08 cusr 183.12 csys = 3854.53 CPU) 15:00
15:02 maxxer10 left
Zoffix ah, crap. I should've read the 6.d-prep notes. I was meant to use uncaught_handler thing 15:02
I think I'll just commit and let jnthn judge if the uncaught_handler thing is better 15:04
Geth rakudo: 6ee5f75778 | (Zoffix Znet)++ | 2 files
[6.d] Attach ex. handler to `start` in sink context

Per 6.d-prep: github.com/perl6/6.d-prep/blob/69a...or-handler
I've used the normal handler instead of `uncaught_handler` the 6.d-prep notes say because I don't know how to use the latter (and noticed that note too late). I'm also unsure if the uncaught_handler handles custom ... (9 more lines)
15:08
roast: 7a426fb4a3 | (Zoffix Znet)++ | MISC/misc-6.d.t
[6.d] Spec `start` in sink context attaches ex. handler

POV: github.com/rakudo/rakudo/commit/6ee5f75778 Per 6.d-prep: github.com/perl6/6.d-prep/blob/69a...or-handler
15:10
6.d-prep: c4016d2d79 | (Zoffix Znet)++ | 2 files
Mark sunk `start` as completed

POV: github.com/rakudo/rakudo/commit/6ee5f75778 Propspec: github.com/perl6/roast/commit/7a426fb4a3 Docs: github.com/perl6/doc/commit/df0b71d8d6
15:12
Zoffix .tell jnthn FYI: I took a crack at sunk `start`. github.com/rakudo/rakudo/commit/6ee5f75778 spec: github.com/perl6/roast/commit/7a426fb4a3 docs: github.com/perl6/6.d-prep/commit/c4016d2d79 `sub { start die }(); sleep ā…“` doesn't die which sucks, but I don't know how to make that work. Also I didn't use any `uncaught_handler` mentioned in 6.d-prep. Dunno if it's good or bad. 15:13
yoleaux Zoffix: I'll pass your message to jnthn.
15:15 buggable left, buggable joined, ChanServ sets mode: +v buggable 15:16 p6bannerbot sets mode: +v buggable 15:18 robertle left 15:25 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 15:38 sticaz joined, sticaz left 15:40 ExtraCrispy joined
TimToady . 15:41
yoleaux 09:17Z <Zoffix> TimToady: what's your opinion on changing 6.c spec's test that tests for "4" in this exception: `my $x = 4/0; say 42 + $x; => Attempt to divide 4 by zero using div`. There are a couple of bugs to fix and some performance benefits to reap if we don't report any particular value. We'd do so by normalizing all zero-denominator Rationals to <-1/0>, <0/0>, and <1/0>
09:26Z <Zoffix> TimToady: well, bugs could be fixed with other means, by basically slowing down the common Rational ops with edge-case logic to handle zero-denominator Rationals (ZDRs). Basically by normalizing them the check for ZDRs becomes just a denominator check (and I tried marking them with a role instead and doing MMD in the past, but dispatch ambiguities creep up due to Rational role)
15:41 p6bannerbot sets mode: +v ExtraCrispy
TimToady I'm fine with normalizing the inv/nan rats 15:41
Zoffix \o/
TimToady it's not like nums carry that info along either 15:42
15:46 patrickb left 16:00 Spr0cket28 joined, kindling23 joined 16:01 kindling23 left 16:05 Spr0cket28 left, AlexDaniel left 16:10 lucasb left 16:16 patrickb joined 16:17 p6bannerbot sets mode: +v patrickb 16:20 lizmat left 16:32 [TuxCM] joined 16:33 p6bannerbot sets mode: +v [TuxCM]
Geth nqp/nqp-mbc: 4 commits pushed by (Stefan Seifert)++ 16:35
17:39 sword_smith5 joined 17:43 sword_smith5 left 17:44 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel
Geth 6.d-prep: 8c1881421c | (Zoffix Znet)++ (committed using GitHub Web editor) | TODO/FEATURES.md
Update ZDR normalization entry with path forward

  colabti.org/irclogger/irclogger_log...09-21#l248
17:50
17:58 lizmat joined, p6bannerbot sets mode: +v lizmat 18:03 pmurias left 18:04 pmurias joined, p6bannerbot sets mode: +v pmurias, patrickb left, patrickz joined 18:05 p6bannerbot sets mode: +v patrickz, pmurias left 18:09 patrickz is now known as patrickb 18:17 pmurias joined, p6bannerbot sets mode: +v pmurias 18:19 patrickb left
[Coke] (exceptions) I think at some point we need to do a pass over all the exceptions and have a sane hierarchy; but zoffix's notes about text vs. types is correct, as far as I recall. 18:21
18:25 patrickb joined
Zoffix .tell jnthn oops, gave wrong link to docs commit. It's github.com/perl6/doc/commit/df0b71d8d6 18:25
yoleaux Zoffix: I'll pass your message to jnthn.
18:26 p6bannerbot sets mode: +v patrickb 18:27 pmurias left 18:30 AlexDaniel left 18:49 pmurias joined, p6bannerbot sets mode: +v pmurias 18:53 dct joined, p6bannerbot sets mode: +v dct 18:56 Zoffix left 19:28 dct left 19:30 pmurias left 19:41 pmurias joined, p6bannerbot sets mode: +v pmurias
samcv AlexDaniel`: i plan on release today 19:43
19:52 ggoebel joined 19:53 p6bannerbot sets mode: +v ggoebel, dct joined, p6bannerbot sets mode: +v dct 20:13 dct left 20:19 chouseknecht16 joined, chouseknecht16 left 20:29 Ven`` joined, p6bannerbot sets mode: +v Ven``, pmurias left 20:33 Ven`` left 20:35 pmurias joined, p6bannerbot sets mode: +v pmurias 20:46 ggoebel left 21:05 dct joined, p6bannerbot sets mode: +v dct 21:16 dct left, pmurias left 21:22 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke 21:23 MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke, pmurias joined, p6bannerbot sets mode: +v pmurias 21:27 pmurias left 21:29 lkoranda19 joined 21:33 lkoranda19 left 21:39 pmurias joined, p6bannerbot sets mode: +v pmurias 21:42 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 21:44 pmurias left
AlexDaniel` samcv: nice 21:53
21:59 chke2 joined 22:03 chke2 left
lizmat .ask jnthn what are your feelings to adding a sub ord(str $s) { nqp::ord($s) } candidate ? Looks like it makes it 1.8x as fast 22:15
yoleaux lizmat: I'll pass your message to jnthn.
lizmat .ask jnthn also: I would like to add a "pos" parameter to ord(), so we can pass that on directly to nqp::ordat 22:16
yoleaux lizmat: I'll pass your message to jnthn.
lizmat sleep&
22:31 patrickb left 22:58 timewalker23 joined 22:59 timewalker23 left 23:06 AlexDaniel left 23:07 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 23:37 Lexa19 joined 23:42 Lexa19 left 23:45 esph4 joined 23:51 esph4 left