What happened in July

Fixed the reader

Fixed the reader to read multiple forms, which also fixed how comments are parsed. The issue was the missing neg operator in PetitParser (not not.

Studying Tail Call Optimization in Truffle

I read up on TruffleScheme and the Truffle/Oz paper and I now have a better understanding on what it takes to implement TCO. To fix it properly, the current compilation pipeline should be refactored:

Current:

  • Reader (return a list of KiwiSymbols)
  • asKiwiNode (turn them into LiteralNodes)
  • compile (turn LiteralNodes into AST nodes like IfNode and LambdaNode)

Refactored:

  • Reader (return a list of Syntax)
  • expand (can be no-op for now)
  • compile (turn Syntax into AST nodes)

This means all the Literal nodes will be replaced by Syntax objects.

Laid off

Oh yeah, got laid off on my birthday, so now I need to prepare for interviews.