Writing a C compiler in 500 lines of Python

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

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • nanoGPT

    The simplest, fastest repository for training/finetuning medium-sized GPTs.

  • It does remind me of a project [1] Andrej Karpathy did, writing a neural network and training code in ~600 lines (although networks have easier logic to code than a compiler).

    [1] https://github.com/karpathy/nanoGPT

  • schism

    A self-hosting Scheme to WebAssembly compiler (by schism-lang)

  • Looks like Schism (https://github.com/schism-lang/schism) got part of the way there, but it unfortunately seems to be dead.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • micrograd

    A tiny scalar-valued autograd engine and a neural net library on top of it with PyTorch-like API

  • Perhaps they were thinking of https://github.com/karpathy/micrograd

  • nearley

    📜🔜🌲 Simple, fast, powerful parser toolkit for JavaScript.

  • While I suspect I would learn more writing a tokenizer and parsing logic myself I find grammars much easier to read and maintain.

    ANTLR is pretty good and is supported across several languages and something I had previously used for some quick Elasticsearch query syntax munging in Python. It also means you can often start from an already existing grammar.

    The JS version of ANTLR didn't seem to work for me so for the SQL/JSONPath stuff ended up using the Moo lever and Nearly parser which was rather pleasant. https://nearley.js.org

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