← 목록

I fell down a debugging rabbit hole

reddit_programming 2026-08-19 원문 보기 ↗


It all started with a bug: it turned out that 7.5 % 2 gives 1.5 in JavaScript and 1 in PHP. And it got me thinking: how many more differences like this are there? I don't want them to catch me off guard again.

Since I couldn't find a list of the divergences I was looking for, I did what any reasonable person would do: put eight AIs to work on it.

So far, they found 143 semantic divergences… and that's only among the data types JSON deals with: numbers, strings, arrays, maps, and booleans.

For example:

And that's without even mentioning our beloved 0.1 + 0.2 = 0.30000000000000004 in every language using 64-bit floats.

The full list is linked in the post (it's basically a compilation video of programming accidents).

And if you're curious, have a look around the rest of the repo. It's like JSON, but for business logic. It already compiles itself to JS and PHP, with more targets coming.
Demo: https://jsol.bustelo.com.ar/

Maybe you'll think it's an abomination. Maybe you'll find it useful. Let me know :)

submitted by /u/santiagobustelo
[link] [comments]