🦋 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.
[Coke] your PATH is a shell thing, not a homebrew thing? 00:03
What problem are you trying to solve here?
when installing rakubrew, at some point you are either told to run rakubrew init, or it does so, at which point it gives you instructions on how to make sure rakubrew is in your path 00:05
(which in my case was "add some stuff to my .zshenv file so I get a rakubrew function in zsh."
that is, `which rakubrew` is 'rakubrew() { ... }', not an executable 00:06
"rakubrew is not working" - can you share your current blocker? getting rakubrew working is the way to go, based on my experience. 00:07
00:29 jpn joined 00:34 jpn left 01:17 Chanakan joined 01:25 jpn joined 01:28 Chanakan left, Chanakan joined 01:29 jpn left 01:32 kylese left, kylese joined
SmokeMachine I'd like to know if anyone have any opinion about this: github.com/FCO/Functional-LinkedList 01:36
02:06 guifa joined
guifa o/ 02:06
Xliff SmokeMachine: Not bad. A bit too strict for my current uses, but we'll see what the future holds. 02:11
Heya, guifa.
02:15 kylese left, kylese joined 02:18 guifa left 03:19 Xliff left 03:32 kylese left, kylese joined 03:50 Sgeo_ joined 03:54 Sgeo left 04:15 Aedil left 04:25 Aedil joined 05:55 jpn joined
SmokeMachine :) 05:57
06:00 jpn left
SmokeMachine X 06:31
Xliff: why is that too strict? Do you mean performance wise? 06:32
tellable6 SmokeMachine, I'll pass your message to Xliff
07:02 jpn joined 07:07 jpn left 07:13 Woodi left 07:45 kylese left 07:46 kylese joined, jpn joined 07:51 jpn left 08:06 eseyman left 08:08 sena_kun joined
lizmat SmokeMachine: how does that relate to any of the Concurrent:: modules: raku.land/?q=concurrent ? 08:18
09:31 jpn joined 09:53 Sgeo_ left
librasteve ingy: I see your feedback on TPRC - it seems that the folks like me who feel "no enough R in TPrC" have a way to fix it - I 100% trust the motives and thank those that are doing a thankless tast - thank you for your patience and for your explanation - it is up to us to fix it 10:10
SmokeMachine lizmat: I dont think they are related besides both being thread safe... mine is thread safe because its a functional/persisteht data structure {en.wikipedia.org/wiki/Purely_funct...structure) instead of using 10:40
CAS
and the previous "version" of the that structure keep exixting... so if you have a linked list 1 -> 2 -> 3 and do a unshift()it will return a new object 10:42
and the previous "version" of the that structure keep existing... so if you have a linked list 1 -> 2 -> 3 and do a unshift(10) it will return a new object with value 10 pointing to 1: 10 -> 1 -> 2 -> 3; if you shift, it will return you the node with value 1 (and the value 10). if you set list[1] = 20, instead of changing the value 2 to 20, it will create a new node with value 1 pointing to a new node with value 20 pointing to the 10:49
old node with value 3 and return that new node with value 1... so, if there are variables still pointing to the old node 1, it will stil be the same (1 -> 2 -> 3), if there are still variables pointing to the node with value 10, the list still exists and is the same... and the new node 1 will have this new list...
lizmat: ^^ 10:53
lizmat ok :-) 10:54
SmokeMachine make sense? 10:55
lizmat yeah 10:56
SmokeMachine and on my implementation of functional linked list (all add that on the other future functional datastructure I will implement) there is a `.mutate()` method that receives a block where the data structure will work as if it was mutable... 11:00
"as if it was mutable"
where the obj is topicalised and everytime a new obj whould be returned, it is topicalised instead... 11:02
so, it you have 1 -> 2 -> 3 and do a `.unshift: 10` inside the mutate block, it will create a new node with value 10 pointing to the node 1 and set $_ to the new node... 11:04
tbrowder can some mac person using homebrew please do “which zef” and report the path shown? thanks so much. 11:05
SmokeMachine /Users/fernando/.rakubrew/versions/moar-main/install/share/perl6/site/bin/zef 11:06
oh! you said homebrew and not rakubrew... sorry
tbrowder: doesn't that first manual installation work fir you? raku.land/github:ugexe/zef 11:16
11:20 wayland left, wayland76 joined
holmdunc IIRC zef is included with the rakudo-star Homebrew package but not with the rakudo one 11:29
11:30 jpn left 11:31 jpn joined 11:36 jpn left 11:37 itaipu left 11:39 itaipu joined
tbrowder ah, ok, thanks! i wonder why not? 11:41
that worked great! 11:46
11:53 sena_kun left 11:55 sena_kun joined
tbrowder well, not so great. i installed App::Rak and its bin prog rak. but rak can’t be found in the default path. 11:56
11:57 guifa joined
tbrowder so, the unresolved question no one has yet answered: how does one add a non-brew-installed bin file path to $PATH on a mac? 11:58
lizmat I have rakudo/install/bin and rakudo/install/share/perl6/site/bin in my PATH= 12:00
tbrowder yes, but in what file are you setting it? 12:02
lizmat ~/.zshrc 12:05
tbrowder ah, are you a bash or zsh user? default i think is zsh. 12:06
i an using bash
12:06 jpn joined
tbrowder *am 12:06
holmdunc ~/.bash_profile then probably 12:08
echo $(brew --prefix rakudo-star) should get you the first half of the path to add 12:09
tbrowder ok
12:11 jpn left
tbrowder now i see prob with rakudo-star: newly zef-installed bin files go into a path with the version in it. dang it 12:24
SmokeMachine just if someone is curious... the Functional::LinkedList can even be a bit faster than arrays in a very specific case: usercontent.irccloud-cdn.com/file/.../image.png
(thats only because `.shift` only returns the $!next node... 12:26
lizmat and if you revert the start statements ?
you should probably use now - ENTER now :-) 12:27
SmokeMachine lizmat: like this? usercontent.irccloud-cdn.com/file/.../image.png
lizmat could you do it again with "now - ENTER now" instead of "now - INIT now" ? 12:28
SmokeMachine with enter it's very different... usercontent.irccloud-cdn.com/file/.../image.png 12:29
holmdunc tbrowder: If I install App::Rak then the executable is located at $(brew --prefix rakudo-star)/share/perl6/site/bin/rak 12:30
SmokeMachine but fi dont get why the faster (usual arrays) are being printed after the ll
usual is starting after? 12:31
lizmat SmokeMachine: the INIT time is when 'my $runs = 1000" is executed
so you were looking at how long it took to do the initialization and *then* whatever difference the shifts did
SmokeMachine usercontent.irccloud-cdn.com/file/.../image.png 12:32
lizmat and the "usual" case started later than the "functional" case, so was at a further disadvantage
SmokeMachine yes, but I was counting that both starts whould start at "the same time"... 12:33
lizmat that's more like what I expected :-)
no, "start" basically just pushes a job into a queue
12:33 wayland76 left
lizmat and that takes a little time 12:34
SmokeMachine but if I have more that one processor, shouldnt both kind of start at the same time?
lizmat you will have to go at great lengths to be able to beat @b.shift
no
SmokeMachine is @b.shift as optimised as that? 12:35
lizmat the first job will be given to a thread, and if there isn't one available yet, will first need to create a thread
SmokeMachine hum... makes sense... 12:36
lizmat also, if the workload is tiny, there's a good chance the worker thread will be finished before the pool manager gets to schedule the next job
so in the end they'll run serially 12:37
you can test this by printing $*THREAD.id
12:37 wayland76 joined
tbrowder holmdunc, good. is zef in the same place? 12:38
SmokeMachine lizmat: it seems you are correct: usercontent.irccloud-cdn.com/file/.../image.png 12:39
lizmat SmokeMachine: yeah, when developing ParaSeq I did a lot of testing on that :-) 12:40
SmokeMachine the difference was not all that big now...
lizmat what if you increase $runs to 1_000_000 12:41
?
12:48 jpn joined
SmokeMachine it almost break my iterm... :) 12:48
lizmat SmokeMachine: and the numbers ? 13:04
SmokeMachine it consumed so much resources I had t stop... 13:05
lizmat oops, sorry
tbrowder holmdunc: if you are using .bash_profile to finalize your exported $PATH, could you please show me its exact contents? i’m not sure how to chain eval path fragments into the final exported $PATH env var 13:06
13:06 jpn left
SmokeMachine for 10_000: usercontent.irccloud-cdn.com/file/.../image.png 13:08
ugexe for something like a linked list i'd honestly expect a non-parallelized version to generally be faster
lizmat SmokeMachine: also, why run the tests in parallel? Why not serially without the promises / starts ? 13:10
13:10 jpn joined
lizmat you're not testing any parallelisms this way? 13:10
SmokeMachine on this cas it tends to be slower the closest to the end you 'edit ' a node, because it will create all the beginning nodes again... but that's not the case on these examples... that's only returning the next node... 13:11
yes...i can run that serialised... 13:12
now I have to collect my kids from school 13:13
holmdunc tbrowder: export PATH="$(brew --prefix rakudo-star)/share/perl6/site/bin:$PATH" 13:19
tbrowder thank you very much! 13:27
ok, i had to add the “eval $(blah brew blah)” as the first line and all is well. installed App::Rak and App;:Mi6 and i can execute rak and mi6. 13:42
holmdunc: very cool! thank you again! gotta get that on the rakudo.org site somewhere (*unless it’s there and i missed it—which is very likely*) 13:46
13:46 thaewrapt left
holmdunc you're welcome - glad it's working 13:52
tbrowder now for my next conundrum for my mac: using lizmat’s rak to emulate *nix “locate” on mac. how do i “locate -i some-string” where “some-string” is a part of a valid *file path* (not case-sensitive) on the mac host’s file system accessible to read by the user. 14:03
14:30 jpn left 15:13 jpn joined 15:19 jpn left 15:30 jpn joined
tbrowder okey-bdoke and eureka: “rak —find FreeSerif” did the trick on mac (i want case respected for that search) 15:31
can use “—ignorecase” option 15:43
also tried to speed search by option “—repository=/Library/Fonts” but didn’t see significant speedup. i’ll try timings 15:46
it seems all options took about the same time. maybe because of all the hidden symlinks. 15:54
[Coke] if there are special instructions for a homebrew install of rakudo, they should be displayed when installing via homebrew. 15:57
16:02 manu_ joined 16:03 manu_ is now known as eseyman 16:04 jpn left 17:08 Sgeo joined 17:11 soverysour joined, soverysour left, soverysour joined
librasteve o/ 18:47
sorry to chime in so late in the day, but I have found homebrew (along with apt-egt etc) to be way behind the latest raku ... otoh, I stated on rakubrew (mac and ubuntu) and never looked abck!! 18:48
kcab
18:53 soverysour left 18:54 soverysour joined
soverysour does anyone know if there's been any interesting magic done with raku + logic programming? 18:57
librasteve discord.com/channels/5384078799804...2623018054 19:06
^^ this thread from a couple of weeks back - pretty inconclusive but may give you some start 19:07
19:07 soverysour left 19:08 soverysour joined
soverysour thanks 19:12
librasteve ;-) 19:14
19:21 abraxxa-home joined 19:23 abraxxa-home left 19:26 abraxxa-home joined
tbrowder [Coke]: i didn’t see anything about how to add the zef 19:26
path to .bash_profile 19:27
19:38 thaewrapt joined
tbrowder the zef-installed executables 19:40
path
lucs tbrowder: Maybe you're referring to ZEF_CONFIG_STOREDIR and ZEF_CONFIG_TEMPDIR? 19:42
ugexe it would be a lot easier for you if you just follow the instructions on rakubrew.org exactly, including following any instructions the commands the instructions tell you to run emit 19:44
i assure you if you follow the steps exactly it will work, including setting up the PATH for zef installed executables 19:45
20:39 soverysour left 20:46 rypervenche joined
guifa meh I still need to get logic stuff done 21:02
[Coke] who is managing homebrew rakudo? 21:13
rakudo-star says it's conflicting with **parrot**
anyone know who chenrui333 is? 21:17
guifa weekly: news.perlfoundation.org/post/new-s...of-conduct 21:20
notable6 guifa, Noted! (weekly)
guifa (they might fix the spelling down the road)
[Coke] guifa++ thanks 21:32
guifa (I volunteered for it for a few reasons, but mainly I wanted to ensure some Raku representation. And also help out if there's a lot of recusals, as the SoC has a very broad --and required-- recusal rule) 21:34
tbrowder ugexe: when i get a chance i’ll do it again, and check closely, but my chang e to bash in the process may interfere with the cli responses. 21:42
antononcube @guifa I read initially "[...] help out if there's a lot of rascals [...]" 21:44
This reminds me -- I have to go back finishing the code-of-conduct classifier I started two years ago. 21:46
This time should be LLM-powered..
tbrowder in the meantime i have a good running system and find that in testing mac for locate is slightly different from linux and one has to run sudo /usr/exec…/locate.updatedb in the yml file to get it to work. 21:47
at least for things added during the tests 21:51
quite diff from linux 21:52
antononcube @tbrowder: Find yourself here: 21:54
cdn.discordapp.com/attachments/633...3f346&
22:17 abraxxa-home left 22:25 cm left 22:34 cm joined 23:15 wayland76 left 23:16 sena_kun left