🦋 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.
suman what does this mean Num(Cool) :$xx = 1e0 07:44
num cool part
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
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
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
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
p6steve @nine that's cool thanks! btw I also found and fixed based on your steer ;-) 13:51
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
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" }
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
nine Can you nativecast it? 19:02
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
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
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