November 2010
11 posts
2 tags
Mail.app Script: Bottom Post
I’ve made peace with mostly top-posting my email replies in the name of efficiency. But there are often times when I want to bottom-post my reply to address a specific section. I finally broke down a wrote a script to automate the transformation of Mail.app’s top-post format to my preferred bottom-post format. That is, it turns this: | -jwr On Nov 30, 2010, at 1:13 AM,...
Nov 30th
14 notes
2 tags
Xcode Node.js User Scripts
Turns out you can use node.js for Xcode User Scripts. For example, here’s a script that takes .h property declarations on the clipboard: @property(retain) NSManagedObjectModel *model; @property(retain) NSPersistentStoreCoordinator *coordinator; @property(retain) NSPersistentStore *store; @property(retain) NSManagedObjectContext *moc; And outputs their .m...
Nov 29th
16 notes
Map Crowd Reduce
Map Crowd Reduce - There’s no place like ::1: My latest open project is a “SETI-at-home-like infrastructure for massively distributed CPU-intensive jobs based on HTML5 WebWorkers and node.js for distributing tasks” (quote from Pedro Teixeira’s blog). This was my second idea for node knockout. I thought it was pretty awesome, but realized it didn’t have a chance of winning....
Nov 22nd
5 notes
Objects and Cores
Intel talks 1,000 cores: Initial multicore chip architectures depended on a set of protocols that assures that each core has the same view of the system’s memory, a technique called cache coherency. As more cores are added to chips, this approach becomes problematic insofar that “the protocol overhead per core grows with the number of cores, leading to a ‘coherency...
Nov 22nd
4 notes
4 tags
JavaScript Performance Tip: Use Objects for Sets
A common operation is “does this list already have this item in it?”. The obvious solution is to use arrays for the list of items and indexOf() as the detection method: var flintstones = ['fred', 'wilma', 'pebbles']; assert(flintstones.indexOf('wilma') !== -1); assert(flintstones.indexOf('betty') === -1); But if you’re doing a lot of lookups and your elements are unique,...
Nov 21st
39 notes
2 tags
XCPushPop
Xcode 3 and Interface Builder 3 don’t like it when you switch files out from underneath them, like what happens when you switch branches in git and mercurial. Here’s a handy AppleScript that will remember and close all your open Xcode projects and IB documents. Run it again, and all your projects+docs will be reopened, ready again for action. tell application "System Events" if...
Nov 15th
13 notes
Hierarchical File Systems are Dead
Margo Seltzer and Nicholas Murphy: As users have begun to interact with increasing amounts of data and are increasingly demanding search capability, such a simple hierarchical model has outlasted its usefulness. It occurs to me that we’re putting applications first (and I include web sites in my definition of applications) simply because they number in the tens-to-hundreds. We can can...
Nov 14th
7 notes
1 tag
mogenerator 1.21
What’s New: [NEW] Machine templates now include fetched properties by default. (Jonathan del Strother) [NEW] Xmo’d: better support for --(machine|human|output)-dir model option path: now they can be full or relative to the model file. Xcode group and file references are no longer deleted/re-added with every save. (John Turnipseed) [NEW] Xmo’d: --log-command model option....
Nov 1st
2 notes
October 2010
2 posts
Attention Surplus
Johann Hari: I hunted it down online. A week later, the little white pills arrived in the post. Within a few hours of a 200mg dose, I found myself gliding into a state of long, deep concentration, able to read a book for six or seven hours at a time without looking up. Little mentions like these make me wonder if I’m very abnormal. I have no problem reading a book all day long. In...
Oct 30th
36 notes
2 tags
Mac App Store
I’ve long wanted better application management on Mac OS X, so I applaud the Mac App Store. Application installation has always been a train-wreck on Mac OS X, but at least independent developers were able to make the application updating process reasonable enough thanks to Andy Matuschak’s Sparkle. I’m also heartened that, unlike the iOS App Store, the Mac App Store is not the...
Oct 22nd
122 notes
September 2010
3 posts
4 tags
Beautiful Cray-1 Architecture
Chris Fenton is cloning a cycle-accurate Cray-1A. In 1/10 scale. Awesome. I was especially smitten with the Cray 1 Hardware Manual’s Computation Section architecture diagram: I love the hand-drawn draftsman’s lines, use of pseudo-3D projection as a grouping construct and its rectangular dimensioning to graphically depict register capacities. I’ve created similar...
Sep 14th
24 notes
3 tags
Make Content Editable Bookmarklet
While we’re on the subject of bookmarklets. here’s one that will make the current page content-editable: Make Content Editable Use it in good taste.
Sep 2nd
17 notes
3 tags
Zap Colors (and Shadows)
I’ve long enjoyed Jesse Ruderman’s excellent Zap Colors bookmarklet to suppress annoying and just-plain-unreadable web page color schemes. I’ve updated Jesse’s bookmarklet to also clear away text-shadow attributes, since usually they look even worse once you’ve zapped away their background. To use, bookmark this link or drag it to your favorites bar: Zap Colors ...
Sep 2nd
5 notes
August 2010
5 posts
1 tag
mogenerator 1.20
What’s New: [NEW] Xmo’d: model comments that start with -- are passed as args to mogenerator. This allows accessing command-line options such as --base-class. (David LeBer) [NEW] Forward-declare transformable attribute class types. bug 11 (seanm) [CHANGE] Generated accessors that return BOOLs now return NO instead of 0, avoiding LLVM Static Analyzer warnings. bug 8 (seanm) ...
Aug 12th
9 notes
3 tags
Xcode: View Variable As Binary Gotcha
I don’t want to tell you how many hours I just spent debugging based on the fact I didn’t immediately realize Xcode’s debugger shows you the logical (big-endian) binary representation of variables, not the their in-memory (little-endian) representation.
Aug 9th
7 notes
1 tag
Pear Note 2.0
I’ve mentioned before that Pear Note is an App I Love. Pear Note 2.0 just shipped with a UI overhaul, web sharing and playback speed control. I just gave it a whirl and it seems even slicker than before. Recommended.
Aug 9th
5 notes
1 tag
App Store "Try Before You Buy"
Mark Gurman: Today Apple added a new section dedicated to promoting free applications on the App Store. One of the subsections of this new feature is “Try Before You Buy.” This section features many of the popular “free” or “lite” editions of apps, but the section title is what makes this all interesting. Apple willfully ignored 25+ years of commercial...
Aug 6th
14 notes
2 tags
iPad Retina Display
Jason Snell / @jsnell: Lots of people saying they wish they had Retina Display on iPad. Obviously iOS 4 won’t do that. :-) But I don’t mind. iPad display’s fine. OK, the iPad’s screen is 1024x768 @ 130dpi. Physical dimensions work out to 7.88”x5.91”. Those same dimensions at 326 ppi would result in 2568x1926 pixels — more than my current 30”...
Aug 3rd
64 notes
July 2010
11 posts
1 tag
Nope
Expanded from a tweet: undefined nil, NIL, Nil null, NULL 0, NUL false, FALSE, NO, kCFBooleanFalse None '', "", @"" (), [], {}, // -1 U?(CHAR|SHRT|INT|LONG|LONGLONG)_(MIN|MAX) U?INT(8|16|32|64)_(MIN|MAX) NSNull, NSNotFound, NSInteger(Min|Max), NSUIntegerMax (FLT|DBL)_(MIN|MAX) 0.0, 0.0f, NAN, INFINITY Asking the reasoning and/or history behind each of these may be a good interview question. ...
Jul 19th
11 notes
OAuthConsumer on GitHub
I extracted mostly-Jon-Crosby’s Obj-C 2 OAuth implementation into its own GitHub project and rolled in my various fixes. Patches welcome.
Jul 7th
13 notes