Responsive, Two Column Documentation Layout With Markdown and CSS

Adrift in Markdown, longing for structured layout sans HTML Markdown is great. I find myself using it everywhere, even places where it makes no sense, such as Word documents and iMovie titles. But Markdown works best for documents that consist of a single column of content. Ask Markdown to do…

Parsing User Defined Operator Expressions in a Scripting Language

One thing that's always bugged me about Javascript is the language's treatment of operators. Javascript operators, like their C and Java ancestors, are hardcoded into the language. The * operator always multiplies two numbers and is always parsed the same way. Javascript operators are special too. They get to use cool…

Stupid Template Tricks: The Life Comonadic

A Brainfuck evaluator is interesting and all, but far too one-dimensional. Lets's kick things up a dimension, it's time for C++ template compile-time Conway's Game of Life. This post translates a Haskell comonad based Life implementation into a C++ template meta-program. Much like with the Brainfuck evaluator, once you get…

Stupid Template Tricks: Lazy Compile-Time Lists

In this time, the most precious substance in the Universe is the List. The List extends life. The List expands consciousness. The List is vital to functional travel. This post overviews the implementation of a compile-time lazy list in C++ templates, along with a few common list operations, such as…

The Lispers in the Darkness

In the empire of Functional stands the outpost of Lisp. Many pilgrims pass though Lisp every season, but few stay long. Something about Lisp's proximity to certain uncharted regions, regions of which no sane Functional traveller dare speak, keep most from staying more than a day or two. And for…

Stupid Template Tricks: Brainfuck Compile Time Evaluator

Every 2nd grader knows that the C++ template system is Turing complete. So what? Compile time Brainfuck evaluator that's what! It turns out that I'm not the first person who learned me some metaprogramming and thought it would be a good laugh to implement Brainfuck with C++ templates. But in…