November 25, 2015
Hello fine people of the Internet. Good day to you.
I'm currently putting the finishing touches on the next version of Acorn, v5.2, and I'd like to invite you to try it out. You can download Acorn 5.2b1 from the latest builds page.
There's two notable changes that I'd like to call out. The first is the color well in the tools palette. It has a simple new look, which I think clears up quite a bit of confusion that people have had in the past when trying to figure out which color was used for stroke, and which was for the fill.
I think it's pretty obvious now which color is going to be used for fill, and which color is stroke. In addition, the fill and stroke checkboxes in the inspector now have little color wells you can click on to quickly change the color of your selected shapes.
The second new feature, and my personal favorite and one that I've been wanting for years, is deep color support for the 2015 iMac 5k as well as to the Late 2013 Mac Pros.
I'll get to the technical bits in a minute, but the short version is this: no more banding, more colors, and a wider range of accuracy and values for your filters to play with.
Since it's creation, OS X has been sending 24 bits of color (aka "True Color", or 16.7 million colors) to our displays. Even if you bought a fancy display which was capable of showing more colors, you would only see 24 bits because the graphics plumbing just wasn't in place to push more color.
However, with OS X 10.11.1, that changed. And we even have some hardware to show it off.
The displays in the iMac 5k (the most recent, as well as the previous generation) are capable of receiving 30bit "deep color" when running on 10.11.1 and later. The late 2013 Mac Pros are also candidates for this if they have a decent monitor hooked up.
So how many colors can Acorn 5.2 push to the display now?
Over one Billion
1,073,741,824 to be exact.
That's kind of amazing.
What does that mean in practice? Color banding is a thing of the past. Dithering when using the gradient tool in Acorn is no longer happening. You also have a wider range of values to manipulate when adjusting exposure or temperature or other color controls. You can actually see all the colors when taking photos with your 14 bit RAW cameras now.
It's great, and it's the future, and I love it.
So what do you need for this? Obviously, you'll need the Acorn 5.2 preview, and a 5k iMac or a Mac Pro with a 30 bit display.
If you just want to view images with deep color, you can do so with Acorn 5.2 and OS X 10.11.1.
If you want to use Acorn 5.2 to adjust or make new deep color images, you'll need to be running the latest OS X 10.11.2 public beta. It contains some fixes that are needed for Acorn to work correctly when handling deep color images.
And finally, if you're creating new images with deep color support, you're going to want to create your images with 16 bpc (bits per component or channel)*. This does mean that your file sizes will be bigger (more color data equals bigger files), but in my opinion it's worth the tradeoff.
And as always, if you run into any issues, questions, or ideas, let us know by emailing firstname.lastname@example.org.
* Technically a 16 bpc image is capable of having 281,474,976,710,656 different colors, but we don't have display technology available to show them all. Images like this are still pretty useful for certain scientific applications though.
** It's really hard to show off screenshots of what deep color looks like in practice since web browsers are only showing 8bpc images. So here's a crappy photo of Acorn 5.2 (on the left) and Photoshop (right) displaying a 16bpc image. This is of course is a 8bpc image, but it shows the compressed range of PS vs Acorn anyway.
*** You can download that test Acorn image from here: purple_green_gradient_16bpc.png, or use the native Acorn version with the live gradient filter from here: purple_green_gradient_16bpc.acorn. Try switching the latter image between 16 and 8 bpc to see the banding come and go.
November 20, 2015
I've been using Wacom tablets for about 20 years now. And in all that time, their desktop tablets have been the standard and the most recommended tablets by just about everyone. I love Wacom products. I've had a Cintiq, multiple Intuos tablets, various incarnations of their Bamboo products, a Graphire, and whatever the heck it was they were selling 20 years ago. They have all been great.
I love tablets. I love drawing with a good stylus that works together with the tablet and when built together correctly they become something that feels empowering and wonderful. Endless pages in a sketchbook. All the colors I could ask for. Pencils, brushes, and watercolor all working together in harmony.
Every single stylus that has been made for the iPad or iPhone has been a pile of dog shit when compared to what you can do with a Wacom tablet. Even compared to what you could do 20 years ago with a Wacom tablet. The KoalaPad on an Apple //e was probably better.
It's been hard, and upsetting. And so much money wasted on crappy iOS styluses. I stopped paying attention whenever a new stylus was announced, since I was inevitably let down.
And then this week I got the Apple Pencil (which is Apple speak for a stylus) and an iPad Pro. This new tablet from Apple has the hardware support needed to make a useful stylus. Hardware support that has been missing for five long, very long, agonizing years.
And It's God Damn Amazing.
It feels absolutely right. Super low latency, palm rejection, and … it just works.
Is it the same as drawing in my sketchbook? No. Of course not. I'm rubbing a plastic tip across a glass screen.
It's still God Damn Amazing though.
Is it better? With the right software, possibly, for my use. I've tried a handful of drawing apps and right now my favorite is Procreate, with Adobe Sketch coming in second. If you don't want to pay a few bucks on those apps (shame on you!), the built in Notes app has some pretty decent sketching tools as well.
I find that when using the HB Pencil in Procreate, I get something that is very, very close to what I feel when I'm drawing in my sketchbooks. But of course now I've got layers and many colors and a perfect eraser to work with. And endless pages. I love it. I'm drawn to it. It's wonderful. You should absolutely try one if you haven't already.
Text on a page doesn't do it justice. Videos don't do it justice. Try it out, that's the only way to truly judge it.
I do have minor complaints, such as the price ($99 USD). I wish it was half that, just so it's easier for everyone to purchase. But after using one for a few days, you could double the price and I'd still buy it. It's that good.
People keep on asking me when I'm going to port Acorn to iOS. I have no plans to at this time, for various reasons. I've certainly thought of making a new type of drawing app for iOS, but honestly- I like being able to just use the hardware.
Every single time I fire up Acorn and start using my Intuos with it, I find something I want to change about the brush engine. I find oddball little behaviors I think I can improve, or go off investigating why a particular brush stamp might be off by a pixel or two. So I never actually get to draw anything.
I don't currently have that problem with the iPad. If I'm sketching in Procreate and I come across something that I'd do differently… well, it doesn't matter. I don't have the source code so I can't change anything. I can just sketch and create, and not fret about little things. It's liberating.
October 16, 2015
Acorn 5.1.1 is mostly about bug fixes (out now for direct, waiting for review for Apple's App Store), but I did manage to add a couple of new Automator actions to it- Scale and Export to Folder.
Dev talk: an Automator extension is a little Cocoa bundle that gets run in another process, so you need to find some way to communicate from that bundle to your application. For Acorn, I use Distributed Objects. And for years it worked great, until the App Store Sandbox was introduced. (Boo, hiss!)
Since the Sandboxed version of Acorn didn't have permission to open files or save files that it hadn't previously encountered, batch processing things in Automator became pretty impossible. Apple had "solved" this for most developers who script their apps using AppleScript. When you pass an AppleScript file reference to your app, some magic happens in the background and holes are punched in the Sandbox, which allows the app to open and save to locations that it otherwise wouldn't be allowed to.
But adding AppleScript support is a pain in the ass, so I mostly avoided it and encouraged folks to use the direct version of Acorn if they wanted to do batch processing of things.
But recently when working on the new export action, I wondered if AppleScript was sending around NSURL Bookmark data for the file references, and maybe that was how it was able to get through the sandbox restrictions. So I tried that out, but with no luck. You can't make a bookmark to a file that doesn't exist- which is what I'd need for exporting images. Magic Apple Events were still needed if I wanted write to new files from the sandbox.
But then I came up with a stupid idea. What if I made a new Apple Event, similar to the open document event, which instead of trying to open a file that doesn't exist… just did nothing? We'll call it "sandopen" and all it does it receives a file reference to a (non-existent) file that I'm about to tell Acorn to write to. In essence, it's saying "Here's a file reference that I want you to use your magic sandbox hole punching abilities on for me. Just ignore the fact that I'm not doing anything to it in this event, but rather the next one".
So the automator action sends that event to Acorn first and then tells it over Distributed Objects to save to the location.
And it worked!
So there's a handy little developer tip for you. I still hate the Mac sandbox.
October 8, 2015
While debugging a problem in Acorn yesterday, I came across a little oddity in Xcode that I thought was worth writing up for the greater good of my fellow Mac OS X developers. (Hey everyone- how's it going? iOS might get all the attention, but at least we can charge livable prices for our apps, amiright?).
Yesterday, Acorn had a bug where pasting a bitmap into an image would occasionally cause the bitmap show up as an empty layer. I could never get it to reproduce on my machine of course. I knew it was real though, I even had video evidence of it in action. It would not happen for me.
Then all of a sudden it did happen. And of course, I didn't have a debugger attached from Xcode so I couldn't break and see what the heck was going on. So I launched Acorn from Xcode, and tried to reproduce it. No luck.
Then it happened again, and I found a pretty reliable way to reproduce it. But again I wasn't running from Xcode and when I launched it from Xcode I couldn't reproduce it.
This shouldn't be happening. Why would the debugger "fix" this problem? Well, that's easy enough to test- I'll just turn off the debugger when running from Xcode. But then the bug didn't happen.
OK, so I was going down the wrong trail. It's not the debugger causing it. What else could be causing problems? Environment variables I turned on for debugging maybe? I checked the Run scheme to see if I had anything turned on there- and I did (Core Image flags), but turning those off wouldn't cause the bug to occur.
Maybe Xcode was setting an environment variable for me that I wasn't aware of? This was easily tested- I just added a couple of lines to Acorn to print the env vars, and compared the output from when I ran from Xcode vs. the Finder. One entry jumped out at me immediately- MallocNanoZone was set to 1 when run from Xcode, and it wasn't around when run from the Finder.
So I set MallocNanoZone to 0 in Acorn's Run scheme, launched Acorn from Xcode, and the bug reproduced right away. I had found what was masking the bug, and it was pretty easy to find the actual bug in Acorn after that.
So what does the MallocNanoZone env variable do? It's a flag that changes the memory allocator for your app, and for the frameworks your app uses. I don't know the specifics of this allocator vs whatever the normal one is, but I do know how it hid this bug from me in Acorn. When MallocNanoZone was set, the allocator worked in such a way that when I used CFRelease with a CGImageRef, and then used CGImageGetWidth with that same (bad) reference, it would return the correct answer (CGImageCreateCopyWithColorSpace() may have been involved as well). When MallocNanoZone was off the normal allocator was used and CGImageGetWidth would return a bad answer (as it should!). This bad answer caused Acorn to put the bitmap in the wrong spot and then the layer showed up empty.
Why does Xcode set MallocNanoZone=1? My understanding is that the Finder used to do this, so Xcode set the variable to behave the same as the Finder. However, I checked 10.8-10.11 and couldn't find any evidence of this.
TL;DR: If you're working on an OS X app, open up the run scheme and make sure to set MallocNanoZone=0 in your environment variables. If you don't, then you're using a different allocator than your users are, and behavior of your app might be different.
The fixes will be in Acorn 5.1.1 and 4.5.7, available now on the latest builds page.
Update October 12th:
So I was wrong about checking the environment variable to determine wether or not your process is using nanomalloc. The correct way is to do something like this in Terminal:
heap Acorn | grep MallocHelperZone
If you see output, nanomalloc is being used. If it's not there, then you're not. On my machine, when running Acorn from Xcode I can see that nanomalloc is being used by default. When run from the Finder, it isn't. A couple of little birdies have implied to me that this is an OS bug introduced in 10.11, and to expect a fix in the future along with a free 2016 WWDC ticket for me*.
* I wish. But hey— wouldn't that be cool? Apple gives out one WWDC ticket a week for the best bug found? I've long thought that Apple should add some sort of gamification to Radar.
September 29, 2015
It doesn't happen very often, but I'm releasing two updates to Acorn today: 5.1 as well as 4.5.6. If you're running the direct version, you can use the Acorn ▸ Check for Updates… menu item to grab the latest version. If you're using the App Store version, you're going to have to wait a bit for Apple to review and approve it.
First up- what's new in Acorn 5.1?
Some bug fixes, as well as minor compatibility fixes for OS X 10.11 El Capitan (most of the 10.11 fixes were in Acorn 5.0.1 already). But there are also some neat new features if you'd like to script Acorn from the command line, as well as Taptic feedback when aligning things to guides or canvas edges (this is available on 10.11+).
And another slightly big thing- basic SVG support. This has been a huge request for a number of years, and I'm happy to finally have something started for you in Acorn 5.1. Acorn doesn't support all the features that SVG provides (nor should it)- but it does a pretty decent job of getting vector objects and layers out of Acorn in a scalable format that'll be around for years to come. Look for more SVG improvements in future releases of Acorn as well.
And what's new in Acorn 4.5.6?
Compatiblity with OS X 10.11 El Capitan, and other bug fixes. Acorn 4 is still a great usable app- and we'd like to keep it that way.
We've also submitted Acorn 4.5.6 to the App Store- though it's been removed from sale. I've never tried updating an app that's been removed from sale, but hopefully it'll sail right through review without any problems.
September 14, 2015
Pieter Omvlee: The iPad Pro as a Greek tragedy:
"At this week’s introduction, two companies to centre stage at the iPad Pro’s announcement; Adobe and Microsoft. The choice made sense; both companies are known for making professional software and are actively developing software for iPad. But since Apple has made it basically impossible for smaller third party developers to have any stab at making serious software for the iPad, Adobe and Microsoft are also the only ones left in the arena."
Related: Why There’s No Sketch for the iPad
September 7, 2015
Charles Parnot: Contentless SQLite FTS4 Tables for Large Immutable Documents:
"If you use SQlite FTS4 for indexing large immutable documents, you might want to consider contentless tables. With minor adjustments, the database could be 2 to 3-time smaller."
This is pretty neat and I'll most likely be doing this in a future release of Acorn, thanks to Charles' work here.
August 28, 2015
"At it’s best Debug captures an oral history of one the greatest transformative moments in technology. People like Don Melton, Nitin Ganatra and David Gelphman have all been on the show and been remarkably honest about a famously secretive company. I don’t even want to start counting the number of ex-Apple people who’ve been on the show"
I like Guy, he's no dummy (and Rene's pretty smart too). And I like Debug, so if you know someone who would be an awesome sponsor- send them the link above.
August 24, 2015
As mentioned on Twitter, Acorn 5's Help menu has a neat new feature- live searching of all our Acorn documentation:
I thought this was a neat trick, and I'll fill you in on the details of how it was done.
FMWrite. Not an actual future product
That's not all it spits out though. When rendering the documentation (542MB of it, 1.22GB pre-render!), FMWrite also creates a SQLite index (1MB) of all the text content, which I then copy into Acorn's resources folder at build time. Acorn then ships with this SQLite file.
You don't really need to build your own documentation app. But you do need an index of your documentation to ship with your app. SQLite worked great for us.
Step 2: Let me introduce you to NSUserInterfaceItemSearching, which is a class which shipped in 10.6 but I didn't notice till about six months ago. It's a pretty simple protocol- you just register a class which conforms to it, and you're asked for entries when the user searches for something via the Help menu.
With Acorn 5, this means we perform a query against the SQLite fts4 table, and then return some entries which then show up as extra menu items. When a topic is picked, Acorn then just opens up a URL which points to the rendered version of the documentation on our server. And if your class also implements showAllHelpTopicsForSearchString:, Acorn will open up a URL on our server which hits a search index up there.
There is no step 3: If you make a Mac app, please steal this idea. Maybe even one-up Acorn and download updated help indexes from the server in the background. Or have the HTML files local and show that, with images rendered off the server? (Apple's Help viewer kind of stinks though, so you might make your own).
Small disclaimer: I'm sure I'm not the first person to do this. And if you're aware of any other apps that do- let me know! It's a neat feature and I'd like to see what else is being done with it.
August 20, 2015
Acorn 5 is out now, and it even comes with a 14 day trial so you have no excuse not to try it.
We worked hard on it, and we think it's pretty awesome. We're biased of course, and you can check the release notes for the full details, but here are three of my favorite new features:
New Thing: The Shape Processor. It's a collection of non destructive filters that work on vector shapes instead of pixels.
In the example above we start with the white shape on the left, and then combining four filters together to make the flower on the right. Here's what the settings look like:
If this looks a lot like the filter that Acorn already has… well, that's on purpose. Shape processors are of course non-destructive and save along with Acorn's native file format. So you can save your image, open it back up, and tweak the settings as you'd like. You can make some really fun stuff with it and it turns out to be super useful for lots of things.
New Filters: Curves and Levels. But wait - Acorn already has Curves and Levels, right? Yes, but in Acorn 5 they are baked into the existing filter chain. So now you can add Levels to your Curves and then a blur and then why not add Curves again after that and finish with a Drop Shadow filter? Then save the file and open it upagain and remove the second Curves because that's just too much what were you thinking? And then you realize Curves and Levels are now non-destructive and that's amazing.
Hundreds of Little Things: We fixed hundreds of minor bugs and annoyances. Little things that built up over the years that very few people ever encountered, like "the shortcut key for zooming in doesn't work when the keyboard layout is set to Dvorak - Qwerty ⌘". So we fixed pretty much all of those. It took months and months of work, it was super boring and mind numbing and it was really hard to justify, and it made Acorn 5 super late. But we did it anyway, because something in us felt that software quality has been going downhill in general, and we sure as heck weren't going to let that happen to Acorn. So we took a long break from adding features and just fixed stuff.
There's lots more of course (updated icons and ui, snapping, crop improvements, soft brushes for clone/burn/etc, shape tool improvements, more blend modes, image meta-data editing, Photoshop brush support, etc). So grab Acorn and start playing with it right now.
And I'll go back to answering emails and helping people out.