Show HN: Lambda-8cc – An x86 C compiler written in untyped lambda calculus

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • lambda-8cc

    x86 C compiler written in untyped lambda calculus

  • elvm

    EsoLangVM Compiler Infrastructure

  • How does it work? Is it translating the C source code of the 8cc C compiler to lambda calculus?

    So like C -> ELVM IR -> lambda calculus?

    https://github.com/shinh/elvm

    If so, it seems like 8cc is doing most of the heavy lifting

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • AIT

    Algorithmic Information Theory, using Binary Lambda Calculus

  • I expect so, as the author is familiar with my tools [1] for doing these optimizations.

    [1] https://github.com/tromp/AIT

  • lambdalisp

    A Lisp interpreter written in untyped lambda calculus

  • I actually mentioned your hint file in details.md. Quite a roundabout way to decode its secrets!

    I too suspect that writing in lambda's native functional style could save a lot of space. Compiling lisp.c from the ELVM repository generates a code much longer than LambdaLisp [1], which empirically shows that well I believe.

    As for the pages of PDF, in mathematical terms, since any variable encodes to weight 1, I believe it would be something close to an encoding that degenerates all De Bruijn indices to 1, or in other words, one that only tries to weigh (or gives larger weight to) the complexity of abstraction depths and applications. Since that erases information about the variable I would guess it's not a universal method for weighing lambda sizes.

    In this particular case for LambdaVM programs however, since the memory initialization clause nor the instruction clause never increases the maximum De Bruijn index value, I believe both the BLC size and "lambda page size" approximately grows linearly with the number of instructions, so I thought it would serve as an approximately-off-by-a-factor metric for weighing its size.

    As for the ELVM lambda calculus back-end, I'll be sending the pull request very soon!

    [1] A Lisp interpreter implemented in lambda calculus: https://github.com/woodrush/lambdalisp

  • lambda-calculus-devkit

    A collection of lambda calculus interpreters and development tools

  • Indeed he uses it here [1], which also gets used in lambda-8cc.

    [1] https://github.com/woodrush/lambda-calculus-devkit

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
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