WebAssembly Becomes a W3C Recommendation
At its core, WebAssembly is a virtual instruction set architecture that enables high-performance applications on the Web, and can be employed in many other environments. There are multiple implementations of WebAssembly, including browsers and stand-alone systems. WebAssembly can be used for applications like video and audio codecs, graphics and 3D, multi-media and games, cryptographic computations or portable language implementations.
December 6, 2019
A Retrobatch customer recently wrote in with a problem where it was crashing when processing a bunch of images overnight, seemingly from gobbling up all the available memory on the system. After a bit of questioning I've narrowed down at least one source of the problem- Core Graphics is leaking like a sieve when generating thumbnails from 16 bit per component tiff files.
I have a sample project which simply opens up an image source and then loads the thumbnail 500 times in a loop. It releases the thumbnail immediately so the system can reclaim the memory for other operations.
When run against an 8bpc tiff file, memory grows to around 75 megabytes. When run against a 16bpc image, memory spikes to almost 4 gigabytes, and the memory is never reclaimed.
Obviously most apps don't open up 16bpc tiff images 500 times in a row, but this is exactly what Retrobatch was designed in part to do.
Filed as FB7482388.
December 4, 2019
Andrew Bisharat writing for Outside Online: What ‘The New York Times’ Got Wrong About Climbing:
One of the more disparaging quotes from Pasternak is, “Keeping in mind the average American is significantly overweight, I would talk everyone I could out of rock climbing unless you are incredibly light, agile, fit and functional. There is a very small minority of this country that should be rock climbing.”
When I first read those lines in the original Times article, I had to stop reading. I couldn't believe they would have quoted such utterly backwards statements. It felt like a "fair and balanced / there's two sides to every story" angle, no matter what the truth might be. They've done great reporting on climbing in the past— why would they quote this?
It’s also plain wrong. Climbing is one of the best sports in the world, precisely because it’s open to every age, gender, and ability. The scene at any gym or crag is one populated by people from three to 70-plus years old—women, men, nonbinary—all climbing with each other, all building trust, connection, and friendships.
Climbing may not give you a butt like Kim Kardashian, but it’s a path to making anyone as strong as an ape. No matter your ability, you will gain strength (and flexibility) through climbing that will (eventually) allow you to lever your body up an impossible-looking wall, which is more impressive than vanity beach muscles. Deadlifts may be the perfect exercise, but climbing is way more fun, filled with amazing people, and ripe with opportunity to travel.
I took my mother to a climbing gym for the first time last year, which I think she was interested in (partly) because her granddaughter was having fun doing it as well. When she came to visit us again this past week I asked her if there was anything specific she wanted to do, and the first words out of her mouth were "climbing". So of course, we went indoor climbing again. She's 71 now, and had as much fun as my 7 year old daughter.
If you are going to be chasing the elite level climbing routes, of course you're going to need strength and fitness. And there's fun to be had in those chases— but that's not the only fun to be had. I find myself on "easy" routes all the time because the movement feels great and it puts a smile on my face. And the confidence you build as you progress in your ability to climb more difficult routes feels amazing. People think it's adrenaline we're addicted to, and that couldn't be further from the truth. It's the personal achievement and the feeling you get when you finally make it to the top of something you've been working on for weeks.
Anyway, take an intro class and give it a try. It's a good time.
What Order to List Typefaces in a Font?
Today I'm doing some minor bug fixes in Acorn, and I'm currently tweaking the order in which font typefaces show up in the text palette's typeface popup.
Currently to get a list of typefaces for a font, I use NSFontManager's
availableMembersOfFontFamily:, and just loop through those and add it to the menu. Now I'm thinking I should sort them alphabetically (as suggested from a customer). However I'm not 100% sure that's the right way to go.
Should the listing start with the thinest font variant, and move down to the boldest? Should the Regular style be placed at the top if there is one? Should italic variants interleave with everything? Is there already an algorithm out there that I'm aware of?
Am I thinking too hard on this?
Update: The docs for
-[NSFontManager availableMembersOfFontFamily:] say:
"The members of the family are arranged in the font panel order (narrowest to widest, lightest to boldest, plain to italic)"
Unfortunately, it looks like this is broken on MacOS 10.15.1. Running Acorn on 10.14 produces the order as described (and as seen below with Helvetica Neue). Looks like I was sent on a wild goose chase and I need to file a bug report to Apple instead.
Filed as FB7476430, with a sample project.
November 22, 2019
Inspired by Inessential's 20th birthday, I decided to dig in and see how hard it would be to import my old posts from gusmueller.com into my current blogging system. Thirteen hundred posts later, I think I've got a reasonable archive added in now, dating back to December of 2000.
Blogging back then for me was way different that it is now. I pretty much wrote about pointless little things that I knew only five or six people would see. I would make references that probably only a few people understood. There were no titles in the posts either, much like Micro.blog does today.
This was also when I would spin up a new MySQL database at the drop of a hat, and build a new blogging engine in Java or Python or whatever over a weekend, just for fun. And then of course all my blogging was in VoodooPad via a custom Lua plugin, and I eventually shipped it with the app.
Honestly, the old posts are kind of embarrassing. There are a few good ones that maybe shouldn't be lost to time, like "How to become an independent programmer in just 1068 days". Maybe my posts about how I'm craving some fried chicken at the moment should be. But you can see my post where I released my first piece of paid software (it didn't even make the $7 I was hoping for). And the post where I discover someone had put VoodooPad up on VersionTracker for me still cracks me up.
In the end, I decided I should spend a little bit of time bringing it all over, even if there are formatting problems (which I'm going to try clean up).
One More Birthday Till the Legal Drinking Begins
Today is my blog’s 20th birthday!
It started like this: at the time I was working at UserLand Software on a blogging app called Manila, and this was my own personal Manila blog. It’s gone through a few other engines since then. (These days it’s rendered — as a static site — by some Ruby scripts.)
20 years is no small feat. Congrats, Brent.
They Might Never Tell You It’s Broken
The problem, it turned out, was that MacOS had more strict requirements for keeping the stack pointer aligned. This wasn’t difficult to fix. The more important lesson, that I didn’t understand until that point, is that you can’t count on the people trying your project to quickly and reliably signal bugs to you. Most of the time, if it doesn’t work, they won’t report the problem. There are a few reasons why this might be.
November 5, 2019
A few months ago, some very nice folks from the App Store at Apple came up to my house and took a bunch of pictures. I worked a bit, we went rock climbing at the new Vertical World, and I even made some pizza.
The result is this cool little profile in the developer section: Meet the Developer: His Big Photo Op.
It was all a bit overwhelming, but fun at the same time.
(There's a version of the profile on the web, but it's a truncated version of what you can see in the App Store - which should auto-open if you visit that link).
October 23, 2019
With the recent release of MacOS 10.15 Catalina, we've put Acorn on sale at the insane price of $14.99. That's 50% off. If your old version of Photoshop won't run on Catalina, or you are still using Acorn 5- now is a good time to get the latest and greatest at a big discount. This sale will only last till October 31st, so it'll be over quickly.
And of course, head over to Acorn's website to see what it can do for you.
Retrobatch 1.3 was also pushed out last week. It includes new nodes such as Vignette, Gradients, Remove Specific Metadata, and a Duplicate node. It also includes improvements to existing nodes such as a token in the Write Node for writing back to an images' source folder, page number tokens, and more. The Trim to Edges node has new options for selecting specific colors while trimming, or using whatever the dominant edge color is. The full release notes are availble as always.
Core Animation Reduces Power Usage in Firefox
In Firefox 70 we changed how pixels get to the screen on macOS. This allows us to do less work per frame when only small parts of the screen change. As a result, Firefox 70 drastically reduces the power usage during browsing.
While reading this, I found a bunch of parallels between Firefox and Acorn with regards to compositing. Acorn draws to an IOSurface like Firefox, but I've got some interesting code for doing partial updates to big Metal textures, so Acorn does as little copying as possible.
Coffee and Chocolate Make You Smarter, According to the Latest Neuroscience
The big takeaway: if you want to keep your brain healthy both today and in the future as you age, you should be consuming coffee, tea, or cacao.
Coffee every morning and sometimes in the afternoon, and if not then I'll drink some tea. I had been eating a ton of dark chocolate but have recently cut back. Maybe I'll reconsider. Mrs. Mueller will never cut back from dark chocolate.
October 7, 2019
Brent Simmons: Xcoders 15th Anniversary
We’d be thrilled if you could come to the meeting. Your Xcoders podcasters will be talking to a panel of old-timers about the history of the group. And afterward we’ll go to the Cyclops and hang out — just like we always do.
I don’t think I need to remind anyone of the important of community. It gives back to us so much more than we as individuals could ever put into it.
The New York Times on Blues Guitarist Robert Johnson
"And yet, in the late 20th century, the advent of rock ’n’ roll would turn Johnson into a figure of legend. Decades after his death, he became one of the most famous guitarists who had ever lived, hailed as a lost prophet who, the dubious story goes, sold his soul to the devil and epitomized Mississippi Delta blues in the bargain."
I discovered Robert Johnson in college while learning the guitar and playing blues with friends. Johnson's recording were simple and raw, but full of … something.
Johnson only ever had 41 recordings of almost 30 different songs, but his influence on blues guitar has been immeasurable.
September 23, 2019
Behind the Dark Room is a video by Jeremy Mann detailing what goes into his photo making. And it's amazing, and possibly one of the best things I've ever seen. (Warning- there's a little bit of artistic nudity in it if you think that might offend folks around you).
It's a 20 minute video, but it'll fly by because it sucks you in. It almost had me in tears at one point, because he's doing what I strive to do- the deep dive, the rabbit hole, the work it takes to get to an understanding and building of the new foundation for your work.
Just watch it.
For the past couple of years Jeremy Mann is who I've been going to for inspiration. His paintings, his photos- they just speak to me in ways I can't describe in words. His mark making is one of a kind, and his approach and philosophy to everything is just so refreshing and inspirational.
Mann was on a the Suggested Donation podcast a few years ago. I've listened to it at least four times now, and it gets better every time.
There's also a mailing list you can join, where Mann sends out thoughts and photos every couple of weeks. And I love each and every one of them.
September 20, 2019
Hillel Wayne: Performance Matters
"It wasn’t even that slow. Something like a quarter-second lag when you opened a dropdown or clicked a button. But it made things so unpleasant that nobody wanted to touch it. Paper was slow and annoying and easy to screw up, but at least it wasn’t that."
James Somers: Speed matters: Why working quickly is more important than it seems
"The obvious benefit to working quickly is that you’ll finish more stuff per unit time. But there’s more to it than that. If you work quickly, the cost of doing something new will seem lower in your mind. So you’ll be inclined to do more."
I used to work really fast, but these days not so much. I wish I did though. It's liberating to just throw stuff out there and move around and iterate quickly.
I think the reason I don't work fast anymore is because the code I write and any other actions I take for work cause ripples that effect a whole lot more people now than they did 10 years ago. I have to be conscious of this (at least I assume I do, or should be). But at the same time, it bugs me that I can't just stream ideas out there and iterate without people instantly becoming dependent on these ideas, which might not be fully baked. If I change the behavior of a filter in Acorn is that going to screw someone up? What about a node in Retrobatch which is surely being used in some sort of production environment?
And then I have ideas for apps. Tons of ideas, but which I don't have time or the will to setup a proper website or introduction, and certainly not support. Just fun things that I want to quickly get up and out there. I used to do this all the time!
Maybe I need a skunkworks branch of Flying Meat.
September 16, 2019
A new climbing gym, Vertical World North, just opened up about a month ago near us. It's big, it's spacious, and it's not usually very crowded. I think it's a beautiful gym, so here are some quick pictures of it:
Dan Erickson also has some great pictures from the construction of it: Behind the Walls - Vertical World North. It's amazing just how much steel and structure goes behind those walls.
So this gym has been in the works for about four years now. Maybe five depending on when you start counting. The climbing community has been waiting a long time for it, but I think it's been worth the wait. It's been great reconnecting with old friends, and making new ones as well (climbers are pretty easy going folks).
It's not fully open yet (there are limited hours during the day, and the second floor bouldering area is yet to be completed), but there's a bunch of top ropes and lead routes for climbers of every skill level. And of course classes have started as well. I find myself there more often than I should be, but climbing's fun- so why not?
If you're in the area, or don't mind a little drive up from Seattle, I highly recommend checking it out if you're curious about climbing or just want to try out a new gym.
September 11, 2019
If you're a programmer that loves cameras or image processing, and working for Apple sounds like a good move- @ivanski wants you to know they're hiring. There are multiple open positions on the Camera Framework and Core Image teams down in Cupertino.
Unsurprisingly, I've had many interactions with the people on Apple's Core Image team over the years from my work on Acorn, and they've always been super great to work with. I think it'd be a great team to join if GPU programming, image processing, and pushing pixels around is something you enjoy.
September 9, 2019
Daniel Jalkut: App Movement Monitoring:
"Essentially, when a Mac app is launched, the location of that app on disk is saved, and used repeatedly whenever an internal component needs to located. The dynamic nature of resource loading in Mac apps means that these components are not typically loaded until they are need. For example, if you never show the Preferences window in a typical Mac app, the resources that define that window will never be loaded.
"If, on the other hand, you decide to show the Preferences window, but you’ve moved the app since it was launched, things have a tendency to go haywire."
Daniel wrote this post after figuring out a crasher in NetNewsWire 5. And the solution he came up with is contained in a single source file you can embed in your Mac app, RSAppMovementMonitor. It's a good solution and I'll have to integrate it into Acorn and Retrobatch for their next updates.
But shouldn't the Finder prohibit moving an app while running in the first pace? I think so, and so does Paul Kafasis as he writes at Rogue Amoeba: The Finder Really Should Prevent Moving Running Applications.
Daniel also talks about his solution on episode 382 of the Core Intuition podcast.
September 5, 2019
Craig Hockenberry: iCloud Clusterfuck:
"Anyone who’s not a developer, and hasn’t been burned by a bad OS, does not know the kind of trouble that lies ahead. It’s irresponsible for Apple to release a public beta with known issues in iCloud. It’s doubly egregious to then promote that release with an email campaign to customers. For a company that prides itself in presenting a unified front, it sure looks like the left hand doesn’t know what the right hand is doing."
I've been doing this long enough to remember when the .Mac APIs were built against an SDK. I understand why Apple ties iCloud API updates to OS releases, but I really wish they wouldn't. Apple's coders are smart enough to make things backwards compatible, and being able to deploy new iCloud APIs to last year's OS release would be a nice win for everyone.
And more importantly, a separate SDK that isn't tied to this year's beta OS means less instability for developers testing the new OS update. At this point in the beta cycle, I would usually be running 10.15 full time. I've barely tested it this year, precisely because of the iCloud issues people were encountering. When a new build comes out I boot into it, test my apps, and then go back to 10.14 for work.
This isn't good for Apple, and I know I'm not the only developer taking this approach for this OS cycle.
September 3, 2019
Bug Bytes: Gus Mueller:
In his 23 years coding for the Mac, Gus Mueller, creator of the popular image editor Acorn, has had ample opportunity to make errors. Here, he talks about his most memorable one, which goes back to VoodooPad, an advanced journaling app Mueller released in 2003.
This was a fun little writeup about what was probably my worst bug ever. Or at least, the one that gave me a giant panic attack when it happened. I can still remember the dread when composing an email to the customer explaining that the data was gone. I felt awful. But then there was the surprise happy ending and I felt like I had dodged a bullet.
The link above will give a little preview to the story, but to read the whole thing, you'll need to follow the link to the Mac App Store.