🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:00 reportable6 left 00:01 reportable6 joined 01:01 tellable6 left, quotable6 left, nativecallable6 left, shareable6 left, statisfiable6 left, linkable6 left, committable6 left, squashable6 left, sourceable6 left, coverable6 left, releasable6 left, benchable6 left, evalable6 left, unicodable6 left, bisectable6 left, greppable6 left, reportable6 left, notable6 left, bloatable6 left 01:02 unicodable6 joined, bloatable6 joined, bigtestaccount[m joined, squashable6 joined, quotable6 joined, coverable6 joined 01:03 releasable6 joined, shareable6 joined, committable6 joined, benchable6 joined, tellable6 joined, notable6 joined, sourceable6 joined, linkable6 joined 01:04 bisectable6 joined, xinming_ left, greppable6 joined, nativecallable6 joined, reportable6 joined, statisfiable6 joined, evalable6 joined 01:06 xinming_ joined
[Coke] anyone able to use Raku's OpenSSL on an m1/m2 mac? 01:19
01:46 jpn joined 02:05 TieUpYourCamel left 02:09 Nemokosch joined
guifa_ Nemokosch: not yet but I'm working on a project that will allow it 02:09
02:09 Nemokosch left 02:15 codesections left, codesections joined 02:17 TieUpYourCamel joined 02:21 rf left
tbrowder .ask El_Che what is the proper way for root to install zef in the /opt/rakudo-pkg directory structure? 02:29
tellable6 tbrowder, I'll pass your message to El_Che
02:31 Homer_Simpson left 03:02 jpn left 03:28 jpn joined 03:35 razetime joined, razetime left 03:40 rf joined 03:42 jpn left 04:00 jpn joined
rf I'm reading some JSON as a blob, when I go to decode to UTF-8 I'm losing the last character ie: '}', I know why this is happening, but not sure how to get around this? 04:02
04:05 jpn left
rf I got it, somehow I was skipping a byte earlier so it broke it. 04:15
04:15 rf left 04:16 razetime joined 04:27 razetime left, razetime1 joined 04:29 razetime1 is now known as razetime 05:00 jpn joined 05:05 jpn left, dogbert11 joined 05:08 dogbert17 left 05:29 squashable6 left 05:31 squashable6 joined 05:45 dogbert11 left 05:46 razetime left, dogbert11 joined 05:47 dogbert17 joined 05:51 dogbert11 left 05:54 dogbert17 left 05:58 jpn joined 06:00 reportable6 left, reportable6 joined 06:03 dogbert17 joined, jpn left 06:25 Xliff joined 06:30 dogbert11 joined 06:34 dogbert17 left, tejr joined 06:45 dogbert11 left 06:46 dogbert11 joined 06:59 jpn joined, dogbert11 left, dogbert11 joined 07:03 oodani_ left 07:04 oodani joined, jpn left 07:06 dogbert11 left 07:09 dogbert11 joined 07:14 epony joined 07:15 dogbert17 joined 07:19 dogbert11 left 07:21 dogbert17 left 07:22 dogbert17 joined 07:29 abraxxa joined 07:30 jpn joined 07:39 abraxxa left 07:40 abraxxa joined, jpn left 07:46 sena_kun joined 07:51 jpn joined
Xliff WEEKLY, gist.github.com/Xliff/b4741a42ab83...f3e9b79528 07:54
weekly, gist.github.com/Xliff/b4741a42ab83...f3e9b79528
*shrug*
07:54 Sgeo left
Xliff lizmat: For inclusion in the weekly -- gist.github.com/Xliff/b4741a42ab83...f3e9b79528 07:54
07:55 Xliff left 07:56 jpn left
jaguart are there any coverage / usage tools - e.g. where-is-this-method/sub used? 08:09
08:20 jpn joined 08:25 jpn left 08:40 abraxxa left 08:49 xinming_ left, xinming_ joined, lichtkind joined 08:52 dakkar joined 08:53 abraxxa joined
jaguart looking for advice. I have a class with a core attribute, and lots of multi-subs used by methods to handle the differences for multiple types. 08:56
eg: class C { has $.x; method ama { x($!x) }; multi sub x (Str:D $y) { say 'Str' }; multi sub x (Int:D $i) { say 'Int' }}; 08:57
..: my $c = C.new(:x('a')); $c.ama --> Str
..: my $d = C.new(:x(4)); $c.ama --> Int
rather than have the multi subs evaluated a lot, I want to break the class into smaller things, and return a specialist subclass for each .new (ala Factory) 08:59
but I cannot access the core private value from these subclasses or roles without a self.x
trust is for private methods
so what pattern should I use? 09:00
09:00 MitarashiDango[m left, jpn joined
nine What's the problem with self.x? 09:00
09:00 MitarashiDango[m joined, MitarashiDango[m left, razetime joined
jaguart its a method call - I assume much slower than accessing $!x 09:00
nine Ah, so that's your problem. You assume without knowing :) 09:01
jaguart ok - I'll test that - I'm pretty sure I read about the performance hit on this in the docs 09:02
09:05 jpn left
nine Accessors are typically inlined into hot code and then optimize to just the nqp::getattr op that accessing the attribute directly would generate (or actually to one of the sp_p6oget_* ops) 09:05
jaguart ok - I guess that's a pretty low hanging optimisation - so you recommend Factory + Subclass + self.x 09:06
nine yes 09:07
jaguart thank you :)
09:14 abraxxa left 09:15 abraxxa joined 09:39 jpn joined 09:40 sena_kun left 09:42 sena_kun joined 09:52 sena_kun left 10:49 jpn left 10:52 jpn joined 11:11 ab5tract joined
tbrowder .ask ugexe what is the recipe for installing zef in the rakudo installation directories for use by all raku users on the same host? 11:49
tellable6 tbrowder, I'll pass your message to ugexe
11:54 Shaeto joined 11:55 Shaeto left 12:00 reportable6 left 12:01 reportable6 joined 12:05 Shaeto joined 12:07 Shaeto left 12:08 Shaeto joined, Shaeto left 12:09 Shaeto joined, Shaeto left
tbrowder and i hope we get to see zef bundled and maintained with rakudo while i'm still able to dress myself :) 12:09
12:11 Shaeto joined 12:14 Shaeto left, Shaeto joined 12:15 Shaeto left, Shaeto joined 12:17 Shaeto left 12:22 Shaeto joined
El_Che tbrowder: # export PATH=$PATH:/opt/rakudo-pkg/bin/; /opt/rakudo-pkg/var/zef/bin/zef install ... 12:27
tellable6 2023-01-23T02:29:23Z #raku <tbrowder> El_Che what is the proper way for root to install zef in the /opt/rakudo-pkg directory structure?
El_Che that's the globally installed zef if you dont want ~/.raku 12:28
(including /root/.raku)
12:34 jpn left, Shaeto left 12:35 Shaeto joined 12:36 Shaeto left, Shaeto joined 12:39 Shaeto left, Shaeto joined 12:52 Abhoerschutz left 12:53 Abhoerschutz joined 12:57 jpn joined 12:58 Kernspin left
ab5tract is it possible to get a list of classes that belong to a given hierarchy? example: I'd like to generate subs that map to .new on classes in Example namespace such that `foo()` maps to `Example::Foo.new()` 13:02
preferably without EVAL
Nemokosch what does "maps to" mean here? 13:03
tbrowder El_Che: thanks! yes, at the moment i don’t see a need for root to have its own modules, but that might change. in that case i guess a separate installation script (in raku, of course) can help “do the right thing” 13:10
ab5tract I mean binding declaring a sub that calls the constructor with the same args passsed to the sub 13:14
s/binding/map/
actually, s/binding// 13:15
in other words, I'm looking for a way to enumerate the list of packages currently loaded under a given namespace 13:19
I'm guessing this just isn't possible
Nemokosch I understand that there are subs that call the constructor with the same arguments - but what does this have to do with "packages currently loaded under a given namespace"? 13:25
Voldenet m: package Example { package Bar { class Tar {} }; class Foo { }; }; for Example::<>:kv -> $name, $value { say ($name, $value, $value.HOW) } 13:32
camelia (Foo (Foo) Perl6::Metamodel::ClassHOW.new)
(Bar (Bar) Perl6::Metamodel::PackageHOW.new)
Nemokosch is the <> only needed to allow for :kv? 13:34
ab5tract Voldenet: thanks, I just found that! 13:35
Voldenet the <> is needed to get a stash out of it
Nemokosch then what would Example:: be? 13:37
Voldenet …huh, apparently it's the same 13:38
m: package Example { package Bar { class Tar {} }; class Foo { }; }; for Example::.kv -> $name, $value { say $name, $value.HOW } 13:40
camelia BarPerl6::Metamodel::PackageHOW.new
FooPerl6::Metamodel::ClassHOW.new
Nemokosch yes, this is what I learned at least 13:41
:: is a shorthand for .WHO
13:58 linkable6 left, evalable6 left, evalable6 joined 14:00 linkable6 joined, Xliff joined
Geth Raku-Steering-Council/main: d1c681acf0 | (Daniel Sockwell)++ (committed using GitHub Web editor) | 3 files
Announcement of JJ's resignation (#55)

This commit adds an announcement stating that JJ is steeping down from the RSC/CAT due to a lack of time. It also removes JJ from the membership list for both groups.
14:13
14:27 razetime left 14:28 rf joined
lizmat And yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/01/23/2023-...nk-you-jj/ 15:06
15:12 epony left 15:13 epony joined, linkable6 left, linkable6 joined 15:15 Sgeo joined 15:16 linkable6 left, jmcgnh left 15:18 Geth left, Geth joined, linkable6 joined 15:22 Geth left, Geth joined 15:24 linkable6 left, linkable6 joined 15:28 jgaz joined 15:46 archenoth joined 16:20 NemokoschKiwi joined
NemokoschKiwi Link test, straight from the weeklies www.reddit.com/r/rakulang/comments..._possible/ 16:20
and another clickbait test hits the butterfly rakudoweekly.blog/2023/01/23/2023-...nk-you-jj/ 16:24
Nemokosch No joy so far 16:25
ab5tract lizmat++
NemokoschKiwi and another good news post hits the test connectified.com/@masukomi/109711363459069873 16:30
Nemokosch and this brought victory
16:34 NemokoschKiwi left
ab5tract BTW, replit.com has Raku support. You can also install packages via `zef`. Just thought I'd share in case others were unaware :) 16:44
16:55 abraxxa left 16:56 bob52 joined 16:57 jgaz left 16:58 bob52 left
tonyo . 17:09
17:11 jgaz joined
rf I've been working on a new HTTP server for Humming-Bird, github.com/rawleyfowler/Humming-Bird/pull/29, it's quite a bit of code and I'd like to get some more eyes on it. Sorry if this is the wrong place to ask for code-review 17:13
lizmat rf: you can always try :-) 17:23
our constant $VERSION = '1.1.4'; feels like a Perlism, why do you need that ? 17:24
no other obvious things on a quick glance 17:26
Voldenet rf: nice avatar, I like it - in timeout method you might consider not using `sleep 1` but `await Promise.in(1)` 17:32
`sleep 1` will use os-level mechanisms for threading, promises will use scheduler's capabilities skipping OS 17:33
m: await (^100).map({ start { sleep 1; } }); say now - BEGIN now
camelia MoarVM panic: Memory allocation failed; could not allocate 393216 bytes
Voldenet m: await (^50).map({ start { sleep 1; } }); say now - BEGIN now 17:34
camelia MoarVM panic: Memory allocation failed; could not allocate 393216 bytes
Voldenet m: await (^20).map({ start { sleep 1; } }); say now - BEGIN now
lizmat wow
camelia 1.244091812
Voldenet m: await (^20).map({ start { await Promise.in(1); } }); say now - BEGIN now
camelia 1.041887402
Voldenet that's quite a difference
17:36 dakkar left
rf Hmm 17:44
Nemokosch Just noticed that there aren't even many good (maintained, at least) options for web servers 17:45
Voldenet rf: also, i'm not entirely sure, but what happens if you provide `content-length-whatever` as a header? The starts-with looks like a risky choice for headers 17:46
Nemokosch ?@header-lines.elems is equivalent to ?@header-lines, isn't it 17:47
Voldenet yes 17:48
Nemokosch as a non-functional remark: $header.chomp.lc could probably use some DRY 17:50
Voldenet …could use some magical regex, which in theory could be more easily optimized
rf Yeah I want to replace most of the naive checks with regex, that's on my list. 17:53
Nemokosch yeah but don't forget that we happen to know the practice which is quite far from this theory... 17:54
17:57 ab5tract left
Voldenet "in theory" was thrown in deliberately ;) 17:57
I'm not sure if parsing headers with regex is a good idea, because processing headers isn't always cpu-bound 17:58
it is in most benchmarks… :)
tonyo m: use Bench;
camelia ===SORRY!=== Error while compiling <tmp>
Could not find Bench in:
/home/camelia/.raku
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-inst-2/share/p…
17:59 Homer_Simpson joined
Homer_Simpson help 17:59
Voldenet throws an anchor
Nemokosch yes, just wanted to emphasize it
18:00 reportable6 left
that "in theory" doesn't mean "we don't know if that happens"; it means "we pretty much know it doesn't happen, although it could" 18:00
Homer_Simpson in comma how do I make it so ctrl+shift+2 adds " " around a selection and ctrl+' adds ' ' around a selection 18:01
tonyo the regex would take a lot of optimizing to be faster than chomp.lc 18:03
18:03 reportable6 joined
Voldenet in the end, .chomp and .lc would usually allocate something 18:03
Homer_Simpson raku needs to compile to asm and oop should be optional 18:04
Voldenet and regex could operate on the bytes
Homer_Simpson if raku compiled to asm you can have compiler optimisations, you can have cross platform code, and you can make everything faster by not just relying on piles of methods/routines for modules especially, and you can compile to windows binaries 18:06
like what if a raku module has some bug in it 18:08
I cant see it because you can only view the routine/methods signature on the web, not the exact source code of it 18:09
Voldenet jit compiling allows runtime to optimize as it gathers more info about types 18:10
Homer_Simpson even if you could there would probably be more methods/routines that end up being opaque, that's why we need operators, and inline ASM
18:10 jpn left 18:12 jpn joined
Homer_Simpson yes, the compiler can still generate byte code using a flag 18:12
Voldenet you can cheat by just running C/C++ from your raku code
using nativecall
Homer_Simpson anyhow where can I ask about the comma IDE 18:13
visual studio is probably better but its HEAVY 18:14
18:14 pleasantpheasant left
Voldenet comma is an intellij plugin iirc (not sure what relation to it standalone comma has), maybe intellij people would help 18:16
tonyo Homer_Simpson: you can see the internals of rakudo in the source and in the virtual machine in the moar repo (both downloadable) 18:18
regex is much slower, especially for parsing http headers
Timing 500000 iterations of chomplc, regex...
chomplc: 4.712 wallclock secs (4.061 usr 0.740 sys 4.802 cpu) @ 106111.086/s (n=500000) 18:19
regex: 8.086 wallclock secs (7.338 usr 0.785 sys 8.123 cpu) @ 61833.673/s (n=500000)
Nemokosch so it's about half the speed? trynna read this 18:20
Xliff Is there a way to run a piece of code through the raku Parser? 18:21
rf Hmm tony that is interesting
tonyo yea, i'll put full output of another run and add `str.lc ~~ `, one sec
pastebin.com/V8FAxxUC 18:22
Voldenet I agree that currently regexes leave a lot to be desired, but in the future I'm sure they'll keep becoming faster
tonyo Xliff: the raku grammar is available to you at run time
Voldenet while chomp and lc may not get substantially faster
tonyo let me check it in perl, i still think chomp.lc would be faster (and nqp even more so) 18:23
18:23 Shaeto left 18:24 Shaeto joined
Nemokosch what does 1781% and the likes signify there? 18:28
18:29 jpn left 18:31 jpn joined
Homer_Simpson k I sort of got it working 18:35
shift+2 stringizes the current selection, just ' literal stringizes the current selectiion 18:36
' ' are not consts right 18:37
" " are definetley not consts
" " and ' ' are both literals
yeah comma is still a good IDE 18:40
18:41 notna joined
Homer_Simpson oh fuck now I cant type @ 18:42
only '
fixed :) 18:46
tonyo 1781% is a ratio of times, Bench is a direct port of Benchmark from p5 18:50
Homer_Simpson why is raku printing one space in my text file as 3 spaces in the console 18:52
rf I refactored the header stuff, thanks folks for the feedback :D 18:54
Voldenet tonyo: 18:56
you sure 1781% is right?
shouldn't it be 69.37%?
Nemokosch ^^ 18:57
Homer_Simpson i.imgur.com/ZE8lYqx_d.webp?maxwidt...lity=grand 18:58
rf Commas add a space between 19:05
Maybe?
Try: say "value of myarray[i][] is: { @myarray[$i][] }";
Homer_Simpson the file has no commas 19:08
rf m: print("Commas", "spaced")
camelia Commasspaced
rf Hmm, not sure then. Does my example work? 19:09
Homer_Simpson no it still prints 3 spaces
rf m: my @a = ["a", "b", "c"]; say "value of a[i][] is { @a[0][] }";
camelia value of a[i][] is a
Homer_Simpson my $fp = open "data.ldr", :r;
my @myarray = $fp.IO.lines.map(*.comb.List); #convert all those methods to routines!
rf Try just *.comb instead of .List 19:10
.List isn't needed.
Homer_Simpson no difference 19:11
ords returns 49 32 32 32 54 19:12
so yes, its 3 spaces
rf Then your file must be borked 19:13
Homer_Simpson nope 19:15
maybe I shanged a setting in comma
changed* 19:16
I probably did
nope I reset my settings it still does it 19:21
@lizmat
19:34 jpn left 19:36 jpn joined
tonyo the regex in p5 is significantly faster 19:40
(sorry, was in a meeting), the 1781 takes into account the number of iterations too, it was some weird calculation when i looked at it, i don't recall what it was measuring exactly - this was ~10 years ago now 19:41
($.wallclock / $.iterations) - ($.ref ?? $.ref.wallclock / $.ref.iterations !! 0); 19:43
19:48 Xliff left
tonyo that could probably be cleaned up to be coherent, though 19:49
that could probably be cleaned up to be coherent, though 19:50
19:58 jpn left 20:02 Shaeto left 20:03 jpn joined 20:07 jpn left 20:19 notna left 20:22 jpn joined 20:28 thundergnat joined
rf tonyo: Is that because Perl5 "compiles" it's regexes? 20:28
tonyo i haven't banged around in moar in so long it'd be difficult for me to guess 20:29
rf Interesting, thanks for these stats.
tonyo it's nearly 2x faster with the regex in p5, though 20:30
thundergnat lizmat: I believe the algorithm Ovid was reffing to (in the weekly) was from colabti.org/irclogger/irclogger_lo...02-09#l322 20:31
Possibly also relevant as it is based on the same code: rosettacode.org/wiki/Pathological_...t_problems
s/reffing/referring/ 20:32
20:32 frankmng joined 20:33 frankmng left 20:43 fnaufel joined 20:44 oodani left, codesections left, discord-raku-bot left, leah2 left, buffet left, sarna left, xkr47 left, kybr left, pjlsergeant left, corwin left, xkr47_ joined, discord-raku-bot joined, xkr47_ is now known as xkr47, kybr joined, oodani_ joined, pjlsergeant_ joined, codesections1 joined, leah2 joined 20:45 sarna joined, fnaufel left
Homer_Simpson net split yo 20:45
20:45 mplsCorwin joined, mplsCorwin left, mplsCorwin joined 20:46 buffet joined, codesections1 is now known as codesections 20:47 jpn left, jpn joined 20:49 mplsCorwin is now known as corwin
Geth doc/main: 6995ffe846 | (Joelle Maslak)++ (committed using GitHub Web editor) | doc/Type/Test.pod6
throws-like does not work correctly a string for the exception name (#4185)
20:50
20:53 jpn left 20:58 leah2 left 20:59 leah2 joined 21:08 cfa joined
cfa afternoon all 21:10
tellable6 2019-11-04T19:24:00Z #raku-dev <jmerelo> .tell cfa it's done by hand for the time being. Automatic deployment is yet to come...
Nemokosch wow
cfa okay, so it's been a little while
21:13 [Coke] left
Nemokosch what's up? 😂 21:15
cfa libera, apparently :) 21:16
Nemokosch what brought you back here? 😛 21:17
21:19 jpn joined
cfa i've been writing in raku again after a bit of a hiatus 21:20
also i was lazy and hadn't re-registered following the move away from freenode
21:24 jpn left
Nemokosch well, welcome aboard 21:32
cfa thanks :) 21:34
21:36 jpn joined
cfa what encouraged me to finally (re)register was the following surprising behaviour; i was hoping someone could clarify what exactly is going on: 21:40
m: my %h1 = <foo bar>.Set; say %(%h1, :baz) # behaves as expected
camelia {bar => True, baz => True, foo => True}
cfa m: my %h1 = <foo bar>.Set; my %h2 = %h1, :baz; say %h2 # as does this
camelia {bar => True, baz => True, foo => True}
cfa m: my %h3 = <foo bar>.Set.Hash; say %(%h3, :baz) # ...and this
camelia {bar => True, baz => True, foo => True}
cfa m: my %h4 = <foo bar>.Set.Hash, :baz; say %h4 # whoops!
camelia {Str|bar => bar => True, Str|foo => foo => True, baz => True}
cfa i expected that last case to behave similarly to:
m: my %h5 = :foo, :bar; my %h6 = %h5, :baz; say %h6
camelia {bar => True, baz => True, foo => True}
cfa which is why i'm calling this out. it seems that `<foo bar>.Set.Hash` returns a `Hash[Any,Any]`, so this is therefore similarly surprising:
m: my %h7 is Hash[Any, Any] = <foo bar>.Set.Hash; say %(%h7, :baz) 21:41
camelia {Str|bar => bar => True, Str|foo => foo => True, baz => True}
cfa sorry for the noise from those examples. (also, i realise i could do something like `|<foo bar>.Set, :baz` but i'm curious to know what the source of the above behaviour is) 21:42
final curiosity: 21:44
m: say %(<foo bar>.Set.Hash, :baz); say hash(<foo bar>.Set.Hash, :baz)
camelia {Str|bar => bar => True, Str|foo => foo => True, baz => True}
{bar => True, baz => True, foo => True}
cfa so in the case of %() and those assignments, the paramterisation of the hash seems to be significant... but not for the hash sub 21:46
parameterisation*
Nemokosch h3 vs h4 is really interesting 21:49
I have an idea 21:51
I think this is a "single argument rule" situation 21:52
when you have a .Hash on the right handside as the only thing, you have no further nesting, it's just stored as it is, as a simple Hash
however, when the .Hash appears next to some additional thing, the assignment won't flatten the structure (?) 21:55
this assignment is backed up by the STORE method of a Hash, that's something I'm quite sure of 21:56
while I think %(...) does the same thing as (...).hash
cfa yeah, the hash() case seems orthogonal to the other issue, afaict. or at least, it was an additional surprise. 21:59
m: say hash(<foo bar>.Set.Hash, :baz); say %(<foo bar>.Set.Hash, :baz); say (<foo bar>.Set.Hash, :baz).hash
camelia {bar => True, baz => True, foo => True}
{Str|bar => bar => True, Str|foo => foo => True, baz => True}
{Str|bar => bar => True, Str|foo => foo => True, baz => True}
Nemokosch oh there is a hash subroutine as well? that one I didn't know 22:00
cfa ignoring sets entirely:
m: my %h1 is Hash[Any, Any] = :foo, :bar; my %h2 = :foo, :bar; say %(%h1, :baz); say %(%h2, :baz);
camelia {Str|bar => bar => True, Str|foo => foo => True, baz => True}
{bar => True, baz => True, foo => True}
cfa it seems to be the parameterisation that's causing the difference -- and since .Hash on a Set gives me a parameterised hash...
(sorry, i probably should've given this more minimal case in the first place) 22:01
Nemokosch even the name is reported in a weird way in the first case 22:02
lemme join the IRC
22:02 NemokoschKiwi joined
NemokoschKiwi m: my %h1 is Hash[Any, Any] = :foo, :bar;  dd %h1; 22:02
camelia (my Any %{Any} = :bar(Bool::True), :foo(Bool::True))
NemokoschKiwi my Any %{Any} ? :D 22:03
m: my %h2 = :foo, :bar; dd %h2;
camelia Hash %h2 = {:bar(Bool::True), :foo(Bool::True)}
NemokoschKiwi %h1.VAR.name is downright empty 22:04
cfa huh 22:06
NemokoschKiwi we don't even need :baz
 %(%h1,) will do
cfa nods
NemokoschKiwi let's see what call is made 22:07
I don't know if you remember CoreHackers::Sourcery :P 22:08
cfa not ringing a bell
NemokoschKiwi it's a simple and straightforward tool to locate core calls in the rakudo repo 22:09
cfa neat
NemokoschKiwi github.com/rakudo/rakudo/blob/704a...ny.pm6#L77 this code snippet didn't help a lot 22:10
let's go the STORE way, then
cfa bisectable6: my %h1 is Hash[Any, Any] = :foo, :bar; dd %(%h1,)
bisectable6 cfa, Will bisect the whole range automagically because no endpoints were provided, hang tight
NemokoschKiwi also a really good idea ^^ 22:11
bisectable6 cfa, Output on all releases: gist.github.com/f4ce24e36a22208eeb...fe3ca06f29
cfa, Bisecting by output (old=2021.12 new=2022.02) because on both starting points the exit code is 0
NemokoschKiwi looks like it never worked well? 22:12
bisectable6 cfa, bisect log: gist.github.com/71696c09df4439b204...f064cada58
cfa, (2022-01-02) github.com/rakudo/rakudo/commit/49...0503e2d3e2
cfa, Bisecting by exit code (old=2020.05.1 new=2020.06). Old exit code: 1
cfa only valid from 2020.06 because of the `is` but yeah
bisectable6: my %h1{Any} = :foo, :bar; dd %(%h1,)
bisectable6 cfa, Will bisect the whole range automagically because no endpoints were provided, hang tight
cfa, bisect log: gist.github.com/b32fcdea1a005aa89c...7d21375cde
cfa, (2020-05-12) github.com/rakudo/rakudo/commit/de...5ff3690813
cfa, Bisecting by output (old=2018.12 new=2019.03.1) because on both starting points the exit code is 1
NemokoschKiwi can reproduce with my %dummy and %dummy.STORE: (%h1,)
that's good for a start...
bisectable6 cfa, bisect log: gist.github.com/dd382f4cfc37395181...8e458f527d 22:13
cfa, Bisecting by output (old=2018.06 new=2018.08) because on both starting points the exit code is 1
cfa, Output on all releases: gist.github.com/da3c613a5548c7e4ea...31daa43760
cfa, Bisecting by output (old=2021.12 new=2022.02) because on both starting points the exit code is 0
cfa okay this is useful: gist.github.com/Whateverable/da3c6...31daa43760
2016.07.1 introduced the change
NemokoschKiwi nice
by the way, STORE is creepy nqp github.com/rakudo/rakudo/blob/704a...sh.pm6#L74 22:14
cfa :)
bisectable6 cfa, bisect log: gist.github.com/b70466f2a0c7b675d1...d36b8093c0
cfa, (2018-07-19) github.com/rakudo/rakudo/commit/e9...c636fb166a
NemokoschKiwi that's a long time ago!
22:15 bisectable6 left
NemokoschKiwi does it have a corresponding commit? 22:15
poor one...
cfa whoops, did i just kill off bisectable6?
NemokoschKiwi hopefully it just timed out a bit, lol
22:15 bisectable6 joined
cfa whistles innocently 22:15
NemokoschKiwi anyway, did you get a bisected commit by any chance? 22:16
cfa not seeing it yet
the logs above were for the Hash[Any, Any] case, i think 22:17
might have to request a bisect on %h1{Any} = :foo, :bar again
bisectable6: my %h1{Any} = :foo, :bar; dd %(%h1,)
bisectable6 cfa, Will bisect the whole range automagically because no endpoints were provided, hang tight
cfa, Output on all releases: gist.github.com/e96da0c3cc2855f774...55477522e1 22:18
cfa, Bisecting by output (old=2021.12 new=2022.02) because on both starting points the exit code is 0
cfa, bisect log: gist.github.com/7ee22e3a73c00d82f5...bafce9a066 22:19
cfa, (2022-01-02) github.com/rakudo/rakudo/commit/49...0503e2d3e2
cfa, Bisecting by output (old=2020.02.1 new=2020.05.1) because on both starting points the exit code is 0
cfa, bisect log: gist.github.com/de5910fbfd577c4e34...85a953e7ad
cfa, (2020-03-20) github.com/rakudo/rakudo/commit/35...72e32b8a0d
cfa, Bisecting by output (old=2019.11 new=2020.01) because on both starting points the exit code is 0
NemokoschKiwi so close... 22:20
bisectable6 cfa, bisect log: gist.github.com/4981a43f94c2953046...2adcc68a66
cfa, (2020-01-06) github.com/rakudo/rakudo/commit/08...0c9087c687
cfa, Bisecting by output (old=2016.06 new=2016.07.1) because on both starting points the exit code is 0
cfa sorry for the noise
bisectable6 cfa, bisect log: gist.github.com/83607b0e8760cf60f1...4cf9ef2529
cfa, (2016-07-03) github.com/rakudo/rakudo/commit/ec...95db11dfed
cfa, ⚠ New output detected, please review the results manually
cfa, Output on all releases and bisected commits: gist.github.com/a8837f95fc8ec8d8cc...3c088900de
cfa NemokoschKiwi: gist.github.com/Whateverable/83607...4cf9ef2529
ecfb956bcf92488106a85f9462731095db11dfed ? 22:21
github.com/rakudo/rakudo/commit/ec...95db11dfed
NemokoschKiwi bravo 😋 22:22
22:25 jpn left
NemokoschKiwi I think I have the line 22:26
m: use nqp; my %h1{Any} = :foo, :bar; say nqp::getattr(%h1, Map, '$!storage') 22:27
camelia {Str|bar => bar => True, Str|foo => foo => True}
NemokoschKiwi in !STORE_MAP at the time of the first appearance 22:28
sadly this seems to be a lower-level error 22:29
cfa ouch
NemokoschKiwi we'd need to know the anatomy of a Hash 22:31
or a Map, for that matter
perhaps $!storage is not sufficient in itself to recreate the hash/map 22:32
there is also a $!descriptor 22:33
cfa hmm, what would be responsible for mapping 'bar' to 'Str|bar'?
NemokoschKiwi maybe it would be good to trace something that DOES work about %h1 because at this point that's more surprising, probably there's something we miss 22:35
cfa nods 22:38
informally, it seems like the pair key is being stringified and prefixed with its type
22:42 ProperNoun left
NemokoschKiwi the very same instance is used for the .keys and .values methods, and it works... 22:46
cfa hmm 22:48
again informal, but this seems to be what we're seeing in the output:
m: %(:foo, :bar).map({.key.WHICH => $_}).say
camelia (Str|foo => foo => True Str|bar => bar => True)
cfa (not sure what else would prefix 'Str|' though) 22:49
ugexe m: my %h1{Any} = :foo, :bar, 1 => "a"; say DUMP %h1
camelia Hash[Any,Any]<1>(
:$!descriptor(ContainerDescriptor<2>(...)),
:$!storage(BOOTHash<3>(...))
)
tellable6 2023-01-23T11:49:07Z #raku <tbrowder> ugexe what is the recipe for installing zef in the rakudo installation directories for use by all raku users on the same host?
jaguart tbrowder: if using rakudo-pkg then github.com/nxadm/rakudo-pkg/blob/m...ocs/zef.md 22:52
ugexe for all users on the same host you would need a rakudo that is installed in a location that all users can access. then install zef with the --install-to=site option (which is the default), and set the PATH as appropriate per user 22:54
in other words: if a root user installs rakudo and then installs zef, all other users should be able to access those things if their PATH is setup to point at their respective bin directories 22:56
NemokoschKiwi the underlying BOOTHash seems to be wrong. I don't know how it's supposed to work exactly but it is still a Hash - a Hash that can be indexed and all
m: use nqp; my %h1{Any} = :foo, :bar; my $bh := nqp::getattr(%h1, Map, '$!storage'); say $bh<foo>; say $bh<Str|foo>; 22:57
camelia (Any)
foo => True
22:57 thundergnat left
NemokoschKiwi I don't think it's to be expected that it's indexed with the WHICH of the key 22:58
jaguart oh - the butterfly lives again?!
NemokoschKiwi jaguart: which one? :P
ugexe why isnt it expected?
jaguart m: 'alive'.say
ugexe i agree seeing the output ya'll are posting doesnt appear to make sense
NemokoschKiwi I didn't phrase it right but I was about to elaborate 22:59
ugexe but using .WHICH on it would be to differentiate e.g. StrInt 1 from Int 1 or some such i imagine
NemokoschKiwi some hash-key value format needs to be obtained. For Any, it makes sense that this would be WHICH
but the data that went in wasn't "just" Any, it was an Str instance 23:00
and this seems to be something that got lost
ugexe typing a hash makes that happen i believe
otherwise it just stringifies the indexes? i dunno if thats true it just feels like something i remember 23:01
NemokoschKiwi this seems something to be fixed but which way? Keep the BOOTHash content and compensate for it while creating a usual Hash? Or make the BOOTHash itself more intuitive? 23:02
apparently BOOTHash is "smarter" than this behavior most of the time, i.e without type parameters 23:03
anyway, retreating to discord now 23:05
23:05 NemokoschKiwi left
jaguart I've seen .WHICH is used for lots of compares and lookups - so 'Str|Something' is the same as 'Str|Something' whereas 'Foo:U123456' is not the same as 'Foo:U561029' - two different instances etc. 23:07
Nemokosch this bug is gladly yours I think 23:16
cfa Nemokosch, thanks for looking into this
23:21 jpn joined
Nemokosch it would be worth a rakudo issue with all these findings, to be honest... 23:25
23:26 jpn left