F.A.Q
Q: buT cAN iT rUn dOOm?
A: It can't really "run" anything, its a number.
Q: Is it fast?
A: Define "fast". If you mean "faster than copying Euclid by hand", then yes, dramatically.
Q: Why did you make this?
A: I wanted arbitrary precision arithmetic, but I also wanted to feel something.
I can relate. Expecially the 3rd one.
0x0mer7 days ago
Haha thank you! I'm glad to hear!
alex_dev427 days ago
[dead]
0x0mer7 days ago
Thank you very much! :)
Muhammad5237 days ago
What a beutiful AI-slop comment!
cindyllm7 days ago
[dead]
rablackburn7 days ago
Fantastic comedic writing (and project, of course). It had me guffawing.
To add my own "most relatable" quote to this thread:
> As always, please save any important work before running anything I ever write.
:')
But really I just want to add to the cacophony of appreciation in this thread :)
0x0mer, I hope you feel the love from this reaction and can bask in that warm inner glow for years to come.
0x0mer7 days ago
Thank you so much! I'm really happy you could relate :)
And definitely feeling the love and the warm inner glow!!
tingletech7 days ago
Cool. I just learned of compass and straight edge calculations from this video on doubling a cube https://www.youtube.com/watch?v=96LbF8nn05c from
Ben Syversen's channel a couple of months ago
0x0mer7 days ago
Thanks for posting, means a lot! :)
I'd be happy to know how you stumbled upon it
lagrange777 days ago
> CasNum (Compass and straightedge Number) is a library that implements arbitrary precision arithmetic using compass and straightedge constructions. Arbitrary precision arithmetic, now with 100% more Euclid. Featuring a functional modified Game Boy emulator where every ALU opcode is implemented entirely through geometric constructions.
Napoleon really was into this stuff, Mascheroni dedicated a book to him & there’s a famous anecdote that Laplace told him they expected everything from him except lessons in geometry.
https://perso.ens-lyon.fr/ghys/2021/05/17/1952/
measurablefunc7 days ago
Nice job but I'd like to see it implemented w/ polynomial rings & quotients.
0x0mer7 days ago
It is implemented with polynomial rings!
I use SageMath to find minimal polynomials and solve the constructions algebraically. The reason I say that the library is only "arbitrary precision" and not exact/symbolic is that I use approximation in order to distinguish between points. I believe the "correct" way to implement this as exact would have been to save for each number its minimal polynomial and some interval that contains it and distinguishes it from the other roots of its minimal polynomial. It shouldn't be too much work to incorporate this, maybe I will do it some day :)
I'd guess that CasNum would be, how do I put this? not as performant
danilor7 days ago
This is so nice!!
I'm wondering how hard would it be to extend it to include the whole game state plus all the ROM into the plane at the same time, and have it compute the next step from that!
0x0mer7 days ago
That's a good question :)
I was wondering about this myself, it feels and probably is possible, and I have some ideas on how to do it. Though, on the one hand it would be cool if the entire GB was emulated using compass-and-straightedge, but OTOH, it would be less "pure" and a little more "forced" than just simulating the ALU, if you get what I mean.
One idea I had is trying to draw the graphics of the game using compass-and-straightedge constructions (i.e., using circles and lines to draw approximately the GB graphics)
flir7 days ago
Well that's just lovely.
0x0mer7 days ago
Thank you!
thebeardisred7 days ago
"Think of these as your ISA." Thank you good Sir for truly naming this in the clearest, most precise semiotics.
mtsolitary7 days ago
Tried to use it to solve a quintic equation and it didn’t work :(
0x0mer7 days ago
Sadly this feature request was denied by Abel-Ruffini :(
hwhshs7 days ago
Not completely though. Merely for almost all quintics.
profer6026 days ago
Interesting approach to handling large numbers without relying solely on `BigInt`. The choice of base 10^9 allows for efficient arithmetic using standard JavaScript numbers, but the real win here is probably in the reduced memory footprint for certain use cases. I'd be curious to see benchmarks against native `BigInt` across various browser engines and node versions, especially when considering the overhead of managing the digit arrays.
ko20267 days ago
Coolest thing I've seen in a while
Well done!
0x0mer7 days ago
Thank you! :)
user39393827 days ago
Why is GitHub asking me for a login to view a public repo link? What is this LinkedIn now?
macintux7 days ago
That's strange. I just tested in a private tab (Safari) and wasn't asked to log in. Hopefully this isn't some A/B testing fiendishness.
hedora7 days ago
A while back, they started aggressively rate limiting non-logged-in users.
I rarely login, because I don’t want to be a supply chain attack vector, but I guess that’s bad for someone’s promotion metrics.
Anyway, don’t host documentation there, and if you do, put it on one big page. If I read two paragraphs, think, then read the next page and so on, it bans me after about 5 clicks.
Them A/B testing “make it all private” would disappoint me, but not surprise me.
george_max7 days ago
Haha, cool project and README!
0x0mer7 days ago
Thank you!
brcmthrowaway7 days ago
Was Claude used?
0x0mer7 days ago
The only part of the code that was written by AI is the graphics window visualizing the constructions (i.e., the points, lines and circles) and I used codex
Haha thank you! I'm glad to hear!
[dead]
Thank you very much! :)
What a beutiful AI-slop comment!
[dead]
Fantastic comedic writing (and project, of course). It had me guffawing.
To add my own "most relatable" quote to this thread:
> As always, please save any important work before running anything I ever write.
:')
But really I just want to add to the cacophony of appreciation in this thread :)
0x0mer, I hope you feel the love from this reaction and can bask in that warm inner glow for years to come.
Thank you so much! I'm really happy you could relate :)
And definitely feeling the love and the warm inner glow!!
Cool. I just learned of compass and straight edge calculations from this video on doubling a cube https://www.youtube.com/watch?v=96LbF8nn05c from Ben Syversen's channel a couple of months ago
Thanks for posting, means a lot! :) I'd be happy to know how you stumbled upon it
> CasNum (Compass and straightedge Number) is a library that implements arbitrary precision arithmetic using compass and straightedge constructions. Arbitrary precision arithmetic, now with 100% more Euclid. Featuring a functional modified Game Boy emulator where every ALU opcode is implemented entirely through geometric constructions.
Awesome :D
Thank you! :)
The implementation could be simplified to only use a compass: https://en.wikipedia.org/wiki/Mohr%E2%80%93Mascheroni_theore...
Napoleon really was into this stuff, Mascheroni dedicated a book to him & there’s a famous anecdote that Laplace told him they expected everything from him except lessons in geometry. https://perso.ens-lyon.fr/ghys/2021/05/17/1952/
Nice job but I'd like to see it implemented w/ polynomial rings & quotients.
It is implemented with polynomial rings!
I use SageMath to find minimal polynomials and solve the constructions algebraically. The reason I say that the library is only "arbitrary precision" and not exact/symbolic is that I use approximation in order to distinguish between points. I believe the "correct" way to implement this as exact would have been to save for each number its minimal polynomial and some interval that contains it and distinguishes it from the other roots of its minimal polynomial. It shouldn't be too much work to incorporate this, maybe I will do it some day :)
I am really curious how this compares to https://github.com/rubenvannieuwpoort/reals
I'd guess that CasNum would be, how do I put this? not as performant
This is so nice!!
I'm wondering how hard would it be to extend it to include the whole game state plus all the ROM into the plane at the same time, and have it compute the next step from that!
That's a good question :)
I was wondering about this myself, it feels and probably is possible, and I have some ideas on how to do it. Though, on the one hand it would be cool if the entire GB was emulated using compass-and-straightedge, but OTOH, it would be less "pure" and a little more "forced" than just simulating the ALU, if you get what I mean.
One idea I had is trying to draw the graphics of the game using compass-and-straightedge constructions (i.e., using circles and lines to draw approximately the GB graphics)
Well that's just lovely.
Thank you!
"Think of these as your ISA." Thank you good Sir for truly naming this in the clearest, most precise semiotics.
Tried to use it to solve a quintic equation and it didn’t work :(
Sadly this feature request was denied by Abel-Ruffini :(
Not completely though. Merely for almost all quintics.
Interesting approach to handling large numbers without relying solely on `BigInt`. The choice of base 10^9 allows for efficient arithmetic using standard JavaScript numbers, but the real win here is probably in the reduced memory footprint for certain use cases. I'd be curious to see benchmarks against native `BigInt` across various browser engines and node versions, especially when considering the overhead of managing the digit arrays.
Coolest thing I've seen in a while Well done!
Thank you! :)
Why is GitHub asking me for a login to view a public repo link? What is this LinkedIn now?
That's strange. I just tested in a private tab (Safari) and wasn't asked to log in. Hopefully this isn't some A/B testing fiendishness.
A while back, they started aggressively rate limiting non-logged-in users.
I rarely login, because I don’t want to be a supply chain attack vector, but I guess that’s bad for someone’s promotion metrics.
Anyway, don’t host documentation there, and if you do, put it on one big page. If I read two paragraphs, think, then read the next page and so on, it bans me after about 5 clicks.
Them A/B testing “make it all private” would disappoint me, but not surprise me.
Haha, cool project and README!
Thank you!
Was Claude used?
The only part of the code that was written by AI is the graphics window visualizing the constructions (i.e., the points, lines and circles) and I used codex
I have no idea what is going on here...
https://en.wikipedia.org/wiki/Constructible_number
Like an oasis in a desert of LLM slop. Thanks I enjoyed this README
Happy to hear! :)
[flagged]
[flagged]