Fast Markdown libraries for Ruby: two for the price of one.
Laurence Tratt: “I had implicitly bought into the idea that C programs segfault at random, eat data, and generally act like Vikings on a day trip to Lindisfarne; in contrast, programs written in "higher level” languages supposedly fail in nice, predictable patterns. Gradually it occurred to me that virtually all of the software that I use on a daily a basis – that to which I entrust my most important data – is written in C. And I can’t remember the last time there was a major problem with any of this software – it’s reliable in the sense that it doesn’t crash, and also reliable in the sense that it handles minor failures gracefully."
Yossi Kreinin: “But I miss virtual functions. I really do. I sincerely think that each and every notable feature C++ adds to C makes the language worse, with the single exception of virtual functions.”
Sometimes! Or, fork(2) is a very fast operation on legitimate operating systems. I didn’t realize it could be as fast as spawning a thread, though.
An implementation of Markdown in portable ANSI C that’s roughly 28.5x faster than the canonical Perl implementation on a 179K test file. Looks like a complete implementation; includes smarty and footnote extensions.
Aristotle Pagaltzis: “Not exactly as fast [as SBCS strlen], but if you write it in asm, it only takes one extra instruction to count characters in UTF-8 vs those in an 8-bit encoding, per character.”
What PrinceXML is coded in, apparently. It’s like Prolog for large systems: declarative, strongly typed and type inferencing, module system, closures, currying, lambdas, and with a strong determinism system. Compiles down to C (as a portable assembler).
“Between 1988 and 1991 I worked on the research program that led to the Mars Pathfinder rover […] All three of [the prototypes] were programmed not in Lisp, but in little mini-languages whose compilers were written in Lisp.”
“Like with unix, cells are not ‘spawned’ – they are forked. All cells started out from your ovum which has forked itself many times since. Both halves of the fork() are identical to begin with, but they may from then on decide to do different things.”
Java becomes 100% more viable. So simple — why didn’t someone do this in the very beginning?
“Maybe if we took away these PL theorists’ Emacs and LaTeX packages for a while we’d get better results.”
Perfect timing as I'm just about to write a little piece on how C is the only reason dynamic languages are viable…