TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

130 点作者 LightMachine超过 9 年前

6 条评论

tikhonj超过 9 年前
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 未加载
murbard2超过 9 年前
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 未加载
javajosh超过 9 年前
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 未加载
agumonkey超过 9 年前
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 未加载
mgalka超过 9 年前
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 未加载
nickcage超过 9 年前
Are you going to bootstrap your Caramel compiler ?