🦋 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:06 arkiuat left 00:09 vasko4 left 00:12 arkiuat joined 00:18 vasko4 joined 00:20 deoac left
[Coke] there is a 'zef fetch', which makes that confusing. 00:24
SmokeMachine librasteve: it seems it still points to programming.dev/post/34643001, but should be pointing to dev.to/fco/ecs-in-raku-a-toy-frame...stems-nmm, no? 00:56
tellable6 SmokeMachine, I'll pass your message to librasteve_
01:28 kylese left 01:29 kylese joined 01:30 nine left, nine joined 02:00 arkiuat left 02:06 arkiuat joined 02:16 arkiuat left 02:19 kylese left, kylese joined 02:21 arkiuat joined 02:29 arkiuat left 02:37 japhb left 02:39 arkiuat joined 02:42 japhb joined 02:44 arkiuat left 02:52 bdju left 03:01 zorfnorf joined
zorfnorf Hi, completely new to programming (well, kinda, I use the terminal since the late 90s and used sh, but nothing further than simple scripts). I want to learn Raku but I don't know where to start (I'm not starting from absolute zero, I know about scope, variables, functions, etc.) Can someone give me pointers on how to learn it? Preferably on an 03:04
incremental way this -> that -> the other...
03:08 apogee_ntv left 03:09 apogee_ntv joined 03:21 RandalSchwartz joined, RandalSchwartz left 03:45 kylese left 03:47 kylese joined
avuserow zorfnorf: maybe learnxinyminutes.com/raku/ 04:25
zorfnorf Thanks, I'll look into it. 04:27
05:04 zorfnorf left 05:17 Aedil joined 05:35 leah2 left
disbot4 <librasteve> SmokeMachine: dang … editing on iPad as on the road this week … hopefully NOW is fixed 05:44
<librasteve> zorfnorf: hi! i learned raku from Think Raku … an excellent book to teach programming from scratch in raku. 05:46
<librasteve> greenteapress.com/wp/think-perl-6/ (it was renamed from Think Perl6) and there is a free PDF version 05:48
<librasteve> if that is too heavy, then maybe try the shorter raku.guide 05:49
<librasteve> Voldenet: please take a look at github.com/librasteve/Air/issues/24 … i think that resolves your point? 06:30
<librasteve> Smokemachine: please take a look at github.com/librasteve/Air/issues/24 … suggestion for Air::Component and Cromponent to use the same names for these utility methods… 06:32
06:54 Sgeo left 06:55 LainIwakura joined 07:02 peder left, peder joined, leah2 joined 08:05 wayland joined 08:12 dakkar joined
Voldenet guifa: I had most of the code available, only last few lines are new – I use this boilerplate with "c-library" all the time for testing NativeCall things 08:20
guifa ah nice
I finally got things working and it's not toooooo bad. Basically both the Raku and the Obj-C side have a generic supermethod (top level function in C world, sub in Raku world) and they just farm things out. Ultimately not too terribly bad 08:22
sub FOO ($id, @args) { @instances[$id].foo: @args }
void foo (instance * i, int * arg) { [i foo: arg]; } 08:24
and then otherwise code as normal
Voldenet I thought a bit about it and it should be possible to smuggle the raku pointers by using WHERE and evil pointer magic 08:37
would be extremely brittle though
even if it's possible to cast arbitrary pointer to raku objects 08:39
08:50 lichtkind joined
Voldenet librasteve: yeah, that sums it up - the other concern was "how to tightly couple model and form so that form can refer to `text` property in a model", but I don't know any obvious way to say `nameof(Todo.text)` 08:55
tellable6 Voldenet, I'll pass your message to librasteve_
Voldenet some frameworks do that by generating the whole form automatically, which could be done here too, but that'd be out of scope 08:56
09:39 LainIwakura left 10:32 LainIwakura joined 10:33 gfldex left 10:34 gfldex joined
wayland Voldenet: Thanks for the heads up about the links. I've fixed that again. That's probably the biggest drawback to this website setuo -- I keep accidentally committing that. 10:48
tellable6 2025-07-28T15:40:12Z #raku <Voldenet> wayland: some things broke and wayland.github.io/blog/raku/genera...sation.xml links to localhost:8000 for most resources now :/
wayland weekly: localhost:8000/blog/raku/ReachingOu...roupes.xml 10:55
notable6 wayland, Noted! (weekly)
lizmat wayland: the localhost:8000 url is pretty useless :-) 10:56
wayland Argh! Did it again! 10:57
weekly: wayland.github.io/blog/raku/Reachi...roupes.xml 10:58
notable6 wayland, Noted! (weekly)
wayland Hopefully that one will work. 10:59
lizmat it does 11:01
guifa Voldenet it's probably best at the moment to keep the restrictions what they are -- after all, nasty things could happen if someone tried to do anything other than just pass the pointer back to Raku 11:05
right now for my JS bridge I'm just limiting it to things that can be sent in text/json representation, no actual object references 11:06
(and with new versions of WebKit's WebView, there's no actually way to do anything but that)
11:21 guifa left 11:25 zorfnorf joined 11:43 zorfnorf left 11:49 guifa joined 11:50 zorfnorf joined
zorfnorf Is there a way to disable colors and emojis on the repl? 11:51
lizmat perhaps setting the RAKUDO_ERROR_COLOR=0 environment variable ? 11:54
zorfnorf Oh, thanks! I was looking for some kind of .rakurc or similar. 11:56
lizmat alas, no :-) 11:57
Voldenet thing to consider no-color.org/ 12:00
lizmat PRs welcome :-) 12:01
zorfnorf Oh nice! I don't know if it's because I'm a beginner (this is my second day learning to program and Raku), but I find colors confusing. I can't believe that programmers are used to all that colors in the editor. I turned them off immediately. 12:02
Voldenet it's such a niche use case that I forgot that NO_COLOR existed for years, remembered it only because it's the exactly same use case 12:08
programmers use spaces to seek through text fast and colors to make it even faster, but some colorschemes get in the way
so I usually prefer various tints of blue/green/gray, never use red or yellow 12:09
zorfnorf Yeah, I tend to associate red with errors/warnings. 12:10
I have a tiny program that colors stderr in red to stand out, i.e. foo | red
12:17 guifa left
Voldenet I admit that it makes me a bit annoyed that vim by default uses a lot of red for raku 12:22
so instead I use nano which doesn't color things very much 12:23
zorfnorf I just use vim with syntax off. 12:26
I think I found a bug in zef: I tried to install a module and it failed saying it didn't had a META6.json file, but I checked at GitHub and it has. So after a little spelunking I discovered that I can just put the GitHub URL + .git and zef installed it without problems. 12:28
I have no idea how git works, I just know that you can save the program and go back- or forwards if needed. 12:30
lizmat zorfnorf: which distribution are you talking about ? 12:31
zorfnorf I installed Raku on macOS (ARM) using rakubrew (the curl | sh method), and when I tried to install both JSON::Fast and Text::Markdown I got the same error: "Extraction: Failed to find a META6.json file for <MODULE-NAME> -- failure is likely 12:33
<MODULE-NAME> Extracting with plugin Zef::Service::Shell::tar aborted."
lizmat what does "raku -v" say ? 12:34
zorfnorf Welcome to Rakudo™ v2025.06.1.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2025.06.
lizmat ok, that's pretty decent :-)
so you invoked it with "zef install JSON::Fast" ? and it failed ? 12:35
zorfnorf Yes. But if I use zef install <github-url>.git everything works.
lizmat what does: zef --version say ? 12:36
zorfnorf Just prints 1.0.0
lizmat then I have no idea what's going on 12:37
zorfnorf Can I paste the whole error here? 12:39
lizmat better in a gist
zorfnorf p.fr33tux.org/e5344f 12:42
lizmat wfm :-( 12:44
patrickb ^^ any ideas ?
[Coke] what's the install command that generates that? 12:47
zorfnorf zef install Template::Mustache (which couldn't install JSON::Fast), it also happens with Text::Markdown, which can't install HTML::Escape. 12:48
===> Failed to find dependencies: HTML::Escape 12:49
Failed to resolve some missing dependencies (use e.g. --exclude="HTML::Escape" to skip)
[Coke] extraction failed - is your disk full, perhaps?
zorfnorf But if I do zef search HTML::Escape, it exists.
[Coke] there's definitely a META6.json file in the distro
SmokeMachine Voldenet: you could just change the colorscheme, no?
zorfnorf [Coke] 183,29 GB available of 245,11 GB
[Coke] yes, there is, I checked. 12:50
patrickb oof. I have many questions. That module is available in P6C and CPAN. I'm a bit unsure which it tried to install. Looking at the auth in the path it seems to go for the P6C one. Shouldn't that be REA then?
Does the archive in the error message exist on your system? is it extractable?
[Coke] curious if 'zef look HTML::Escape' works for you (should put you in a tmp dir where you can verify there is in fact a META6.json) 12:51
zorfnorf: what's the "source-url" you get from "zef info HTML::Escape" 12:52
lizmat perhaps it's a zef config issue ?
zorfnorf zef info HTML::Escape 12:53
===> Searching for: HTML::Escape
!!!> Found no candidates matching identity: HTML::Escape
But zef search HTML::Escape does find 3 versions of it.
I tried to extract the .tar.gz on /var/ and got tar: Error opening archive: Error reading <file path here> 12:56
[Coke] OOC, what is your tar version? You have one from homebrew installed or something? 12:57
on my old mac (where this works) I have bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 12:58
zorfnorf No, it's the system's: bsdtar 3.5.3 - libarchive 3.7.4 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8
[Coke] cool
zorfnorf zef install github.com/moznion/p6-HTML-Escape.git worked without errors.
It also works with zef install 'HTML::Escape:ver<0.0.1>' 13:03
patrickb So to sum up, there is a .tar file on your system that is somehow broken (size == 0?) or unreadable. Is it a permissions error? Is there some Anti-Virus stuff going on that changes the permissions on downloaded files? 13:05
zorfnorf No antivirus, I think I somehow had a hiccup and the download got corrupt. I uninstalled and reinstalled just with the module's name and everything worked. 13:06
patrickb can that file be copied? opened in a text editor? What's the file size? Output of `file /path/to/file.tar.gz`?
ok.
zorfnorf the output of file says it's a directory (what?!) 13:07
[Coke] maybe need to nuke the zef download area (I forget the zef command for this) 13:11
Voldenet SmokeMachine: hence "by default", vim is so flexible that I can use it to play doom :) 13:12
zorfnorf [Coke] zef nuke site home 13:13
zef nuke site home && rakubrew build-zef and everything worked 13:17
13:19 zorfnorf left 13:20 zorfnorf joined
zorfnorf I got disconnected (my internet connection is terrible) but zef nuke site home && rakubrew build-zef and everything worked and now everything is fine. Thanks lizmat, patrickb, and [Coke] for the attention and sorry to bother you all with this. 13:21
lizmat no worries!
glad to have been of help :-)
[Coke] just glad it's working! 13:29
13:59 wayland left 14:00 wayland76 joined 14:09 zorfnorf left 14:48 LainIwakura left
disbot4 <librasteve> Voldenet: there’s a whole other module Air::Form for that … I’ll post on that next week. (Which was quite an interesting journey in “how to smush Cro forms and HTMX form behaviors together in a useful way”) 14:57
15:00 guifa joined
disbot4 <antononcube> @guifa I just finished watching your TPRC 2025 conference talk. (Something about Corinna and Camellia.) It is good, but too much time was spent on a certain language known as Perl. 16:28
guifa ha the original plan was to do that talk and then a Raku-only talk
disbot4 <antononcube> 🙂 Nice plan -- what happened ?! 16:29
<antononcube> Would you record and publish the Raku-only talk? 16:31
guifa we had a few more other Raku talks that were offered so we decided to have me just do the one 16:32
but then codesections and others got sick but I didn't have time to write out one of the other talks
my new UI::HTMLWindow will probably also make a nice talk
disbot4 <antononcube> Does "UI::HTMLWindow" provide interactive elements? Like sliders and buttons? 16:33
guifa Yes, since it basically gives you a window that you insert in HTML into 16:35
I'm working on expanding interactivity, but at the moment, you can call Raku methods from JS and vice versa
16:36 dakkar left
disbot4 <antononcube> ✍️ 16:36
<antononcube> I have mentioned this before -- I am interested in Raku replacement(s) of R-Shiny. 16:37
guifa the goal is that you'll be able to just pop up a window in any OS and provide a simple (or complex, only limited by HTML/CSS/JS) UI while doing everything else on the backend in Raku 16:38
disbot4 <antononcube> Here is an example of the ideal end result for me: antononcube.shinyapps.io/GNNMonTim...Detection/ 16:41
guifa see above: if you can show it in HTML you can handle it in Raku :) 16:44
to be it's a little bit nicer than opening up an HTML server and then opening up the browser 16:45
disbot4 <antononcube> Ok. See the source code in that link. I think it should not be (that) hard to generate the corresponding "UI::HTMLWindow" code from a Markdown file. 16:48
guifa so the way it's set up, if you have the html/css/js code, you'll be able to just add them as files. Those are copied into a temp folder and the run as a file://. With the big exception you'll get to respond to various window events too and interact directly with JS 16:49
disbot4 <antononcube> BTW, the services of shinyapps.io is a "serious business" for Posit (formerly RStudio.) The advantage is that "anyone, anywhere" can use those interfactive interfaces/ 16:50
<antononcube> Hmm... that Raku-workflow is less convenient that what "shinyapps.io" and RStudio IDE provide. But it can be productized into something similar. 16:51
16:53 zorfnorf joined
guifa I don't figure it's ideal for all use cases, but I think it'll be good for a lot of them 16:55
in classic form, this is a stepping stone towards another large project ha
disbot4 <antononcube> Yes, so it seems. 16:56
zorfnorf Just a heads up: I was trying to install some modules (File::Which and Fire::Directory::Tree) and zef displayed an error saying "candidates found matching identity: <module name here>". I ran zef update and got the same behavior, when I opened .zef/store/META.json it contained a single line: "429: Too Many Requests". This can be verified by running
curl "raw.githubusercontent.com/Raku/REA...META.json"
17:00 LainIwakura joined
guifa for instance, if someone wants to just pop up a quick dialog with some fields to be entered, that'll be very easy 17:02
17:09 zorfnorf left 17:14 zorfnorf joined 17:20 LainIwakura left
ugexe zorfnorf: can you create an issue at github.com/ugexe/zef/issues for adding an alert when an invalid ecosystem index is not valid? 17:33
er, for adding an alert with an ecosystem index is not valid 17:34
s/with/when/
17:37 eseyman left 17:42 manu_ joined 17:43 manu_ is now known as eseyman 17:44 zorfnorf left 17:51 zorfnorf joined
zorfnorf ugexe I'm afraid not since I never used git and GitHub :( 17:52
It's literally my first day at programming. 17:53
18:05 LainIwakura joined 18:14 zorfnorf left 18:16 SEric joined 18:22 kaskal left 18:23 kaskal joined 18:26 LainIwakura left 18:27 SEric is now known as bigfondue 18:30 bigfondue is now known as SEric 18:32 LainIwakura joined
disbot4 <melezhik.> . 18:39
18:40 zorfnorf joined 18:47 melezhik joined
disbot4 <melezhik.> news.ycombinator.com/item?id=44726955 - scroll a bit further down for Raku part 18:50
<melezhik.> Please vote up if you like it 18:51
18:51 melezhik left 18:54 zorfnorf left 19:30 wayland76 left 19:31 wayland76 joined 19:43 SEric left 20:06 wayland76 left, wayland76 joined 20:37 sm2 joined 20:50 Aedil left 21:02 arkiuat joined 21:13 sm2 is now known as seric, seric is now known as SEric 21:31 bdju joined 21:32 SEric left 21:36 SEric joined 21:54 arkiuat left 22:05 arkiuat joined 22:10 arkiuat left 22:14 guifa left 22:15 guifa joined 22:19 bdju left 22:21 bdju joined 22:24 SEric left 22:28 arkiuat joined 22:33 SEric joined 22:44 lichtkind left 22:45 SEric left, SEric joined 23:05 wayland76 left 23:08 deoac joined 23:10 apac joined