🦋 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.
Xliff How do I get the "Rakoon" tag on reddit? 01:03
uzl[m] .tell Xliff Go to r/rakulang and in the sidebar to the right, click "edit" and select one of the flairs 01:14
tellable6 uzl[m], I'll pass your message to Xliff
guifa Xliff let me know if you have any trouble with it, I'm one of the mods 01:23
guifa just changed raiph from Experienced to Wise Elder because… really? Why did they choose the middle tier?! 01:25
jdv raiph is insane 02:22
moon-child jdv: many wise elders are 03:22
jdv :) 03:36
Geth ecosystem: c9ac84ce1f | (Elizabeth Mattijsen)++ | META.list
Freeze Inline::Brainfuck

While we move it to the zef ecosystem
12:20
Geth ecosystem: b5acf1b362 | (Elizabeth Mattijsen)++ | META.list
Remove Lingua::Conjunction

It now lives in the zef ecosystem
12:50
ecosystem: fc748e1c60 | (Elizabeth Mattijsen)++ | META.list
Freeze Benchy

While we move it to the zef ecosystem
13:00
robbob Hi 15:57
Is Raku an Esolang? 15:58
El_Che no 16:00
robbob What's the use of it? 16:19
guifa_ What's the use of any programming language? lol 16:24
robbob Well, I suppose that's generally a good question, but there are languages with certain uses. For example, shell is good for quick scripts, C is good for lower-level programs and things that would be worth the writing time to be fast. 16:49
lizmat robbob: I guess Raku somewhere between those two, especially if you value your developer's time 17:00
robbob Okay, that's helpful to know, thanks! So it gives you good control, without too much complication? 17:01
lizmat not sure what you mean with "good control" ? 17:06
Xliff robbob: I would say "Yes" to this. 17:22
tellable6 2022-05-19T01:14:32Z #raku <uzl[m]> Xliff Go to r/rakulang and in the sidebar to the right, click "edit" and select one of the flairs
Voldenet >shell is good for 17:23
in general shell is great for shooting yourself in the foot 17:24
Nemokosch not even that, to be honest 17:29
Shell is good for giving you a headache
Actually I don't know a pragmatic reason why all POSIX compatible shell dialects have to be this bad 17:30
Voldenet they're always skip edge cases and only solve the general case well 17:31
skipping, even
Nemokosch but like even the syntax is a big mess 17:33
with the fake functions and fake control structures
and not even faking data structures, the best you can get is an associative array of strings and then you must feel really thankful 17:34
Voldenet syntax is not that horrible if you use it on files 17:37
Nemokosch I'm not sure what "use it on files" should mean 17:39
Voldenet something like: for i in *.txt ; do cp $i /mnt/backup/$i ; done 17:39
ofc, it gets incredibly hairy if you have spaces in filenames… 17:40
Nemokosch that's just one thing 17:41
but why wouldn't it not even a terribly difficult thing do solve, you just gotta know the difference between $foo and "$foo"
Voldenet except every programming language does the right thing
s/every/most/ 17:42
Nemokosch but tbh I don't get why wouldn't that be horrible syntax, with the ; do and ; done 17:43
tonyo you guys sound like you're talking about bash and not shells in general 17:44
Voldenet zsh fans have joined the chat :D
Nemokosch I'm not saying what $foo does is always handy - in fact, it's more often not handy than it is 17:45
but that's hardly an anomaly in my eyes, among the overall behavior of shell
tonyo i use bash
Nemokosch I said POSIX compatible shell
tonyo and dislike zsh : )
Nemokosch in fact, Bash already extends "/bin/sh" in several ways 17:46
tonyo nushell, for instance, is different
Voldenet fish has saner `for` syntax too: for i in * ; echo $i ; end 17:47
Nemokosch and if you don't really aim for POSIX compatibility - why not just use an actual programming language?
there are loads of perl scripts in the software we are working on, for example
tonyo fish copies bash in a few irritating ways
Nemokosch Perl is for all intents and purposes an actual programming language, not yet another string parsing madness with fake control structures
Voldenet perl has at least some weird defaults 17:48
error handling is weird too
tonyo in fish: `echo "test '"$(echo -n)"'"
outputs nothing 17:49
s/\$//
Voldenet '"'"' is a well-known bash idiom for escaping ' character ;) 17:53
tbh. writing any bash-level things is raku is painless 17:56
Juerd In bash I prefer '\'' 18:06
'"'"' gives me a headache when I try to see what's what. 18:07
Xliff I'd switch to fish if it supported powerline shell and rakubrew 18:08
Voldenet in raku you can confidently say `for 'something'.IO.dir { run("thing", $_); }` and it will just work (and die when thing fails), without any tricks involved 18:16
similar thing in shell is deceptively hard to get right
Geth ecosystem: 171449a87b | (Elizabeth Mattijsen)++ | META.list
Freeze WhereList

While it is being moved to the zef ecosystem
18:18
Nemokosch Perl defaults seem sane when you compare it against anything with "shell" in its name tbh 18:20
tbh if I want to do any automation that involves at least one control structure, I go for Raku 18:22
interfacing with shell is simple and effective, you get decent output with minimal regex processing
hhcryfqnut Hey lizmat do you have any opinions/thoughts on "tilde communities"? Recently became aware of tildeverse.org/ and places like sdf.org and remembered one of your conference talks where you talk about PLATO www.youtube.com/watch?v=MXIJjdNdjjk (great talk, btw) 18:43
lizmat hhcryfqnut must admit I don't have a lot of thoughts about that :-) 18:45
hhcryfqnut ha! that's ok. wasn't sure if you had found something fun like PLATO and wanted to share. It's a trip down memory lane, in some ways, exploring these tilde communities. it reminds me of the web before everyone started having conversations/posting stuff in just a few places (places that are desperate to make money without having "users" pay) 18:49
lizmat PLATO ended for me in 1981 or so... so that's quite a long way down memory lane 18:53
hhcryfqnut *checks when the movie WarGames came out* 18:55
yep. that's a long time ago. lol
lizmat I did visit www.wired.com/1997/03/platofest-to...community/ and it was fun seeing old friends, some of which I'd never seen IRL :-)
lizmat BTW, Brian Dear's book did get published: www.amazon.com/The-Friendly-Orange...B0777XSZKW 18:58
recommended if you're interested in PLATO and/or early online communities 18:59
hhcryfqnut I'll read it! Thanks! 19:04
p6steve wonders if raku MOARVM implements Copy On Write (COW) semantics 20:51
gfldex p6steve: Values are immutable, so no write is allowed. Values will be shared where ever possible. 21:03
m: my $a = "abc"; my $b = "abc"; say ($a.WHERE, $b.WHERE)».fmt('%X'); 21:04
camelia (5FF046D4BA8 5FF046D4BA8)
Voldenet it's more obvious when you see most variables as pointers 21:47
Voldenet my $a = 123; my $b = $a; # int symbol = 3; int *a = &symbol; int *b = a; 21:52
guifa values will be shared when possible but that's not a guarantee AFAIK (it just happens to be that's how Rakudo does it) 22:22
this can actually cause problems 22:23
m: role B-Role {;}; my $a = 5; my $b = 5; $b does B-Role; say $a.WHAT; 22:24
camelia (Int+{B-Role})
Voldenet …doesn't that mean that using 'but' is safer fox mixins? 22:33
m: role B-Role {;}; my $a = 5; my $b = 5; $b = $b but B-Role; say $a.WHAT;
camelia (Int)
guifa Voldenet: yes, but (lol) `but` creates a copy, whereas `does` mixes in in place 22:41
Voldenet m: role B-Role {;}; my Int $b = 5; $b = $b + 1; $b does B-Role; say 6.WHAT; 22:44
camelia (Int+{B-Role})
Voldenet Huh…
Voldenet m: role B-Role {;}; my Int $b = 15; $b = $b + 1; $b does B-Role; say 16.WHAT; 22:48
camelia (Int)
japhb Voldenet: Tripping over the small Int cache? 23:06
Voldenet m: for ^16 { $_ does role :: { method CALL-ME { self + 1 } } }; say 10()()(); 23:09
camelia 13
Voldenet it's actually quite fun thing
i'll use it in my code
Voldenet m: for ^16 { $_ does role :: { method ACCEPTS($x) { False } } }; my $x = 11; say 11 ~~ $x 23:13
camelia False
Voldenet I'll use this if I ever need to make someone mad 23:15