šŸ¦‹ Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
04:11 [Coke] left 04:14 [Coke] joined 07:39 sena_kun joined
Geth roast: 4e23615b17 | (Elizabeth Mattijsen)++ | S03-operators/set_multiply.t
Fix XāŠ test and test count
08:13
ab5tract Ahh, lizmat++ 09:04
Thought Iā€™d done it as a subtext
*subtest
lizmat well, the test also didn't pass :-(
ab5tract Yeah, clear operator error there ā€¦ I think there was a mistake in moving it from the CLI invocation to the test file. 09:10
lizmat shit happens :)
ab5tract Next time Iā€™ll make sure to double check with the harness and not just the executable 09:11
09:18 sena_kun left
ab5tract Re: 06e45d89f .. since we potentially call .rand repeatedly in a tight loop, would it make sense to move the actual work to a !rand method so that the checks are only run once? 09:19
Or is the probability of churning in the while loops low enough not to matter? 09:20
lizmat if it were called in a loop with the same Range object, it would fail on the first iteration 09:24
so I wouldn't worry about that ?
ab5tract Itā€™s a micro optimization, to be sure 09:25
What I mean is that .rand calls itself 09:26
lizmat if you're looking at that: if nqp::isnanorinf($!min) || nqp::isnanorinf($!max) could replace all checks on NaN and Inf and -Inf 09:28
ab5tract nice! 09:30
ah, the concern about Range.rand calling itself is actually not the case at all. But I will push a change to using the nqp op 09:36
[Tux] Rakudo v2024.04-103-g06e45d89f (v6.d) on MoarVM 2024.04-6-gc9dd4dd96
csv-ip5xs0.261 - 0.265
csv-ip5xs-201.145 - 1.150
csv-parser1.516 - 1.555
csv-test-xs-200.142 - 0.142
test1.957 - 1.997
test-t0.432 - 0.449
test-t --race0.280 - 0.281
test-t-205.193 - 5.277
test-t-20 --race1.259 - 1.262
10:09
tux.nl/Talks/CSV6/speed4-20.html / tux.nl/Talks/CSV6/speed4.html tux.nl/Talks/CSV6/speed.log
ab5tract m: use nqp; dd nqp::isnanorinf(55) # :( 10:14
camelia This type cannot unbox to a native number: P6opaque, Int
in block <unit> at <tmp> line 1
ab5tract looks like I need to check Num-ness first 10:17
I guess it can't do the check at the nqp level because it would involve checking against HLL types 10:20
lizmat m: use nqp; dd nqp::isnanorinf(Inf) 10:34
camelia 1
lizmat m: use nqp; dd nqp::isnanorinf(5e0)
camelia 0
lizmat m: use nqp; dd nqp::isnanorinf(5)
camelia This type cannot unbox to a native number: P6opaque, Int
in block <unit> at <tmp> line 1
lizmat m: use nqp; dd nqp::isnanorinf(5e0)
camelia 0
lizmat HLL Num is also ok
Geth rakudo/main: f233458e1b | ab5tract++ | 2 files
Optimize and clarify Range.rand

Switch to using `nqp::isnanorinf` in the Range.rand method itself.
Also add some clarity and fixups to the exception class.
10:35
ab5tract yeah, I meant having `nqp::isnanorinf` just return 0 for Int/int/etc, instead of dying. If it were implemented in NQP it would be straight forward to add `return 0 if nqp::isnum($foo)`, but like most things it actually maps directly to a VM function where things are a bit more complex 10:37
found `nqp::isnum` after making my comment about not mixing HLL checks into nqp ops 10:38
anyway, it was more user error than anything.. `ops.markdown` clearly delineates that the arg must be a num 10:40
lizmat yeah, but some phase in MAST inserts coercion ops 10:41
for some nqp ops
ab5tract true.. could be useful to learn how it works 10:48
I was about to push a commit to switch from nqp::istype -> nqp::isnum, but: 10:49
m: use nqp; my num64 $f = Inf; dd $f; dd :istype(nqp::istype($f, Num)), :isnum(nqp::isnum($f))
camelia Inf
:isnum(0)
:istype(1)
ab5tract safer to keep it where it's at now :)
lizmat heh... weird 10:50
ab5tract N#824 11:07
linkable6 N#824 [open]: github.com/Raku/nqp/issues/824 `nqp::isnum` returns 0 for everything Rakudo considers a `Num`
11:23 finanalyst joined 12:44 MasterDuke left
[Tux] m: say āˆšĻ€ 13:28
camelia ===SORRY!===
Argument to "say" seems to be malformed
at <tmp>:1
------> sayā āˆšĻ€
Bogus postfix
at <tmp>:1
------> say āāˆšĻ€
expecting any of:
infix
infix stopper
postfix
ā€¦
[Tux] Why is that not supported? Curious
lizmat m: sub prefix:<āˆš>($a) { sqrt($a) }; say āˆšĻ€ 13:30
camelia 1.7724538509055159
lizmat no idea
greppable6: āˆš
greppable6 lizmat, 20 lines, 3 modules: gist.github.com/3eb36373d6f60bbff6...5da3fd1ec4
[Tux] When supported, I'd also expect support for āˆ› and āˆœ
lizmat please create a problem solving issue for that 13:31
[Tux] No idea how to :) 13:32
lizmat github.com/Raku/problem-solving/is...amp;title=
[Tux] done 13:37
lizmat [Tux]++ 13:40
Geth nqp/main: dcf6277d42 | (Christian BartolomƤus)++ (committed by ab5tract) | README.pod
Add --gen-moar/--with-moar to build command

