Compilers Are Hard

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

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • libcperciva

    BSD-licensed C99/POSIX library code shared between tarsnap, scrypt, kivaloo, spiped, and bsdiff.

    On the topic of compilers being hard: In my repositories I'm carrying around a 5 year old workaround (https://github.com/Tarsnap/libcperciva/commit/92e666e59503de...) for a 6 year old bug (https://bugs.llvm.org/show_bug.cgi?id=21183) in clang/LLVM.

    You might think that "incorrect code gets generated" would be a maximum-priority must-fix-before-the-next-release bug in a compiler, but apparently not.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • bug

    Scala 2 bug reports only. Please, no questions — proper bug reports only.

    > I recently saw a PR to Scala that’s a great demonstration of exactly this. The private and sealed keywords have been in Scala forever and someone only just recently came up with the realisation that private classes are effectively sealed. Scala’s been in existence for 16 years!

    Slight correction: someone came up with the realisation 8+ years ago[1] but someone else came up with a fix only recently

    1: https://github.com/scala/bug/issues/6159?orig=1

  • Befunge

    lang befunge 93 fast

    You'll also find them used in CPython's ceval.c

    I use them in both my C befunge implementations:

    https://github.com/serprex/Befunge/blob/c97c8e63a4eb262f3a60...

    https://github.com/serprex/Befunge/blob/c97c8e63a4eb262f3a60...

  • swc

    Rust-based platform for the Web

    I've never used it, but [1] claims to be a much faster js/typescript compiler than some of its competitors and written in Rust.

    1. https://github.com/swc-project/swc

  • stage0

    A set of minimal dependency bootstrap binaries

    But compilers are not hard but simple state machines.

    If you don't believe me, look at cc_x86

    https://github.com/oriansj/stage0/blob/master/stage2/High_le...

  • c4

    C in four functions

    ...or in other words, "they're hard only because you make them hard".

    That said, I think C4 makes a better example of how simple it can be:

    https://github.com/rswier/c4/blob/master/c4.c

    (Previously on HN at https://news.ycombinator.com/item?id=8558822 and https://news.ycombinator.com/item?id=22353532)

  • bamboomigrate

    bamboomigrate is a typelevel transformation and migration library

    Actually, both your examples are possible to solve even in Scala 2. Check my repository from 4 years ago. The Readme has the examples that will be interesting for you: https://github.com/valenterry/bamboomigrate

    I'm not saying it looks very elegant though - this is certainly improved a lot in Scala 3

    Actually, the match types page in Scala 3 lists some of the differences with typescripts approach: http://dotty.epfl.ch/docs/reference/new-types/match-types.ht...

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

  • Speedy Web Compiler: Rust-Based Platform for the Web

    1 project | news.ycombinator.com | 10 Aug 2023
  • Show HN: Ezno, a TypeScript checker written in Rust, is now open source

    4 projects | news.ycombinator.com | 7 Jun 2023
  • TypeScript team released an explorer for performance tuning

    1 project | news.ycombinator.com | 13 May 2023
  • 13.2.4 doesn't start, 13.2.3 is fine

    1 project | /r/nextjs | 2 Apr 2023
  • [Blog post]: Scaling Rust builds with Bazel

    4 projects | /r/rust | 21 Mar 2023

Did you konow that C is
the 7th most popular programming language
based on number of metions?