Learn by doing! Work on exciting programming projects and create something awesome.
Create Your Own Game
Do you have a burning desire to create video games? Take a look at my latest class (deadline for enrollment is soon!!!)
PL101: Create Your Own Programming Language
The PL101: Create Your Own Programming Language class began on April 4, 2012.
Lesson 1: Whirlwind Tour of Languages - We went on a whirlwind tour of four exciting programming languages, in videos. We covered Scheme, Go, OCaml, and Prolog. I tried to pick something interesting about each one to demonstrate the diversity of programming languages.
Lesson 3: Parsing - In this lesson we explored parsing and creating grammars for programming languages. You learned how to use PEG.js step-by-step to create a parser. We covered parser actions, repetition and choice, and Scheme syntax. You created a parser for a simplified "Scheem" language. We went over context free grammars, ambiguity, arithmetic and operator precedence, and unit testing. You added features to the Scheem parser and created a parser for your MUS language.
Lesson 4: Scheem Interpreter - In this lesson we worked through lots of features of Scheem. We covered arithmetic, variables, and begin blocks. We worked through quote, then wrote some functions like "cons" and "cdr" to deal with list values, and finished off by implementing the "if" statement. Your homework was to put all the pieces together into a working interpreter and link it with your Scheem parser, with working unit tests. Then you put up a working demo webpage showing off your working Scheem parser and interpreter. This is what the class is all about!
Lesson 8: Take Control of Continuations - You wrestled continuations to the floor and beat them into submission this lesson. You learned how to make a simple interpreter that is written in continuation-passing style. You extended your interpreter with a step function that can single step the evaluation of expressions. Then you took it to the next level and interpreted multiple expressions at once in a shared environment. Thread fighting is fun! Finally you doubled down on continuations and implemented exception handling in the little language.
Lesson 9: Am I Your Type? - In this episode you'll learn about static typing and how type checking works. You'll learn what currying is all about and practice dealing with higher-order types. You'll work through how to build a simple type checker for TScheem, a typed version of Scheem. If you want types in your language you need to work through this lesson. Types are fun!