19 Mar 2025
[Coke] m say Inf.Numeric; 13:55
m: say Inf.Numeric;
camelia Inf
nahita3882 it's not in line with ^$val being 0..^$val though, as 0..^* interprets the star as making the end point Inf 16:40
m: say ^12, 0..^12, ^*, 0..^*
Raku eval ^12^12WhateverCode.new0..^Inf
nahita3882 m: dd ^12, 0..^12, ^*, 0..^* 16:41
Raku eval ^12 ^12 WhateverCode.new 0..^Inf
[Coke] Yup. I don't know if there's a reason for that inconsistency. Might be worth opening a problem solving ticket. 16:54
Seems like an easy change to make if it doesn't break anything.
lizmat m: dd ^* 17:09
camelia WhateverCode.new
lizmat m: .say for (^*)(10) 17:10
camelia 0
1
2
3
4
5
6
7
8
9
lizmat so I think that's going to be a no-starter as it's valid syntax atm
it may be a bit of a WAT 17:11
[Coke] m: .say for (^Inf)(10) 17:35
camelia No such method 'CALL-ME' for invocant of type 'Range'
in block <unit> at <tmp> line 1
[Coke] m: .say for (^Inf)[10] 17:36
camelia 10
[Coke] ok.
librasteve m: say (^*)[10]; 17:37
Raku eval WhateverCode.new
librasteve m: say (0..^*)[10] 17:38
Raku eval 10
librasteve can that be what was intended? 17:39
lizmat ^* currently codegens to -> $_ { ^$_ } 17:41
librasteve and presumably, +* codegens to > $ { +$ } ie coerce to Numeric 17:48
and ^ is the upto operator so that ^* should return the Range 0..^* except it returns WhateverCode.new 17:50
m: say +*; 17:53
Raku eval WhateverCode.new
librasteve m: say (+*)(<2>).WHAT;
Raku eval (Int)
librasteve so the general case makes sense and even works when ^* is the second arg to the range operator like 0..^*, but raku forgets to special case when ^* is used standalone since there is no value coming to prime it 17:55
i got this general raku comment on my harc stack intro post over at /r/htmx Can I set a config so that it doesnā€™t let me get away with not typing things? ... I am reluctant to just say "no", but I don't know of any use super-strict; pragma that would require explicit types to be set everywhere 18:07
[Coke] You can self enforce, but there's no pragma to say, e.g. all user-space routines and variables must be typed. 18:53
librasteve ah - I thought not but wanted to check - maybe a rakuAST linter could do this in the future... 18:54
tx
[Coke] ... wonder if that could live in module space.
habere-et-disper How did @lizmat discover what (^*) codegens to as neither `dd` nor `raku` introspect fully? 19:46
[Coke] she's a core dev. 19:48
probably looked at the source.
librasteve - yes, probably easier in AST. 19:58
I don't remember happening to see Device::Velleman::K8055 before 20:14
ww.
23 Mar 2025
sdomi trying to print out arbitrary bytes, raku complains `Malformed UTF-8 near bytes 00 86 at line 1 col 3` 04:05
how do i make it shut up?
`.encode('latin1')` mangles my bytes... 04:09
okay mb, I confused `$*OUT.put` with `$*OUT.write`, i don't need to decode with the 2nd one 04:20
24 Mar 2025
habere-et-disper I have multis with the same signature. How do I call them all? I can get them with .cando but I'm not sure how to call each candidate then? 19:40
m: multi foo { 'bar' }; multi foo { 'baz' }; say .() for &foo.cando 19:47
camelia bar
baz
25 Mar 2025
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2025/03/25/2025-...n-rakuast/ 11:34