🦋 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.
tbrowder i'm trying to install raku on an ubuntu host but i'm not real familiar with ubuntu. what's the preferred way to install the latest raku on ubuntu? 01:50
Guest58 tbrowder there is the rakudo compiler, just install it 01:57
tbrowder i know, but it’s old, i want the latest raku 01:59
avuserow tbrowder: nxadm has some prebuilt packages at cloudsmith.io/~nxadm-pkgs/repos/ra.../packages/ 02:08
you should be able to add that repo and then apt-get install the appropriate one 02:09
I see debian ones, maybe those would work
otherwise I would look for a PPA, or use rakubrew
guifa is late but 02:18
gist.github.com/alabamenhu/7261845...fb4d945f58
Can annyone read that over and give me some feedback / grammar check / etc? 02:19
tbrowder avuserow: yeah, i use nxadm's packages on debian, i guess i'll use that. thnx 02:39
jaguart @guifa - this nosey elf couldn't get ``zef install Intl::CLDR`` to install - or Intl::CLDR::Immutability... is there a cyclic dependency? 04:21
jaguart @guifa = maybe s/ultimately intending her code that much/ultimately indenting her code that much/ 04:29
@guifa maybe s/reduction bit has some many elements/reduction bit has so many elements/ 04:32
@guifa++ - nice article :) thank you 04:39
Geth advent: 012d0d2f7f | (Ben Davies)++ | 2 files
Add Kaiepi's "Junction Transformers" article
07:45
advent: 3d62595572 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 2 files
Merge pull request #105 from Kaiepi/junction-transformers

Add Kaiepi's "Junction Transformers" article
Nemokosch tbrowder: for what it's worth, rakubrew already has it bundled 08:23
guifa jaugart: let me test that, Intl::CLDR shouldn't have any problem, Immutability is an old submodule that shouldn't be around anymore 10:19
oh wow, yup there's two or three uses of it, but since i had an old copy of immutability on my machine, it didn't cause an error on my end 10:20
tbrowder <Nemokosch>: thnx, i've been wanting to try rakubrew--this is a good opportuniy to do so 11:13
Nemokosch github.com/Raku/problem-solving/issues/336 could someone please read the last paragraph of the long 2colours comment at the end? 12:06
That really turned into a "spitting facts" paragraph and I would like to hear others' opinion about it 12:07
Xliff Can you override say()? 13:16
Nemokosch nothing prevents you from it, I think. The question is more, why would you want to, instead of providing string representations for certain data
Xliff TUI 13:17
So how would you do it?
Nemokosch well, just define a proto say for yourself... no? 13:28
or even an only sub, as it suits you 13:29
lexical scoping 13:30
Xliff Ah. Thanks. 13:35
Nemokosch built-ins come from a scope that encloses your compilation unit 13:38
so if you define something with that name, you can just shadow them
Geth advent: ef6df10497 | (Ben Davies)++ | raku-advent-2022/articles/junction-transformers.md
Clarify that junction (auto)threading is recursive

