smol-toml icon indicating copy to clipboard operation
smol-toml copied to clipboard

Long things - Strings and Numbers

Open timothyjoh opened this issue 10 months ago • 1 comments

Added support for BigInt when the number exceeds safe integers.

Added formatting for multiline-strings when stringifying. Looks nicer.

timothyjoh avatar Feb 24 '25 21:02 timothyjoh

Appreciate your thoughts here overall, and your preference to leave some things out. Maybe you want to cherry-pick the things you like (if any) and close this one. But I was glad to find this repo and might continue to iterate on it a bit in an upcoming project that I am spiking on right now.

timothyjoh avatar Mar 06 '25 19:03 timothyjoh

Support for bigints landed thanks to Gouvernathor in #41 and #42. As for the other features included here, they don't fully preserve the values which is not something I want to do in this library.


Side note: the code in here is perhaps not the most readable, as it uses quite a few tricks to improve performance, make the GC work less, and compress logic in a compact form to reduce code size. It also lacks proper comments/guidance and can be quite obscure at times.

I might eventually iterate again on the core implementation to refactor a few things, further improve performance, and eventually work a bit more on cold-start performance. Don't know when, time and motivation are quite rare... 😅

cyyynthia avatar Jun 28 '25 10:06 cyyynthia