Closed sno2 closed 1 year ago
Is anyone else able to look at my work? For some reason, I'm getting "this type is possibly infinite" errors. However, when you hover over the following type in the IDE, it shows the correct value:
import { Call, E } from ".";
type A = Call<E.Btoa, "Hello">;
// ^? "SGVsbG8="
Hmm, I think I have an idea to circumvent this, but it's going to be ugly.
Regarding the needed optimization for the bitwise operators and finding the correct starting point on the power table. We should be able to implement a fast Log2
type that uses a precomputed table for the most common powers (e.g. 1-32). I'll work on that tomorrow.
This is mindblowing. You should join our discord! https://discord.gg/kaegdW3z
It says I’m at the server limit! Do I need to leave some
Get Outlook for iOShttps://aka.ms/o0ukef
From: Gabriel Vergnaud @.> Sent: Thursday, February 16, 2023 7:31:51 AM To: gvergnaud/hotscript @.> Cc: perrystan1489 @.>; Comment @.> Subject: Re: [gvergnaud/hotscript] feat: implement base64 (PR #29)
You should join the discord: https://discord.gg/kaegdW3z
— Reply to this email directly, view it on GitHubhttps://github.com/gvergnaud/hotscript/pull/29#issuecomment-1433017357, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYQTQ65LFNKZ2BRN3X6MCMLWXYM3PANCNFSM6AAAAAAU5RRHRY. You are receiving this because you commented.Message ID: @.***>
Alright, this is ready for review. I did not add on the Log2
optimization I was talking about for the bitwise operators yet because I think we should be able to make a Tuples.BinarySearch
implementation with sorters that would automatically do it for us.
I'm closing this. It's an howesome algorithm achievement, but it's a really narrowed use case that does not fit the purpose of this library in being a collection of building blocks to create higher end algorithms.
These are mostly primitive implementations for bitwise AND/OR/XOR. Proper handling still needs to be done for negative numbers but I want to work on something with these operators for only unsigned data for the moment. Also, we could do a binary search on the
Pow2
with theN1
/N2
to find out the needed power map with log(highest_power). It sadly iterates through all of them currently.