🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:06 reportable6 left 00:08 reportable6 joined 00:14 jgaz left 00:32 coverable6 joined 00:33 squashable6 joined 00:34 tellable6 joined 00:43 jgaz joined 01:10 jgaz left 01:26 xkr47 left 01:27 xkr47 joined 01:33 sourceable6 joined 02:22 simcop2387 left, perlbot left 02:24 simcop2387 joined 02:30 perlbot joined 02:32 committable6 joined 02:39 [Coke] joined, [Coke] left 02:56 frost joined 03:38 swaggboi left 03:48 swaggboi joined 04:25 clarkema left 05:25 tellable6 left, coverable6 left, notable6 left, committable6 left, benchable6 left, bisectable6 left, releasable6 left, reportable6 left, nativecallable6 left, linkable6 left, squashable6 left, evalable6 left, greppable6 left, sourceable6 left, bloatable6 left, quotable6 left, unicodable6 left, statisfiable6 left, shareable6 left 05:27 releasable6 joined, benchable6 joined, shareable6 joined, committable6 joined 05:28 evalable6 joined, coverable6 joined 05:29 tellable6 joined 06:07 reportable6 joined 06:20 tirnanog joined 06:26 greppable6 joined 06:29 unicodable6 joined 07:26 squashable6 joined, bloatable6 joined, notable6 joined 07:28 sourceable6 joined, bisectable6 joined 07:30 suman joined
suman what does this mean Num(Cool) :$xx = 1e0 07:44
num cool part
08:04 suman left 08:27 nativecallable6 joined 08:28 linkable6 joined 08:31 jjido joined
nine suman: docs.raku.org/syntax/Coercion%20type 08:31
tellable6 nine, I'll pass your message to suman
CIAvash suman: type of $xx values of type `Cool` and `Num` are accepted and values of type `Cool` are coerced to target type `Num` docs.raku.org/syntax/Coercion%20type
tellable6 CIAvash, I'll pass your message to suman 08:32
09:16 Sgeo left 09:26 statisfiable6 joined 09:39 jjido left 10:39 nativecallable6 left, reportable6 left, statisfiable6 left, bloatable6 left, notable6 left, unicodable6 left, releasable6 left, sourceable6 left, greppable6 left, squashable6 left, bisectable6 left, benchable6 left, evalable6 left, coverable6 left, tellable6 left, linkable6 left, shareable6 left, committable6 left, benchable6 joined 10:40 sourceable6 joined, evalable6 joined, greppable6 joined 10:41 nativecallable6 joined, tellable6 joined, squashable6 joined, notable6 joined 10:42 bisectable6 joined, coverable6 joined 11:27 sena_kun left 11:41 linkable6 joined, releasable6 joined 11:45 sena_kun joined 11:59 djerius left, djerius joined
p6steve looking at Inline::Python ... thought I might whet my appetite with fixing github.com/niner/Inline-Python/issues/43 12:20
good news is that this has necessitated getting the probes into the code and getting an idea how it works 12:21
bad news is that I have got stuck trying to debug 12:22
Digging in a bit, the p6_to_py.t error msg is on value Buf.new(228,98,99) throws 'This container does not reference a native unsigned integer'
I naively expect that this error is thrown by the PyObject lib on CallObject and may have something to do with the UniCode representation of this object having changed between 2021.05 (works) and 2022.02 (fails)
so wondering if Buf.new('äbc'.encode('latin-1')) may have changed between 2021.05 and 2022.02 - does anyhone know?? 12:24
this is python 3.9.7 on ubuntu 12:25
12:27 quotable6 joined, squashable6 left
lizmat m: dd Buf.new('äbc'.encode('latin-1')) 12:30
camelia Buf.new(228,98,99)
lizmat bisactable: old=2021.05 dd Buf.new('äbc'.encode('latin-1')) 12:31
bisectable6 lizmat, On both starting points (old=2021.05 new=8fb0a66) the exit code is 0 and the output is identical as well
lizmat, Output on both points: «Buf.new(228,98,99)␤»
p6steve ah yes --- could have tried that - sorry
lizmat afk again& 12:33
p6steve did raku NativeCode change? 12:37
12:40 bloatable6 joined, unicodable6 joined 12:41 shareable6 joined
nine It was trying to take int8 from a CArray and write those into a Buf (which is uint8 by default). Since 2022.02 Rakudo properly supports unsigned native ints which includes that it differs between them and signed native ints. 12:58
p6steve thanks @nine ... so the error is when casting back over to raku and is a raku error ... (the test mentions something about a round trip, guess that didn't sink in) ... appreciate the steer - hopefully that will give me enough to work on 13:22
nine Actually I've already pushed the fix :) It was just a single character similar to a lot of PRs that I submitted in the past month. 13:40
13:41 linkable6 left, evalable6 left 13:42 committable6 joined, xinming left, evalable6 joined 13:43 xinming joined 13:44 linkable6 joined
p6steve @nine that's cool thanks! btw I also found and fixed based on your steer ;-) 13:51
14:29 eseyman left 14:42 statisfiable6 joined 14:50 eseyman joined 14:57 frost left 15:08 reportable6 joined 15:28 squashable6 joined
xinming What is the right way to check %h is empty or not? %h.DEFINITE always returns true 15:54
m: my %h; %h.defined.raku.say;
camelia Bool::True
ugexe %h.so 15:55
xinming Got it, Thanks 15:58
16:12 abraxxa-home joined, razetime joined 16:32 wild joined, wild left 16:33 Evenwilder joined 16:34 Evenwilder left
guifa xinming also, if you're doing it in a conditional, you can just put the hash in as such. 16:35
if %hash { say "has items" } else { say "has no items" }
16:40 jjido joined 17:05 razetime left 17:27 jjido left 18:09 reportable6 left 18:39 jjido joined 18:40 Xliff joined
Xliff \o 18:40
Xliff is recovering from a Hard Drive crash :(
Lost like 6 months of workaaaa.
And my keyboard. I am now using a more-expensive keyboard with soft-keys. I hate soft keys. It takes only the lightest touch to make you sound like an idiot. 18:41
I tend to get repeat "s"es and "a"es by just tapping the thing.
Hence the "workaaaa" above.
So.... what's the best way to convert a CStruct to a CArray[uint8]? 18:42
18:43 Sgeo joined
nine Can you nativecast it? 19:02
19:18 tirnanog left 19:26 irced joined
irced tumbles in thru a vortex and knocks over a bookcase crushing a table and tipping chairs. 19:26
irced brushes off some wood splinters. 19:27
pardon my intrusion but did anyone notice there is a nonworking link at examples.raku.org/index.html to the FAQs (footer area)? 19:28
my god, you've all turned to stone!
irced attempts to cow-tip timo. 19:29
irced chisels a tattoo of a butterfly on ugexe.
irced puts a dainty feathered cap on vrurg. 19:32
irced moves lizmat to the top of the rubble (lizmat's fault clearly for the mess). 19:34
19:36 irced left 19:53 Kaiepi left 19:55 Kaiepi joined
nine The link points at faq.perl6.org/ which does look a bit dated 19:59
While faq.raku.org is just nginx default page
Xliff nine: I went that route in the end. 20:30
Originally I wanted an attribute to be CArray[uint8]. I wanted to take a structs binary data and break it down into its binary representation and stuff it into a CArray[uint8] iteriatively. 20:31
If you cast, the CArray doens't know its size.
Now I need to know something... why isn't there a default exception handler for warn? If there is, then why do I keep getting this message: No exception handler located for warn? 20:33
20:56 jjido left 21:12 reportable6 joined
gfldex Xliff: I believe that handler is setup here: github.com/rakudo/rakudo/blob/mast...n.pm6#L618 21:15
nine Xliff: is this happening in a callback from native code? 21:34
If yes, then you'll just have to add those handlers like I do in: github.com/niner/Inline-Perl5/blob....pm6#L1240 21:35
Xliff nine++ -- Thanks! 21:46
21:53 jjido joined 22:06 abraxxa-home left 22:15 Kaiepi left 22:16 Kaiepi joined, euandreh left 23:12 jjido left 23:56 epony left