Joshua

CTO @ Encamp
jmoyers@gmail.com

Automating and Modernizing My Site

Posted on June 27, 2019

Recently I set out to replace the infrastructure behind my personal website. I had a few goals when I started the project a few days back... I want to write articles in vim, press a button and have them show up on the internet. I want to control the build pipeline - I want minified html, css (written in sass), and javascript. I don't want to be forced into using javascript, even though I'm deeply invested in React! I don't want to write a blog server from scratch. Thats a solved problem. I want nice TLS, but I...

More

Stanford Compilers: Bison Parser for Cool

Posted on June 11, 2016

Completed assignment #2, which is a Bison Parser for cool. I posted this project on github (here), which includes a makefile for OSX. Honestly, there weren't too many gotchas to this project. The most difficult things to figure out were the required AST (abstract syntax tree) operations that were expected given the library provided by the course. I got most of this just by examining the cool-tree.aps file directly. In fact, this file acts as a decent outline for how to approach each non-terminal expression you...

More

Stanford Compilers: GDB With MyParser

Posted on June 07, 2016

Still working on the actual parser, but I did run into a situation where I actually needed to debug the parser in gdb. Not immediately obvious how to get this working, so I modified the myparser shell script with my...

More

Stanford Compilers: Flex Lexer for Cool

Posted on June 06, 2016

I just finished the first programming assignment for the Stanford Compilers course, which was to implement a lexer for the Cool (classroom object oriented language) using Flex. Flex is a C-language based lexical analyzer generator. It generates a valid c source file for the lexical rules you put together. The .flex file format is basically a c file with some special syntax. The bulk of this assignment was hunting for implementation details. I do not enjoy courses as much when they don't go through an assignment...

More

Stanford Compilers

Posted on June 05, 2016

Welp, still on the journey down to the hardware. Now that I've got the nand2tetris class on building a computer from nand gates out of the way, its time to dive into compilers. Update 2019: Looks like this coursera link is dead, I'm sure the course can be found though! I've decided to take Stanford's Coursera offering, though I've got a few reservations about it. First, it focuses quite a lot on formal definitions of languages and grammars. This means its using set notation and big unwieldy greek...

More