🦋 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.
Howsthat I want to program in Raku and use Cro, but I'm stymied because my computer is a MacBook Pro running Monterey 12.2.1 and the Apple M1 chip. Because of this, I can't get zef to work, and Cro installs but gives me the notorious warning "rakudo is loading libcrypto in an unsafe way." Has anyone solved these problems? I've tried several solutions on 02:13
StackOverflow, but no one has the same hardware or OS. I just need to be pointed toward a published solution for Mac, Monterey, M1.
Geth docker: sorairolake++ created pull request #47:
Update Rakudo Star and base images
08:37
CIAvash weekly: www.reddit.com/r/rust/comments/tbu...e/i0am71b/ 09:00
notable6 CIAvash, Noted! (weekly)
El_Che CIAvash: you answer is great 09:11
CIAvash thanks
razetime > {($^a) Z+ ($^b)}((1, 2, 3), (4, 5, 6)) 10:48
(6)
> (* Z+ *)((1, 2, 3), (4, 5, 6))
(5 7 9)
why are these two results different?
nine m: say {@^a Z+ @^b}((1, 2, 3), (4, 5, 6)) 11:05
camelia (5 7 9)
nine razetime: ^^^
razetime oh. right.......
Nemokosch bang 11:15
p6steve m:class c {has $.a=42} my $k='a'; my $i=c.new; say $i.a; 12:08
evalable6 (exit code 1) 4===SORRY!4=== Er…
p6steve, Full output: gist.github.com/2d74803e95f6c27b9a...4b76ed6bd1
p6steve m:class c {has $.a=42}; my $k='a'; my $i=c.new; say $i.a; 12:09
evalable6 42
p6steve ok - that works ... I have a dumb question "(how) can I use a variable as method name (not with EVAL)"? 12:11
p6steve m:class c {has $.a=42}; my $k='a'; my $i=c.new; say $i."$k"; 12:11
evalable6 (exit code 1) 4===SORRY!4=== Er…
p6steve, Full output: gist.github.com/296f377c94f988780a...402e6bef8d
lizmat m: class c {has $.a=42}; my $k='a'; my $i=c.new; say $i."$k"(); 12:24
camelia 42
lizmat p6steve: you need the ()
lizmat m: sub MAIN(|c) { dd c }; @*ARGS = "-1" # meh 12:50
camelia \("1" => Bool::True)
lizmat leont ^^ thoughts? 12:51
p6steve class c {has $.a=42}; my $k='a'; my $i=c.new; say $i."$k"(); 13:50
evalable6 42
p6steve aha - no I know the answer I can find it in the docs docs.raku.org/language/packages#In...into_names 13:51
.^dumb 13:52
hmmm 'A."$m"()' is searchable in the docs.raku.org lookup box, but the resulting page docs.raku.org/language/packages#in...%22$m%22() seems to be missing this piece 14:01
lizmat time for a doc issue :-) 14:07
p6steve github.com/Raku/doc/issues/4042 14:09
lizmat p6steve++ 14:15
Whaaat = Prince of Cows#5266> how do I ask you a question @raku-bot#6099 ? 15:54
Prince of Cows#5266> hello everyone
Prince of Cows#5266> hi @Rogue#2017
martinthewildpig sup 16:33
[Coke]_ Hello. 17:03
CIAvash weekly: Rakudo and zef completions for fish shell 3.4.0 twitter.com/CIAvash/status/1502712984635904000 18:30
notable6 CIAvash, Noted! (weekly)
leont lizmat: I'm not sure what your question is? 22:07
jdv i think i saw recently that Hash doesn't do standard MOP (not straightforward to subclass) was on purpose. iirc that would be wrong. 22:27
vrurg jdv: You're likely to be confused with something else 22:30
m: class MH is Hash { }; my $mh = MH.new((a => 1, b => 2)); say $mh; say $mh.WHICH
camelia {a => 1, b => 2}
MH|3639385253440
jdv i had a ticket about it a while ago 22:31
i think 22:32
vrurg Hash is hard-coded in many places in the compiler. This might be a problem for some tricks, perhaps? 22:34
jdv github.com/rakudo/rakudo/issues/3704 22:35
one of the original ideas was that core classes were not special/different - in contrast to tie and stuff in Perl for example
oops. dinner. sorry & 22:38
vrurg They're special in a way. As the most used ones they need extra optimizations. Sometimes at the cost of some usability. So, if you want attributes while inheriting from some core classes – you can do it manually, by overriding method new.
vrurg I barely expect anything to change here because it would pose significant slowdown of object creation for core classes.. 22:39
theangryepicbanana is there a way to do something like `role Foo[Array[::T]] { ... }` in raku without having to specify `::T` beforehand? 23:33
lizmat leont: should command line arguments of the form "-123" be considered an IntStr of a negative Int value, or a boolean flag called "123" 23:46
leont There's rarely one true way in argument parsing 23:47
There's precedent for the former though. I think I have seen -0 to indicate using null-byte as record separator. 23:49
Most cases I know of that use hyphen-number as a command line option actually use the number itself as the argument (e.g. head -2 filename)