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, …

Repls, repls, everywhere

Have a new-years resolution to try out a new programming language, but in too much of a hurry to pick only one, or install anything? Online REPs and REPLs Today there’s 61 different languages on that list. That many, there’s gotta be at least one that strikes your fancy. Best batch execution site: ideone.com with 50 unique languages. …

Quickrefs for Python and Vim

More quick reference booklets: Vim PocketMod draft 1 (new) Python PocketMod draft 1 (new) Scheme PocketMod draft 3 (updated) I don’t really need the qr for Python, but I thought it might be good to have ready should a friend a coworker wish to start learning Python. As for Vim, the reference is certainly terrible …

Go: Defer, Panic, and Recover

It seems after much resistance to the idea, Go has added exception handling to the language in the form of defer, panic, and recover. The Go Programming Language Blog: Defer, Panic, and Recover. Don’t get me wrong, I think the’ve got something here.  Defer gives you the equivalent of C#’s finally/using; or a nice subset …

Best and Free Programming Ebooks

(updated / switched link to source article on stack overflow) So, I wrote my list of some unique programming texts. But on the more practical side, there’s this: Best and Free Programming Ebooks. Free full texts, covering: Bash, C, C++, C#, Common Lisp, Haskell Java, JavaScript, Lua, Objective-C, Perl, PHP, PowerShell, Prolog, Python, Ruby, SQL, …

Is it better to remain blissfully unaware…

I was once asked “why bother learning these other languages, if you can’t use them”. It hadn’t occurred to this person that I code off hours. I’ve also been asked “what if you find these other languages actually are better than C++? Won’t you find it depressing having to code in a normal language then?” …