🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
00:02 reportable6 left 00:03 reportable6 left 00:05 Doc_Holliwood left 01:04 reportable6 joined 02:04 linkable6 left, evalable6 left 02:05 linkable6 joined 02:06 evalable6 joined 02:31 stoned75 left 02:33 stoned75 joined 02:52 Doc_Holliwood joined 03:01 zacts joined 03:30 justsomeguy joined 03:35 zacts left 03:43 Doc_Holliwood left 03:44 Doc_Holliwood joined 04:44 linkable6 left, evalable6 left 04:47 linkable6 joined 05:02 justsomeguy left 05:22 ddeimeke left, ddeimeke joined 05:30 gordonfish- joined 05:32 gordonfish left
moon-child m: say +'⑤' 05:42
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5⑤' (indicated by ⏏)
in block <unit> at <tmp> line 1
moon-child m: say ⑤
camelia 5
moon-child why?
05:46 evalable6 joined
moon-child notably, it's not just unicode, because 06:00
m: say +'৫'
camelia 5
06:04 reportable6 left 06:06 reportable6 joined 06:28 ufobat joined 06:46 ufobat left 07:23 Sgeo left
mykhal m: say '5৫⑤'.comb.map(*.uniprops.join) 07:26
camelia (Nd Nd No)
mykhal moon-child: .. no digit, bot other, according to Unicode headquarters
or maybe other number, i apologize :) 07:27
non-decimal, for some reason 07:30
07:32 gugod left 07:33 gugod joined
mykhal strange definition, strange behavior 07:39
m: say '5৫⑤'.comb.map({(for <Numeric_Type Numeric_Value> -> $n {$_.uniprop($n)}).join(", ")}).join("; ") 07:48
camelia Decimal, 5; Decimal, 5; Digit, 5
07:59 ufobat joined
mykhal i think all are digits, i hope Unicode is not going to add all decimal numbers 08:38
m: say '⑬'.uniprop('Numeric_Type') # 13 circled 08:40
camelia Numeric
08:59 linkable6 left, evalable6 left 09:01 evalable6 joined 09:03 tejr left, tejr joined 09:31 xinming joined 09:32 patrickb joined 09:50 MoC joined 09:54 zacts joined 10:00 linkable6 joined 10:10 abraxxa left 10:25 zacts left 10:30 sena_kun joined 11:22 sono left 11:33 Doc_Holliwood left 11:47 Doc_Holliwood joined 11:58 Frozenset joined
Frozenset hello, how may i get a handle to a method to, say, inspect its signature? 12:00
I mean:
m: &abs.signature
camelia ( no output )
Frozenset &A-Class.method.signauture 12:01
m: say &abs.signature; 12:02
camelia ($, *%)
Frozenset Okay with functions but what about methods?
12:02 reportable6 left
MasterDuke m: .say for Int.^methods>>.signature 12:03
camelia (Int: |)
(Int: *%_)
(Int: *%_)
(Int:D: *%_ --> Int:D)
(Int:D: *%_ --> Num:D)
(Int:D: $?, *%_ --> Rat:D)
(Int:D: $?, *%_ --> FatRat:D)
(Int:D: *%_ --> Int:D)
(Int: *%_ --> Num:D)
(Int:D: *%_ --> Num:D)
(Int: |)
(Int:D: +@mods, *%_…
Frozenset how to for a specific method?
(thx btw)
MasterDuke m: .signature.say for Int.^can("abs") 12:04
camelia (Int:D: *%_ --> Int:D)
(Cool: *%_)
12:05 reportable6 joined
MasterDuke m: say Int.^find_method("abs").signature 12:05
camelia (Int:D: *%_ --> Int:D)
MasterDuke the docs explain the difference between can and find_method 12:06
Frozenset oh thanks very much
[Coke] me yesterday: "why doesn't this code work". me today: ".package" is not the same as "package." 12:20
12:45 Doc_Holliwood left 12:46 Doc_Holliwood joined 13:22 [Coke]_ joined 13:24 goblin joined, Gruber joined, raydiak_ joined 13:25 masak_ joined, sjn_ joined, a3r0 joined 13:26 eseyman_ joined 13:30 Scotteh_ joined 13:34 [Coke] left, Grrrr left, a3r0_ left 13:39 tadzik joined 13:40 Doc_Holliwood left
codesections huh, I've always used .^lookup instead of .^find_method. 13:44
MasterDuke right, forgot about that one 13:47
codesections is there any difference between those two? 13:48
m: say Int.^find_method('abs') === Int.^lookup('abs')
camelia True
codesections m: say Int.^find_method('not-here'), Int.^lookup('not-here') 13:50
camelia (Mu)(Mu)
codesections m: say Int.^find_method('roll'), Mixy.^lookup('roll') 13:54
camelia Method+{is-nodal}.new(Mu)
codesections m: say Mixy.^find_method('roll'), Mixy.^lookup('roll')
camelia The 'ForeignCode' class is a Rakudo-specific implementation detail and has no serviceable parts inside(Mu)
codesections m: say Mixy.^find_method('of'), Mixy.^lookup('of') 13:55
camelia The 'ForeignCode' class is a Rakudo-specific implementation detail and has no serviceable parts insideof
13:56 zacts joined
codesections different behavior for Rolls, I guess? 13:56
s/Rolls/Roles/
14:12 tadzik left, tadzik joined 14:31 zacts left 14:33 Sgeo joined 14:54 zacts joined 15:22 Doc_Holliwood joined 15:24 sjn_ is now known as sjn 15:27 zacts left
mykhal hi again. services like camelia and evalable6 are handy. can some of them test a code snippet in multiple notable rakudo versions backwards and report result differences and failures ? 15:34
MasterDuke committable6: releases say $*PERL.compiler.version 15:37
committable6 MasterDuke, gist.github.com/19d6d6dd4a4040ef67...dbeda4c9a5
MasterDuke github.com/Raku/whateverable/wiki 15:38
15:43 stoned75_ joined
mykhal MasterDuke: very nice, it was unexpected 15:46
15:47 stoned75 left
MasterDuke yeah, they're awesome tools 15:47
mykhal committable6: releases say {(1..$^x).grep($^x %% *)}(10) 15:50
committable6 mykhal, ¦releases (56 commits): «(1 2 5 10)␤»
15:51 ufobat left
mykhal c: say Uni(0x300) eqv Uni(0x340) 15:52
committable6 mykhal, Seems like you forgot to specify a revision (will use “v6.c” instead of “say”)
mykhal c: releases say Uni(0x300) eqv Uni(0x340)
committable6 mykhal, gist.github.com/8926b89dbdb9f982ac...9df344c358 15:53
mykhal, gist.github.com/3fb1b37dcc24c353fb...49583c7231
16:22 gordonfish- is now known as gordonfish
mykhal c: releases my @a = ^5; my @b := @a[5, 100, 0]; @b[2] = 0 but "zero"; say @a 16:36
committable6 mykhal, ¦releases (56 commits): «[zero 1 2 3 4]␤»
16:55 melezhik joined
Xliff It looks like line numbers have stopped being included in the error reporting for a few types of syntax errors. 17:01
Consider: gist.github.com/Xliff/09d508ed9ce8...a7a61bc564 17:02
17:17 Xliff left 17:52 sena_kun left 18:02 reportable6 left 18:05 reportable6 joined
AlexDaniel Altai-man: dat 2021.06 release… I guess the issue is known? 18:12
18:29 [Coke]_ is now known as [Coke] 18:35 melezhik left 19:19 Juerd is now known as Juerd[m] 19:29 Juerd[m] is now known as Juerd
Altai-man AlexDaniel, the one with line numbers or? 20:03
20:29 linkable6 left, evalable6 left 20:31 linkable6 joined
codesections wait, really: 21:03
m: say Mu(42)
camelia 42
codesections Oh, is that being parsed as a coercion? 21:04
m: say Int.^lookup('nope')(5)
camelia 5
codesections m: say Int.^lookup('abs')(-5); say Int.^lookup('abbs')(-5) 21:06
camelia 5
-5
codesections that's pretty odd – and I'm not sure if it's a feature or not 21:07
21:14 sono joined
AlexDaniel Altai-man: the one with the release number that is incorrect :) 21:19
Altai-man: gist.github.com/Whateverable/19d6d...dbeda4c9a5
2021.06 should say 2021.06, not 2021.05-something
doesn't matter anymore I guess 21:20
it happened before too
Altai-man AlexDaniel, I fail to see how that could happen. I mean, there is github.com/rakudo/rakudo/pull/4417...83a86fc4dd <- and github shows it's included under the 2016.06 tag? 21:25
anyway, I think I'll retire in two relesaes 21:26
*releases
AlexDaniel oooooooh interesting
cuz I also fail to see how it can happen!
c: 2021.06 say $*PERL.compiler.version 21:27
committable6 AlexDaniel, ¦2021.06: «v2021.05.43.g.4887.a.169.b␤»
AlexDaniel c: 4887a169b4 say $*PERL.compiler.version 21:28
committable6 AlexDaniel, ¦4887a16: «v2021.05.43.g.4887.a.169.b␤»
AlexDaniel that's the right commit sha, but whyyy
21:29 MoC left
AlexDaniel c: cd01706216d6 say $*PERL.compiler.version 21:31
committable6 AlexDaniel, ¦cd01706: «v2021.06.1.gcd.0170621␤»
21:32 Frozenset left
AlexDaniel Altai-man: great work! Well deserved retirement 🤗 21:32
Altai-man: some successor volunteered already?
Altai-man AlexDaniel, not really, but I also did not "announce" it properly yet, just told it here and there a couple of times in "well, maybe sometime in the future" sorta way, so the people are not worried yet. :) 21:33
AlexDaniel Altai-man: if you stay for 3 releases then you'll break the record 😀 21:34
Altai-man AlexDaniel, well, that's my plan. :P
AlexDaniel Altai-man: yes, but 3, not 2, if I'm not mistaken 21:35
or 4 if we count point releases as cheating 🤔 21:36
Altai-man AlexDaniel, dunno, maybe I'm wrong as well. I counted it as 2, doesn't matter much. I mean, after first 10 one or two more start to look alike.
AlexDaniel not making your life easier am I
Altai-man AlexDaniel, well, I counted both point for you and me included.
AlexDaniel Altai-man: dunno, some releases are special! Based on the list, 2020.08 looked like one 😛 21:37
Altai-man: but you did great! Thank you for your work! 21:38
Altai-man AlexDaniel, noooo, I don't want to remember this one, what an utter failure, heh.
.oO ( just blame the man who distracted me a lot that day )
AlexDaniel, I cannot express enough gratitude to YOU though, I mean I am just starting the scripts once in a while and you did made all that tooling, that's very helpful. 21:39
21:39 patrickb left
AlexDaniel if I didn't do it, you would've had one made by Zoffix. It was a big step too, mine was just an iteration on that 21:40
there was Toaster instead of Blin and a bot instead of the sakefile, both did the job alright 21:41
Altai-man fair enough 21:42
22:19 gabiruh_ is now known as gabiruh, Typewriter joined 22:23 Typewriter left
[Coke] (releases) I'm glad you (and others) have gotten to point where it's mostly routine. Thank you! 22:24
(you all)
vasko Hi, anybody able to point me in the right direction to convert a list into a hash? In perl5 I would do `▶ perl -M'Data::Dump qw(dump)' -e 'my %sq = map { $_ => $_ ** 2 } (0..4); dump \%sq;' 22:32
{ "0" => 0, "1" => 1, "2" => 4, "3" => 9, "4" => 16 }`
In raku I'm failing with: `> (0..3).map( * => * ** 2); 22:33
(0 => 1 2 => 9)`
moon-child so you want the array indices to be the keys of the hash? 22:34
oh, no, ignore me
so something like (* => * ** 2) is actually a function of _two_ parameters 22:35
so you would need something like {$_ => $_ ** 2}
m: say (0..4).map({$_ => $_ ** 2}).hash 22:36
camelia {0 => 0, 1 => 1, 2 => 4, 3 => 9, 4 => 16}
vasko Ah thanks, I was missing the `.hash` cheers :)
moon-child well, you don't actually need the .hash depending on what you do with it 22:37
m: my %x = (0 .. 4).map({$_ => $_ ** 2}); say %x
camelia {0 => 0, 1 => 1, 2 => 4, 3 => 9, 4 => 16}
vasko Oh I see, I really need to reread the manpages and understand the `Whatever` closures over normal subs/functions I'm used too. 22:38
22:45 Xliff joined
Xliff Is there an easy way to check the wordsize of a string encoding? 22:46
22:48 casaca joined
Xliff Hmmmm.... 22:58
m: "Hello".encode('ASCII').of.^name.say # ?
camelia uint8
Xliff \o/
23:10 kybr left 23:12 kybr joined 23:16 casaca left 23:18 casaca joined 23:26 casaca left 23:27 casaca joined
mykhal m: sub circumfix:<\ />($a) { "\$a/" }; say \o/ 23:28
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> 3 circumfix:<\ />($a) { "\$a/" }; say \o/7⏏5<EOL>
expecting any of:
prefix
term
23:30 evalable6 joined 23:31 casaca left 23:32 Xliff left