🦋 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.
guifa m: True does False; say True 01:03
camelia Cannot use 'does' operator on an Int, did you mean 'but'?
in block <unit> at <tmp> line 1
tbrowder howdy 01:46
hope all are well. i have run into a raku execution problem with debian sudo: i can't get the rakudo-pkg paths working for it 01:49
i have one more thing to try first... 01:50
nope, didn't work. how can one get a raku script to work when executed with sudo? 01:56
El_Che tbrowder: sudo stripts your environment in case you're counting on that 08:13
you can add expections in the config
or sudo -E
Geth ecosystem: e66a1b7d17 | (Elizabeth Mattijsen)++ | META.list
Freeze RakudoPrereq

While it is being moved to the zef ecosystem
08:18
ecosystem: 9f00cf95f6 | (Elizabeth Mattijsen)++ | META.list
Remove Benchy and Wherelist

They live in the zef ecosystem now
08:19
p6steve glfdex, Voldenet: thanks! (sorry I went to bed) 08:20
m: my $a = 123;my $b = $a;say $a.WHERE, $b.WHERE;say $a.VAR.WHERE, $b.VAR.WHERE; 08:23
camelia 29104509994962910450999496
29104509994962910450999496
p6steve m: my $a = 123;my $b = $a;say ($a.WHERE, $b.WHERE, $a.VAR.WHERE, $b.VAR.WHERE).join('--'); 08:24
camelia 3452892611656--3452892611656--3452892611656--3452892611656
p6steve this does what I expected for '.WHERE' ... but I was expecting 2 containers for '.VAR.WHERE' (both different to each other and different to the contents) 08:26
my $a+=1;my $b+=1;say ($a.WHERE, $b.WHERE, $a.VAR.WHERE, $b.VAR.WHERE).join('--'); 08:27
evalable6 3755781027920--3755781027920--3755781027920--3755781027920
p6steve m: my $a=123;my $b=$a;$a+=1;$b+=1;say ($a.WHERE, $b.WHERE, $a.VAR.WHERE, $b.VAR.WHERE).join('--'); 08:28
camelia 2404183463608--2404183466560--2404183463608--2404183466560
p6steve my $a=123;my $b=$a;say ($a.WHERE, $b.WHERE, $a.VAR.WHERE, $b.VAR.WHERE).join('--');$a+=1;$b+=1;say ($a.WHERE, $b.WHERE, $a.VAR.WHERE, $b.VAR.WHERE).join('--'); 08:30
evalable6 5612187156928--5612187156928--5612187156928--5612187156928
5612188936016--5612188938968--5612188936016--5612188938968
p6steve ah - yes this is what I expected (now I grok that .VAR.WHERE is telling you the location of the contents) - so change both and get two new locations 08:33
and that this is a non guaranteed implementation detail of rakudo 08:34
Nemokosch by the way 08:38
what is the advantage of using any other backend but MoarVM?
lizmat some users require the JVM 08:40
El_Che inclusion with an specific ecosystem
lizmat re the JS backend... the idea that we could run in the browser... but I think that still need a lot of TLC
El_Che but I don't think the alternative runtimes are ready for primetime
Nemokosch I really don't know what it practically means to run code on the JVM, for example 08:48
like does this mean that you can make calls to Java libraries, like with Clojure for example?
lizmat I understand that that is possible to a degree, bartolin is the local JVM wizard, might know more :-) 08:49
El_Che your get libraries, more memory usage and face-to-face time with oracle lawyers :) 08:51
lizmat understand that the JVM backend was originally developed as a proof-of-concept of being able to run on multiple backends (other than Parrot) 08:52
Nemokosch Yes, this is somewhere along the lines the question 08:53
That it sounds nice in theory that you can target different backends but the way I understand, as it stands, there is little reason to use anything but MoarVM 08:54
lizmat I would concur, unless your *really* want the JVM 08:57
El_Che in you're in that ecosystem, it would be a great addition to stuff like kotlyn, groovy, jruby and the like 08:59
like when you need java stuff but prefer to program in a different lnaguage :) 09:00
Geth ecosystem: 0377b7489c | (Elizabeth Mattijsen)++ | META.list
Freeze Acme::Anguish

While it is being moved to the zef ecosystem
09:06
ecosystem: 0377b7489c | (Elizabeth Mattijsen)++ | META.list
Freeze Acme::Anguish

