Top all-time · #1022
surma.dev
Personal blog · surma.devprogrammingweb
surma.dev is a personal blog at surma.dev about programming and web. Since 2021, 68 different Hacker News readers have linked it 69 times, most often “Ditherpunk: The article I wish I had about monochrome image dithering”. It is still writing: the last post was on 2025-06-17, and you can follow it by feed.
Most-linked posts?
- Ditherpunk: The article I wish I had about monochrome image dithering29 people · 29 mentions · first linked 2021-01-04
- WebGPU – All of the cores, none of the canvas7 people · 7 mentions · first linked 2022-03-08
- Rust to WebAssembly the Hard Way7 people · 7 mentions · first linked 2023-02-13
- Is WebAssembly magic performance pixie dust?5 people · 5 mentions · first linked 2021-04-14
- WebAssembly optimization with AssemblyScript4 people · 4 mentions · first linked 2021-04-13
- I turned JavaScript into a compiled language (for fun and WASM)4 people · 4 mentions · first linked 2022-10-03
- Compiling C to WebAssembly without Emscripten3 people · 3 mentions · first linked 2021-07-18
- The Cost of Convenience2 people · 2 mentions · first linked 2022-06-17
- When should you be using Web Workers?2 people · 2 mentions · first linked 2021-06-07
What Hacker News says?
This guys' articles are wonderful. I was experimenting with compiling C to WASM[0] and Surma's was really helpful. [0]: https://surma.dev/things/c-to-webassembly/index.html
Comment linking /things/c-to-webassembly/index.html
on “Ditherpunk: The article I wish I had about monochrome image dithering”Submitted Ditherpunk: The article I wish I had about monochrome image dithering as a story · 1290 points
HN discussion“Dithering” is the key — except this seems to have been done by hand. When I was a kid, I owned a monochrome display that could only display at CGA resolutions “640x400” 1-bit (and 320x200). Many games and art and didn’t support that showed up garbled. Then I got hold of Deluxe Paint that would load pictures in color and dither them with an algo called Floyd Steinberg. And the pictures that I saw on my friends VGA m…
Comment linking /things/ditherpunk/
on “MacPaint Art from the Mid-80s Still Looks Great Today”Submitted WebGPU – All of the cores, none of the canvas as a story · 393 points
HN discussionYou could approximate this by taking a picture as normal, then resizing and applying some dithering I think. There was a nice article submitted to HN recently on this: https://surma.dev/things/ditherpunk/
Comment linking /things/ditherpunk/
on “Game Boy Camera Canon EF Lens Mount (2018)”Submitted Is WebAssembly magic performance pixie dust? as a story · 347 points
HN discussion"Collision detection is usually a tree search" Yes, because of the very limited numbers of CPU cores. With a GPU you can just assign one core to one particle. Here is a simple approach to do it with WebGPU: https://surma.dev/things/webgpu/ It uses the very simple approach, of testing every particle with EVERY other particle. Still very performant (the simulation, the choosen rendering with canvas is very slow) I cur…
Comment linking /things/webgpu/
on “Liquid Layers”Submitted Is WebAssembly magic performance pixie dust? (2021) as a story · 127 points
HN discussionRabbit hole ahoy: https://surma.dev/things/ditherpunk/
Comment linking /things/ditherpunk/
on “Quantized Llama models with increased speed and a reduced memory footprint”Submitted I turned JavaScript into a compiled language (for fun and WASM) as a story · 14 points
HN discussionYour mention of Return of the Obra Dinn reminded me of this article[1] which I found quite fascinating about dithering, the technique used for the game's art style. One of the neat things about these types of small indie games is that they can do unique things with (among other things) art style which bigger budget games that need a wider appeal can't afford to. [1] https://surma.dev/things/ditherpunk/
Comment linking /things/ditherpunk/
on “ConcernedApe's Haunted Chocolatier”Submitted Ditherpunk – The article I wish I had about monochrome image dithering as a story · 4 points
HN discussionThen you might enjoy this one, too: https://surma.dev/things/ditherpunk/
Comment linking /things/ditherpunk/
on “Convert photos to Atkinson dithering”Submitted Case study: Moving a Three.js-based WebXR app off-main-thread as a story · 4 points
HN discussionLucas Pope's section of the update video [0] has me incredibly excited. He's one of my favorite game developers, and seeing him work more with 1-bit 3D games after Obra Dinn has piqued my interest. Also, a blog on dithering I came across after playing Obra Dinn was one of the more interesting tech blogs I've read [1]. Also see Lucas Pope's post on how he did dithering in-game [2]. [0] https://youtu.be/DeWGukDrc1U?t=…
Comment linking /things/ditherpunk/
on “Playdate pre-orders begin in July”Submitted Ditherpunk – The article I wish I had about monochrome image dithering as a story · 3 points
HN discussionActually you can do the same with clang. Emscripten just installs a bunch of stuff to make it easier to use existing libraries. If you just want to use standard library, no need for extra stuff. https://surma.dev/things/c-to-webassembly/
Comment linking /things/c-to-webassembly/
on “Zig cc: A drop-in replacement for GCC/Clang (2020)”Submitted Ditherpunk – The article I wish I had about monochrome image dithering as a story · 3 points
HN discussionA great visual intro to dithering here [1] and a specific filter based on Bill Atkinson’s algorithm for the original Mac here [2] [1] https://surma.dev/things/ditherpunk/ [2] https://www.tinrocket.com/content/hyperdither/
Comment linking /things/ditherpunk/
on “Apple Silicon M1 supports “billion of colors” a.k.a. HDR 10-bit output”Submitted I turned JavaScript into a compiled language (for fun and WASM) as a story · 3 points
HN discussionMore on dithering: https://surma.dev/things/ditherpunk/
Comment linking /things/ditherpunk/
on “Atkinson Dithering (2021)”Submitted WebAssembly optimization with AssemblyScript as a story · 3 points
HN discussionWhile reading this[1] I just remembered you guys and thought I'd throw in the idea of compiling your "native" code to WebAssembly, in case it might fit your case. https://surma.dev/things/js-to-asc/
Comment linking /things/js-to-asc/
on “Show HN: Pop.com – pair programming with low-latency, Screenhero-style sharing”Submitted Ditherpunk – The article I wish I had about monochrome image dithering (2021) as a story · 2 points
HN discussionCool, yeah Floyd Sternberg is definitely period appropriate! This article on dithering made the rounds a few months ago, and was a fascinating read; the hilbert curve method at the end (Riemersma) might be a good fit and get rid of some of the line effects (if that's of interest). And the Atkinson error diffusion sounds like it even has some history in old macs. https://surma.dev/things/ditherpunk/ There's a really…
Comment linking /things/ditherpunk/
on “MacFlim: Full-motion video on B&W Macs”Submitted I turned JavaScript into a compiled language (for fun and WASM) as a story · 2 points
HN discussionOh man, there is an absolute beauty with 1-bit graphics that I think is deeply underappreciated. When the right dithering algorithm is used, the graphics look like what characters in cyberpunk novels dream of. [1] I secretly wish the dominant aesthetic in computing was one where everything was mac-like 1-bit dithered graphics, and we only used color when absolutely necessary - when the black and white graphics just…
Comment linking /things/ditherpunk/
on “Decker – A HyperCard Replacement”Submitted Rust to WebAssembly the Hard Way as a story · 2 points
HN discussionUnfortunately not when you're performing error diffusion, where the residuals are added to neighboring pixels. If you're doing it in the non-linear domain, you're going to get a different result during that diffusion step, even when you're dithering to a target 1-bit/pixel image. You can see this visually in Surma's excellent blog post [1]: look for the gradient strips in the "Gamma" section. [1] https://surma.dev/t…
Comment linking /things/ditherpunk/
on “Ditherpunk 2 – beyond 1-bit”Submitted The Cost of Convenience as a story · 2 points
HN discussion