Edited the post to add a "floating point isn’t bad or random" section because I really did not want people to take away "floating point is bad". Floating point is amazing! It's just solving an inherently very hard problem.
I don't think I understood before this week that a "fixed point number" is literally just an integer (which represents that integer divided by 1000 or something)
(the reason I don't want to post reruns on main is that whenever I do, people reply with lots of interesting comments/suggestions, and I find it distracting because I'm not actively working on that comic and am not going to make any changes)
I was thinking about how I have hundreds of programming comics I've posted to Twitter over the last 5 years that aren't on Mastodon anywhere. Would folks be interested in a "b0rk_reruns" account where I have a bot post older comics?
I think the main hard thing about that would be figuring out captions, I only started writing captions pretty recently and backfilling is hard
today I'm thinking about how floating point numbers can be treacherous -- what are specific examples of when they've betrayed you?
so far I have:
* money calculations where you need to get the exact correct answer (you have to use integers, not floats) * twitter's tweet IDs are bigger than 2^53 and can't be represented as a Javascript number, you have to use a string
I'm looking for specific examples of what code you were writing that broke, not general facts about floats
today I'm thinking about why it's useful for someone who mostly works in higher-level languages (python, JS, scala, etc) to understand how computers represent things in bytes.
some ideas I have so far:
- reading the output of strace - doing back-of-the-envelope storage calculations - choosing the right size for a DB primary key (to prevent overflow) - knowing the limits of JS numbers - optimizing algorithms (like knowing that multiplying by 2^n is fast) - debugging encoding issues
I'm also curious about whether there's ever a reason to understand how two's complement works (I'm sure it's cool but I've never needed to learn it so far, only that signed and unsigned integers are different)
Very relatedly: I'm planning to have "The Pocket Guide to Debugging" shipped around the end of January. Still working out a few final things with the printer.
I was worried when I started selling print copies that nobody would buy them. But it looks like we've almost sold out the first two print runs (from 2021/2022)! 850 printed copies of each zine!
Decided to take an optimistic approach and print 1000 copies of each zine for the next print run. Hopefully I won't regret it :)
I also think this page is slightly wrong -- my understanding is that data in memory is actually stored in words? (on my machine, 1 word = 4 bytes). But that feels like too much to get into here, and I'm still slightly confused about words
my current top idea for what to write next is a "how binary things work" zine, that explains how your computer represents things in memory, and the most common things you find in binary file formats
thinking about what to write zines about in 2023. I have a few ideas, but: what would you like to read a zine on? (all suggestions are ok -- even if I don't know anything about the topic, maybe someone else will see it and be inspired and write a zine! :))
long shot, but: does anyone know of a fulfillment company based in Canada or Europe that works with very small companies / artists? I work with https://www.whitesquirrel.com/ in the US (who are AMAZING) but shipping from the US to Canada/Europe is just inherently pretty expensive
the most fun thing about this project is that it's a static site -- there's no server code! It just makes cross-origin requests to your mastodon instance directly.
I'm also doing an experiment with this project where put the code online but explicitly say in the README that it's unmaintained, so that I don't have to feel bad when I inevitably ignore all issues and PRs :)