🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
mfiano Hello again. 03:44
I would like to get a better idea of what people are using Raku for these days. I haven't looked at Perl in about 20 years, and historically it has been mostly used for text processing and cgi scripts (which I suppose is a subset of the former). I am told Raku is more suitable to other tasks, and while I know it is a general-purpose language, I'm still curious what members of the community are 03:47
actually using it for these days, outside of text processing, parsers, and the like.
moon-child mfiano: you mentioned earlier gl; I made a very basic interface to it here github.com/moon-chilled/glarkum 04:25
mfiano Thanks moon-child 04:26
moon-child be advised it takes a very long time to compile 04:27
mfiano Shouldn't be a problem is parallel compilation is possible
if*
moon-child well, it's a single translation unit sooo
but there is caching
moon-child timo: my recollection is vulkan structs are not too bad from an abi perspective. Always passed/returned by pointer, so no problem that dyncall can't handle value structs 04:28
mfiano I've mostly just been trying to read about Raku and success stories for now. 04:29
mfiano Ordered a book. For now reading official docs. Still hard to find what people are using it for. Seems mostly just exploratory programming and parsers. 04:29
and web apps with Cro 04:30
moon-child 6guts.wordpress.com/2021/09/29/the...m-is-here/ mentions its use in 'Agrammon, an application calculating farming emissions' 04:32
mfiano Wonder how it'd do for declarative, data-driven tasks, like a lot of traditional AI. Probably best to stick to CL for that ;) 04:33
moon-child there are no symbols, which is a shame. But you can do interning yourself. Beyond that you're probably mostly fine 04:54
mfiano No symbols...hmm, odd. 04:55
Nemokosch what are "symbols"? 07:45
moon-child a symbol is an identifier. Given two symbols you may ask whether they identify the same thing (i.e. compare them). That's it 07:47
frequently symbols are used to represent variable and function names in code. Raku uses strings instead
mfiano THe thing that a string maps to in a symbol table of a compiler. Lisp just exposes these as a primitive.
moon-child notably symbols are interned, where strings are not. So you can use === to compare them in constant time 07:48
Nemokosch I don't quite get the use case 07:55
moon-child @Nemokosch you can think of it a bit like the dynamic typing version of enums 08:03
El_Che moon-child: symbols is something I dislike about Ruby 08:04
moon-child :/ 08:04
monochromec Hi! Who's the right person to contact as a dev advocate or community liaison for Raku? 08:06
Nemokosch moon-child: how is it useful to make it compile time, then? 08:13
moon-child how not? 08:14
Nemokosch I mean, could you give an example for using it compile time? lol 08:17
because there are constants in Raku, it's just a matter of implementation to make them evaluated compile-time in a switch-like scenario 08:18
moon-child hm, I may have misinterpreted your initial question. Can you rephrase/elaborate?
Nemokosch No, not really 08:21
I genuinely don't get what these "symbols" are when it really sounds like they are just typeless constants 08:22
moon-child 'typeless constants' exactly
Nemokosch like IterationEnd for the matter
moon-child but you do not need to explicitly declare them. You can just use them as you see fit 08:23
Nemokosch What does that mean? How would either a person or a compiler know they are something?
It sounds more weird than useful, to not need to declare them 08:24
moon-child they are not _anything_, by themselves. The only way to 'get' any information out of a symbol is to compare it to another symbol and see if they are the same
mfiano Are you sure about that? 08:25
Nemokosch This sounds like IterationEnd but without declaration...
mfiano They are objects, like everything else in CL. They have 5 fields, such as the value bound to it. 08:26
moon-child mfiano: sure, in cl you have symbol-package and symbol-name and such, but those are incidental, not The Point
mfiano Fair enough.
moon-child and, talking about symbols as an abstract concept, not specifically as in cl
mfiano Ok, then pick up any compiler theory book and be done with it. 08:27
They are an integral part
moon-child fair enough
Nemokosch In Javascript, Symbols absolutely don't mean "typeless constants" 08:29
MasterDuke .tell monochromec you could try asking in #raku-steering-council
tellable6 MasterDuke, I'll pass your message to monochromec
Nemokosch and in Raku, there _are_ "typeless constants"
lizmat .tell monochromec sending an email to [email@hidden.address] would be the best cause of action, I think 09:07
.tell monochromec sending an email to rsc@raku.org would be the best cause of action, I think
tellable6 lizmat, I'll pass your message to monochromec
RaycatWhoDat mfiano: re: "what is Raku being used for", it might not be anything fancy or overly interesting but I use it in my day-to-day work. Usually, I want to write a shell script or some sort of file/directory watcher or similar. 11:24
Now you may say that "lol, just learn shell scripting properly" and you'd be right 11:25
But, in my head, pound-for-pound, Raku provides the smoothest development experience to a point where it feels like cheating sometimes 11:26
mfiano I see, thanks for your input. 11:27
RaycatWhoDat mfiano: gist.github.com/RayMPerry/f2e1df44...d6170c2db8 11:33
mfiano I won't "lol" either. shell scripting is the worst, and I say that with 30 years of still banging my head over trivial tasks 11:34
I haven't tried raku out yet, been mostly reading still. i would definitely consider replacing some sh and lisp scripts with something like that. my only concern would be warmup time; most shell scripts are short-lived processes so waiting 20 seconds for it to even begin would be worthless. 11:37
mfiano has no idea what startup time is like 11:38
tbrowder mfiano: i'm with RaycatWhoDat, i have used Perl since 1993 for both text processing as well as a wrapper for heavy duty numerical processing prof 11:39
mfiano Nice, yes I figured that would be most of you.
I am mostly an AI / data visualization guy. 11:40
tbrowder *processing pgms and postprocessing reams of data. Raku is the Perl i wish i had when i was working for a living.
RaycatWhoDat Oh, yeah. Raku can definitely chug if you start using a bunch of the arcane magick constructs in the language but, for 95% of what you're doing, Raku is ready to go in like 0.5 secs.
Give or take. I haven't measured a damn thing.
tbrowder and when i need a serious bash prog, i use raku instead 11:41
mfiano Are there any interesting programs written in Raku? Like something that you might see on HN or something?
tbrowder and i use raku for cgi progs, too
RaycatWhoDat The biggest one *might* be Red 11:42
I need to double-check, one second
tbrowder find jnthn's lecture on his BIG prog for one of the European gov agencies
now that's heavy duty use of Raku 11:43
RaycatWhoDat Oh, yeah, yeah
mfiano link? 11:45
RaycatWhoDat tbrowder: He's done so many, I've forgotten which year it was. Do you remember?
tbrowder er, no, but i'll see if i can duckduckgo it... 11:46
MasterDuke raku-advent.blog/2020/12/20/day-20...-the-wild/ and github.com/oposs/agrammon 11:49
tbrowder see jnthn.net for all his public slides and talks. he has many on composable concurrency and one of those may be it...
yeah, that ^^^ one, too 11:51
RaycatWhoDat MasterDuke++
mfiano Ah cool 11:52
Anton Antonov @mfiano: re: "what is Raku being used for" -- I use Raku to make Conversational Agents (CA) for computational workflows. At this point most of them are not CAs, but "single-line interpreters", but I do use them to generate Data Science or Machine Learning workflows for different languages: Mathematica, Python, R. 12:31
@mifiano This recent presentation of mine, "Raku for prediction", goes into more details: conf.raku.org/talk/157 . 12:35
avuserow I wrote a simple password manager in raku which I use daily. Also writing a "network jukebox", for controlling speakers remotely via a web interface with a shared queue and music library from multiple users. Once upon a time, I did some video game modding using raku (replacing sounds, textures, etc). 12:36
Anton Antonov '@' ~ discord-user(329084082162106371.Str) Is in PAUSE? Or GitHub? 12:37
avuserow Soon :) 12:38
Which one are you most interested in? 12:39
Anton Antonov '@' ~ discord-user(329084082162106371.Str) Ah, sorry... The password managing one.
@RaycatWhoDat Do you have blog posts and/or videos explaining your approach to make "shell scripts"? 12:47
avuserow '@' ~ discord-user(694526400488669234.Str) , okay I'll see what I can do. it's nothing super involved, just a CLI in the spirit of passwordstore.org - but not GPG and not bash 🙂 12:56
'@' ~ discord-user(694526400488669234.Str) - github.com/avuserow/saiph - quick release after finishing off a few TODOs. It installs and still reads my local database, so it may even work for other people too 🙂 13:37
perryprog looks like discord-raku-bot is having a moment 13:38
avuserow The integration tests don't work any longer since the format changed. Haven't really thought about how to fix it.
perryprog Anyone know who's it maintainer? 13:39
its*
avuserow looks like it's confused when someone is at-mentioned on the discord side 13:40
perryprog yeah
MasterDuke gfldex maybe? 13:41
avuserow I dropped a note in discord's <#538407879980482562> 13:42
ha, and that got formatted weirdly too, naturally. the "general" channel is what I meant.
perryprog see if you just used irc we wouldn't have these problems ;)
avuserow my computer running my IRC client died 13:43
perryprog well, heck
avuserow so I'm using discord as my bouncer 🙂
gfldex is looking into it
perryprog Thanks!
Anton Antonov '@' ~ discord-user(329084082162106371.Str) What is Go used for in your "saiph" package? (I am too lazy to read and comprehend the code...)
avuserow the golang code is just a parallel implementation to dump one of the encrypted files. still requires the password, just helped make sure I wasn't silently using the library wrong 13:44
(originally the code was using gpg so you could just `gpg -d somefile` as a way to peek into it, so I wanted to keep that) 13:45
gfldex @glfdex testy, testy? 13:49
gfldex this looks better
gfldex @gfldex#8222 well, I acutally have to have a link, tho. 13:50
perryprog gfldex, can I bother you to just remove the ID codes outright? :P 13:50
perryprog just since it shouldn't matter for a bridge, IMO 13:51
gfldex The bridge has to translate stuff that IRC doesn't understand. Discord is using `@ ~ 'some stuff here'` quite heavily. 13:52
perryprog Oh, I mean in username tags 13:52
gfldex That would be very confusing.
perryprog As in make <@123> into @person instead of @person#456 13:53
Anton Antonov @avuserow#1203 Do I have to install `xclip` or I can skip it? 13:56
gfldex Quite in contrast to IRC, usernames are not uniqe on Discord. There are also per-server usernames.
perryprog I'm aware. There's just no need to have the #1234 portion for an IRC bridge of this scale. 13:57
avuserow You can skip it. It's used in a few commands but if you just want to echo things to stdout, you're fine
perryprog (In my opinion, of course :))
avuserow I used it have it on a headless server with no X11 and it worked fine.
Anton Antonov Installing it now it now with `brew`... 13:58
Nemokosch Username#Discriminator should be good enough
also, it is unique to my knowledge
or nicks as well
Anton Antonov Any "discriminator" would do?
gfldex perryprog: For the channel itself, not-so-unique usernames might be fine. But there are public IRC logs that I don't want to confuse.
avuserow <@694526400488669234> I have no idea if saiph will run on a Mac. Let me know how it goes and patches welcome. 13:59
Nemokosch I mean your discriminator is 7232, it's random generally
perryprog Right. It doesn't give any information on the IRC side of things. I bet $20 imaginary dollars that there isn't—and hasn't—been a single username collision on the discord side of the bridge. 14:00
Anton Antonov OK, right, it is not something I could make-up on the spot.
I am getting now a failure for installing Raku's `Readline` -- not a `saiph` error per se. 14:01
avuserow I probably could use something else. I think I just use it for tab completion on field names when editing an entry, and maybe completion for dot commands 14:13
Anton Antonov @avuserow#1203 It looks like on Mac OS X `gpg` is used instead of `gpg2` : stackoverflow.com/q/54895263/ . 14:35
@avuserow#1203 So, I changed the test `ok which('gpg2'), 'gpg2 in PATH';` to `ok which('gpg'), 'gpg in PATH';` and I was able to install `saiph`. 14:36
avuserow I should remove that. gpg is no longer used for the current format. (I guess you could trick it into using the older format but I'd rather not...) 14:39
gfldex lolibloggedalittle: gfldex.wordpress.com/2021/10/09/do...spiration/ 15:40
Geth doc: 2a2ac73c91 | (Joseph Brenner)++ (committed by Juan Julián Merelo Guervós) | 2 files
documenting when order-of-declaration matters with multi-dispatch (Fixes #3970)
18:03
doc: 6c101243bc | (Joseph Brenner)++ (committed by Juan Julián Merelo Guervós) | 2 files
Some small fixes for clarity and brevity
Geth doc: 8b8d817db3 | Coke++ | doc/Language/functions.pod6
whitespace
18:29
doc: 52ca420fae | Coke++ | 2 files
new words
linkable6 Link: docs.raku.org/language/functions
[Coke] crap. %!sort -u screwed up the unicode sorting in xt/pws 18:32
guessing related to my recent os x upgrade to latest OS 18:33
if someone could fix that and make sure xt/words.t passes, I'd appreciate it.
RaycatWhoDat Anton Antonov: I haven't really written anything on tech 18:41
RaycatWhoDat Anton Antonov: I haven't really written anything on tech 18:42
berber44 Hello, I found a "Complete course" of Raku that looks promising, but it only has the first, most basic, part. I wonder whether other parts follow up? course.raku.org/ 18:53
tellable6 2021-10-07T02:03:14Z #raku <tbrowder> berber44 you are very welcome
2021-10-07T05:13:02Z #raku <japhb> berber44 test-t is part of a benchmark suite whose performance results are posted semi-regularly to #raku-dev by |Tux|. You can find them in the channel logs.
mfiano berber44: The about page mentions that only the first part is published. It seems that part 2 development has been stalled since February though. 19:01
berber44 That's sad 19:02
The chaper names look good
^chapter
^chapter 19:03
Xliff What's the best hash initializer when keys are actually scalars? AKA Is there a shorter, more idiomatic way to do: "my %hash; my $key = 'key'; %hash{$key} = 'value'" 19:19
What's the best hash initializer when keys are actually scalars? AKA Is there a shorter, more idiomatic way to do: "my %hash; my $key = 'key'; %hash{$key} = 'value'" 19:20
MasterDuke m: my $k = "a"; my %h1 = $k => 1; dd %h1; my %h2 = $k, 1; dd %h2 # like these? 19:32
camelia Hash %h1 = {:a(1)}
Hash %h2 = {:a(1)}
Xliff MasterDuke: Hmmm... something like that, yes. 19:41
m: my $k = 'a'; my %h = ( $k => 1 ); dd %h
camelia Hash %h = {:a(1)}
Xliff <- Derp