lldb: VI mode and tab-completion

lldb uses libedit, which is a BSD licensed alternative to GNU readline. A feature of libedit is the ability to configure per-application settings for command-line bindings via ~/.editrc. Detailed documentation for this configuration file can be found using man editrc or via online documentation, such as developer.apple.com. As I prefer VI bindings, I initially configured my .editrc as follows, to replace the default emacs bindings: lldb:bind -v Unfortunately, when I re-ran lldb, tab-completion was not functioning....

Jun 23, 2012 · 2 min

Objective-C: ternary operator

The ternary operator, also known as a conditional expression is a C construct. What follows is an example used for conditional assignment: result = condition_expression ? true_expression : false_expression; If condition_expression evaluates to true, result will be assigned the true_expression; otherwise, result will be assigned the false_expression. A GNU extension to the ternary operator, also available in Objective-C, is the ability to omit the true_expression as follows: result = first_expression ?...

Mar 15, 2012 · 2 min

Associative References in Objective-C

This is some preamble. ...

Feb 19, 2012 · 2 min

Transferring Preview app signatures in Lion

Lion introduced a great new feature that allows you to capture your signature via an attached camera and store it in an encrypted form for later use. Therein lies the problem; you must have an attached camera. I have a Mac Pro, and wanted to use the signatures I captured on my Macbook Pro. Following these steps, you can transfer the encrypted signatures over. On your machine endowed with the power of sight:...

Aug 3, 2011 · 2 min

Eval Expression service for OS X

Eval Expression is a Mac OS X service to evaluate the selected text of any text field as a Ruby expression. My instinct was to choose Perl, however Ruby offers binary in addition to decimal, hex and octal numerical literals. The service becomes infinitely more useful if you assign it a global shortcut in Keyboard preferences. In my case I assigned a combination that seemed obvious, ⌘= It came about as I was working on some layout in Xcode 4 / Interface Builder, and needed to adjust the Y position of a view by a specific number of units....

Apr 9, 2011 · 2 min