While it is being moved to the zef ecosystem
09:07
Nemokosch Yes, definitely
the browser-ish backend also sounds interesting - maybe by that time there will be a mature WASM 😄
El_Che I manage a few big java applications, so I think please no. 09:08
Nemokosch although I personally don't get the _urge_ to supplement JS in the browser, other than a kind of fairness assured in the biggest application platform (the browser) 09:09
time to rewrite them in Raku 😛 09:34
Geth ecosystem: c6b6bc5176 | (Elizabeth Mattijsen)++ | META.list
Freeze Games::TauStation::DateTime

While it is being moved to the zef ecosystem
09:41
tbrowder El_Che: thnx, that's part of the problem. if one installs raku with the official debian raku package, raku is sym linked to one of the standard bin locations so it is not a problem. 10:36
can not the rakudo-pkg do the same? 10:37
El_Che it would mean writing outside of /opt/rakudo-pkg what I would prefer not to do 10:44
create a link?
tbrowder can you provide in yr rakudo-pkg an optional link script which will "do the right thing" to get the same paths as the official debian package? 10:59
that would be very helpful for anyone creating such a raku pkg as mine 11:00
i can create it, but, imho, it would be much better coming from you 11:01
El_Che it can not be in the same path because it will conflict with the system supplied raku binary 11:02
the proper way should be adding it to sudoers eg in the secure_path key 11:03
or link to /usr/local/bin 11:04
but the sudo config will vary with distros
tbrowder hm, that sounds good. i'm involved in a debian users email discussion on what is the "correct" way to do that 11:05
and there are lots of varying answers
but still, 11:06
i like the /usr/loca/link idea better... 11:08
thnx
tbrowder El_Che: would you consider having yr rakudo-pkg instructions showing the approriate sym links for yr pkg executables? 11:15
Geth ecosystem: 9f742d52f3 | (Elizabeth Mattijsen)++ | META.list
Freeze Trait::IO

While it is being moved to the zef ecosystem
11:18
Xliff Do we have a .touch for IO::Path? 11:47
Something that just updates the modification time without modifying contents? 11:48
Nemokosch I can't see one but you know that it's easy to just call shell utilities, right? 12:34
I was also missing something a couple of days ago - the target of a symlink 12:36
eventually I just parsed it from the output of ls -l 😄
lizmat Xliff: seem to recall having made a PR for that once, wasn't accepted 12:38
but that was then and this is now
Xliff Nemoko: Yeah, I may just look at the source and port it.
lizmat: Hummm... lemme see if I can find it. 12:39
Thanks.
lizmat .spurt("", :a) should do it ?
Xliff Huh. OK. 12:40
lizmat I mean.. the code would be trivial 12:44
nine lizmat: wouldn't .open(:a) do as well then?
lizmat .open(:a).close then
nine If you want to be tidy :)
Geth ecosystem: 8ecd652556 | (Elizabeth Mattijsen)++ | META.list
Freeze Proc::Q

While it is being moved to the zef ecosystem
12:50
[Coke] . 13:08
tellable6 2022-05-16T02:54:38Z #raku <jdv> [Coke] ok
tbrowder .tell El_Che i have a link script i'm trying now. it seems to solve the problem. i'll put it with my module until/unless you do smething similar with rakudo-pkg. 13:15
tellable6 tbrowder, I'll pass your message to El_Che
Xliff lizmat/nine: Can confirm that { est".IO.open( :a ).close } works!. Thanks 13:17
Erm... that's { "test".IO.open( :a ).close } 13:18
rjbs What's the compact means to get a finite range with a non-one step? Like "all odd numbers from 1 to 999" 13:57
lizmat 1,3 ... 999 13:59
rjbs Thank you!
lizmat rjbs: and hi! :-)
rjbs Hi! I'm still not doing much Raku, but was showing some of it off to the JavaScript team at work this week. It's still nice. :)
lizmat thank you... 14:00
rjbs Honestly, I'm doing very little programming these days. ;_; 14:09
lizmat yeah... caught in the managerial role... :-) 14:10
was caught in that once for ~ 5 years.... made sure it would never happen to me again :-) 14:11
Xliff lizmat: Ouch. 14:15
lizmat I'm no good as a manager 14:16
Xliff m: (1, 3, 7, 11...999)[^10].say
camelia (1 3 7 11 15 19 23 27 31 35)
Xliff m: (1, 3, 6, 10, 15...999)[^10].say 14:16
camelia Unable to deduce arithmetic or geometric sequence from: 6,10,15
Did you really mean '..'?
in block <unit> at <tmp> line 1
lizmat yeah... there's a lot of those in ... 14:17
Geth ecosystem: 42dc82c804 | (Elizabeth Mattijsen)++ | META.list
Freeze Proxee

