🦋 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 reportable6 left 00:01 Wanderer_ joined 00:02 reportable6 joined 00:03 Wanderer_ is now known as wanderer 00:12 Kaiepi left 00:20 lichtkind left 00:34 epony left 00:39 sgrs left 00:45 derpydoo left 01:22 epony joined 02:10 razetime joined 02:43 razetime left 03:43 notable6 left, linkable6 left, unicodable6 left, quotable6 left, committable6 left, shareable6 left, bisectable6 left, statisfiable6 left, bloatable6 left, benchable6 left, coverable6 left, tellable6 left, nativecallable6 left, sourceable6 left, evalable6 left, squashable6 left, reportable6 left, greppable6 left, releasable6 left, bisectable6 joined 03:44 notable6 joined, coverable6 joined, bloatable6 joined, nativecallable6 joined, committable6 joined, benchable6 joined 03:45 quotable6 joined, squashable6 joined, sourceable6 joined, reportable6 joined, evalable6 joined, releasable6 joined, linkable6 joined 03:46 tellable6 joined, shareable6 joined, greppable6 joined, statisfiable6 joined, unicodable6 joined 03:59 Kaiepi joined 04:06 ProperNoun joined 04:59 xinming left 05:59 linkable6 left, evalable6 left 06:00 reportable6 left, evalable6 joined 06:01 reportable6 joined, linkable6 joined 07:01 evalable6 left, linkable6 left, unicodable6 left, nativecallable6 left, quotable6 left, sourceable6 left, squashable6 left, shareable6 left, tellable6 left, coverable6 left, reportable6 left, greppable6 left, committable6 left, benchable6 left, bloatable6 left, statisfiable6 left, releasable6 left, notable6 left 07:02 sourceable6 joined, committable6 joined, nativecallable6 joined, shareable6 joined, evalable6 joined, coverable6 joined, reportable6 joined, bloatable6 joined, greppable6 joined 07:03 linkable6 joined, releasable6 joined, statisfiable6 joined, squashable6 joined, quotable6 joined, unicodable6 joined 07:04 tellable6 joined, benchable6 joined, notable6 joined 07:41 xinming joined 07:44 deoac left 07:59 holyghost left 08:05 razetime joined 08:19 ToddAndMargo joined
ToddAndMargo Raku (Perl6) question NativeCall question: 08:34
I have little ending 8 bytes in a CArray representing a memory address.  How do I create a Pointer out it?
This is frustrating as the array is 8 bytes and the pointer is also 8 bytes and the position of the bytes is the same in both.  AAAHHH!!!!! 09:04
09:19 linkable6 left, evalable6 left 09:20 evalable6 joined, linkable6 joined 09:40 derpydoo joined 10:13 sena_kun joined 10:31 sgrs joined 10:41 razetime left 10:43 human-blip joined, xinming left 10:48 razetime joined, xinming joined 11:09 Sgeo left, sgrs left 11:20 Kaiepi left 11:46 human-blip left 12:00 reportable6 left 12:01 reportable6 joined 12:06 mscha joined
mscha m: my @a =<a b c d e f g>; say @a/2; # :-) 12:08
camelia 3.5
mscha m: my @a = <a b c d e f g>; say @a div 2; # :-(
camelia Cannot resolve caller infix:<div>(Array:D, Int:D); none of these signatures matches:
(Int:D $a, Int:D $b --> Int:D)
(int $a, int $b --> int)
(uint $a, uint $b --> uint)
in block <unit> at <tmp> line 1
mscha m: my @a = <a b c d e f>; say @a.head(@a/2); # :-) 12:14
camelia (a b c)
mscha m: my @a = <a b c d e f>; say @a.tail(@a/2); # :-(
camelia Type check failed in binding to parameter '$toskip'; expected Int but got Rat (3.0)
in block <unit> at <tmp> line 1
mscha m: my @a = <a b c d e f>; say @a.tail(+@a div 2); # :-/
camelia (d e f)
12:14 lichtkind joined
Nemokosch what's the matter with the last one? 12:18
mscha Last one works fine, but is longer, less elegant.  If `head` works fine with a `Rat`, why doesn't `tail`? 12:19
sarna why is this error so weird? 12:24
m: sub foo { True }; foo or die "not true"
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
or used at line 1
sarna ah I can fix it with unless
Nemokosch yeah perhaps you shouldn't use "or die" pattern anyway 12:25
but foo() or die would have worked probably
by the way: github.com/Raku/problem-solving/issues/326 12:26
I opened this issue months ago so yeah...
if you could leave a comment, that would be really nice 12:27
watching Vadim's presentation from last year as a kind of training 12:48
sarna can raku strings hold arbitrary bytes or do they need to be valid utf-8? 12:53
or well, some other format..
[Coke] Strings need to be valid unicode, yes 12:58
If you need binary data, use Blob 12:59
Huh. Seems like we should refer to this on the Str class in the docs. docs.raku.org/language/unicode has some of it 13:02
Nemokosch you can do encode/decode business to get other formats into strings 13:04
[Coke] and there is encoding 'utf-c8' described on that unicode page to avoid converting the bytes. the strings have a normalization form that means some unicode doesn't *literally* round trip (example shown on that page) 13:08
13:14 linkable6 left, evalable6 left 13:16 evalable6 joined 13:17 linkable6 joined
Nemokosch so apparently all Raku blocks are very much like IIFE's 13:25
13:33 derpydoo left 13:48 Kaiepi joined 13:50 gfldex_ is now known as gfldex 14:47 epony left
Anton Antonov Strings encoding and decoding is reliable source of headaches in my ZMQ based connections. 15:01
15:21 sena_kun left 15:23 sena_kun joined 15:48 mscha left
Nemokosch youtu.be/NYBc3tQEIh4?list=PL_OYHwb...mp;t=10151 15:52
"Array and Hash are containers, too"
It's a problem that not even core devs can apparently say the same thing about what a container is 15:53
15:55 deoac joined
lizmat, 2022.11.12 - "an Array is not a container. it is an object with containers (...) an array can be within a container, sure, but it is *not* a container" 15:56
16:35 razetime left 17:03 Guest33 joined 17:20 squashable6 left
sarna thanks! 17:21
I'm trying to use a library from perl via Inline::Perl5, and it's returning strings.. to me, these should be blobs. any way of converting these before they get decoded in raku? 17:22
(it's inflate/deflate from Compress::Zlib)
17:23 squashable6 joined
thowe Advent Calendar! Yas! drinking coffee and thinking of all the cool stuff I could do if I knew Raku better. 17:38
18:00 reportable6 left 18:01 reportable6 joined 18:06 derpydoo joined 18:15 coleman left 18:16 sena_kun left 18:18 sena_kun joined 18:21 Guest33 left, coleman joined 18:53 Kaiepi left 18:54 Kaiepi joined 19:54 greppable6 left, bisectable6 left, shareable6 left 19:55 statisfiable6_ joined 19:56 benchable6_ joined, evalable6 left, linkable6 left, squashable6 left, unicodable6 left, quotable6 left, reportable6 left, committable6 left, tellable6 left, statisfiable6 left, notable6 left, coverable6 left, nativecallable6 left, sourceable6 left, releasable6 left, benchable6 left, shareable6_ joined, bisectable6_ joined, notable6 joined, unicodable6 joined, reportable6 joined, quotable6 joined, sourceable6 joined, committable6 joined, releasable6 joined, squashable6 joined, linkable6 joined 19:57 nativecallable6 joined, tellable6 joined, greppable6 joined, evalable6 joined, coverable6 joined 19:59 Sgeo joined 20:59 linkable6 left, evalable6 left 21:00 evalable6 joined 21:01 linkable6 joined 21:12 Sauvin left 21:15 Sauvin joined 21:27 Bocaneri joined 21:28 Bocaneri is now known as Guest6927 21:29 Sauvin left, Guest6927 is now known as Sauvin 21:40 mscha joined, mscha left 22:40 linkable6 left, evalable6 left, linkable6 joined, evalable6 joined 23:08 epony joined 23:43 Bocaneri joined, Sauvin left, Bocaneri is now known as Sauvin