29 Mar 2025
lizmat making it throw immediately, breaks quite a few spectests :-( 18:10
timo at least attempting to assign to a Failure should throw it
lizmat How would you assign to a Failure? You mean if it's in a container ? 18:12
timo m: my Int @a; @a[my $ = -1] = 42 18:14
camelia ( no output )
timo this is assigning to the Failure object
m: Failure.new(exception => X::AdHoc.new(message => "oh no")) = 5 18:15
camelia Failed

Actually thrown at:
in block <unit> at <tmp> line 1
timo ah, so this is not about the failure that's returned from postcircumfix:<[ ]> being assigned into
instead, it's ASSIGN-POS not doing anything
which spec tests rely on that not throwing? 18:16
lizmat t/spec/S09-multidim/XX-POS-on-undimensioned.t 18:23
t/spec/S32-basics/xxPOS.rakudo.moar
timo so you made AT-POS throw immediately? 18:25
lizmat yeah
timo why? that already successfully returned a Failure
i thought the issue was that ASSIGN-POS wasn't explodey in any way for negative indices 18:26
lizmat the problem is that the return value of: @a[foo] = 42 is not being sunk 18:27
ASSIGN-POS returns a Failure fine
timo ah
lizmat but because the postcircumfix isn't sunk because of the assignment, it just silently does nothing
m: my @a; @a[my $ = -1] = "foo" 18:28
camelia ( no output )
timo makes sense for the return value of postfix assign not to be sunk as a general thing, it's just bitey here
lizmat yup
timo then does making ASSIGN-POS throw, but not AT-POS, also break lots of spec tests?
lizmat it would 18:29
but I was working on multi sub postcircumfix:<[ ]>(\SELF, Int:D \pos, Mu \assignee) is raw {
and have *that* check for Failure and throw if it is
timo ah
does ASSIGN-POS return the thing you assign? 18:30
we will not want to make Failures that you want to stash into an array be thrown for this reason
lizmat m: my @a = ^10; say @a.ASSIGN-POS(3,42) = 666; dd @a
camelia 666
[0, 1, 2, 666, 4, 5, 6, 7, 8, 9]
lizmat so yes 18:31
[Coke]: fwiw, I cannot repro the CSS::Stylesheet issue 18:37
[Coke] OK. I'll see if running it by hand on the blin box is instructive.
lizmat also realizes she's too tired to be programming after cycling almost 2 hours, so goes afk& 18:38
timo hm?
ah
[Coke] lizmat: installs fine from the main shell 18:47
sorry for the noise! 18:49
oh wait, main shell isn't at head. recalibrating. :) 18:52
Geth rakudo/main: 915c14c05b | (Stefan Seifert)++ | 2 files
RakuAST: report conflicting type on signature declarations

Fixes: my Int (Str $x) # to fail
21:37
nine It's somewhat comical that on the day we discuss about Failure being used too often I come across the fact that array.^parameterize returns plain strings on errors. No exceptions, not even Failures, just a return "Can only parameterize array with a native type, not {t.^name}" 21:40
timo you take the MOP, you get to mop up the dirt :D 22:00
Geth rakudo/main: cfc74a80ef | (Elizabeth Mattijsen)++ | src/core.c/Hash.rakumod
Add a "die" that was missed in 69dd7d66ea
23:22