🦋 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.
rf Yeah there are definetley tradeoffs 00:00
Geth doc/main: 4143d9fa59 | (Elizabeth Mattijsen)++ | doc/Type/VM.rakudoc
Document VM.request-garbage-collection
08:28
lizmat doc pushes will only be reported on #raku-doc from now on, to reduce noise here 08:29
Geth App-Rakubrew: 8640a60ad5 | (Nick Logan)++ | 2 files
Use an arm64 perl in rakubrew standalone executeable

Previously the macos rakubrew was build with a x86 perl, which resulted in a x86 rakubrew and ultimately an x86 rakudo. This updates the macos build script to detect arm64 systems and to download the appropriate perl, build an arm64 rakubrew, which itself will build arm64 rakudos.
This also updates the version of perl used to one that has an arm build available.
09:47
App-Rakubrew: b4d2039cb8 | (Patrick Böker)++ (committed using GitHub Web editor) | 2 files
Merge pull request #72 from Raku/macos-arm64

Enable building of arm64 rakudos on Apple silicon
Geth App-Rakubrew: ddb60a939e | (Patrick Böker)++ | lib/App/Rakubrew/Download.pm
Better error reporting in Download _unzip
11:55
App-Rakubrew: 10df00e323 | (Patrick Böker)++ | 2 files
Automate building rakubrew on ARM MacOS
App-Rakubrew: b9b2b21a96 | (Patrick Böker)++ | 4 files
Version 34
App-Rakubrew/refs/tags/v34: 9d1d5d4493 | (Patrick Böker)++ | lib/App/Rakubrew/Download.pm
Better error reporting in Download _unzip
App-Rakubrew/refs/tags/v34: 6e91baa9c8 | (Patrick Böker)++ | 2 files
Automate building rakubrew on ARM MacOS
App-Rakubrew/refs/tags/v34: 8d74d22022 | (Patrick Böker)++ | 4 files
Version 34
Geth App-Rakubrew: cc4daf4170 | (Patrick Böker)++ | 4 files
Version 35
12:02
App-Rakubrew: 0112188108 | (Patrick Böker)++ | release-stuff/trigger-manual-build.sh
Fix MacOS ARM build to build the current version
12:17
App-Rakubrew: 818d584bbb | (Patrick Böker)++ | 2 files
Simplyfy release process a bit more
ugexe [Coke]: looks like rakubrew should build arm64 on mac now as appropriate 12:40
lucs In raku.land, can the search box be used to find modules matching a given tag? 13:16
lizmat yes, e.g. raku.land/?q=CPAN5 13:22
lucs Aha, thanks. 13:23
(Well, not exactly the search box, but that'll do.) 13:24
lizmat I typed that in the search box: the search box just creates a URL like that ?
lucs Oh, I actually typed that in my browser's address field. 13:27
Not sure what you typed in the page's search box to get that result.
I just noticed that if I enter some tag in the search box, it appears to list the modules that happen to have been tagged with that tag, but it also lists modules that have that string in their name or description, things like that. 13:31
@lizmat: Am I misunderstanding what you're telling me? 13:33
lizmat lucs: yes, it's either the tag, name or description 13:39
for some tags, that works, for others less so
lucs I guess that's pretty much okay, but I was wondering if there was a way to list only the modules that had been tagged with a particular tag -- currently, it seems that the answer is "no". 13:42
Another raku.land/tags question:
Oh, never mind (while preparing the question in my editor, I found a rather simple way to do what I wanted). 13:46
(Wanted to know how to list all currently used tags: just click on an arbitrary tag displayed by any module, and all tags will be displayed on the right.) 13:48
(Oh, and there is a way to list only the modules tagged with a given tag, but it's a bit roundabout: click on an arbitrary module's arbitrary tag, then on the right, click on the desired tag.) 13:51
lizmat ok, so the URL is raku.land/tags/xxxx with xxxx being the lowercase tag 13:53
TIL
lucs Okay, but ain't nobody got time to enter all that 😉 13:55
rf Morning, happy friday :) 14:01
lucs Gooood morning to you too.
Anton Antonov What is a good name for a Raku package/module that accesses OpenAI (and its ChatGTP)? I consider(ed) the names: (1) "AI:OpenAI" -- does not hint WebAPI much (2) "Lingua::Generation::OpenAI" -- too specific to text (3) "WebAPI::OpenAI" -- too "technical" (4) "Shmack::ShmePT" -- has a slight hint of my opinion about ChatGPT (5) "(ML|AI)::OpenAI::WebAPI" -- "same" 1 and 3 14:09
Any suggestions would help!
rf OpenAI::WebAPI 14:10
Anton Antonov Yeah. Or "OpenAI::Playground::WebAPI". 14:19
vrurg In Perl world they used to use WWW namespace for that. Raku has three modules in that NS already too.
Anton Antonov Ok, like this one: raku.land/github:Altai-man/WWW::DuckDuckGo 14:20
vrurg I think so. It clearly points at the use scope of the package.
Anton Antonov Yes. I checked the "AI::" prefix in raku.land, but it did not occur to me to try "WWW::" . 14:22
vrurg WWW::ShmackGPT...
Anton Antonov 🙂 Yeah, of course. (I even considered "ACME::" prefixes...) 14:23
vrurg ACME::KoyotGPT? 14:25
Anton Antonov @vrurg I created this one : github.com/antononcube/Raku-WWW-OpenAI 14:28
vrurg I wonder how much of CPU power backs the model. When I tried a question which it is not well trained for, apparently, it was like hearing its gears moving while it was producing an answer word-by-word.
Anton Antonov Oh, yeah -- they have many and huge servers. 14:29
vrurg Anton: looking forward for seeing the module in the wild! 14:30
Anton Antonov I will try to "populate it" into its initial version within the next 30 min. Hopefully, it would be Zef-ready tomorrow. 14:31
patrickb ugexe I'm still on it. The website is still todo. Would you be willing to test once I'm done? 14:59
ugexe patrickb: yeah just ping me when 15:02
Anton Antonov The first -- very basic -- version of "WWW:OpenAI" is completed : github.com/antononcube/Raku-WWW-OpenAI . 15:48
I hope it works on non-macOS platforms. I have to figure out how to replace the curl queries with "direct" URLs... 15:49
rf You can use Cro HTTPClient 15:50
[Coke] ugexe++ 15:58
tonyo . 16:04
Geth rakubrew.org: d18f7ec911 | (Patrick Böker)++ | 3 files
Add support for ARM Mac builds
16:06
knarkhov hi, rakkoons! 16:27
rf knarkhov o/
lizmat knarkhov o/ long time no see!
knarkhov I need help with Inline::Perl5 and IO::Socket::UNIX. I'm dealing with some dummy bot via unix sockets, and on server side i can not get buffer from socket. `my $bytes = $ipcconn.read($outbuf, 64);` Here's `bytes` are ok, exactly what i read, but `$outbuf` is blank. I guess this is due to Perl5 read is used and it assume `$outbuf` as writable by default. But not in raku. 16:34
tonyo m: any reason to not use IO::Socket in raku? 16:35
camelia ===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> any reason to not use IO::Socket⏏ in raku?
expecting any of:
infix
infix stopper
postfix
statement end
Nemokosch kostas? 16:38
knarkhov tonyo, actually no any global reasons, I'm bit confusing - I saw in some module IPC communication via IO::Socket... Let me find. But also i remember, a long story about unix sockets native support in raku. Looks like it was delivered a while ago. 16:44
tonyo if you're not doing anything tricky with the sockets then iirc they were pretty stable ~2015 ? 16:45
knarkhov lizmat, hi, yep, was kicked from usual lifecycle an year ago... 16:47
lizmat as were many, I believe :-( 16:48
knarkhov tonyo, thanks!!!!!! 16:56
github.com/Raku/roast/blob/master/...NET-UNIX.t
my bot is working)))
have no clue why I looked into Inline::Perl5 and IO::Socket::UNIX 16:57
lizmat
.oO( old habits die hard )
rf tonyo I much prefer IO::Socket::Async 16:59
knarkhov 100% true
Geth rakubrew.org: cce38d13a8 | (Patrick Böker)++ | resources/homepage.md.tmpl
Explain how to best automate: without Rakubrew
17:00
Nemokosch Iirc Leon's complaint was specifically about Unix domain sockets 17:02
The lack thereof, that is
Anton Antonov @rf Using "Cro::HTTP::Client" was a good advice -- thanks! 18:05
tonyo m: 120 ^^ 4294967295 18:23
camelia ( no output )
tonyo m: dd (120 ^^ 4294967295)
camelia Nil
tonyo hm 18:25
tonyo m: dd 0 ^^ 0xFFFF_FFFF; 18:28
camelia 4294967295
rf Anton, no problem :) 18:29
patrickb ugexe: I have finished updating the Rakubrew website and toolchain. You could start testing. 19:02
Geth rakubrew.org: d3a347260d | (Nick Logan)++ (committed using GitHub Web editor) | resources/homepage.md.tmpl
Add missing word
19:10
ugexe patrickb: the curl instructions and the standalone instructions both work as expected. only thing worth noting is with the standalone instructions I also had to `chmod +x ~/.rakubrew/bin/rakubrew` 19:23
tonyo rf: did you end up looking at the globber? 20:02
tonyo oh ^^ is not the typical ^, +^ is smdh 20:26
Nemokosch :cameliathink: 21:00
Geth rakubrew.org: a4fc8839b7 | Rawley++ (committed by Patrick Böker) | public/install-on-perl.sh
Fix typo
21:54
rf tonyo: Not yet sorry 21:55
Geth rakubrew.org: 17482f02e3 | (Patrick Böker)++ | resources/homepage.md.tmpl
Clarify that one needs to make rakubrew executable

