šŸ¦‹ Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:00 CosmicTortoise left, reportable6 left
ugexe to me that points at either github actions resource allocation, or the Raku/setup-raku action itself. although im more inclined to think its the former 00:01
but note that appveyor test does that TMPDIR shortening trick i showed before 00:02
00:03 reportable6 joined
jaguart when the install fails - is there anything more that zef can determine? 00:03
e.g. the exception message?
ugexe with --debug it should be showing any such messages. the only additional info that can be gotten is by running with --ll-exception. but to do that you have to use like `raku --ll-exception -e "use Zef::CLI" install TAP --debug` since its a raku flag not a zef flag 00:05
jaguart ok - will try CompUnit first... 00:06
this being my first workflow [blush] - is there a way to string multiple run: lines into one name: ? 00:09
ugexe github.com/ugexe/zef/blob/f706e8b6...ml#L83-L88 00:11
Xliff m: my $m = "Module::One, this is Module::Two" ~~ / (\w+) + % ';;' /; $m.gist.say
camelia ļ½¢Moduleļ½£
0 => ļ½¢Moduleļ½£
Xliff m: my $m = "Module::One, this is Module::Two" ~~ / (\w+)+ % ';;' /; $m.gist.say 00:12
camelia ļ½¢Moduleļ½£
0 => ļ½¢Moduleļ½£
Xliff m: my $m = "Module::One, this is Module::Two" ~~ / (\w+)+ % '::' /; $m.gist.say
camelia ļ½¢Module::Oneļ½£
0 => ļ½¢Moduleļ½£
0 => ļ½¢Oneļ½£
Xliff m: my $m = "Module::One, this is Module::Two" ~~ m:g/ (\w+)+ % '::' /; $m.gist.say
camelia (ļ½¢Module::Oneļ½£
0 => ļ½¢Moduleļ½£
0 => ļ½¢Oneļ½£ ļ½¢thisļ½£
0 => ļ½¢thisļ½£ ļ½¢isļ½£
0 => ļ½¢isļ½£ ļ½¢Module::Twoļ½£
0 => ļ½¢Moduleļ½£
0 => ļ½¢Twoļ½£)
Xliff OK, why is this matching 'this' and 'is'?
Nemokosch I think you have a thinko here. a word is indeed a sequence of alphanumeric characters, repeated at least once 00:16
"this" has the inner + as 4 and the outer + as 1
"is" has the inner + as 2 and the outer + as 1
perhaps you wanted ** 2..*, instead of + 00:17
00:19 discord-raku-bot left 00:20 discord-raku-bot joined
Xliff m: my token word { \w+ }; my $m = "Module::One, this is Module::Two" ~~ m:g/ <word>+ % '::' /; $m.gist.say 00:21
camelia (ļ½¢Module::Oneļ½£
word => ļ½¢Moduleļ½£
word => ļ½¢Oneļ½£ ļ½¢thisļ½£
word => ļ½¢thisļ½£ ļ½¢isļ½£
word => ļ½¢isļ½£ ļ½¢Module::Twoļ½£
word => ļ½¢Moduleļ½£
word => ļ½¢Twoļ½£)
Xliff m: my token word { \w ** 2..* }; my $m = "Module::One, this is Module::Two" ~~ m:g/ <word>+ % '::' /; $m.gist.say
camelia (ļ½¢Module::Oneļ½£
word => ļ½¢Moduleļ½£
word => ļ½¢Oneļ½£ ļ½¢thisļ½£
word => ļ½¢thisļ½£ ļ½¢isļ½£
word => ļ½¢isļ½£ ļ½¢Module::Twoļ½£
word => ļ½¢Moduleļ½£
word => ļ½¢Twoļ½£)
Xliff Nemokosch: Did I do it wrong? 00:22
m: my token dc { '::' }; my token word { \w ** 2..* }; my $m = "Module::One, this is Module::Two" ~~ m:g/ <word>+ % <dc> /; $m.gist.say
camelia (ļ½¢Module::Oneļ½£
word => ļ½¢Moduleļ½£
dc => ļ½¢::ļ½£
word => ļ½¢Oneļ½£ ļ½¢thisļ½£
word => ļ½¢thisļ½£ ļ½¢isļ½£
word => ļ½¢isļ½£ ļ½¢Module::Twoļ½£
word => ļ½¢Moduleļ½£
dc => ļ½¢::ļ½£
word => ļ½¢Twoļ½£)
Nemokosch the other + should be replaced. This one would protect against one-letter words
Xliff m: my token dc { '::' }; my token word { \w+ }; my $m = "Module::One, this is Module::Two" ~~ m:g/ <word> ** 2..* % <dc> /; $m.gist.say 00:23
camelia (ļ½¢Module::Oneļ½£
word => ļ½¢Moduleļ½£
dc => ļ½¢::ļ½£
word => ļ½¢Oneļ½£ ļ½¢Module::Twoļ½£
word => ļ½¢Moduleļ½£
dc => ļ½¢::ļ½£
word => ļ½¢Twoļ½£)
Xliff \o/
Nemokosch šŸ¬
ugexe jaguart: fresh update at github.com/ugexe/zef/issues/491#is...1370365933 00:43
looks like its a raku issue since it works for previous raku versions
00:45 vrurg left, vrurg joined
leont Can you reproduce the issue with Protocol::Postgress (also a fairly large module with many types, maybe that's the problem). 00:48
jaguart ugexe: ssue since it works for previous raku versions 00:49
sorry - that was a buffer
wondering about: from SETTING::src/core.c/Lock.pm6:30 (C:\hostedtoolcache\windows\rakudo\2022.12-01\x86_64\bin\..\share\perl6\runtime/CORE.c.setting.moarvm:protect) 00:50
Nemokosch skaji is very reliable at showing up, unless it's for mi6 šŸ˜¦ 00:54
jaguart actually - github.com/rakudo/rakudo/blob/main...lation.pm6 00:57
line 230 is tha lock call...
the code-block ends at line 244
can't see the ending ')' - but I dont grok NQP yet 00:58
leont I think it's on line 368, but it's weirdly indented 00:59
jaguart yeah - my bad
Nemokosch for what it's worth, I also don't actually think TAP itself is the big problem of zef installations 01:00
ugexe looks like its dying during precomp at github.com/rakudo/rakudo/blob/5f7f...y.pm6#L461 01:01
01:03 Homer_Simpson joined
ugexe fwiw you would have gotten that error message from zef using --ll-exception, but surprinsgly there isnt a top level error message there that *should* normally show up without --ll-exception 01:03
jaguart good to pin it down :) bbs 01:12
01:27 melezhik joined
ugexe so it seems to be related to 2022.12, however note earlier my appveyor run which builds against rakudo master passed 01:34
so either the issue is fixed sometime between 2022.12 and now, or (more likely) the github action has less resources available compared to the appveyor vm (perhaps less threads or difference in locking behavior) that cause precompilation failure 01:36
01:38 Nemokosch left
Homer_Simpson can I use raku without OOP 01:40
(yes I mean "without any oop at all") 01:41
01:45 melezhik left
rjbs But what do you mean by that? 01:47
The numeric value 5 is an object. 01:48
01:54 Guest47 joined 01:56 epony left
guifa_ As rjbs notes, everything is an object. When you do 1 + 2, you're actually calling &infix:<+>(1,2), it's just syntactic sugar on objects (although I guess the argument could be made OO code is just syntactic sugar for procedural so lol). 02:08
s/procedural/imperative|functional|etc 02:09
The idea behind Raku is to let you feel free to use the style that you're most comfortable with
02:21 razetime joined 02:40 Kaiepi left 03:20 epony joined 03:23 ab5tract joined 03:27 xinming left 03:28 xinming joined 04:04 ab5tract left, ab5tract joined 04:10 derpydoo left
ab5tract okay, one more question for the day.. is there an easy way to redirect $*ERR to /dev/null? 04:14
use case: Audio::PortAudio dumps a lot of text to STDERR. It would be nice to be able to silence this at the library or application level 04:33
It's not the library's fault -- it is the underlying C functions that do all of the messy debugging 04:34
04:39 epony left
kjp Try something like "my $*ERR = '/dev/null'.IO.open" 04:41
04:47 ab5tract left 04:56 ab5tract joined, epony joined 04:57 ab5tract left, ab5tract joined
CIAvash ab5tract: maybe raku.land/zef:lizmat/silently can be used? depending on the code 05:09
ab5tract CIAvash: that's exactly what I was looking for. unfortunately my suspicion was correct and this doesn't trap the noise from the underlying C library 05:16
jaguart CIAvash: Test::Output grabs STDERR - maybe look at it's code? 05:17
CIAvash ab5tract: oh! maybe open an issue or ping lizmat if something can be done about it 05:18
ab5tract jaguart, CIAvash: thanks for the advice. right now I should go to bed but I'll definitely look into this 05:20
CIAvash np. good night! 05:21
05:21 ab5tract left 05:22 ab5tract joined
ab5tract I have a feeling that it is a bit hopeless, though. Not sure why someone would decide it is appropriate to spew non-error debug info all over STDERR from a shared library 05:22
I've tried `./configure --disable-debug-logging` of the underlying package and that didn't do anything eithe
05:45 ab5tract left 05:46 ab5tract joined
japhb ab5tract: If you're really desperate, you can get the underlying file descriptor from $*ERR and reopen it elsewhere I suppose. (Haven't tried it myself, but I have used .native-descriptor when talking to C libs) 05:53
05:53 ab5tract left
japhb Actually, also Xliff might have faced (and dealt with) this already, because GTK loves to spew errors out the wazoo. 05:54
06:00 reportable6 left 06:01 reportable6 joined
Xliff Unfortunately, I have not had the opportunity to deal with $*ERR. 06:14
tonyo .tell ab5tract something like this works `raku -e '$*ERR.say: "test"' 2>/dev/null` to redirect 06:29
tellable6 tonyo, I'll pass your message to ab5tract
tonyo or, programmatically 06:38
tellable6 2023-01-01T18:48:12Z #raku <melezhik> tonyo I've created an enhancement ticket for fez - github.com/tony-o/raku-fez/issues/75
tonyo m: our $*ERR := '/dev/null'.IO.open(:mode<wo>); $*ERR.say: "test"; # ab5tract
camelia ( no output )
Xliff Muhahahahahaha! 06:54
The fact that there are colors is enough for me!@
Not even one day of work.
07:01 evalable6 left 07:02 evalable6 joined 07:14 avuserow left, avuserow joined 08:07 Sgeo left 08:10 jaguart left, jaguart joined 08:45 Nemokosch joined, Nemokosch left 08:49 Kaiepi joined 09:03 sena_kun joined 09:27 jpn joined 09:55 mahafyi joined 10:27 tejr left 10:50 tejr joined 11:11 mahafyi left 11:13 Homer_Simpson left
guifa_ Xliff: oh man, just imagine when you can compile to RakuAST ā€¦Ā the level of detail that code editor is going to get suddenly lol 11:23
tbrowder hi, all. question: can i create a role to encapsulate all the machinery to add Iterable and Associative attributes to a class? 11:36
Nemokosch role AllMachinery does Iterable does Associative {} # wouldn't this work? 11:38
tbrowder i suppose so, thanks. my problem is i start thinking in the lower-level parts before the "does" and "is" parts. 11:41
gotta get over that
Nemokosch understandable šŸ˜„ 11:42
tbrowder clever retort, Saturday Night Live standin? 11:44
12:00 reportable6 left 12:02 reportable6 joined
lizmat tbrowder: I doubt that Nemokosch knows what an icon SNL is in the US :-) 12:26
lizmat is more a Laugh-In fan :-)
12:57 Zephyr[m] joined 13:04 Zephyr[m] left
tbrowder you are right 13:14
Nemokosh: i meant, as a compliment, you are a very humorous person! 13:16
yea, Rowan & Martin as i recall
also loved "That Was the Week that Was" 13:17
13:35 xinming left 13:36 xinming joined 13:41 Kaiepi left 13:44 derpydoo joined
Xliff guifa: Yep. Although I will settle for figuring out why my <argument> rule doesn't work. 13:51
I'm getting this error in a place where I shouldn't be: "lang-call cannot invoke object of type 'VMNull' belonging to no language" 14:14
14:14 Kaiepi joined
Xliff The offending line being "multi sub apply-color-tag (Str $n, Match $m where { $m && $m.elems == 0 }) {" 14:15
tbrowder another question for something i should know: i know you can't use "use lib" in a module being precompiled. but i can define RAKULIB and name an added desired lib path. so, given a script defining env<RAKULIB>="./lib", do modules in "./lib" inherit that path also? 14:23
14:25 Guest47 left
tbrowder ok, looks like the answer is NO if i do it inside the script even within a BEGIN block. 14:34
but the answer is YES if i export it in my shell before i call the script. 14:35
so the question still is: is there a way to export RAKULIB within a script so it affects all the pieces being called from that script? 14:37
nine tbrowder: that really sounds like the wrong problem to solve 14:42
tbrowder yes, i know, but i got myself in a box with ad hoc design and am trying to put a tmp bandage on it 14:43
raku duct tape, that is 14:45
14:49 jgaz joined
tbrowder i guess i could throw everything from multiple modules into one giant Toolbox.rakumod and export stuff needed externally. 14:49
14:49 simcop2387 left, perlbot left
tbrowder this is not for public consumption, at least in its present form 14:50
oh well, new year, new trials ;-D 14:51
14:51 simcop2387 joined 14:53 perlbot joined 14:59 derpydoo left 15:08 ab5tract joined 15:12 ab5tract left 15:13 ab5tract joined
ab5tract okay, it looks like I might be able to get the behavior I want using `freopen` . But how do I setup NativeCall for a stdlib C function? 15:33
tellable6 2023-01-04T06:29:10Z #raku <tonyo> ab5tract something like this works `raku -e '$*ERR.say: "test"' 2>/dev/null` to redirect
15:33 CodeTortoise joined
ab5tract tonyo: indeed, redirecting from the shell is working fine for me. not an ideal situation though 15:34
15:34 ab5tract left 15:35 ab5tract joined 15:42 razetime left 15:43 Sgeo joined 15:53 ProperNoun left 15:55 ProperNoun joined 16:11 xinming left, xinming joined
tonyo ab5tract: i posted another, programmatic, option right below that 16:22
m: our $*ERR := '/dev/null'.IO.open(:mode<wo>); $*ERR.say: "test"; # ab5tract
camelia ( no output )
ab5tract tonyo: thanks for pointing that out. It does work perfectly well for Raku code. Unfortunately my issue is with the stderr handle at the C level. I think my solution would look something like this: stackoverflow.com/questions/247789...ib-logging 16:58
tonyo ahhh , you can do the same in C as i did with IO.open(:mode<wo>) - fopen("/dev/null", O_WRONLY) 17:02
ah, that'd work too ^
ab5tract tonyo: I suspect I will need to write some custom C code for it though, right? Unless there is a way to resolve `stderr` to it's file pointer from NativeCall? 17:05
tonyo i'm not entirely sure what you're trying to do, there's usually a macro or you can use fileno(...) 17:07
leont You can use Nativecall and use dup2 to redirect it? 17:09
tonyo (usually a macro in C) 17:11
ab5tract tonyo: my preferred approach would be to try and load `freopen` into NativeCall so I don't have to ship a custom C file that does the thingy
17:11 linkable6 left, evalable6 left 17:12 linkable6 joined
ab5tract leont: yeah that does look like another option. same situation though of not being sure how to get at STDERR_FILENO from NativeCall 17:13
17:13 evalable6 joined
leont STDERR_FILENO = 2 17:13
ab5tract unless that's a static enum in the C standard?
okay, I had a thought that might be the case :)
tonyo ab5tract: that does look like a good option then (wasn't sure if you were consuming a lib in C already or not)
ab5tract I'm trying to patch this into Audio::PortAudio, which does bind to portaudio but otherwise doesn't ship any C code of its own 17:14
17:15 bdju left
ab5tract leont: okay, (hopefully) final question on this then. what does the `is native` trait take as an argument when you are pulling in standard C functions? `is native('c')` ? 17:15
leont Just say Ā«is nativeĀ» without an argument 17:16
ab5tract beautiful
leont Example: github.com/Leont/sigpipe/blob/mast...rakumod#L4
Also, the descriptor can be retrieved from a handle with the native-descriptor method 17:18
m: say $*ERR.native-descriptor
camelia 2
17:19 jpn left, bdju joined 17:27 jpn joined, sena_kun left 17:28 sena_kun joined
ab5tract it works! \o/ thanks leont, tonyo, and everyone else who chimed in :D 17:32
now I just need to guard it so that it only runs this code on Linux
17:33 jpn left, xinming left 17:35 xinming joined
leont You can even do it in such a way that your raku code can still print to $*ERR but your libary can't print to STDERR 17:56
18:00 reportable6 left 18:01 perlbot left, simcop2387 left 18:02 reportable6 joined 18:04 simcop2387 joined 18:06 perlbot joined 18:20 jpn joined, [Coke] joined 18:31 jpn left 18:51 discord-raku-bot left 18:52 discord-raku-bot joined 19:29 xinming left 19:36 jpn joined 19:58 jpn left 20:09 jpn joined 20:23 jpn left 20:24 Kaipei joined 20:28 Kaiepi left 20:37 hythm joined, jpn joined 20:49 NemokoschKiwi joined
NemokoschKiwi leont: gist.github.com/2colours/f241c3998...510bf72b6a do you have an idea why this could happen? 20:49
[Coke] that URL gives me a github 500 error 21:02
NemokoschKiwi hm, I don't think it should have but what about now? now it should be as public as it gets 21:03
leont That doesn't make sense to me 21:04
It's a multi method, but the other method has a very different input parameter
NemokoschKiwi well it literally says that the same candidate appears twice... but it left me clueless why 21:05
Nemokosch is the bridge šŸ”¼ or šŸ”½
21:06 NemokoschKiwi left
leont As a sidenote, I'm not sure if having execute take a slurpy was a god design decision, and am wondering if I should do a breaking change before the module gets popular 21:06
21:07 jpn left
leont I can reproduce the issue with Ā«Protocol::Postgres::Type::Default.encode-to-text("")Ā» 21:10
And now that I think of it, I have seen this issue before, github.com/rakudo/rakudo/issues/5056 21:11
Nemokosch šŸ˜¬ 21:14
[Coke] (500 error finally gone) 21:15
leont multi-dispatch en conversion types still have a ton of issues
Which apparently only I ever run into, because I'm reckless enough to use both
Nemokosch to be honest, multiple dispatch is legitimately under-designed 21:17
the semantics changed somewhere on the way but the conceptual process itself is still not clear 21:18
21:21 jpn joined
leont True. I've been bitten by multi-dispatch issues more often than any other class of issues 21:22
Nemokosch By the way: do you maybe have a golf idea for the issue you linked that does NOT contain use of the coercion protocol? 21:23
At the moment, I don't even feel the exact scope of the issue
And also it would be good to see a bisect with a piece of code that might work on loads of versions 21:24
21:29 Nemokosch joined
Nemokosch bisectable6: multi foo(Int:D $n) { say "my int is $n"; }; multi foo(Str(Any:D) $s) { say "i obtained str $s"; }; foo 5 21:29
bisectable6 Nemokosch, Will bisect the whole range automagically because no endpoints were provided, hang tight
Nemokosch maybe this can work 21:30
bisectable6 Nemokosch, Output on all releases: gist.github.com/b7a1e99d58fb816a51...eb69a2408c
Nemokosch, Bisecting by output (old=2020.08.2 new=2020.09) because on both starting points the exit code is 1
Nemokosch, bisect log: gist.github.com/a4b68a5ac86383971f...d40b5edaf0
Nemokosch, (2020-08-20) github.com/rakudo/rakudo/commit/99...70d88e5b81
Nemokosch, Bisecting by output (old=2018.09 new=2018.10) because on both starting points the exit code is 1
Nemokosch, bisect log: gist.github.com/d7fa6767631de7f973...3983d87bfc 21:31
Nemokosch, (2018-10-23) github.com/rakudo/rakudo/commit/02...2f041ccacb
Nemokosch, Bisecting by output (old=2017.12 new=2018.01) because on both starting points the exit code is 1
Nemokosch, bisect log: gist.github.com/2f2ea2b7b2f2a976ee...dc6a205ec8
Nemokosch, (2017-12-23) github.com/rakudo/rakudo/commit/6d...cd47249a05
Nemokosch, Output on all releases and bisected commits: gist.github.com/6b758a9be733399501...6a5cf01742
leont The solution is simple: just get rid of the type smiley. It was needed in an earlier version of the code but not in the current
Nemokosch sounds good :P 21:32
Xliff Can someone help: gist.github.com/Xliff/43827ef39f5d...f3e3b745e4 21:33
Nemokosch actually I'm acting on someone else's behalf with this postgres business, it came up on discord
Xliff There should be a golfed routine without GTK involvement at the bottom. Would really be a big help at this point. Thanks! 21:34
Nemokosch Xliff: the lesson I learned with grammars lately is: always bet on name conflicts 21:35
so without looking deep into it, I would advice you to just change "key" and "value" to names built-in stuff surely doesn't use and retry 21:36
if that doesn't help, a major (and fairly bizarre) source of problems is eliminated at least
ah no, probably not the issue here. I thought it was inside a grammar 21:44
21:45 jpn left 21:51 jgaz left 21:55 Nemokosch1 joined
Xliff Nemokosch, thanks for the thought, but these are token names. 21:57
Your point is well taken. I may change them just on principal. 21:58
However I think it's the fact that they would be simple Match objects (no positional or associative items)... and I can't seem to get them processed without invoking a VMNull error for some reason.
21:59 Nemokosch left
Nemokosch1 I got no error, by the way 22:02
it's just I don't know what to see 22:03
22:04 Nemokosch1 is now known as Nemokosch 22:28 Homer_Simpson joined
Xliff Nemokosch What kind of error. Can you post your output as a comment in the gist? 22:31
Nemokosch it's there :) 22:38
22:44 jjido joined 22:48 CodeTortoise left
ab5tract Is jonathan stowe around? 23:24
Or anyone from Raku-Noise-Gang?
23:26 sena_kun left
Nemokosch Jonathan Stowe is great 23:30
ab5tract he is indeed. Does he use a handle in #raku? 23:34
Nemokosch I'm not sure actually 23:35
so... Calling Bool(int32) does not seem to work anymore, you say? This can even be an unwanted regression. The error seems too ugly.
ab5tract It could be a regression caused by the new coercion protocol, maybe? 23:36
Nemokosch let's find out
ab5tract But I would argue using `so` is the nicer version anyway
Nemokosch fair enough but maybe there is something to fix here
bisectable6: say Bool(my int32 $ = 32) 23:37
bisectable6 Nemokosch, Will bisect the whole range automagically because no endpoints were provided, hang tight
Nemokosch it's easy to overuse this bot :)
ab5tract then again, I've always enjoyed `so`
bisectable6 Nemokosch, Output on all releases: gist.github.com/35812bd5b195568a45...892220912b
Nemokosch, Bisecting by output (old=2021.09 new=2021.10) because on both starting points the exit code is 1
ab5tract Nemokosch: TIL of it's existence
Nemokosch trust me, a couple of simple things can really boost your feel for Raku development 23:38
this bot is one of the simple magic tricks
ab5tract From the output, it looks like this never worked? 23:39
Nemokosch yes... however, almost certainly because I chose a bad golf
m: my int32 $foo = 32; say Bool($foo); 23:40
camelia True
Nemokosch and this does work even now...
makes you wonder
ab5tract it does indeed
bisectable6 Nemokosch, bisect log: gist.github.com/372bd2b6cb6c12e260...6efb031c48
Nemokosch, Bisecting by output (old=2020.11 new=2020.12) because on both starting points the exit code is 1
ab5tract m: say Bool(my int32 $foo = 32) 23:41
camelia Impossible coercion from 'Int' into 'Bool': value is of unacceptable type BOOTInt
in block <unit> at <tmp> line 1
ab5tract now that's a headscratcher!
bisectable6 Nemokosch, bisect log: gist.github.com/309b29a52f413ea432...92c3b3ec4a
Nemokosch, (2020-12-08) github.com/rakudo/rakudo/commit/79...0f7bdc46f6
Nemokosch, Bisecting by output (old=2019.03.1 new=2019.07.1) because on both starting points the exit code is 1
Nemokosch, bisect log: gist.github.com/e3dfa83ebf344d7e5d...13be310f7c
Nemokosch, (2019-07-17) github.com/rakudo/rakudo/commit/f7...ae06829d23
Nemokosch, Output on all releases and bisected commits: gist.github.com/4b55b49c5908e57ce2...eb5fa863f4 23:42
ab5tract the golf you chose is actually good because it mirrors what the Audio::PortAudio code is doing
Nemokosch finally...
ab5tract maybe something going on at the spesh level? 23:43
Nemokosch how does one turn spesh off, again? 23:44
by the way... 23:45
m: sub nati(-->int32) { 32 }; say nati().WHAT;
camelia (Int)
Nemokosch a bit bizarre isn't it
I'm very tempted to run a bisect on this as well xD
ab5tract MVM_SPESH_DISABLE=1 23:46
Nemokosch thank you
ab5tract m: sub nati(-->int32) { 32 }; say Bool(nati()) 23:47
camelia Impossible coercion from 'Int' into 'Bool': value is of unacceptable type BOOTInt
in block <unit> at <tmp> line 1
Nemokosch but an "Int Int" does work, lol
bisectable6: sub nati(-->int32) { 32 }; say nati().WHAT;
bisectable6 Nemokosch, Will bisect the whole range automagically because no endpoints were provided, hang tight
Nemokosch had to...
I hope somebody isn't paying fortunes to Amazon because of this 23:48
bisectable6 Nemokosch, Ā¦6c (66 commits): Ā«(Int)ā¤Ā»
Nemokosch, Nothing to bisect!
Nemokosch so it literally always did this
perhaps native types don't even have this sort of metadata 23:50
aha docs.raku.org/language/numerics#Auto-boxing well this part is clear then 23:51
ab5tract I guess the autoboxing doesn't totally work when it is in a Capture or something? 23:53
m: sub nati(-->int) { 32 }; say Bool(nati())
camelia Impossible coercion from 'Int' into 'Bool': value is of unacceptable type BOOTInt
in block <unit> at <tmp> line 1
Nemokosch the funny thing is that .Bool would work 23:54
ab5tract right?
m: sub nati(-->int) { 32 }; say nati().Bool
camelia True
Nemokosch tbh I don't know what sort of *syntax* Bool(...) even is here
ab5tract now that's just offensive :)
Nemokosch it doesn't seem to be a regular sub, not as &Bool at least
lizmat in the case of use as an invocant, it *must* be HLLized, because natives are really just pieces of memory really 23:55
and you can only call methods on objects
ab5tract right, makes sense. 23:56
Nemokosch however, it seems that the "int32" you get as return value is... somewhat boxed?
ab5tract okay, I've got to sign off for now... thanks for digging into this oddity with me Nemokosch :0
Nemokosch that's always fun :) byez 23:57
ab5tract Nemokosch: I guess the call to `.WHAT` does the boxing
Nemokosch Remember what it said: can't coerce *Int* to Bool blablabla
ab5tract oh, right... 23:58
Nemokosch there was no WHAT in that snippet
ab5tract yeah, it said it couldn't coerce Int to Bool for type BOOTInt
Nemokosch and it did work when we had a plain int32 variable and Bool'd that
what disturbs me is that it apparently worked at some point and doesn't work now 23:59
how did it work? what changed?
ab5tract I'll check back later to see if the mystery has progressed