Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Programming with Pure Lambda Calculus (marvinborner.de)
61 points by marvinborner on Dec 14, 2023 | hide | past | favorite | 8 comments



That is really cool. Lambdas all the way down.

The encoding of binary and ternary was interesting (following from the link at the bottom of the page). It does make me curious why ternary was chosen as the default.


Hi, thanks!

Balanced ternary was chosen as the default base because an investigation by Torben Mogensen[1] showed that it's a good compromise in terms of space and time complexity. Higher bases can be even more compact and efficient, but require much larger implementations for arithmetic operations. Balanced ternary also supports negative numbers, which unary (Church) or binary (Mogensen) don't.

[1]: https://doi.org/10.1007/3-540-45575-2_20


I await the day an efficient lambda calculus reducer is laid upon us.

Essentially it'd be massively parallel.


If you haven't done so already, you might want to look at interaction nets and HVM. Although HVM does not (yet!) support full lambda calculus.

I'm currently exploring another approach to a massively parallel reducer for pure lambda calculus. Efficient sharing of lambda graphs is one of the main problems for me.


Based. Upvoted.


OK but why? Is this for fun or profit?


There's a dedicated section titled "Why?" on the linked website. To summarize: Just for fun, not for profit.


Neat!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: