00:18 Sgeo joined 00:52 tonyo left 01:02 elcaro joined 01:09 sftp_ joined, sftp left 01:10 sftp_ is now known as sftp, sftp left, sftp joined 01:41 sftp left 01:42 sftp joined, sftp left, sftp joined 01:50 mc2 left 01:53 mc2 joined 02:23 hulk joined 02:24 kylese left 02:42 sjn left, sjn joined 02:43 vasko4535586169 left 03:15 hulk left, kylese joined 03:53 mantle joined
disbot <_elcaro_> Is there a good reason why polymod doesn't accept negative numbers? It's essentially just successive divmod. 04:57
<_elcaro_> Reason I ask is that sometimes I'm dealing with RGBA as 32-bit signed values, and want to convert to 8-bit values. I should be able to do, eg.(-8347982).polymod(256,256,256,256) 05:00
<_elcaro_> FWIW, I've confirmed this works fine if I bypass the check and just do IntPolymod.new(-8347982, (256,256,256,256).iterator). Pulling values out of the iterator yields (178 158 128 255) 05:01
<_elcaro_> I can implement successive divmods with eg. ([\div] $n,|@b) Zmod @b, but it's pretty slow 05:28
<_elcaro_> For this specific case I could do some bit-gymnastics, but ($n X+> (0,8,16,24)) X+& 255 is even slower (in Rakudo at least... Raku++ perf is ok here) 05:29
05:35 vasko4535586169 joined
disbot <_elcaro_> Hmm... ok so I build Rakudo without the negative $got check in Polymod [0] > (-8347982).polymod(256,256,256,256) (178 158 128 255 -1) Not the result I expected. 05:39
<_elcaro_> If there's a good reason why it can't support negative numbers, I'm all ears; I'll just continue to work around it. But if it can be supported without too much hassle, I think it should.
06:28 hurufu joined 06:30 xinming left 06:34 mantle_ joined 06:38 mantle left 06:56 Sgeo left, mantle_ left
disbot <antononcube> @lizmat Do not wait for my post — I ended up researching / writing “the most popular advent post”. 07:00
07:10 greaser|q joined 07:22 belluzj joined 07:30 belluzj left 07:31 mantle joined 08:19 abraxxa joined 08:34 abraxxa left
disbot <_elcaro_> Solving my own problem a better way... Just convert the signed to 32-bit unsigned with +& and then polymod .map((* +& 0xFFFFFFFF).polymod(256,256,256,1)) This is the fastest way 08:44
08:49 hurufu left 08:53 hurufu joined, xinming joined, xinming left 08:55 xinming joined 09:00 dakkar joined 09:28 xinming left 09:53 xinming joined
ab5tract _elcaro_++ 10:14
that approach has the advantage of being highly explicit 10:15
if you have the time, it would be great to see this in the docs
10:27 xinming left 10:28 xinming joined 13:12 apogee_ntv joined
apogee_ntv I've been away for a few days, hi all. If anyone uses Compress::Zlib/Compress::Zlib::Raw btw it bundles an ancient version of zlib with multiple CVEs, I have published new Compress::Zlib::Raw but it uses me as an author, will do the same with Compress::Zlib soon. 13:14
lizmat apogee_ntv++
OOC, why does it bundle it? 13:15
apogee_ntv I will look for the affected packages and raise PRs, timo I will also look at your comments on that MoarVM PR asap.
Because windows doesn't have it by default, IIRC it is only bundled for Windows on the old version but that raises another issue because zlib breaks bc occasionally.
lizmat ah, understood 13:19
hmmm.. WIndows still doesn't have that by default?
apogee_ntv It bundled a dll for Windows, maybe it didnt at the time or it didnt have the ABI exports, it's a very old module. 13:20
I just saw it when I was CVE scanning my Windows machine and it had this ancient zlib in my raku sites. 13:21
github.com/retupmoca/P6-Compress-Z.../resources
I didnt really chestertons fence it :D just saw this ancient dll. 13:22
Apparently it still doesn't.
You usually get it from vcpkg or chocolatey, it doesnt come with Windows. 13:23
13:55 mantle left 13:57 mantle joined 14:09 tgg joined 14:19 tgg left
apogee_ntv I have raised PRs to all github dependents and sent messages to non-github dependents authors but a lot of these do not look actively maintained. 14:19
14:51 belluzj joined
disbot <antononcube> @lizmat This more-or-less describes my current Raku blog posts work: xkcd.com/1906/ 15:03
lizmat at least it's something you can count on :-) 15:08
disbot <antononcube> 💯
15:10 MasterDuke joined 15:19 hurufu left 15:20 hurufu joined 15:28 MasterDuke8 joined 15:32 MasterDuke left 15:40 MasterDuke8 left 15:53 MasterDuke joined 16:30 MasterDuke left 16:38 nort left 16:53 human-blip left 16:56 human-blip joined 17:03 baturhan joined 17:13 belluzj left 17:19 baturhan left 17:31 dakkar left 17:38 kaestralblades left 17:42 kaestralblades joined 18:03 xinming left 18:18 xinming joined 18:32 xinming left