Re:Recursions without names: Introduction to the Y combinato...
by qwertyuiop924 on Thursday August 11, 2016 @09:54PM
(#12272971)
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.
Re:Recursions without names: Introduction to the Y combinato...
by ChicagoBoy11 on Thursday August 11, 2016 @07:27PM
(#12272436)
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!
Re:Recursions without names: Introduction to the Y combinato...
by hughbetcha on Friday August 12, 2016 @07:06AM
(#12274626)
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.
Re:Recursions without names: Introduction to the Y combinato...
by qwertyuiop924 on Thursday August 11, 2016 @09:50PM
(#12272963)
Quoth xkcd, "Tail recusion is its own reward."
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.
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.
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.
If you find a way to evaluate python code in the browser, please let me know: [email protected]
> Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!
[0] https://github.com/skulpt/skulpt
Here's his JavaScirpt version: https://vimeo.com/45140590
RIP
What 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
[1] https://babeljs.io/repl/
No 'x=...'
Nerd -> meet article
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...