I’ve sometimes been asked “why use language X when you already have language Y”, and I’m bad at answering these things on the spot because I don’t generally think about it in a “pros/cons” sense. The differences are sometimes subtle and numerous, not few and obvious.
Category Archives: Uncategorized
Pointless T-shirt
I was thinking to myself recently, “it’s so very hard to find good programming language shirts to alienate and confuse onlookers with, so why not create one of my own?” A couple clicks, and ta-da: (apply shirt ‘(self)) Here’s a convenient Zazzle link.
Language Folk Wisdom
Andy Wingo, a JavaScript and Guile Scheme blogger writes this insightful comment There is very little in the way of correct, current, and universal folk wisdom as to how to implement a programming language. Compiler hackers are priests of their languages, yes, but their temples are in reality more or less isolated cults, in which …
In a name
Just registered close-paren.com. Got a project in mind for it, but it just redirects here for now. My first choice was free-variable.com, but I saw that free-variable.org was already claimed by another good programmer. Interestingly, he too wanted a different domain originally, strictly-positive.org. Gotta have back up plans. 🙂 )))
Simple explanation of *delimited* continuations
Just last month, I was talking about how raise/catch could interact across C callouts, and inadvertently described reset, without realizing it at the time.
Schools of Thought – Compilers
It occurs to me that there are roughly two schools of compiler and language design, typified by the books The Structure and Interpretation of Computer programs (aka SICP) by Ableson and Sussman, and Compilers: Principles, Techniques, and Tools by Aho et al. They’re also known as the Wizard Book and Dragon Book, respectively, named for …
A little stack machine
Threw this together to show an example of computed goto. Computed goto is a handy tool for building little interpreters. #include #define NEXT goto **ip++ int main() { int fact = 6, fact_b0 = 16; void* program[] = { &&push, (void*)5, &&call, (void*)fact, &&printi, &&end, &&beq0, (void*)fact_b0, &&dup, &&push, (void*)1, &&sub, &&call, (void*)fact, &&mult, &&ret, …
Bookmarklet for 404’s
After encountering yet another 404 error, tired of manually copy-pasting URLs, I finally took a few seconds to make a bookmarklet to search archive.org for a backup. Archive-it bookmarklet
Some parser combinators for Python
I’ve got two parser combinators today for you to play with, both whipped up this evening from pieces of earlier experiments.
Schrodinger’s Yacc
There was a small controversy last year about parser combinators, a convenient way of rapidly developing parsers in a functional style. Yacc is presumably chosen as the archetypal non-combinator parser generator, requiring separate external parser compiler, known for being a pain to use. “Yacc is dead” (ltu discussion) “Yacc is not dead“ “Yacc is dead: …