00:09 librasteve_ left 01:58 teatime joined 15:07 habere-et-disper joined
habere-et-disper m: my NaN $foo = Rat.new(0,0).Num; 15:07
camelia Type check failed in assignment to $foo; expected NaN but got NaN
in block <unit> at <tmp> line 1
habere-et-disper 🤣 => "expected NaN but got NaN" 15:09
15:26 habere-et-disper left
ab5tract yeah, that's LTA 15:58
m: dd NaN.WHAT 16:00
camelia Num
ab5tract it's a bit of a special case when it comes to the type system.
m: subset IsNaN of Num where NaN; my IsNaN $n = NaN; dd $n 17:08
camelia IsNaN $n = NaN
librasteve dihwidt 19:46
ab5tract librasteve: if a type can't be assigned to like this, it probably should be a compile time error to use it as a type constraint on a container 19:47
librasteve m: my Nil $n = Nil; $n = 2; 20:22
Raku eval Exit code: 1 Type check failed in assignment to $n; expected Nil but got Int (2) in block <unit> at main.raku line 1 20:23
librasteve just thought I would elaborate a bit ... but actually Nil is not conected to Inf/NaN case 20:30
with regards to Inf/NaN as a container type, well that's nonsensical and so far the authors of raku have not included a check for that since errr no one would want to do it 20:31
ab5tract: I agree that a compile time check would be correct and would prevent this kind of error ... but I also think that there are many, many silly things that can be written and that our compiler gurus have better things to do with their time 20:33
ab5tract librasteve: fixing an LTA does not require a compiler guru 21:04
This edge could at least be made less hilarious just by patching an exception class to produce something less obviously strange 21:05
That said, I doubt that this is more than an hour or two’s worth of work in RakuAST. And just because you told me that I have better things to do, I have half a mind to see if I’m correct :P 21:06
Ah look, it’s already been refined 21:09
m: Q|my NaN $n = NaN|.AST.EVAL
camelia ===SORRY!=== Error while compiling EVAL_0
Cannot assign a literal of type Num (NaN) to a variable of type Num.
You can declare the variable to be of type Cool, or try to coerce the
value with NaN.Num or Num(NaN), or just write the value a…
ab5tract It’s still LTA though 21:31
22:24 Heptite joined 23:06 Heptite left