Skip to content

Teaser

Choose a tag to compare

@c0c0n3 c0c0n3 released this 09 Mar 19:52
· 11 commits to main since this release
dee12e8

We explore the concepts of language, interpreters, compilers, and hardware architecture by building a simple pocket calculator.

These are the components that make up our calculator:

  • An arithmetic language embedded into Haskell.
  • Language interpreters to work out the value of an expression and pretty print it.
  • A virtual stack machine to simulate the calculator hardware.
  • A compiler to transform language expressions into low-level instructions the machine can run.

Even though this is just a toy, it should give us a fairly good idea of how to conceptualise the problem and design a solution.