TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Caramel – a modern syntax for the lambda calculus

130 pointsby LightMachineover 9 years ago

6 comments

tikhonjover 9 years ago
This is a neat project which makes the λ-calculus more accessible. The λ-calculus is incredibly useful for designing and analyzing language features, but it can be a bit of a pain to work with in part because it quickly becomes verbose. Papers and proofs usually end up developing their own shorthand, but that tends to be rather <i>ad-hoc</i> and is rarely implemented programmatically.<p>In my view, this makes this project a great platform for playing around with language design. It should be reasonably easy to take the existing base and extend it with additional features (exceptions, continuations) or types. I&#x27;ve long suggested writing a handful of λ-calculus interpreters, from untyped to simply typed to System F to dependent types as a great way to thoroughly learn programming language concepts; Caramel gives you a great starting place for this coupled with an accessible, readable syntax.<p>Also, it would be great to see an online version of this, perhaps compiled with GHCJS. I&#x27;ve played around with trylambda[1] which is fun, but the lack of syntax quickly gets in the way. Caramel would be a great alternative.<p>[1]: <a href="https:&#x2F;&#x2F;trylambda.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;trylambda.com&#x2F;</a>
评论 #10289539 未加载
murbard2over 9 years ago
Would love to see this compile to blc <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Binary_lambda_calculus" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Binary_lambda_calculus</a>
评论 #10289583 未加载
评论 #10299481 未加载
javajoshover 9 years ago
I don&#x27;t think I understand the reasoning behind the ADT. Isn&#x27;t a &#x27;type&#x27; just a set of predicates applied to arguments at compile time and&#x2F;or at runtime? Why not just define a Caramel convention where you specify typed functions using a fancy argument list, in this case, a list of lists of predicate functions? Untyped functions would take a different shape of argument.
评论 #10288759 未加载
评论 #10288749 未加载
agumonkeyover 9 years ago
They use .mel extension, which reminded me of the old <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Maya_Embedded_Language" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Maya_Embedded_Language</a>
评论 #10288359 未加载
评论 #10288726 未加载
mgalkaover 9 years ago
Had never heard of the lambda calculus before. Very cool.<p>Does it have any practical applications? Or is it mostly a theoretical &#x2F; conceptual tool?
评论 #10288680 未加载
评论 #10289023 未加载
评论 #10288517 未加载
评论 #10289329 未加载
nickcageover 9 years ago
Are you going to bootstrap your Caramel compiler ?