🦋 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.
Nemokosch m: say qq{ {1 + 2} } 08:18
anyway... 08:20
> > say qq{ {1 + 2} }
> {1 + 2}
> > say qq/ {1 + 2} /
> 3
I'd still like to know if this is an issue, or not documented, or I failed to notice
Nemokosch *just a little test* 08:28
Nemokosch funky
El_Che building rakudo-pkg for new release 09:05
lizmat ++El_Che 09:10
El_Che t/02-rakudo/18-pseudostash.t flopper-de-flop 09:26
El_Che done 10:20
grondilu bduggan, author of git.sr.ht/~bduggan/raku-protobuf, not around? 11:26
lizmat I don't recall seeing bduggan here, fwiw 12:16
lizmat clickbaits rakudoweekly.blog/2022/04/25/2022-...inrelease/
grondilu unrelated: 12:24
m: proto foo($) {*}; multi foo(uint8 $) {}; multi foo(uint16 $) {}; foo my uint8 $
camelia Ambiguous call to 'foo(Int)'; these signatures all match:
(uint8 $)
(uint16 $)
in block <unit> at <tmp> line 1
grondilu can't a multidispatch work with natives?
or am I missing something obvious? 12:25
grondilu is also suprised that foo is assumed to take a Int as parameter. 12:26
m: proto foo($) {*}; multi foo(uint8 $) {}; multi foo(uint16 $) {}; multi foo(Str $) {}; foo my uint8 $
camelia Ambiguous call to 'foo(Int)'; these signatures all match:
(uint8 $)
(uint16 $)
in block <unit> at <tmp> line 1
grondilu m: proto foo($) {*}; multi foo(uint8 $) {}; multi foo(uint16 $) {}; multi foo(Str $) {}; foo "bar" 12:27
camelia ( no output )
lizmat m: multi foo(uint8) { dd }; multi foo(uint16) { dd }; my uint8 $a = 42; foo $a
camelia Ambiguous call to 'foo(Int)'; these signatures all match:
(uint8 $)
(uint16 $)
in block <unit> at <tmp> line 1
lizmat hmm... *that* should work 12:28
m: multi foo(int8) { dd }; multi foo(int16) { dd }; my int8 $a = 42; foo $a
camelia Ambiguous call to 'foo(Int)'; these signatures all match:
(int8 $)
(int16 $)
in block <unit> at <tmp> line 1
lizmat hmmm
m: multi foo(Int) { dd }; multi foo(int16) { dd }; my int8 $a = 42; foo $a
camelia sub foo(int16)
lizmat ok, I guess it's either native or not, and no difference between the various native types 12:29
grondilu is that specced?
lizmat good question, wouldn't know
but whether specced or not, that's all historical now 12:30
grondilu I'm trying to write serialization routines, and I was planning to use multidispatch on natives.
nine It distinguishes between native ints, uints, nums, strings and (non-native) objects 12:34
Or rather non-native types
grondilu m: say so my uint8 $ ~~ uint8 12:37
camelia True
grondilu m: say so my uint8 $ ~~ uint16
camelia False
grondilu so I'm supposed to use manually check for the type? 12:38
like `given $arg { when uint8 {...}; when uint16 {...}; ... }` ? 12:39
grondilu notices that this doesn't work 12:41
m: sub foo($x) { so $x ~~ uint8 }; say foo my uint8 $ 12:43
camelia False
grondilu m: sub foo($x) { so $x ~~ uint8 }; say foo my uint8 $ = 2
camelia False
grondilu :thinki 12:44
🤔 12:45
m: say my uint8 $ ~~ uint8 12:46
camelia True
grondilu m: sub foo($x) { $x.WHAT }; say foo my uint8 $ 12:47
camelia (Int)
grondilu 🤨 12:48
that seems wrong tbh 12:49
m: say *.WHAT(my uint $)
camelia ===SORRY!=== Error while compiling <tmp>
Cannot give arguments to WHAT
at <tmp>:1
------> say *.WHAT(my uint $)⏏<EOL>
grondilu m: say (*.WHAT)(my uint $)
camelia Impossible coercion from 'Int' into 'Whatever': no acceptable coercion method found
in block <unit> at <tmp> line 1
grondilu m: say {.WHAT}(my uint $) 12:50
camelia (Int)
grondilu m: say {.WHAT}(my uint $ = 1)
camelia (Int)
MasterDuke well, calling a method boxes it into an object (i.e., it loses its nativeness)
grondilu ok
m: say sub (uint $x) { $x.WHAT}(my uint $) 12:51
camelia (Int)
grondilu even if the sub was defined to take natives?
Xliff m: sub a (Int $x) { my uint8 $xx := $x; $xx.WHAT.say } 12:52
camelia ===SORRY!=== Error while compiling <tmp>
Cannot bind to natively typed variable '$xx'; use assignment instead
at <tmp>:1
------> sub a (Int $x) { my uint8 $xx := $x⏏; $xx.WHAT.say }
Xliff m: sub a (Int $x) { my uint8 $xx = $x; $xx.WHAT.say }
camelia ( no output )
grondilu m: say (my uint $).WHAT
camelia (Int)
Xliff m: sub a (Int $x) { my uint8 $xx = $x; $xx.WHAT.say }; a(12)
camelia (Int)
Xliff m: sub a (Int $x) { my uint8 $xx = $x; $xx.WHAT.say; $xx.REPR.say }; a(12)
camelia (Int)
P6opaque
grondilu oh, .WHAT does not what I thought it would
Xliff m: sub a (Int $x) { my uint8 $xx = $x; $xx.WHAT.say; $xx.^name.say }; a(12) 12:53
camelia (Int)
Int
Xliff Odd.
m: use NativeCall; sub a (Int $x) { my uint8 $xx = $x; $xx.WHAT.say; $xx.REPR.say; $xx.^name.say }; a(12)
camelia (Int)
P6opaque
Int
grondilu sees docs.raku.org/language/numerics#Native_dispatch 13:00
raku's doc is very good. seemingly exhaustive, despite how big a language raku is. 13:02
congrats
unrelated: 13:13
m: say ++$ * 256 + *, 1 xx 10 13:14
camelia WhateverCode.new(1 1 1 1 1 1 1 1 1 1)
grondilu m: say ++$ * 256 * * + *, 1 xx 10
camelia WhateverCode.new(1 1 1 1 1 1 1 1 1 1)
grondilu oh nevermind 13:15
github.com/Raku/flymake-rakudo <-- cool stuff, anything similar for vim? 13:20
[Coke] grondilu: thanks for saying that - it often feels that because it's so big, there are always gaps. 13:24
grondilu frankly I used to prefer reading the synopses, but lately I switched to reading the official doc. It has become better than the synopses now, I think. 13:27
grondilu this flymake module makes me feel like trying emacs with evil-mode again 13:29
grondilu does that 13:37
gfldex I'm reading S05-mass/* and already found 3 ENODOCs 14:28
Geth ¦ Documentable: coke assigned to antoniogamiz Issue Dependencies invalid github.com/Raku/Documentable/issues/162 14:44
grondilu that flymode thing is telling me I made an error at my first `use` line. Message is `X perl5#` 14:48
grondilu guesses it's about include paths or something 14:52
Geth ¦ Documentable: JJ unassigned from antoniogamiz Issue File::Temp dependencies invalid github.com/Raku/Documentable/issues/162 15:00
grondilu ended up setting RAKULIB and the error vanished 15:02
real-time syntax check, very nice
Geth ¦ Documentable: coke assigned to antoniogamiz Issue Typo in diagnostic output github.com/Raku/Documentable/issues/163 15:52
Geth ¦ Documentable: coke assigned to antoniogamiz Issue "make html" broken in raku/doc github.com/Raku/Documentable/issues/164 16:21
CIAvash grondilu: If that line was the only line you saw, there is a chance you're seeing the last line of the message. If you're using Eldoc for messages, read the Eldoc section here: www.ciavash.name/blog/2022/04/25/f...acs/#eldoc 18:04
tellable6 CIAvash, I'll pass your message to grondilu
timo Xliff: ever so slightly confused by the "method Cairo::cairo_t" in the cairo Context class; is the :: in there fine? is it reachable? 20:10
timo at least now i found method Cairo::cairo_font_options_t later in that file, so there's precedent 20:14
melezhik I've switched SparkyCI the newest ( 2020.04 ) Rakudo version, if someone needs to test their modules against the latest version - feel free - sparrowhub.io:2222/report/239 21:05
Geth doc: e9c0ad31e9 | Coke++ | xt/01-raku-version.t
track 2022.04 rakudo release
21:21
doc: f22bdf16c1 | Coke++ | 2 files
Make category case consistent

Upper lower
Closes #4063
doc: 7fbf8842f2 | Coke++ | xt/search-categories.t
add note
Geth doc: coke self-assigned No space after category comma in indices (and in general generated pages with leading whitespace) github.com/Raku/doc/issues/2884
131189118c | Coke++ | xt/search-categories.t
21:45
doc: d3483f2c6e | Coke++ | 5 files
Remove leading space from category component

Resolves #2884
thegargler hm 23:11