The Shape of Everything
A website mostly about Mac stuff, written by Gus Mueller
» Acorn
» Twitter
» Pizza Lab
» Code
» Archive
December 18, 2014

David Owens: Static Wins! RAH RAH!

"Seriously, someone asks for the functionality for dynamic dispatch and you say you can do the same thing with static code! No, you cannot. You can mimic the behavior.

"Instead, you showed someone how to build a static registration table. Then you make the statement that it’s “type-safe” while using Any as the arguments to the public API for dispatch and using type coercion… that’s not type-safety. And let’s be honest, it’s really not that different then the validation one does for dynamic dispatch either."

Via Michael Tsai.

December 17, 2014

Math can be fun sometimes.

December 13, 2014

The Dropbox Blog: Dropbox lands in Seattle.

I went to a Dropbox sponsored "mixer" a couple of weeks ago, where they discussed their plans and vision for the Seattle office. There were numerous Dropbox engineers there, and it sounds like they really mean business with this new office. The idea is not to just be an extension of what's going on in their San Francisco office, but rather be a peer of it. And they are looking both iOS and OS X folks (in addition to some other platforms of course).

Seattle is getting more interesting for developers every day.

November 11, 2014

NYT ▸ The Life of a Pot Critic: Clean, With Citrus Notes

"Jake Browne was seated in a yellow suede chair, carefully rotating a marijuana bud between his fingers. “I’m looking for bugs, mildew, things I wouldn’t want to ingest,” he said, leaning forward to hold the nickel-size flower up to the light. He paused, then took a sip of water from a cup with a Miley Cyrus hologram down its side. “This looks clean,” he concluded."

And my favorite line from the story:

“I’m a human coffee, spewing words like dark-roasted drip.”

I bought my first little bag of legal weed a couple of months ago (Washington voted for recreational use in 2011). It's such a strange and awesome time to see these changes happening. I walked into a pot store, there was a menu, I picked out a strain, paid for it, and walked out. Taxes were collected, I knew exactly what I was getting, and nobody was shot. (For the record- it was some strong stuff, and I've used a tiny bit of it. A little is fun, but like alcohol - it's best in moderation).

Drugs like pot and alcohol have been with us for a millennia. They aren't going away, and it's great to see some states finally coming to terms with it and making sure everyone is safe.

November 8, 2014

Acorn 4.5.2 is almost ready to go- but I've just put up a new build with a tiny new hidden pref you can set with Terminal:

defaults write com.flyingmeat.Acorn4 wideKernSpacing 1

What this snippit does is expand the range of the Kerning slider in the text palette to -200 to +200. Depending on the font, a negative kerning will stop somewhere between -30 and -22, but without this pref Acorn will automaticaly stop at -25. Which isn't great if you want just a little bit more on the less than zero side and the font will allow it.

And here's a random bit of info for developers. The attributed string value for setting this value is NSKernAttributeName, which the documentation describes as "points by which to modify default kerning", but what it doesn't mention is that this seems to be a percentage of the font size.

That is all. Please continue on with your Saturday.

November 5, 2014

I wrote a quick little script for Acorn which takes the front and back colors, and averages the two together. It's pretty simple, and you can grab it off Acorn's GitHub repository.

I've been doing a bit of fiddly pixel work lately, and this has been coming in handy when blending between two different colors.

Here's the main bits of the script:

function main() {
    var tp = [NSApp toolPalette]
    var c = [[tp frontColor] blendedColorWithFraction:.5 ofColor:[tp backColor]];
    if (c) {
        [tp setFrontColor:c];
November 5, 2014

Jason Snell reviews the new Kindle Voyage over on Six Colors.

I received my new Voyage last week as well, and my thoughts on it match pretty closely with Jason's. However, I've not had any problems with my finger slipping off the bezel and accidentally turning pages, though I wouldn't mind if the bezel was a tiny bit wider. But then, I also really like the size of it so I don't want it to get bigger. And I don't want the display any smaller.

Design is hard.

It does feel really nice in my hands though.

I do have one complaint; I wish the Voyage was a faster. I was in a bookstore recently and they had Kobo eReaders on display, so I played around with them briefly. They were noticeably faster than the Kindle, and it left me wondering why the latest and greatest from Amazon weren't just as fast.

OK, one more complaint. Still no ePub support. Not that I actually expect it to ever show up, but it would be nice to have.

Marco also has a short review up, and he's a bit more critical of it.

November 3, 2014

I was under the impression that the extensions architecture on Yosemite would cause 3rd party code to run in a separate process. But as of today, my #1 crasher for Acorn is caused by Dropbox's extension on OS X 10.10.

I see Dropbox is pushing out lots of updates for their client, but I don't see anything specific to this problem. Has anyone else seen this, or been able to reproduce it (email me please if you have)?

For the developers in the crowd, here's the stack trace. Even though I said Dropbox was running code in my process- I realize that it probably isn't. But it sure feels like it does. Maybe it's Apple's XPC services that are flaking out and causing Acorn to crash, and the Dropbox extension is just triggering it?

Update 11/21/2014
Apple has released 10.10.1, and it seems that this crash is fixed (phew). And yes, it was an Apple bug.

November 3, 2014
Overcast and VoodooPad icons
Overcast and VoodooPad icons

VoodooPad for iOS was recently updated, and shipped with a new icon.

I like this icon.

Probably because I made it right after iOS 7 went into beta. I was digging the new design language out of Apple, and whipped this guy up for the 2.0 that I never shipped. I'm pretty happy Plausible Labs ended up using it.

When I first saw Marco's icon for Overcast, my heart sunk a little. Here was a nice looking icon, that used very similar colors as VoodooPad's. But only a couple of people had seen VoodooPad's icon and I just knew that a small number folks would look at it and assume I ripped off Overcast. But this post will hopefully head that off. Possibly.

I think they are both great designs, and they were created independent of each other.

VoodooPad's is better though, if a bit dated at this point. It's classic.

November 3, 2014

GeekWire is reporting that "Apple hiring for mysterious new engineering office in Seattle". They even link to a previous post of mine.

It sounds awesome, and I hope it happens, but I won't believe it until the lights are turned on and there are software engineers showing up for work every day.