josdejong
  • Joined on 2022-10-05
josdejong commented on issue StudioInfinity/nanomath#18 2025-05-21 12:37:57 +00:00
Add a config object and approximate equality

Ah, I understand what you mean now, I wasn't aware of the TD.resolve('config', [BigNumber]) solution, your idea for type based configuration. I think my latest example proposal basically has…

josdejong commented on issue StudioInfinity/nanomath#33 2025-05-15 13:39:23 +00:00
Ban instanceof and avoid inheritance, specifically in TypePattern.

Yes indeed, instanceof doesn't reliably work between iframes and the main window.

josdejong commented on issue StudioInfinity/nanomath#14 2025-05-14 14:10:07 +00:00
Separate Type entities and the type information about them

(A) 👍 (B) I have a strong feeling that it would be better to keep the data type itself and the type information about the data type separate from each other, but I don't have a full picture of…

josdejong commented on issue StudioInfinity/nanomath#18 2025-05-14 13:51:23 +00:00
Add a config object and approximate equality

So far it's just a wild idea, I would be curious to see if that could work out nicely.

Should that be on a per-value basis?

I think that would complicate things quite a bit, I would prefer…

josdejong commented on issue StudioInfinity/nanomath#33 2025-05-14 13:31:20 +00:00
Ban instanceof and avoid inheritance, specifically in TypePattern.

I like the famous "prefer composition over inheritance"😄. I'm totally fine with using classes by themselves, but in my experience it helps to keep complexity managable by using inheritance as…

josdejong opened issue StudioInfinity/nanomath#34 2025-05-14 12:55:33 +00:00
Error when running pnpm test
josdejong commented on issue StudioInfinity/nanomath#32 2025-05-14 12:44:04 +00:00
Avoid files with names differing only by casing

@glen it would help me a lot if you can rename the Type.js function soon. Right now I can't work with nanomath on my machine.

josdejong opened issue StudioInfinity/nanomath#33 2025-05-07 15:59:41 +00:00
Change TypePattern into an interface?
josdejong commented on issue StudioInfinity/nanomath#18 2025-05-07 15:51:45 +00:00
Add a config object and approximate equality

Maybe we can think through a way to configure the precision based on the max precision offered by the numeric type at hand, so the same config works for both number and BigNumber, and automatically…

josdejong commented on issue StudioInfinity/nanomath#14 2025-05-07 15:39:26 +00:00
Separate Type entities and the type information about them

(A) I have no strong opinion in this regard. I prefer to have 1 way to do things though. (B) Is it needed to create type objects on top of the primitive types (which are already built in)? If so,…

josdejong commented on issue StudioInfinity/nanomath#32 2025-05-07 15:29:17 +00:00
Avoid files with names differing only by casing

😁 it's an interesting case.

josdejong commented on issue StudioInfinity/nanomath#12 2025-04-25 14:59:02 +00:00
API to specify a function name and multiple signatures in a single file

It makes sense indeed, it's indeed a good thing to have a high precision version of the constants (when available), and go from there! I think in some cases we can also lazily calculate a…

josdejong commented on issue StudioInfinity/nanomath#12 2025-04-23 14:57:25 +00:00
API to specify a function name and multiple signatures in a single file

I think it will be nice if values (constants) like tau or pi can be imported as is, without a wrapper function. They don't have to be matched to anything except their name, and they aren't…

josdejong commented on issue StudioInfinity/nanomath#12 2025-04-23 10:48:13 +00:00
API to specify a function name and multiple signatures in a single file

@glen wrote in StudioInfinity/nanomath#12 (comment):

Would you prefer to require the match(Passthru, ...) for uniformity, or are you OK with…

josdejong commented on issue StudioInfinity/nanomath#12 2025-04-16 19:41:00 +00:00
API to specify a function name and multiple signatures in a single file

Ah, ok, yeah that sounds good to me. It is quite a common case indeed so nice to have.

josdejong commented on issue StudioInfinity/nanomath#12 2025-04-16 19:12:44 +00:00
API to specify a function name and multiple signatures in a single file

Yeah, good point, I think match is better than on. De dispatcher is indeed "just" doing pattern matching :). Ok let's go for match then.

Well, I think it is unambiguous and convenient…

josdejong commented on issue StudioInfinity/nanomath#12 2025-04-16 18:31:09 +00:00
API to specify a function name and multiple signatures in a single file

😂 I hear some frustration about formatters. I myself love them, it helps a lot ensuring a consistent and unified style in a code base, and it saves me time when styling and indentation is…

josdejong commented on issue StudioInfinity/nanomath#12 2025-04-16 09:04:24 +00:00
API to specify a function name and multiple signatures in a single file

Ah I see. The alternating pairs are indeed concise, but I think it would be better to have a bit more explicit API. When using automatic formatters for example, I expect all arguments to be put on…

josdejong deleted branch chore/enforce-using-nodejs-22 from StudioInfinity/nanomath 2025-04-10 18:26:21 +00:00