Re-launching this site

January 25, 2018

This is my “Hello, World” blog post.

I’ve previously used Wordpress for my blogs but one of my goals for 2018 is to finally get hands-on with web design and web development. I’ve been a backend and data guy forever and the last time I built a production UI it was a fat client implemented in Swing. I’m probably showing my age a bit there.

Later this year I will be learning React for a side project that I am working on. More about that soon.

This web site is now implemented using Jekyll, which generates static HTML pages from Markdown. The content is stored in github so it is easy to edit and version control and I can test the site locally before deploying to the cloud.

One of the nice things about Jekyll is that it integrates easily with the Rouge syntax highlighter, so I can easily post code samples. It doesn’t seem to be working perfectly yet but I think it is probably good enough for now.

Here’s a Scala example:

def encode(tree: CodeTree)(text: List[Char]): List[Bit] = {

  def encodeChar(node: CodeTree, bits: List[Bit])(ch: Char): List[Bit] = node match {
    case f: Fork => if (chars(f.left) contains ch) {
      List(0) ++ encodeChar(f.left, bits)(ch)
    } else {
      List(1) ++ encodeChar(f.right, bits)(ch)
    }
    case l: Leaf => bits
  }

  text.flatMap(ch => encodeChar(tree, List.empty)(ch))
}

Here’s a Rust example:

#[derive(Debug,Clone,PartialEq)]
pub enum ASTNode {
    SQLIdentifier{id: String, parts: Vec<String>},
    SQLBinaryExpr{left: Box<ASTNode>, op: SQLOperator, right: Box<ASTNode>},
    SQLNested(Box<ASTNode>),
    SQLUnary{operator: SQLOperator, rex: Box<ASTNode>},
    SQLLiteralInt(i64),
    SQLSelect{
        projection: Vec<ASTNode>,
        relation: Option<Box<ASTNode>>,
        selection: Option<Box<ASTNode>>,
        order: Option<Box<ASTNode>>,
        limit: Option<Box<ASTNode>>,
    },
}

Finally, I used Let’s Encrypt for SSL/TLS certificates.


Want to learn more about query engines? Check out my book "How Query Engines Work".