As pointed out in github.com/Raku/nqp/issues/792 the previously advertised command
   $ perl Configure.pl --backends=moar,jvm
... (7 more lines)
14:41
gfldex m: sub not-anon { False }; sub foo($a where &not-anon ) { }; foo 42; 14:45
camelia Constraint type check failed in binding to parameter '$a'; expected anonymous constraint to be met but got Int (42)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
[Tux] nice to see that with that prefix-op, āˆš5Ā² returns 5 and āˆšĻ€Ā² return Ļ€ 14:46
gfldex I'm pretty sure that sub is not anonymous. What leads to the question, if the binder knows at runtime the name of that sub. If so, that's an LTA.
lizmat gfldex: what's further wrong with that, is that if the sub returns a Failure, that information is discarded as well 14:49
I've looked at fixing it, but it requires to have to do stuff in the bootstrap :-( so it's something that needs quality time
gfldex I noticed that too. Would make for much better custom error messages, if $.message could be pulled out of a Failure.
lizmat especially in combination with github.com/rakudo/rakudo/pull/5571 14:50
ab5tract gfldex: FWIW my understanding of the "anonymous constraint" wording has always been that the `where` is not attached to a subset 14:58
though that might easily be a misunderstanding on my part 15:00
RakuAST should make it straightforward to provide the actual constraint via .deparse, unless that ends up considered as too dirty 15:01
gfldex: also, #5175 is merged, if you're still up for fixing the docs 15:16
(R#5175)
linkable6 R#5175 [closed]: github.com/rakudo/rakudo/issues/5175 [LTA][CORE.setting] where-clause in subset does not work with Block/Callable
ab5tract lizmat: M#1803 is good to go :) 15:21
linkable6 M#1803 [open]: github.com/MoarVM/MoarVM/pull/1803 Provide some mechanisms for introspecting file mode
Geth nqp/main: 81eb8a8484 | (Elizabeth Mattijsen)++ | tools/templates/MOAR_REVISION
Bump MoarVM to get ab5tract++ file mode additions
15:26
rakudo/main: fa3c633de9 | ab5tract++ | tools/templates/NQP_REVISION
Bump NQP revision for open mode functionality
15:36
rakudo/main: cf87ccf959 | ab5tract++ | src/core.c/IO/Handle.rakumod
Use NQP for open mode detection in IO::Handle.lock

This allows us to remove the additional instance variable from IO::Handle in order to avoid adding additional weight/complexity to an already unwieldy core class.
ab5tract gahh, looks like I've messed up my first NQP revision bump :/ 15:39
oh, wait. spoke to soon *phew* 15:41
lizmat yeah, looking good :-) 15:45
notable6: weekly 16:24
notable6 lizmat, No notes for ā€œweeklyā€
lizmat And yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/05/20/2024-...ry-primed/ 16:36
18:18 sena_kun joined 22:36 sena_kun left
ab5tract m:use nqp; dd nqp::isfalse(False) 22:42
evalable6 1
ab5tract because of course there's no rule we make without an exception 22:43
(ie, is* is only for native things)
22:43 finanalyst left
Geth nqp/main: 0b35d7e321 | ab5tract++ | docs/ops.markdown
Clarify the rules regarding some is* ops

Per N#824, some of the is* ops only reflect on native things.
22:48
linkable6 N#824 [closed]: github.com/Raku/nqp/issues/824 `nqp::isnum` returns 0 for everything Rakudo considers a `Num`
lizmat m: m:use nqp; dd nqp::isstr("foo") 22:57
camelia ===SORRY!=== Error while compiling <tmp>
Alphanumeric character is not allowed as a delimiter
at <tmp>:1
------> m:useā nqp; dd nqp::isstr("foo")
lizmat m: use nqp; dd nqp::isstr("foo")
camelia 0
lizmat heh 22:58
TIL
ab5tract so the right way to hold this is: 23:22
m: use nqp; dd nqp::isstr(nqp::unbox_s("foo")) 23:23
camelia 0
ab5tract huh
nevermind lol!
m: use nqp; dd nqp::isstr(nqp::unbox_s(my $s = "foo"))
camelia 0
ab5tract yeah, I'll stick with nqp::istype :) 23:24
even if the above did work, it pre-supposes that you already have a string because you would have to call unbox_s on it 23:25