Top all-time · #15595
Nimble Machines
Personal blog · nimblemachines.comhardwareprogramming
Nimble Machines is a personal blog at nimblemachines.com about hardware and programming. Since 2019, 5 different Hacker News readers have linked it 7 times, most often “Symmetric Division Considered Harmful”. No feed was found, so read it on the site itself.
Too few sampled comments (3) to say how often HN recommends it.?
Why HN links it
Commenters link these posts on integer division and modulo, including floored versus symmetric division, as background on Forth-83 and how other languages handle negative numbers. None judge the writing itself.
Summarised by Claude from a sample of 3 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Nimble Machines is where I talk (and rant) about microcontrollers, Forth, functional programming, bicycles, audio, and anything else that captures my attention.
Most-linked posts?
- Symmetric Division Considered Harmful4 people · 6 mentions · first linked 2019-05-20
What Hacker News says?
The FORTH-83 standard adopted floored division. https://wiki.forth-ev.de/doku.php/projects:signed_integer_di... Lots of other languages got it wrong: https://en.wikipedia.org/wiki/Modulo_operation#In_programmin... Symmetric division is the kind of thing that causes rockets ships to explode unexpectedly. Symmetric division considered harmful: https://www.nimblemachines.com/symmetric-division-considered... >Since its…
Comment linking /symmetric-division-considered-harmful/
on “Python, unlike C, has the mod operator always return a positive number”Submitted Symmetric Division Considered Harmful as a story · 2 points
HN discussionForth-83 beat C99 by 16 years! >Python, unlike C, has the mod operator always return a positive number (twitter.com/id_aa_carmack): https://news.ycombinator.com/item?id=29729890 https://twitter.com/ID_AA_Carmack/status/1476294133975240712 tzs on Dec 30, 2021 | next [–] >The submission is a tweet which doesn't really have a title, so the submitter was forced to make up one. Unfortunately the assertion in the chosen t…
Comment linking /symmetric-division-considered-harmful/
on “Why Python's integer division floors (2010)”Submitted Symmetric Division Considered Harmful as a story · 2 points
HN discussionYou might get unexpectedly negative financial results if you don't use floored division and modulo properly: https://stackoverflow.com/questions/4467539/javascript-modul... >JavaScript % (modulo) gives a negative result for negative numbers >Question: According to Google Calculator (-13) % 64 is 51. According to Javascript (see this JSBin) it is -13. How do I fix this? >Solution: ((i % n) + n) % n The Forth-83 stand…
Comment linking /symmetric-division-considered-harmful/
on “Using floating-point numbers for money”Submitted Donuts, Inc: a creepy company (2018) as a story · 1 points
HN discussionSubmitted Symmetric Division Considered Harmful as a story · 1 points
HN discussion