It's why we're slapping Mu everywhere, yet not Junction:D, which a reader might assume gets forwarded around in its most literal sense.
13:44
advent: a5fd21a8e6 | (Ben Davies)++ | raku-advent-2022/articles/junction-transformers.md
Use a more up-to-date Kind example link
Nemokosch What is eigenstate? 13:55
El_Che the state of the eigen 14:07
moritz the values in a junction are its eigenstates 14:10
so any(1, 2, 3) => the eigenstates are (1, 2, 3)
El_Che ethymologie: partial translation of German eigenstand, from eigen- + stand state, condition 14:11
how convinient, moritz, how convinien
t
:P
japhb I suspect the more proximate history is a reference to eigenvalues and eigenvectors in linear algebra. 15:37
El_Che that's one way of looking at it 15:48
or not looking at it
¯\_(ツ)_/¯ 15:49
tbrowder one more question about rakudo star installation on Windows: preference on Choclatey or Scoop? 15:55
[Coke] I think I used choclately once and it was OK, but I typically build from source, sorry 15:57
Nemokosch I'm pretty sure eigenstates have only obscure relation (if at all) to eigenvectors and eigenvalues 16:10
smol-hors how can I make a hash compare keys with eqv? 17:13
nevermind it was an xy problem 17:20
and I figured out the x
Nemokosch I wonder if you can do that at all 17:21
But yeah consider value types
Like ValueList
smol-hors m: say -2 leg -1 17:49
camelia More
smol-hors oh 17:50
leg is for strings, right?
silly me 17:51
I wanted <=>
[Coke] smol-hors++ 18:00
smol-hors well here's my aoc day 9 problem 1 anyway github.com/esnk86/aoc22/blob/main/09/main.raku 🦋 18:01
lucs I like the idea of having (I'll be simplifying a bit here) a file "myscript.raku" that just has "use My::Module", where MyModule.rakumod has the MAIN() function. 18:40
But it seem that if I want a custom USAGE() function, it's not found if it's in the module file, but it is, if in the script file. 18:41
But it seems that if I want a custom USAGE() function, it's not found if it's in the module file, but it is, if in the script file.
How can I have it in the module file?
gfldex <@212055773407215616> did you try to put the proto MAIN into the module? 18:50
moritz iirc MAIN is designed to *only* run in the top-level script 18:57
tbrowder .tell [Coke] i get the aspell.t error on Ubuntu, too. 19:44
tellable6 tbrowder, I'll pass your message to [Coke]
lucs moritz: Turns out MAIN can get invoked the way I described it, but... 19:46
gfldex: ... I'm trying to reproduce the problem with two simple (kind of golfed) files to demonstrate the problem (where the module has a 「proto sub MAIN (|) is export {*}」 line), but something weird is going on, and the script hangs. 19:48
Will fix that first, and report then.
lucs Sheesh, I just got up from a nap, am I still asleep?: gist.github.com/lucs/672fb1e434cf1...5fbb233a43 19:57
(I must be doing something profoundly dumb there.) 19:58
guifa Xliff: you can override it by wrapping it 20:03
tellable6 guifa, I'll pass your message to Xliff
guifa It just depends on whether you want it to be global or local
Nemokosch bluntly put: MAIN does have issues, alas 20:09
lucs Can someone kindly go to the trouble of making those files from my gist and tell me if it works for them? 20:22
Nahita lucs: i do "raku myscript.raku" and get "USAGE() in myscript.raku" as the output 20:30
lucs <@836605577400549436> Aha. Good. That is the expected result. 20:32
I have no idea why it hangs here, strange.
Now, given that, is it possible to have USAGE() in the module file? 20:34
<@836605577400549436> Also: thanks for trying it.
Nahita np, if you mean uncommenting the USAGE sub in MyModule.rakumod, no it did not trigger; again i did "raku myscript.raku" and get "USAGE() in myscript.raku" as the output 20:37
lucs And if you comment out the one in myscript, but leave the one in the module uncommented, there will be no output, correct? 20:39
Nahita no custom output yes; the default Usage message appears like "Usage: myscript.raku <foo>" 20:45
lucs Oh, correct, yeah, I forgot, the default USAGE kicks in. 20:46
I want my custom one *snif* 20:46
El_Che lo 20:48
lucs hi
lucs goes to practice; back later 20:54
Nemokosch smol-hors: please consider sharing the solutions under github.com/codesections/advent-of-raku-2022 😛 22:16
smol-hors ok :)
I'm still stuck on problem 2!
works on the example but not the input
gist.github.com/esnk86/b8a84a38322...9fe7e9cccb 22:24
here's what I've got so far (spoilers)
Nemokosch in what regard is it broken? 22:53
smol-hors nvm, I got it fixed.. I'll post the finished version soon 23:52