Beep boop at flatMap

(2018-05-05. Index.)

Post that goes with flatMap(Oslo) talk Lambda Calculus Beep Boop.

Slides are here. Elm code is here. Some JavaScript and HTML that uses the Elm code is here. (The more graphical parts are mostly code stolen from Einar’s Escher-in-Elm Workshop.)

Various beep boop evaluators. Maybe they work in some of the browsers. The later ones are more fun...

Some controls:

And like:

So the identity function is beep boop bap (A S D). The Church encoded number one is beep beep pling boop boop bap boop bap (A A F S S D S D). Stuff like that.

A fancy exprssion, like a “2 + 3” one, can be written like so:

F F A A A A F F S S S S D S S D F F S S S D S S D S D A A F S S D F S S D S D A A F S S D F S S D F S S D S D

Okay.

Oh and like it is possible to, uh, cheat? Like instead of pressing the buttons, can probably open the JavaScript console and go like:

[pling, pling, beep, beep, beep, beep, pling, pling, boop, boop, boop, boop, bap, boop, boop, bap, pling, pling, boop, boop, boop, bap, boop, boop, bap, boop, bap, beep, beep, pling, boop, boop, bap, pling, boop, boop, bap, boop, bap, beep, beep, pling, boop, boop, bap, pling, boop, boop, bap, pling, boop, boop, bap, boop, bap].forEach(doBeop);

(Maybe make sure the soundstuff is initalized first. Like press space and hear a sound before doing JavaScript stuff.)