Get the latest tech news

TinyCompiler: A compiler in a week-end


Introduction Have you ever wondered how a compiler works, but you never found courage to find out? Then this series of articles is for you. I have never had the chance to look under the hood either, but one week-end I have decided to to write a translator from the esoteric programming language wend (short for week-end), which I just invented myself, into regular GNU assembly.

Wend is strongly typed, with no pointers, arrays, closures, dynamic memory allocation, garbage collector or parallel computations. By the way, I have spent a lot more time on writing test programs than on the compiler itself :) It is so dull to compute Fibonacci numbers, so here are more eyecandy examples for the compiler, check test-programs/gfx/*.wend files.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of end

end

Photo of compiler

compiler

Photo of TinyCompiler

TinyCompiler

Related news:

News photo

By the end of today, NASA's workforce will be about 10 percent smaller

News photo

'Not every story is told in that way': Phil Spencer says that live service games aren't the answer to every problem, and that smaller games play an important role | "Allow us to also support games that have a beginning, middle, and end."

News photo

Show HN: Synergetica – A Modern, End-to-End Genetic Circuit Design Desktop App