News for hackers. Stuff that matters.
Re:Show HN: Caramel – a modern syntax for the lambda calculus by tikhonj on Sunday September 27, 2015 @10:37PM (#10288680)
It's mostly a theoretical tool: it's an incredibly simple programming language, which makes it easy to design and evaluate language features in isolation. That's a powerful property!

At the same time, practical functional languages are often surprisingly limited extensions of an underlying lambda calculus, perhaps with types. In fact, Caramel is more or less what an untyped Haskell or purely functional subset of Scheme would look like with fewer parentheses and macros.

Re:Show HN: Caramel – a modern syntax for the lambda calculus by imakesnowflakes on Sunday September 27, 2015 @11:11PM (#10288748)
>which makes it easy to design and evaluate language features in isolation.

Where can I see a demonstration of this? For example, what does it mean to evaluate something like decorators in Python and how will one go about doing that with lambda calculus?

Re:Show HN: Caramel – a modern syntax for the lambda calculus by tikhonj on Monday September 28, 2015 @12:00AM (#10288847)
Decorators in Python are basically special syntax for higher-order functions, so I don't think there's much there to evaluate. The lambda calculus is usually used when you want to ignore syntax.

Introductory resources on programming language theory usually have examples, after giving you a thorough grounding in the basic untyped lambda calculus. In particular, this is how they usually introduced type system features, but there are interesting things like continuations that don't necessarily involve types. Types and Programming Languages by Benjamin Pierce is a great resource, but you can probably find free lecture notes to the same effect. (I'd look them up, but I'm on my phone so it's a bit of a hassle.)

The most interesting non-introductory (but still self-contained) example I've seen was Barry Jay's Pattern Calculus book. He introduces pattern matching and first class patterns, first without types and then with, all building upon the lambda calculus. His ideas cover functional, imperative and object-oriented features, and it's fascinating to see a whole language developed piece-by-piece like that. If you're curious about PL theory and want to dive pretty deep, I think this is a book worth looking at.