A question about the klipse plugin: Does code inside it have access to DOM elements just as javascript running on the console would? Would be a fantastic addition that could really make developing an interactive coding exercise for kids learning about the web a breeze!
In all seriousness, even if the y combinator is practically useless in languages that don't have proper TCO (which is specced for ES7), it's a useful learning tool, is powerfully mind expanding, and can help to demonstrate the power of the λ-calculus.
Indeed. It's by far best explanation of the concept that I've seen, and it, along with some of Matt Might's posts, helped me gain a deeper appreciation for concepts like Church Encoding, and λ-calculus in general.
To be fair, the article would be more aptly titled "Recursion without function names". In any recursion you need a way to reference the original function somehow. They're using a function parameter to accomplish that via indirection.
32 comments
[ 2.6 ms ] story [ 71.2 ms ] threadWhat ideas do you have for kids?
I have tried to do something for kids here: kids.klipse.tech
The klipse plugin concept is explained in details:
1. http://blog.klipse.tech/javascript/2016/06/20/blog-javascrip...
2. https://github.com/viebel/klipse
The full Y combinator is also vastly more mystical and less obvious than the partial step :)
The full Y conbinator simply binds func to func(func) as seen in `(y => f(x => y(y)(x))))`, an easy jump to make and pretty easy to understand.
In all seriousness, even if the y combinator is practically useless in languages that don't have proper TCO (which is specced for ES7), it's a useful learning tool, is powerfully mind expanding, and can help to demonstrate the power of the λ-calculus.
http://blog.klipse.tech/lambda/2016/08/10/y-combinator-app-j...
The Y combinator is useless in languages that already have builtin support for recursive functions.
You can do elegant recursive memoization with the Y combinator as explained here http://blog.klipse.tech/lambda/2016/08/10/y-combinator-app-j...
http://dkeenan.com/Lambda/index.htm
If you have never read this before, then I highly recommend it. It's a beautiful way to picture combinators.
Here's his JavaScirpt version: https://vimeo.com/45140590
RIP
[1] https://babeljs.io/repl/
If you find a way to evaluate python code in the browser, please let me know: viebel@gmail.com
> Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!
[0] https://github.com/skulpt/skulpt
No 'x=...'
Nerd -> meet article