🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
japhb tbrowder: The one with the higher API or version? Unless you've been specifying auth in your use statements, in which case you'll run across the problem that fez requires the 'zef:' prefix on auths for uploaded dists. 00:00
(Because fez has a naming authority) 00:01
Geth doc: 9654f5bdf2 | (Richard Hainsworth)++ (committed by Juan Julián Merelo Guervós) | doc/Type/Proc.pod6
Insert missing target into Proc #3841

  `Type/Independent-routines` contains a reference to `Proc#sub_run` but `Type/Proc` does not contain any target for `run`.
So I have inserted a X<> around the first explanation of `run` in Proc. This provides a target for Independent-routines (also opening separate PR with new target)
BUT, for consistency, `run` should be listed as sub along with `new` and `shell`. Also relationship with new should be illustrated. This is not done in this PR.
05:31
linkable6 Link: docs.raku.org/type/Proc
lizmat clickbaits rakudoweekly.blog/2021/04/05/2021-...ting-rats/ 08:48
El_Che floating rats :) 08:57
Geth Raku-Steering-Council/main: 7e8b590216 | (Elizabeth Mattijsen)++ | minutes/20210320.md
The minutes of RSC meeting on 20 March 2021

A little late, I know.
09:00
[Coke] Problem installing DOM::Tiny on windows with zef, getting a "failed to rename" when dealing with a precomp folder, "operation not permitted", on windows. with 2020.11-xxx 15:33
PimDaniel \o 15:47
tellable6 2021-04-03T12:07:48Z #raku <lizmat> PimDaniel: looking at that code example, it should
samebchase- Assume I have a Supply where events are being sent. Now, if there is more than say 2 seconds between events, then we have to trigger a timeout. The thing is, I want this to run in a loop indefinitely. What's the best way of modeling such situations? 16:04
Ideally, I would need something like Promise.anyof, but for two supplies, one is the event supply, and the other is a timeout supply. If an event comes before the 2 second timeout, I want that timeout message to be discarded, and start the timer again, so to speak 16:05
In danboykis.com/posts/core-async-timeout-channels/ we see that the `alts!` function is being run on two separate channels, one is `c` and the other is a timeout channel. Basically, it's a race between two channels. Only one message is processed, the other is discarded. 16:06
In core.async that code can be run in a loop, and on each loop iteration it will run the race between both channels 16:07
samebchase- The problem I am having with react/whenever is that I'm not finding a way to do a race between two supplies. BOTH messages are getting consumed. I want to discard some messages based on the result of the race. I hope I'm making sense. 16:08
I tried using modules.raku.org/dist/Supply::Timeout:cpan:CONO , but maybe I'm using it wrong 16:13
japhb You've got a bit of an XY question going there. I'm not sure if you're curious how to "race supplies", or how to determine that it's been 2 seconds between events. One possible way of doing the latter is docs.raku.org/routine/stable . 16:18
samebchase- japhb: The XY question did strike my mind when I was asking this question. 😂 What I am trying to do is implementing the timeouts for Raft. I did use stable earlier, by doing a merge between the "events" supply and the "timeouts" supply. That did work, but it wasn't getting fired in the case where no events come in the "events" supply. stable() 16:24
was ensuring that I could do something every time there is X time elapsed between events, but in the case where there are no events at all, I still want a timeout to occur at that point
With stable I was able to get half the problem sorted 16:25
japhb Well it's hackish, but you could always arrange to send a dummy event down the event supply whenever stable fires. 16:29
samebchase- japhb: yup I could do that! I was just wondering if there's a more elegant way to model these problems 16:30
samebchase- A few days ago I stared at the documentation of stable(), and I just could not make sense of what it was trying to convey. I did the monkeys-on-a-typewriter thing, and something finally stuck. 16:31
japhb: if you had to implement the timeout logic, what would you reach for? would you try and write your own version of some function like stable() which does what you want, or is there an easier way to do this 16:32
samebchase- Or it might be better if I hack up something based on stable(), and at least get it working how I need, and then refine it later. 16:35
japhb The only time I've needed a similar kind of timeout functionality was in this code: github.com/ab5tract/Terminal-Print...t.pm6#L145 -- I used a stable timer (lines 146-148) that I would repeatedly silence by emitting a timestamp into it (lines 234-239), so if I ever failed to silence it in time, the timer would fire. 16:55
kawaii Has anyone had any luck getting Cro installed on Windows? I've only ever installed it on Linux which simply requires the build-essential package but I guess I'm stuck in endless dependency hell on Windows or something. www.irccloud.com/pastebin/DFWisckk/ 17:18
samebchase- japhb: Nice! Thanks for the link. "Silencing a timer" this sounds like exactly what I am looking for. 17:20
PlayPause9 @tyil Is that you? The one helping WhiskedIgloo on Reddit with Raku? 17:54
tyil I think I am, yes 17:55
if its posted by tyil on reddit :>
PlayPause9 Yeah, you're helping me. Well, here I am.
tyil :D
PlayPause9 :) 17:56
[Coke] any alternatives to DOM::Tiny in the ecosystem? 18:29
[Coke] is there a way to write "return %hash<path><to><nested> if %hash<path><to><nested>:exists without duplicating the keys? 18:39
codesections m: my %a; %a<b><c><d> = 42; say do with %a<b><c><d> { $_ } 18:42
camelia 42
codesections does that do what you're looking for?
m: my %a; %a<b><c><d> = 42; say do with %a<b><c><nope> { $_ }
camelia ()
Doc_Holliwood "Rakudo runs on MoarVM and the Java Virtual Machine (JVM)." 19:01
can you use java objects though?
[Coke] codesections: might work, will try. thanks 19:10
PlayPause9 I'm trying to set up Visual Studio Code so I can use it as my IDE for my Raku programming. What is the path to the perl6 executable? 19:43
ionsolo try >$ whereis raku on your bash 19:44
$ whereis raku 19:46
but also you should try the comma ide, there is a lot effort of the community on it
commaide.com/
PlayPause9 Oh right. Alright. 19:47
I've never successfully installed Comma. It doesn't show up as an installed program in my start menu. I always have to go to the terminal and do some kind of comma.sh thing 19:48
Is that normal?
El_Che yes 19:58
intellij is like that
you can generate a app shortcut for the menu from within intellij/comma
Or maybe not anymore 20:00
let me have a look
mmm, it seems gone 20:02
it's there 20:03
Tools - Create Desktop Entry
the installer normally takes care of that, but you can always (re-) create like that
PlayPause9: ==^
PlayPause9 I'm trying to use Comma but I don't know how to run any of the code I write. A little help? 20:24
I made a new file. I don't know how to compile it though. 20:26
kawaii PlayPause9: `raku yourscript.raku` in your terminal?
PlayPause9 kawaii Yeah, I tried that. It tells me "no such file or directory". 20:31
You mean the terminal in Comma itself, don't you?
kawaii no, I've never used that terminal, I mean a terminal cd'ed into the same location as your script 20:32
PlayPause9 Oh right.
kawaii I would expect Comma's own terminal to be in the context of whatever file you're writing but who knows 20:33
PlayPause9 Yeah, Comma saved my file in a weird place. It's in some kind of hidden folder, ".config". I guess I could move the file somewhere more comfortable and try to compile it from there
But then why is Comma saving my files in such a strange place?
The project folder is in a nice, easy-to-spot place but the files aren't. 20:34
PlayPause9 No, no, no, I think what I'm saying might be appear a bit confusing. 20:34
kawaii did you make a "new project" in Comma or just open it and somehow make a file? 20:35
i.imgur.com/fgg9lXq.png
this is how mine looks
I made a new project called 'test'
and it chose a sensible location itself
PlayPause9 I made a Project called "ForTests" and I can see, in /home/myname/, a folder called "Comma Projects" and, in that folder, "ForTests". That's intuitive. Why the project files are kept within folders within the hidden .config folder is odd. 20:36
PlayPause9 I believe I made a new project called "ForTests" however, I kept working with the "scratch.p6" file that was there when I first opened up Comma. 20:37
kawaii Perhaps you misclicked something, my project files get saved in the project directory themselves - not a subdirectory or anywhere else
Ah I think scratch files are something specific to Comma and not stored with your project, that is if you used the "create new scratch file" option PlayPause9 20:38
PlayPause9 Oh okay, thank you kawaii 20:41
kawaii i.imgur.com/X7mdHC4.png
PlayPause9: if you choose Raku script/module from this menu, you'll probably get something in the actual directory itself
PlayPause9 You know, when I first installed Comma, I was having some issues with Raku. I had to do "rakudo" in the Linux terminal to compile Raku code. I couldn't just "raku". Do you think it's possible my installation of Comma is weird because of this? 20:46
I'd like to uninstall and reinstall it but idk if that's necessary.
Because yeah, Comma keeps saving files in a weird place.
[Coke] I've never had that issue. I'd probably do a reinstall at this point if I were you, just in case. 20:48
PlayPause9 Yeah, alright. I'll do that in time.
Thanks everyone.
[Coke] good luck.
demostanis[m] I made a PR, reviewers advised a change, now it breaks everything 21:04
😔
MasterDuke but it doesn't break for you locally? 21:06
demostanis[m] it wasn't because 3rdparty was already configured 21:10
so I hadn't realized
demostanis[m] was* 21:14
I can't figure out why it doesn't work for now, I'm not on my computer 21:20
It's probably a bad escape in the written Makefile.config 21:24
codesections Interesting: if I skip past them in the first iteration of a loop, `state` variables never get initialized 23:30
m: for ^5 { next if $_ == 0; state $n = 'a'; say $n++ } 23:31
camelia 0
1
2
3
codesections I'm not sure if that's _wrong_, exactly, but it surprised me (and doesn't quite match the docs, which say "initialization happens exactly once, the first time the initialization is encountered in the normal flow of execution") 23:33
raydiak m: for ^5 { next if $_ == 0; state $n = "a"; say $n } 23:37
camelia (Any)
(Any)
(Any)
(Any)
raydiak I would think that's very wrong, imo 23:38
codesections Yeah, it certainly surprised me
maybe I should see if there's an issue for it/open one 23:39
raydiak m: for ^2 { next unless $_; state $n = "a"; say $n }
camelia (Any)
raydiak bisectable6: for ^2 { next unless $_; state $n = "a"; say $n } 23:40
bisectable6 raydiak, Will bisect the whole range automagically because no endpoints were provided, hang tight
raydiak, ¦6c (52 commits): «(Any)␤»
raydiak, Nothing to bisect!
raydiak I'd report it