Jeremy W. Sherman

stay a while, and listen

What’s this about @import?

So today in the company IRC channel my illustrious colleague Mark Dalrymple (of Advanced Mac OS X Programming fame) mentioned this new-fangled @import compiler directive. News of this compiler directive appears to be spreading through the Objective-C developer community mostly by way of Twitter-pigeon.

As it happened, I had not heard of @import. But then the inimitable Mikey Ward (alias: Wookiee) asked me about it. Two persons independently inquiring? Now I had to look into it.

Memory Allocation in sam

Bad news, bucko. Malloc is merely “adequate.” And it’s only adequate if you’re writing simple programs. Real programmers write their own memory manager. It’s the first thing they do after they ditch their shaving kit and start growing their Samson neckbeard.

Don’t believe me? Listen up:

The C language has no memory allocation primitives, although a standard library routine, malloc, provides adequate service for simple programs. For specific uses, however, it can be better to write a custom allocator.

sam’s Structural Regular Expressions

This is the first post in a series of quotes from papers. These are the great turns of phrase, the intriguing idea I’ve run into nowhere else, the start of something that could have been great but probably fizzled.

First up: structural regular expressions, as introduced in the GUI text editor sam

Pasting HTML into Markdown

So I was writing a comment on Reddit today, and the easiest way to answer was to quote a list of search results, links and all. One problem: Reddit’s post interface uses Markdown, not HTML. That’s swell when you’re writing your comment fresh, but if you want to paste something in from a webpage, it’s no good.

I’d run into this once or twice before, but I always took the simple way out: just rewrite the one or two links in the text by hand. No big deal.

But these search results were just a list of links. And as a programmer, I am vocationally virtuously lazy.

That’s when I remembered Pandoc.