Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
MasterDuke yeah, i did `my $a := ...` also, almost no change in performance 08:34
MasterDuke complete change of topics, but i think a lot of other languages have added a bitcount/popcount/whatever-you-want-to-call-the-function-that-returns-the-number-of-ones-set-in-the-binary-representation-of-a-number, should raku get one too? 13:36
lizmat MasterDuke: raku.land/zef:lizmat/Bits 13:41
japhb lizmat: There's some more that would be valuable there ... for example: least significant set bit, most significant set bit. Also, I think there are CPU instructions for some of these when dealing with native types, so that may be what MasterDuke was thinking of. 18:06
lizmat well.... yeah, I just wanted to point out there's an interface for it already :-)
japhb :-) 18:07
MasterDuke yeah, i would propose a new nqp op. i think jvm/js have builtins for it, and so do libtommath and gmp 19:08
btw, any details on possible/planned dates for rakudo core conf? 19:09
lizmat MasterDuke: maybe we should start with people stating when they can *not* be there at all 19:12
MasterDuke ha. this little thing called covid has been annoying. i hoped that my couple years in the uk would mean a lot more european raku conferences and such, but no such luck. and now we're moving back to the states in july 19:16
lizmat ah... ok, so would June still work for you ?
or will you already be too busy packing ?
MasterDuke maybe i could do a day or two june 12-18, but i wouldn't want to promise anything 19:17
and probably a realistic estimate for when i'd be free after the move would be october, what with moving, stuff arriving, moving into the new house, etc 19:20
so i wouldn't recommend planning anything around me
(also, i'll probably have a lot less time for raku stuff for the next couple months (and then less conveniently time-zoned)) 19:22
lizmat MasterDuke :-( but understood 19:35
MasterDuke i have an annoying number of almost-finished-except-for-a-last-really-annoying-bit PRs, hopefully i can finish up at least one before my time is (even more) reduced 19:39
MasterDuke interesting. using `@a = ` vs `$a :=` with the binary sha1 op gives a different digest 21:02
lizmat ah? 21:46
example?
MasterDuke `rakudo-m -e 'use nqp; my int @a = "src/core.c/Int.pm6".IO.slurp(:bin); my $b; my $s = now; $b := nqp::binarysha1(@a) for ^10_000; say now - $s; say $b' gives AA4E6E40AB7A4F867CAE21A18D4A5024C2FBCAD2 21:50
`rakudo-m -e 'use nqp; my $a := "src/core.c/Int.pm6".IO.slurp(:bin); my $b; my $s = now; $b := nqp::binarysha1($a) for ^10_000; say now - $s; say $b'` gives D10659C9C57676112F06DEC45CA5D9FE93805A8B
`sha1sum src/core.c/Int.pm6` gives fc1db10480cc2f52cb11b22fff807c5db89a3474 21:51
`rakudo-m -e 'use nqp; my $a := "src/core.c/Int.pm6".IO.slurp; my $b; my $s = now; $b := nqp::sha1($a) for ^10_000; say now - $s; say $b'` gives FC1DB10480CC2F52CB11B22FFF807C5DB89A3474
but i'm off to bed, something to investigate later 21:52
lizmat when you slurp with :bin, any utf-8 in the file, will remain separate bytes, whereas with a string, they're normalized to codepoints ?
so: they would only be the same if the file would be pure ASCII ? 21:53