smlckz boosted
smlckz boosted

I took some time today to learn QBE syntax. It's basically a tiny LLVM: c9x.me/compile/

Wrote my standard Brainfuck compiler in QBE IR: github.com/ibara/bf.ssa

Works on #OpenBSD, so it works for me.

I'm thinking the PL/0 compiler could adopt QBE as its backend. That would satisfy the "compile to assembly" thing I want to do, plus it'll provide amd64 and arm64 (and eventually riscv64) assembly output and quality optimizations. And it's far easier to write QBE IR than LLVM IR.

smlckz boosted

A new #blog post appears!

We're beginning a new series, "Let's write a compiler." In part 1, we'll introduce what a compiler is, select a language for our compiler, and do some high-level (no code) planning.

At the end of the series, you will have written a complete compiler from scratch! It won't be the world's fanciest compiler, but it will be correct. And it will be fast! Good for beginners.

briancallahan.net/blog/2021081

#coding #code #program #programming #compiler #compile #compilers

smlckz boosted

GNU - creating unreadable software since 1984

My profile picture now generated from pic instead of being hand drawn.

[1]: smlckz.ttm.sh/profile.pic.txt

C.IM

C.IM is a general, mainly English-speaking Mastodon instance.