Channels

#present-company

Title

# present-company

n

Nilesh Trivedi

09/04/2023, 8:56 AMIs there a visual programming environment that implements lambda calculus (either untyped or simply typed)?

w

wtaysom

09/04/2023, 4:21 PMNot specifically, but in my experience a natural way to introduce the lambda calculus visually is via templating. Starting with some diagram (essentially equivalent to an expression tree), let the person pull out some part of it leaving a whole. So from

Copy code

`here we go round the mulberry bush`

we can go to:
Copy code

`(here we go round _) (the mulberry bush)`

As soon as you try to pull something else out, you see the ambiguity:
Copy code

`(here _ go round _) (the mulberry bush) (we)`

In text we use lambdas and variables to order how the blanks get filled in
Copy code

`(\ _what_ _who_ . here _who_ go round _what_ _what_ _what_) (the mulberry bush) (we)`

and so on.
Immediately, I think of three things that are — um, off — about conventional notation:
1. `(\ variable . expression) value`

quickly puts a lot of space between `variable`

and `value`

.
2. Being able to repeat a variable is so easy to do with text, that you can easily fail to realize how significant an operation it is.
3. Likewise, the between `f (g h)`

and `(f g) h`

much bigger than the notation suggests.
So it certainly would be neat to see a spacial lambda calculus that specifically addresses these problems.k

Kartik Agaram

09/04/2023, 4:35 PM

Would either http://www.lamdu.org or https://hazel.org qualify?
(I think this question would be *fine* to post on **#thinking-together**.)

j

Joshua Horowitz

09/04/2023, 5:34 PMj

Jimmy Miller

09/04/2023, 7:00 PM

Here's a paper on a lambda calculus based formalism for visual programs. (Haven't read it)
https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=ca25ecf69726cde7e4e735fbc9a6805daa4ca9df

Also, not what you are looking for, but if you want to do some proofs in the simply typed lambda calculus, there is http://incredible.pm/
(A super fun way of doing proofs)

n

Nilesh Trivedi

09/07/2023, 2:25 PMCame across https://inet.run/ today on HN.
Had never heard of Interaction nets before: https://en.wikipedia.org/wiki/Interaction_nets