September 2010
3 posts
2 tags
Jade Templates Introspection
The Jade Template Engine for Node now have the ability to manipulate themselves based on the parse tree constructed from a nested block. This has extreme potential, in that developers can now alter jade templates dynamically, constructing their own syntactic sugar. One of my favorite (but not only) use-cases for this functionality, would be that of a database record edit form. Typically your...
Sep 25th
30 notes
3 tags
C Indentation Based Language Lexer Tutorial
C Indentation Based Language Lexer Tutorial In this tutorial I wanted to show you how you can start your own programming language, starting by creating what is commonly referred to as a lexer or scanner. The grammar for our “language” will be indentation based much like Python, however will implement a tiny subset of tokens for illustration purposes. If you prefer, you may also jump...
Sep 21st
16 notes
2 tags
C Insertion Sort
So I wanted to investigate different sorting algorithms for a few personal projects, and I thought while I was doing so that I would write little tutorials for each algo :) why not! First we have one of the most basic sorting algorithms, the Insertion Sort. Explanation As illustrated by this video, the insertion sort works much like you might sort a deck of cards laying infront of you on a...
Sep 10th
6 notes