News for hackers. Stuff that matters.
Re:Show HN: Lambda-8cc – An x86 C compiler written in untype... by tromp on Friday October 07, 2022 @05:20AM (#33119070)
Yes, let bindings would get translated like that, but there would be some straightforward optimizations done, such as size-reducing beta-reductions, which strip out unused let bindings, and inline the single-use ones, as well as the multi-use ones whose definition is smaller than the unary encoded de-Bruijn index.
Re:Show HN: Lambda-8cc – An x86 C compiler written in untype... by atennapel on Friday October 07, 2022 @05:45AM (#33119220)
Yes, I wonder if these optimizations are done in the PDF. I found the BLC encoding of the lambda expressions which is 407171813 bits, about 5 mb.
Re:Show HN: Lambda-8cc – An x86 C compiler written in untype... by tromp on Friday October 07, 2022 @06:41AM (#33119524)
I expect so, as the author is familiar with my tools [1] for doing these optimizations.

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

Re:Show HN: Lambda-8cc – An x86 C compiler written in untype... by tromp on Friday October 07, 2022 @09:20AM (#33120882)
Indeed he uses it here [1], which also gets used in lambda-8cc.

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