Compiler Class

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • coollang-2020-fs

    Compiler of Cool 2020 (a small Scala subset) into x86-64 assembly, in F#

    You might find [CS 6120: Advanced Compilers: The Self-Guided Online Course][1] interesting. I'm slowly working through it, but basically its focus is intermediate representations, optimizations, etc. A link to the course was on the first page of HN some time ago.

    Also -- and you knew it was coming -- I've written a [toy-compiler of a Scala subset][2] myself :)

    I'm new to F# and writing compilers, so I'm sure the code is full of rookie mistakes. Still, it works and does generate assembly and executables for Linux and Windows.

    [1]: https://www.cs.cornell.edu/courses/cs6120/2020fa/self-guided...

    [2]: https://github.com/mykolav/coollang-2020-fs

  • scamp-cpu

    A homebrew 16-bit CPU with a homebrew Unix-like-ish operating system.

    Thanks, this is serendipitous timing. I definitely plan to watch the YouTube playlist.

    I'm designing a simple CPU at the moment[1] and one of the things that keeps me awake at night is thinking about how to make a compiler for it.

    It only supports 64K words of RAM (and I'm not planning to implement bank switching), and I definitely want the compiler to be self-hosting on my CPU, so retargeting LLVM or similar won't be applicable.

    I've looked at Small-C[2], Cowgol[3], and PL/0[4] which all target similar goals.

    [1] https://github.com/jes/scamp-cpu

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

  • selfie

    An educational software system of a tiny self-compiling C compiler, a tiny self-executing RISC-V emulator, and a tiny self-hosting RISC-V hypervisor.

    Maybe this is interesting to you as well? https://github.com/cksystemsteaching/selfie

  • llvm-project

    The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.

    I have to keep up with Ruby changes.

    But even for example the parser in clang doesn't seem to be touched very often.

    https://github.com/llvm/llvm-project/commits/main/clang/lib/...

    Take a look at the commits there and see how much each changes the parser vs the rest of the compiler.

    Also, at the bottom of page 2 for parser changes you're already all the way back in 2017!

  • shecc

    A self-hosting and educational C compiler

    I'm looking at this one for a CPU design I've been working on. :)

    https://github.com/jserv/shecc

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts