Menu
Sign In Search Podcasts Libraries Charts People & Topics Add Podcast API Blog Pricing

Simon Peyton Jones

πŸ‘€ Speaker
962 total appearances

Appearances Over Time

Podcast Appearances

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

It's a very simple translation.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

You can give the whole translation in half a dozen lines.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

But then you have this mess of S's and K's.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

And S and K reduction is very, very easy.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

So it's like the machine code of functional programming.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

That's one way to think of it.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

There are three combinators, SK and I. And they have simple reduction rules.

889.76 View full episode β†’
The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Here they are.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

I of X equals X. KXY equals X. SXYZ is X of Z applied to Y of Z. End of story.

895.09 View full episode β†’
The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

That's all.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

So very simple, right?

903.13 View full episode β†’
The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

So now all I've got to do is take my lambda, translate it into a giant tree of SK accommodators, right?

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

S applied to K, applied to I of three, and S of Z of, just a huge tree of S's and K's, right?

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Now simply apply the rewrite rules I gave you, and that is program execution.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

It's rather astonishing that that can execute arbitrarily complicated programs, but it can.

925.38 View full episode β†’
The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Don't you think that's rather amazing?

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Now, then I can take an arbitrary Haskell program, I can translate it into lambda terms, and I can translate those lambda terms into SMK, very simple transformation, and I can just run those three rules, and it'll produce the output of the Haskell program.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

That's pretty amazing.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

And indeed, there is an implementation of Haskell that uses exactly this.

The Peterman Pod
Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

It's called MicroHS, and my colleague Leonard Augustin has built it.