🦋 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.
Xliff guifa: github.com/rakudo/rakudo/blob/raku...ors.t#L174 -- I don't know if custom ops are supported, yet. 00:03
guifa Ah okay, so you just apply it as if it were a postfic 00:04
that's I think what was throwing me off. 00:06
guifa Also it's interesting that you can do method calls via both dotty infix and as a postfix call. 00:06
jaguart @Nemokosch#9980 - a slug is a usually readable word-like unique id - often used in a url - so 'raku' is already taken at StackShare, but the language doesn't show up in programming languages etc. 00:48
guifa Xliff lizmat: success! I just got a fully working RakuAST version of Intl::Format::List working. Only 200 lines to replace 25 hahahaha. But definitely a great introduction to RakuAST 02:29
But I think I could have the Intl::Format::Number converted very quickly now 02:31
Is there a good way to have a module released with a RASTy and non-RASTy version coexisting? I guess I could check for %ENV<RAKUDO_RAKUAST>, but the RakuAST::* will bomb on compile before the check would go into play 02:33
lizmat guifa: well, you could put the code in a Q:to/SOURCE/ block at BEGIN time, so you'd have more control 09:09
leont r: class Foo { has Order @.orders; }; my %hash = orders => Array[Order].new; Foo.new(|%hash) 10:28
camelia Type check failed in assignment to @!orders; expected Order but got Array[Order] (Array[Order].new())
in block <unit> at <tmp> line 1
Can't open perl script "/home/camelia/rakudo-j-inst/bin/eval-client.pl": No such file or directory
leont Is that a bug, or am I misunderstanding something?
It should accept that argument, right?
commit: class Foo { has Order @.orders; }; my %hash = orders => Array[Order].new; Foo.new(|%hash) 10:35
committable6 leont, ¦class: «Cannot find this revision (did you mean “Plano”?)»
leont commit: v6.c class Foo { has Order @.orders; }; my %hash = orders => Array[Order].new; Foo.new(|%hash) 10:36
committable6 leont, gist.github.com/afa0920d2c30b5da10...5b509c3a23 10:37
leont Interestingly, it all works fine if I put the arguments in a Map instead of a hash 11:31
lizmat leont: probably also if you bind the array 11:33
m: class Foo { has Order @.orders; }; my %hash; %hash<orders> := Array[Order].new; Foo.new(|%hash)
camelia ( no output )
lizmat m: class Foo { has Order @.orders; }; my %hash = orders :=> Array[Order].new; Foo.new(|%hash) 11:34
camelia ===SORRY!=== Error while compiling <tmp>
Preceding context expects a term, but found infix := instead.
at <tmp>:1
------> Order @.orders; }; my %hash = orders :=⏏> Array[Order].new; Foo.new(|%hash)
lizmat sadly we don't have a :=> infix
well, actually, that wouldn't matter in this case anyway :-)
m: class Foo { has Order @.orders; }; my %hash is Map = orders => Array[Order].new; Foo.new(|%hash) 11:35
camelia ( no output )
Voldenet m: class Foo { has Order @.orders; }; my $hash = orders => Array[Order].new; Foo.new(|$hash) 11:40
camelia ( no output )
leont Voldenet: that last example is not a hash but a pair 11:42
Voldenet It works in the example though 11:43
guifa I managed to get a RakuAST pretty print semi working last night ^_^ 14:28
right now just handles the nodes and attribuets that I've used, but still… going to make coding much easier 14:29
lizmat guifa++
guifa is there a way to enable ANSI colors in Comma's terminal? 14:30
lizmat RakuIRCLogger: help 14:31
RakuIRCLogger lizmat, Logging #raku with Raku module IRC::Client::Plugin::Logger 0.0.11
lizmat . 14:32
[Coke] can anyone ping 9.9.9.9 ? Wondering if non-responsiveness here is part of my home network woes this morning. 17:21
sena_kun [Coke], pings fine 17:22
[Coke] maybe my ISP is being a jerk.
lizmat pings fine for me 18:40
[Coke] nqp: class EEK {method Numeric() {return 3}}; my $a:= EEK.new(); say(+$a); 21:22
camelia Cannot intify object of type EEK
at src/vm/moar/ModuleLoader.nqp:129 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/ModuleLoader.moarvm:)
from <tmp>:1 (<ephemeral file>:<mainline>)
from gen/moar/stage2/NQPHLL.nqp:1949 (/home/camelia/rakudo-m-inst-1/s…
MasterDuke nqp: class EEK {method Int() {return 3}}; my $a:= EEK.new(); say(+$a); 21:26
camelia 3
MasterDuke m: class EEK {method Numeric() {return 3}}; my $a:= EEK.new(); say(+$a); 21:29
camelia 3
MasterDuke [Coke]: nqp as of a while ago default to integer operations for everything. so &prefix:<+> calls intify(), which doesn't look for a Numeric method. you'd have to ask someone like jnthn if it should (which i don't believe would be hard to add) 21:32
[Coke] MasterDuke: github.com/Raku/nqp/issues/59 23:35
"a while ago" - the ticket is from 2012. ;) 23:36
MasterDuke yeah, i'm not sure that should be expected to work 23:41
[Coke] I would be sad if it took 10 years to say that, but at least the ticket would be closed. :) 23:56
MasterDuke well, i'd get confirmation from somebody else before closing it. jnthn, pmurias, TimToady, etc 23:59