When doing a manual installation that is.
22:05
patrickb ugexe: Thanks for testing. I added a bit of clarification to the website. 22:07
tonyo m: my $b = Buf[uint8].new(0 xx 0xFFFF); dd $b.bytes; my $a = Buf[uint8].new; $a.append(|$b.subbuf(0, 0xFFFF)); 23:28
camelia 65535
Flattening produced 65538 values, but argument lists are limited to 65535
in block <unit> at <tmp> line 1
Voldenet you don't even ned the second buffer 23:40
m: Buf[uint8].new.append(|(0 xx 0xFFFF))
camelia Flattening produced 65538 values, but argument lists are limited to 65535
in block <unit> at <tmp> line 1
tonyo how is that flattening to three extra values? 23:41
Voldenet m: [].push(|(0 xx 0xFFFF)) 23:42
camelia Flattening produced 65538 values, but argument lists are limited to 65535
in block <unit> at <tmp> line 1
Voldenet even
Argument list contains 3 elements already 23:43
m: [].push(1, |(0 xx 0xFFFF))
camelia Flattening produced 65539 values, but argument lists are limited to 65535
in block <unit> at <tmp> line 1
Voldenet m: sub x { }; x(|(0 xx 0xFFFF)); 23:44
camelia Flattening produced 65536 values, but argument lists are limited to 65535
in block <unit> at <tmp> line 1
Voldenet maybe first arg is thread context or something like that?
tonyo ah i guess because of the flip of @x.push is giving you some args eh
i'll just do it in halves
is a problem for gzip uncompressed blocks
Voldenet I'm not sure if it's good idea to even use append here, I'd be tempted to use memcpy 23:45
Voldenet a perlxs aficionado 23:46
tonyo trying to keep no build deps in fez 23:47
Voldenet tbh. I'm surprised buf can't be copied into another buf 23:48
tonyo yea i just double looked at the docs 23:50
am also surprised
Voldenet …maybe it does 23:51
m: my $b = Buf.new(0 xx 0xFFFF); dd $b.bytes; Buf[uint8].new.append($b.subbuf(0, 0xFFFF));
camelia 65535
tonyo with subbuf-rw ?
Voldenet apparently append simply accepts Buf 23:52
tonyo hmm..could've sworn i tried that
Voldenet a lot more obvious when you look at supported types github.com/rakudo/rakudo/blob/main....pm6#L1370 23:56