🦋 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:14 MasterDuke joined 00:35 MasterDuke left, jpn joined 00:40 jpn left 00:44 jpn joined 00:49 jpn left 01:26 hulk joined 01:28 kylese left 01:35 jpn left 01:37 RakuIRCLogger left 02:15 hulk left, kylese joined 02:24 jpn joined 02:30 jpn left
SmokeMachine weekly: dev.to/fco/building-raku-codeboard...-htmx-30k9 02:45
notable6 SmokeMachine, Noted! (weekly)
03:08 Aedil left 03:12 Aedil joined 03:39 stanrifkin_ joined 03:42 stanrifkin left 04:11 jpn joined 04:16 jpn left 04:23 lizmat_ left 04:30 kylese left 04:33 kylese joined 04:43 guifa left 04:46 derpydoo joined 04:50 derpydoo left 05:11 jpn joined 05:15 jpn left 05:30 kylese left 05:31 kylese joined
melezhik. Yet another Raku/Sparrow answer on sof , please vote if you like it, thanks stackoverflow.com/a/79561262/5147708 05:50
06:07 lizmat joined 06:35 derpydoo joined 06:49 Sgeo left 06:50 jpn joined 06:55 jpn left 07:13 derpydoo left 07:46 oodani left 07:51 oodani joined 07:53 sena_kun joined 07:58 dakkar joined 08:14 jpn joined 08:29 sena_kun left
grondilu m: ub f($a, $b) { (state %){$a}{$b} //= my Num @ = gather { take pi; take e; │ok 5 - 08:34
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$a' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> ub f(<HERE>$a, $b) { (state %){$a}{$b} //= my Num @
grondilu m: sub f($a, $b) { (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; say f("foo", "bar").elems 08:35
camelia 2
grondilu m: sub f($a, $b) { (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; print f("foo", "bar").elems
camelia 2
grondilu m: sub f($a, $b) { my Num @ = gather { take pi; take e; } }; print f("foo", "bar").elems 08:36
camelia 2
grondilu ok two elements, but then why : 08:37
m: sub f($a, $b) { (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; .say for f("foo", "bar")
camelia [3.141592653589793 2.718281828459045]
grondilu ^why can't I enumerate them in a for loop? 08:38
m: sub f($a, $b) { (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; .say for |f("foo", "bar")
camelia 3.141592653589793
2.718281828459045
grondilu I have to use prefix:<|>
grondilu thinks about using slip 08:39
m: sub f($a, $b) { slip (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; .say for f("foo", "bar")
camelia 3.141592653589793
2.718281828459045
grondilu I guess I can do that
08:54 sena_kun joined 09:01 lichtkind joined
librasteve SmokeMachine: I will say that raku codeboard is awesome - I have only done a high level skim of your blog post and the repo and I think that there is a lot of amazing stuff in there. I also note that you have titled the repo "Discuss" - shall we discuss? 09:05
Voldenet grondilu: because `(state %){$a}{$b} //=` turns the expression into a scalar 09:08
m: sub f($a, $b) { (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; f("foo", "bar").VAR.WHAT.say 09:09
camelia (Scalar)
Voldenet m: sub f($a, $b) { my Num @ = gather { take pi; take e; } }; f("foo", "bar").VAR.WHAT.say
camelia (Array[Num])
Voldenet what you could do is 09:11
m: sub f($a, $b) { .<> given (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; f("foo", "bar").VAR.WHAT.say
camelia (Array[Num])
SmokeMachine librasteve: thanks! Yes, sorry… I was quite late to my target to write at least 1 post per week, so everything got messed up and the repo’s name does not match the post’s name. But I’m glad you like it. :)
Voldenet or 09:14
m: use nqp; sub f($a, $b) { nqp::decont (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; f("foo", "bar").VAR.WHAT.say
camelia (Array[Num])
librasteve Let me begin (and welcome you to continue, or just ignore me is fine too). We are on parallel tracks with Cromponent and Air/hArc stack. There has already been some sharing of fundamental ideas ... it was only by reading and building on your early Cromponent design back in Oct/Nov that I was able to understand what I had been aiming for and how to get there. (Which I trust you feel has been properly acknowleged and 09:18
credited). Even then it was too early for me to be clear about what the goal of Air was - we are both doing something new and for me at least I need to see how the statue emerges from the block of stone. Now that work is done I would say that Air is a quite complete statement of what I see as the best way to build websites. However, Air is not for everyone, Air is very opinionated ... it currently only works with Pico CSS via
SASS/SCSS for example, it leans hard on writing html in functional style not with HTML templates, and it is intended to be HTMX above all else, so rather hard to integrate with (eg nodejs). I see that Cromponent is a more broadly capable foundation and I expect that most Cro websites will lean to cro templates (since having HTML monkeys coding templates is a thing for large teams) and that Air will continue to be unusual and
pretty niche (I would say better, but that is a marmite opinion).
Anyway Air is made of three modules (i) Air::Functional is distinct in that is a different way to embed HTML in raku, (ii) Air::Component is an adjusted Cromponent and (iii) Air::Base is a bunch of "standard components" for website builders to extend (site and page are a bit special, but we don't need to worry about that). 09:20
Voldenet m: use nqp; sub f($a, $b) { @:= (state %){$a}{$b} //= my Num @ = gather { take pi; take e; } }; f("foo", "bar").VAR.WHAT.say # this sorta works, but I don't like it 09:24
camelia (Array[Num])
librasteve So, my worry is that we will work away separately and diminish our efforts - I propose we try and find a way to collaborate (and invite others to the party). To do this, I think that we could (a) recombine Cromponent and Air::Component into the same codeline (maybe with a shim layer) and (b) do that in a way that makes Cromponents (written with Cro template) and Air::Components (written with Air::Functional) 09:25
interchangeable. This will help build the overall library of web components available to raku Cro users.
What do you think?
SmokeMachine librasteve: I’m in a week of all day presentations, I’ll answer you soon (sorry) 09:41
librasteve SmokeMachine: there is no hurry ... I'll open an issue at discuss so we do not lose track of the conversation 09:42
hi all, we got a test failure on cro webapp ... The strategy configuration was canceled because "raku.macOS-latest_latest" failed ... just wondering who looks after the GHA actions? 09:50
10:03 donaldh joined 10:11 donaldh- joined 10:16 jpn left 10:17 jpn joined 10:22 lichtkind left 10:23 donaldh left 10:26 donaldh- is now known as donaldh 11:06 kst joined 11:18 jpn left
tbrowder hi all, is there a clever way to prompt the user, wait X sec for a response, and continue without a response? i 11:53
i haven't found anything in docs about a delay... 11:54
librasteve tbrowder: maybe something like this (untested) chatgpt.com/share/67f50eb7-7064-80...cb4c08792f 11:55
looks lke ChatGPT forgot about the raku prompt command so that should simplify this a bit 11:56
tbrowder thnx, before i look, does it use $*IN and $*OUT handles directly? 11:59
12:01 melezhik joined
librasteve sorry, I dont know, the information I was trying to convey that some combination of promise, await, react should do the trick - however I have not really used raku concurrency much so this is (hopefully) a pointer 12:01
melezhik lizmat: is it me only having issues accessing rakudo weekly site?
librasteve melezhik: looks good to me rakudoweekly.blog/blog-feed/ 12:02
lizmat melezhik: you mean, not having a new issue ? am still working on it
librasteve lol
melezhik ah, ok, no worries then )
tbrowder librasteve: yes, my guess was in the right direction, thank you! chatgpt is pretty cool... 12:03
librasteve yeah - I find it useful for "some pointers on how to do something I have not done before" ... but it always needs a lot of correction and changes 12:05
12:08 jpn joined
melezhik ok, liz, let me reiterate ) I meant issue of access web site, not issue of accessing new issue )) 12:11
by browser says - "took loo long to access rakudoweekly.blog site"
or something 12:12
maybe it's just me though
successfully connected via mobile phone, so nevermind ) 12:13
12:13 melezhik left
librasteve maybe try rakudoweekly.blog/about-rakudo-weekly/ since it is static page 12:13
can you ping the domain?
12:14 guifa joined
lizmat updown.io/4rae says it's been up all the time 12:18
12:31 guifa left
melezhik. I guess this is specific to my working network setup . Like I said no issues from my personal phone 12:32
12:38 jpn left 12:46 JimmyZhuo joined 12:49 jpn joined
weekly: programming.dev/post/28258819 13:07
notable6 melezhik., Noted! (weekly)
lizmat not sure what to make of ssojet.com/escaping/regex-escaping-in-raku/ is it AI generated? feels like it 13:19
similarly ssojet.com/encryption-decryption/r...8-in-raku/
melezhik. Feels like that to me 13:35
13:35 donaldh left
Suspiciously the same domain took an interest in Raku … 13:35
Feels like advertising trick , I might be wrong though 13:36
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2025/04/08/2025-14-diving/ 13:39
13:57 donaldh joined 14:01 sena_kun left 14:02 sena_kun joined 14:04 lichtkind joined 14:10 JimmyZhuo left 14:17 leont left, leont joined
tbrowder lizmat: thnx for all you do for us raku ppl, have a good rest and vaca 14:19
14:19 ab5tract left
lizmat tbrowder: thanks! 14:19
14:20 ab5tract joined 14:41 DarthGandalf left 15:09 grondilu left 15:14 derpydoo joined 15:16 grondilu joined 15:17 hvxgr joined 15:25 jpn left 15:27 derpydoo left 15:38 derpydoo joined
melezhik. Lizmat: thank ! 15:53
16:02 sena_kun left
Voldenet tbrowder: the solution you've got from chatgpt is a bit incorrect - the first "get" is never aborted, so even when you get new stdout, that .get method is still hanging 16:04
16:07 sena_kun joined
melezhik. Yet another solution for sof question using Raku and Sparrow - stackoverflow.com/a/79562559/5147708 16:08
Voldenet I think spawning a process for this readline might work, since the process can be killed 16:11
16:14 jpn joined 16:30 zostay left, tbrowder left 16:31 zostay joined, tbrowder joined
timo stackoverflow.com/a/79562603/804005 please like, share, subscribe, hit the bell icon, etc etc yada yada 16:35
16:37 derpydoo left 16:38 dakkar left
timo well, more than likes i'm interested in feedback / critique 16:41
16:42 guifa joined
[Coke] timo++ 16:44
timo "sorry for the lengthy letter, i did not have time to make it any shorter" comes to mind %) 16:50
ever so slightly annoyed that there's no syntax highlighting for raku on stackoverflow :) 16:52
16:53 undoencalma joined
undoencalma Hello! What ide is recommended to develop in raku? 16:54
tellable6 2025-04-04T07:24:01Z #raku <ab5tract> undoencalma: that’s a long list :)
2025-04-04T07:52:54Z #raku <librasteve> undoencalma: one thing you may like is you can write a website like this:-site page main p "Yo baby!"
Voldenet undoencalma: I use nano %-) but seriously comma, people use vim, I remember using atom 16:58
I seriously use nano though > 16:59
lichtkind does anybody sees a need for a PCA module? 17:00
17:12 derpydoo joined
undoencalma Voldenet good! i want to develop in linux but dont have a personal machine yet...like the vim option hehe 17:38
17:41 jpn left
Voldenet timo: this is a nice post, but `map` example could be more `for loop`ish via `.map: { … }` perhaps 17:50
it could be deceptively similar, even 17:51
now that I think of it, it could be probably countervaluable to present it like that 17:52
17:57 DarthGandalf joined 18:14 undoencalma left
timo I kind of disprefer `.map: { … }` since adding more stuff on is awkward 18:20
melezhik. Voldenet: nano++ ) 18:47
[Coke] is there some raku code to diagnose *where* in a file the malformed UTF-8 it's complaining about is? 18:51
(windows)
Voldenet Yeah, I don't like .map: {} either, it would only look cool in this specific case 18:53
timo what exact error are you getting, [Coke]?
[Coke] Malformed UTF-8 - turns out it was a leading FFEE. 18:54
... which I could only see using 'format-hex' - tried to manually edit it using vim -b, no love. 18:55
timo huh that's not the BOM, is it? FFEE? 18:56
Voldenet BOM would be \x{EF}\x{BB}\x{BF}
[Coke] weirdly, I can no longer duplicate this issue - cut and paste some markdown into a temp file to run a raku script on it... for weeks it has been throwing that error (I do this maybe 2x a week). Just now, when I did the cut and paste again... no issue. no FFEE... wtf.
Voldenet FEFF/FFFE are for utf16/32 18:57
timo might depend on what program you're saving it with, or something?
m: say Buf.new(0xFF, 0xEE, 0x3a).decode 18:58
camelia Malformed UTF-8 at line 1 col 1
in block <unit> at <tmp> line 1
[Coke] sorry, FFFE
timo i guess we could put a special case for this funny special case 18:59
but you didn't get the line/col output?
[Coke] of the input? no, backtrace into the setting, IIRC
timo it has to be the decodestream code, not the non-streaming utf8 decoder 19:08
19:14 Aedil left 19:17 swaggboi left 19:19 swaggboi joined
[Coke] Also - it probably has something to do with my recent upgrade to a windows 11 box. I don't think I ever tripped over this on the previous win 10 instance. 19:44
[Coke] gen AI experience today: copilot popping up repeatedly, and then crashing as soon as I type anything in the input box. 19:57
(unrelated to my encoding issues. :)
antononcube @Coke Are you us in VSCode? With Jupyter notebooks, or the text code editor? 20:15
timo presumably just windows's own copilot stuff? 20:21
antononcube Yeah, "copilot" can be found/used in several places. 20:24
20:38 [Coke] left 20:50 jpn joined
tbrowder Voldenet: thnx for comment. the version i started with kind of works, but i will keep playing with it. 20:53
20:55 jpn left 20:56 [Coke] joined
[Coke] the standalone copilot executable. 20:58
antononcube @Coke & @timo So, that is on Windows, then. 21:04
tbrowder Voldenet: ok, i think i see the results of the hang (my input seems to be ignored). how would you get the soltution to work as intended? 21:12
*solution
oops, now i see yr second comment about the read line 21:25
avar: 21:32
(disregard last line) 21:33
21:52 apac joined 22:10 guifa left 22:12 stanrifkin_ left 22:14 apac left 22:16 Xliff joined
Xliff \o 22:16
Wow! 3 spectests left. We're close aren't we? (nine++ lizmat++ [everyone else involved]++)
Is there a chance for a RakuAST release in April? 22:17
SmokeMachine Librasteve: do you have any idea on how to unify them? Functionally, I don’t think that would be hard… but syntactically, any suggestion?
Xliff SmokeMachine!
SmokeMachine Xliff: hi!
Xliff I'm writing an application-server in Raku and would like to include some basic Red support.
How can I associate a DBIish or DBI database connection with Red? 22:18
[Coke] I can't imagine we would release it as the default without a full month of testing.
Xliff For technical reasons (database pools) I can't use 'red-default' so I'm hoping there's another way. 22:19
SmokeMachine Xliff: `database` can receive a DBI object… depending on the Red driver…
Xliff SmokeMachine: Can you show (or point to) a quick example in code? 22:20
22:39 jpn joined 22:43 Sgeo joined 22:44 jpn left
SmokeMachine Xliff: sorry, I was searching it here on my phone with no luck… but it should be something like: red-defaults Pg => %( :$dbh ) (if I’m not mistaken ) but I would probably suggest to you to write a custom driver… just extends an existing driver and change what you need to change… 22:44
Xliff SmokeMachine: `database 'mysql', $dbh` 22:45
I had to search the docs. Thanks!
SmokeMachine (We still have no MySQL driver, but if you want to help: github.com/FCO/Red-Driver-MySQL 22:48
) 22:49
22:51 sena_kun left 22:55 lizmat left, lizmat_ joined
Xliff SmokeMachine: I see. I'll look into it. Do you have any documentation on what it is missing, or some kind of roadmap? 23:04
SmokeMachine Xliff: github.com/FCO/Red/issues/225 :( 23:09
Xliff: sorry, I don’t… 23:11
Xliff: but please, let me know if I can help some how else… 23:13
23:15 derpydoo left 23:24 swaggboi left 23:27 swaggboi joined 23:35 jpn joined 23:40 lichtkind left 23:41 jpn left