4 ms·
Investigating MacPaint's Source Code
- DesertVarnish 2y agoMy wife has been working on a pixel accurate recreation of MacPaint on the web, and one of the things that I've learned from on-and-off helping with it was just how much of the magic in it is actually just handled by QuickDraw. Also, the text styling has a lot more complexity than you would expect.
- jwstarr 2y agoBy "pixel accurate", do you mean the user interface or the rendering? Is she able to leverage the HTML 2D Canvas API or does she have to go lower level than that?
- allthreespies 2y agoI’m using a buffer pool and raw bitmaps with calls to drawImage - the canvas api doesn’t play very well with trying to do things in a pixel perfect way. I’ve gone on a lot of rabbit holes digging into original source code and dev manuals for this project, hopefully one day I’ll write some of it up somewhere. I think what’s been interesting is iterating towards the most elegant solutions has often meant ending up with pretty similar approaches to what Atkinson originally used.
- userbinator 2y agoMSPaint (which I wish MS would officially open-source) heavily relies on GDI too.
- gblargg 2y agoQuickDraw's regions always impressed me. They could cover an arbitrary area, and most operations could be masked to a region. This was important for updating a window behind another efficiently, just mask to the visible portion and draw its contents normally.
- JKCalhoun 2y agoMe as well. As I recall, regions were essentially something akin to an array of run-length-encodings for each scan line (where, additionally, there was a sentinel or some way to indicate the next n rows are the same as the previous). The fun part is then writing a set of routines to union, difference, etc. pairs of these RLE region objects (and here I use the word 'object' loosely).
- userbinator 2y agoSomething felt a little "off" about the text of this article, but this fragment raised the most suspicion: demonstrate mechanical empathy with the 68k platform
- garbagewoman 2y agoSuspicion of what?
- userbinator 2y agoDoesn't sound like something a native nor non-native English speaker would write.
- TickleSteve 2y agoThe correct phrase is "mechanical sympathy" but it means effectively the same. Its relatively well known in software optimisation and means tailoring the design of the software to match the characteristics of the hardware.
- fragmede 2y agoSympathy involves understanding someone’s feelings from your own perspective and feeling sorry for their situation. Empathy means putting yourself in someone else’s shoes, imagining their feelings and experiencing their emotions as if they were your own. Based on those definitions, mechanical empathy seems more correct. It describes the ability to understand and intuitively sense how machines or mechanical systems work, almost like understanding.
- fragmede 2y agoYour detector is off. Mechanical empathy and sympathy; whichever is correct, both predate ChatGPT. https://trends.google.com/trends/explore?date=all&geo=US&q=mechanical%20empathy,mechanical%20sympathy&hl=en https://trends.google.com/trends/explore?date=all&geo=US&q=m... It's a good phrase that describes when someone really knows their car and can just tell how its "feeling".
- peterbmarks 2y agoBill Atkinson unfortunately has been diagnosed with Pancreatic cancer. https://daringfireball.net/linked/2024/11/13/atkinson-prayers https://daringfireball.net/linked/2024/11/13/atkinson-prayer... I'm sure everyone wishes him well.
- JKCalhoun 2y agoAtkinson writes QuickDraw, then writes an app, MacPaint, that essentially uses every aspect of it, then has Susan Kare using MacPaint. What a fantastic feedback loop for readying a framework before shipping. Contrast this with the "I Don't Know How To Count That Low" meme.