While we move it to the zef ecosystem
14:18
rjbs lizmat: I enjoy a bunch of management stuff, but I also miss having more time to build. 14:20
lizmat I surely hope you don't need to do performance evaluations :-)
uzl[m] rjbs: What neat Raku feature were you showing off? 17:28
rjbs uzl[m]: Nothing a Rakuist would find too exciting. :) The construction of ranges with ^ 17:52
It came up because a coworker was lamenting that JS lacks a good Range, and so had implemented something. Some folks got to talking about a (x..y) syntax as a proposal for JS, and I said, "If you think *that*'s cool..." 17:53
El_Che hehe 18:53
nice
tellable6 2022-05-20T13:15:17Z #raku <tbrowder> El_Che i have a link script i'm trying now. it seems to solve the problem. i'll put it with my module until/unless you do smething similar with rakudo-pkg.
sjn installs 2022.04 :-) 19:05
El_Che sjn: ubuntu? 19:08
:)
[Coke]_ Folks, my network is SUPER spotty these days, so please .tell me if needed. 19:10
El_Che .tell [Coke]_ your network is spotty 19:12
tellable6 El_Che, I'll pass your message to [Coke]_
[Coke]_ ... You might want to tell me with the _. :)
*without 19:13
... I can't rename myself. wtf.
Voldenet now you can 19:15
[Coke] ? something with my account, or the channel, or... 19:15
sjn El_Che: 2022.04, running on 22.04, yes :-) 19:16
El_Che that's a winning combo 19:20
Voldenet [Coke]: it's just that irc is made for slow connections, so they don't timeout immediately and old connection keeps the nick ┐(´~`;)┌ 19:22
[Coke]_ Voldenet++ 19:23
You would think that providing credentials again would trump that, ah well.
tbrowder El_Che: i'm a bit confused as usual.m 19:55
when installing a ne
tbrowder when installing a new instance of rakudo-pkg, is zef installed with it? 19:56
El_Che yes and no :)
there is a system wide zef, for root
tbrowder if you
El_Che installed
and a script to install a user one in your home
the 2nd is the raku way
the first may be handy where it does not matter, like a docker container 19:57
installing modules in your home may be weird compared to e.g. perl
but it's a lot nicer
nuke the dir and you're in a new situation 19:58
new new
:)
tbrowder ok, so when i do linking, i should not try to link the zef part
tbrowder unless i don't find it already in /root 19:59
El_Che no
only raku
tbrowder thnx
Xliff Is it possible to create a sequence of random enums where the first n are predetermined? 20:35
lizmat enums are compile time... so... is that what you want ? 20:37
Xliff Huh... this seems to work. 20:43
m: enum Alpha <A B C D>; class PredetNEnums does Positional { has @!predet is built; submethod BUILD (:@!predet) { }; method new (*@predet) { self.bless( :@predet ) }; method AT-POS (\k) { return @!predet[k] if k < @!predet.elems; @!predet.head.WHAT.enums.pick.key }; }; my $a = PredetNEnums.new(A, B, C, D, D, A); $a[^10].say
camelia (A B C D D A A C B B)
patrickb \q 20:49
tbrowder El_Che: i hate to keep bugging you, but now i'm not seeing the root's path to its zef in its home dir :-( 21:05
Voldenet m: enum Alpha <A B C D>; role NextRandom[\E] does Positional { method AT-POS ($k) { $k < self.elems ?? (nextsame) !! E.pick.key }; }; my $a = (A, B, C, D) but NextRandom[Alpha]; $a[^10].say
camelia (A B C D A B C B B C)
tbrowder afk& 21:05
Voldenet the same as above, but hackier
tbrowder for honey do's
Voldenet m: enum Alpha <A B C D>; role NextRandom[\E] does Positional { method AT-POS ($k) { $k < self.elems ?? (nextsame) !! E.pick }; }; my $a = (A, B, C, D) but NextRandom[Alpha]; $a[^10].say 21:08
camelia (A B C D D B A A D B)
Voldenet m: enum Alpha <A B C D>; role NextRandom[\E] does Positional { method AT-POS ($k) { $k < self.elems ?? (nextsame) !! E.pick }; }; my $a = (A, B, C, D) but NextRandom[(A, D)]; $a[^10].say
camelia (A B C D D D D A D A)