4 ms·
Was it for fun or for business?
by jdormit 10y ago
Was it for fun or for business?
- amorphid 10y agoMostly fun. I was initially pissed off out how a JSON encoder/decoder exploded when parsing a large float. After a while, I learned what I wanted to learn about why it works they way it does and moved on to other things.
- jdormit 10y agoInteresting. What encoder exploded at the large float? I ask because I would be surprised if an encoder/decoder from one of the major languages couldn't handle that.
- amorphid 10y agoIt's Poison, a hex package for Elixir. It blows up if you try to parse a number somewhere between "1e308" and "1e309". That is a limitation of the Elixir standard lib. Elixir doesn't try to handle that in a special way, it just raises and exception. I'd love to see something like a BigFloat, or an plug-in hook giving you the option to not explode if you didn't want to. In Ruby, when you parse "1e309" with the built in JSON gem, you get "Infinity". That drives me bonkers, too :)