• 0 Posts
  • 12 Comments
Joined 2 years ago
cake
Cake day: September 24th, 2023

help-circle



  • Try interacting with anything that uses u64 and you’ll be a lot less happy!

    Anyway JavaScript does have BigInt so technically you are choosing.

    that insanity is how C and Intel handle NaN conversions.

    It’s not actually quite as bad as the article says. While it’s UB for C, and it can return garbage. The actual x86 conversion instruction will never return garbage. Unfortunately the value it returns is 0x8000… whereas JS apparently wants 0. And it sets a floating point exception flag, so you still need extra instructions to handle it. Probably not many though.

    Also in practice on a modern JS engine it won’t actually need to do this operation very often anyway.








  • This comment perfect captures why I don’t like Lisp. Essentially “it’s simple, this easy to read code transforms to this AST”. Lisp basically says “we can make parsing way easier if we force programmers to write the AST directly!” which is really stupid because computers can perfectly well parse syntax that is easy for humans to read and turn it into ASTs automatically.

    It makes it easier to parse for computers at the cost of being much harder to parse for humans, which is really the wrong choice in most cases. (The exception is if you’re DIYing your compiler, e.g. if you’re teaching how to write a compiler then Lisp is a good target.)