🦋 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.
wayland .tell librasteve: I think you'd enjoy being on #raku-doc 00:01
tellable6 wayland, I'll pass your message to librasteve_
wayland Regarding the TPRC talks, my guess is that they're going to release one a day until they're all done. Probably for the algorithm. 00:02
SmokeMachine arkiuat: glot.io/snippets/h94pu2to82 00:09
arkiuat: that’s a way to have the constraint on the class 👆 00:12
arkiuat just on the attribute. But subsets are a better way to do what I was talking about doing 00:18
00:19 jjido left 00:23 arkiuat left, arkiuat joined
arkiuat oh right, which is what you're using there. Sorry, I misread at first 00:24
thanks! I hadn't figured out the syntax for that yet
specifically the :: to anonymize the subset 00:32
m: role R[::T] { has T $.a }; class A does R[subset :: of Int where {0 <= $_ <= 99}] {}; say A.new(:99a).a 00:50
camelia 99
arkiuat weird, over here I'm getting "Invalid typename 'subset' in parameter declaration." 00:57
but not when I paste SmokeMachine's snippet into my REPL
I'll return to this later. Thanks again y'all!
01:44 wayland76 joined, hulk joined, wayland left, kylese left 01:49 arkiuat left 01:51 arkiuat joined
guifa docs.raku.org/type/Routine 02:04
Doesn't mention .signature
err actually I guess that's inherited from Cod 02:05
Code
disbot3 <jubilatious1_98524> @apogee I thought that was what the :P5 adverb was for? See docs.raku.org/language/5to6-nutshe...rl5_adverb 02:11
guifa feel free to also contribute to the polyglot regex module :) 02:13
raku.land/zef:guifa/Polyglot::Regexen
02:15 hulk left, kylese joined
Voldenet btw, there's no point implementing php/ruby/python regexes if there's p5 regex already 02:47
guifa Voldenet: for the most part, they can be copypasta'd 02:58
but there are some tiny differences
My goal with that project is allow someone to just wholesale C&P a regex, tag it with the language, and profit 02:59
Voldenet hm, I've just read and you're right, even PCRE from PHP are not exactly perl regexes (even if it says perl in the name) 03:27
though differences are caused by some weird regexes www.php.net/manual/en/reference.pc...rences.php 03:28
`(?!a){3}` huh :D
but still, I'd love to see any production code regexes that aren't directly executing in perl5 03:30
otoh implementing native bindings for PCRE might be an interesting challenge 03:40
03:45 kylese left 03:49 kylese joined 03:51 Aedil joined 04:15 arkiuat left 04:29 arkiuat joined 04:34 arkiuat left 04:40 librasteve_ joined
disbot3 <librasteve> wayland:just made it to rakudoc - thanks! [but its awkward for Discord users like me as there's no bridge channel] 04:42
wayland76 Yeah, agree that's a problem. 04:43
I've had ideas about addressing that, but it's a long way down the list.
disbot3 <librasteve> I would like to see some of the unused Discord channels pruned - looks a bit deserted for newbie visitors dropping in atm (and maybe pin a welcome to the general channel pointing over to the active IRC Bridges) 04:46
<librasteve> lets archive Discord ecosystem, other programming, implementation and merge (ie drop one of raku-media or showcase 04:48
<librasteve> who's in charge?
<librasteve> (of Discord Server & Bots) 04:49
04:52 Sgeo left 04:56 Sgeo joined 05:06 arkiuat joined 05:11 arkiuat left
wayland76 I was confused by your message beginning "lets archive" -- in case others are, he's listing Discord channels that need to be archived. 05:20
disbot3 <librasteve> sorry & thanks! 05:21
wayland76 I think channels that might be worth mirroring to discord are: #raku-beginner #raku-doc, and maybe #mugs and #raku-community-modules (and of course the existing #raku and #cro channels). The rest of the IRC channels are fairly low-traffic. 05:25
disbot3 <librasteve> raku-beginner is already bridged ... ;-) 05:39
05:40 arkiuat joined
disbot3 <librasteve> yeah there is some modding history to consider - Discord is errr free speech inclined 05:40
<librasteve> definitely raku-doc (how did I miss that), I never knew mugs existed - 05:42
<librasteve> and we shoule probably merge raku and raku-irc (ie archive Discord #raku`` channel) since 05:44
05:44 arkiuat left
disbot3 <librasteve> it is a very quiet and serves the same role 05:44
wayland76 Agreed with all the above. 05:46
disbot3 <librasteve> =b
wayland76 There are a few channels that may be worth replicating if they start getting traffic (I'm looking at #red and #raku-sparrow) 05:47
librasteve_ yeah but too many dead channels is not a good look
tellable6 2025-07-11T10:29:34Z #raku <lizmat> librasteve plainvanillaweb.com/index.html perhaps of interest?
2025-07-11T18:09:32Z #raku <SmokeMachine> librasteve: talking about Cromponent, today, or max this weekend, I’m going to release a new version of it, supporting cookies and websocket… and also a new post on my blog about that…
2025-07-11T18:30:50Z #raku <SmokeMachine> librasteve: what do you mean by build phase, etc?
2025-07-12T00:01:43Z #raku <wayland> librasteve: I think you'd enjoy being on #raku-doc
hey librasteve_, you have a message: gist.github.com/e99ea119d64a84cae4...ed5657449c
wayland76 librasteve_: Yeah, that's why I said "If they get more traffic". I made a spreadsheet maybe a month ago listing which Raku channels had how much activity, and the ones I suggested in my first comment all had traffic within the last week at that point. 05:51
disbot3 <librasteve> SmokeMachine: you said One thing I think would help using Cromponents would be a way to not need to use &HTML when using a cromponent object…
wayland76 The ones in my most recent comment were from 2024 (at the time). 05:52
disbot3 <librasteve> SmokeMachine: Air::Component::Common has this 05:54
<librasteve> SmokeMachine: #| Cromponent::MetaCromponentRole normally calls .Str on a Cromponent #| this method substitutes .HTML for .Str method Str { self.HTML }
librasteve_ SmokeMachine: this translates all use of &HTML from Air - so you can remove from Cromponent … just needs the Str method to be called 05:56
06:12 arkiuat joined 06:17 arkiuat left 06:30 arkiuat joined 06:37 arkiuat left 06:43 guifa left 06:49 lichtkind joined 06:50 arkiuat joined 07:02 arkiuat left 07:14 jjido joined 07:31 arkiuat joined 07:36 arkiuat left 07:49 arkiuat joined 07:54 arkiuat left 07:59 arkiuat joined 08:03 arkiuat left 08:11 abraxxa-home joined 08:30 arkiuat joined 08:35 arkiuat left 08:50 jjido left 08:59 arkiuat joined 09:00 librasteve_ left 09:04 arkiuat left 09:09 Sgeo left 09:31 arkiuat joined 09:35 arkiuat left 09:49 arkiuat joined 09:53 arkiuat left 10:17 arkiuat joined 10:22 arkiuat left 10:40 arkiuat joined 10:44 arkiuat left 11:01 arkiuat joined 11:06 arkiuat left 11:35 arkiuat joined 11:40 arkiuat left 11:54 arkiuat joined 11:59 arkiuat left
SmokeMachine librasteve: by &HTML, I mean Cro template’s &HTML (cro.raku.org/docs/reference/cro-we...avaScript) 12:01
tellable6 SmokeMachine, I'll pass your message to librasteve_
12:10 arkiuat joined 12:16 arkiuat left 12:44 arkiuat joined 12:48 arkiuat left 13:08 arkiuat joined 13:16 guifa joined 13:27 jjido joined
disbot3 <librasteve> oh … sorry i get it now 14:22
14:36 jjido left 14:39 guifa left 14:46 guifa joined 15:12 guifa left 15:32 rir left 15:39 rir joined 15:40 rir left 15:49 jjido joined 16:54 jjido left 17:57 arkiuat left 18:11 arkiuat joined 18:18 Sgeo joined
patrickb librasteve: Did you see my reply here? github.com/croservices/cro-http/pu...3064882921 18:53
tellable6 patrickb, I'll pass your message to librasteve_
19:42 abraxxa-home left 19:47 guifa joined 20:00 Aedil left 20:02 jjido joined 20:07 arkiuat left 20:20 arkiuat joined 20:25 arkiuat left 20:32 coleman left, coleman joined
disbot3 <librasteve> =b 20:35
20:38 arkiuat joined
guifa What's the quickest way to ensure all the directories leading to an IO::Path exist? 20:45
ugexe i'm not sure i follow. are you asking if given /foo/bar/baz, how to check that /foo /foo/bar and /foo/bar/baz all exist? you would just check if /foo/bar/baz exists, no? 20:48
guifa ugexe: so if foo/ exists, but you want to do "foo/bar/file.txt".spurt(), it errors because foo/bar/ doesn't exist 20:49
I know I can just go up the chain and mkdir but I feel like it's a common enough use case there might be something baked in I'm missing 20:50
I guess I can just do mkdir($file.parent) andthen $file.spurt() 20:51
ugexe im not sure i can think of a language where that is a common thing 20:52
its racey for one
arkiuat how are subset declarations scoped? 21:21
like if I declare a named subset in a module, does it need to be exported, and how can it be exported?
disbot3 <librasteve> you can always go my subset , our subset 21:22
<librasteve> iirc the default is our scoped
21:25 Guest70 joined, Guest70 left 21:26 Guest77 joined
disbot3 <librasteve> this is how class, role etc work, they are default our scoped (ie exported automatically) 21:26
Guest77 hi all! i <3 raku
disbot3 <librasteve> yo
guifa and yeah you'll need to export 21:27
same way your export a class
disbot3 <librasteve> but you don't need to export a class 21:28
<librasteve> well we're both right docs.raku.org/language/modules#Loa..._importing 21:31
<librasteve> the FQN is autoexported - but you need class A is export {} to use the short name 21:32
21:32 jjido left
disbot3 <librasteve> so if I have Foo.rakumod with class A {}, then I need Foo::A.new() to make one 21:33
21:37 jjido joined 21:43 wayland76 left 21:44 wayland76 joined
disbot3 <nahita3882> (if it itself is under a package declaration, e.g., the common unit module *;) 21:46
<nahita3882> otherwise it leaks to GLOBAL and A.new becomes ok
<librasteve> .oO 21:48
<librasteve> weekly: www.youtube.com/results?search_query=tprc
<librasteve> weekly: www.youtube.com/@YAPCNA 21:49
<librasteve> weekly: youtu.be/_OMsWYLQLqU?si=iy8_pg9Tsr6m6DEb 22:04
guifa Oh heck yeah 22:20
so much closer to release
of my UI::Window module
I just successfully created an ultra simple chat application. Person 1 is in the Raku terminal, Person 2 is in the WebView
Voldenet guifa: I've implemented this for network filesystems - the quickest way (in wallclock time) of getting the directory that exists is doing the binary search on the path 22:40
though it only matters for paths with more than 2 segments
guifa thankfully in my case I can just do mkdir($file.parent) first 22:41
it will create all the intermediate directories if necessary
I'm just copying a bunch of files from /resources into a system tmp folder 22:42
ugexe mkdir("foo/bar").add("file.txt").spurt("bleh") 22:45
Voldenet in linux dirent cache will speed all of this so heavily that there's no point optimizing it anyhow probably
guifa yeah when I meant quickest I wasn't meaning speed so much as simplicity of code lol 22:48
Voldenet mkdir is the way then :) 22:49
[Coke] (videos) 14 videos are up, 6 unavailable videos are hidden 23:02
23:03 Guest77 left
Voldenet in fact mkdir_p in moar could be faster if it used the O(log(n)) approach when creating paths that partially exist, but in the usual case I don't think it'd matter 23:04
if anything, it'd be slower for the most usual case 23:08
23:35 jjido left