HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Jim Weirich: Adventures in Functional Programming

Cultivate · Vimeo · 11 HN points · 5 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Cultivate's video "Jim Weirich: Adventures in Functional Programming".
Vimeo Summary
ScotlandJS 2012: June 26th: Edinburgh
Website: http://www.scotlandjs.com
Twitter: @scotlandjs
Videos: https://vimeo.com/tag:scotlandjs2012

One of the deepest mysteries in the functional programming world is the Y-Combinator. Many have heard of it, but few have mastered its mysteries.
Although fairly useless in real world software, understanding how the Y-Combinator works and why it is important gives the student an important insight into the nature of functional programming.
Join with us on this journey of understanding.
Be prepared to curry your functions and bind your lambdas as we delve into the whys and wherefores of this paragon of functional programming.
Although you will probably never have a need for the combinator, the effort put forth to understand it will improve your functional programming chops.
This talk is not for the faint of heart, but the successful student will be richly rewarded.
Also, you will understand why "Y-Combinator" is the perfect name for Paul Graham's start-up funding company.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Jim Weirich had a good couple talks about building a Y combinator in a couple languages.

Here's his JavaScirpt version: https://vimeo.com/45140590

RIP

Nice.

This made me think of this video with Jim Weirich demonstrating functional patterns, transformations and the Y combinator:

https://vimeo.com/45140590

Highly recommened. It's very related to what seems to be going on here, and actually quite funny.

Anyone who doubts this should watch Jim Weirich's talk "Adventures in Functional Programming" - the last (and most mind-blowing) quarter of the talk is almost entirely made up of automatic refactoring.

[1] http://vimeo.com/45140590

Umm, Jim Weirich's explanation in this video makes pretty much perfect sense: http://vimeo.com/45140590
dkural
Not if you don't already know what it is. It's not a definition. This is exactly what he says and shows starting at 6:30

Audio: "This is the basics of lambda calculus right here. You’ve got the little lambda function, a lambda character and that’s indicates the beginning of a function definition. you say this function takes a varia..uh argument called x. The period denotes the beginning of the body of the function, and then whatever comes after the period is what is returned by the function. So this is an identify function here. Anything you give it, it returns back the same value. You have arguments, well ok you have variables, and you have functions. That's all you have in lambda calculus. There is nothing else, but variables and functions. "

Visual: There is a title to the slide, "λ-calculus". There is an image on the center of the slide with λx.x, and there are these words with arrows going to λx.x :

"punctuation", with two arrows coming out of it, going λ and . "argument (variable)" with an arrow to the first x "body (λ-expression)" with an arrow to the second x.

This person would fail the first definition-proof based math exam at Harvard. Let's say, the question is "What is a function?"

You can't say, well, uh, you have your f there, so basically, that's the function, and you have these arrows, and the x between the arrows, that's uh, your variable. f takes that, and uh, returns whatever's after the equal. So that's basically a function.

And I'd draw an image of f(x) = y, and have arrows to ()= saying punctuation, to f, "function", and x,y "variables".

Sloppy thinking like this is what resulted in inconsistencies in calculus, until people got rigorous and started giving good definitions of what exactly they're talking about. Here's a standard definition:

http://en.wikipedia.org/wiki/Function_(mathematics)#Definiti...

Common Intuition is not always a good guide for mathematics or computer science. The world is not as it seems. You have things like the Banach Tarski paradox, or Brouwer's fixed-point theorem which may be counterintuitive but once things clearly defined, makes more sense.

Crito
He wasn't given a lecture about lambda calculus, he was giving a lecture about Y Combinators. While he gave a quick overview of lambda calculus (an overview which I would describe as effective and _sufficient for the rest of the lecture_), that should not be confused with an attempt to give a lecture about lambda calculus.

A more rigorous or 'correct' treatment of lambda calculus would not have improved his talk, it would have distracted from it..

Jim Weirich derives the Y combinator in pure Ruby here:

http://vimeo.com/45140590

EDIT: Correct video http://www.youtube.com/watch?v=FITJMJjASUs

It is some of the ugliest ruby code I have ever seen, but it was something amazing to watch happen live.

baddox
Is the Ruby hiding in that video? I briefly skimmed it and all I saw was JavaScript.
tesmar2
You are correct, I edited the comment with the right video.
eggsby
Nice, I enjoyed Jim's talk where he derived the combinator using clojure[1]. In it he referenced another talk that he cites as an influence, "Programming With Nothing"[2] by Tom Stuart where he writes fizzbuzz in ruby using only lambda application.

Finding the SKI calculus was a similar revelation to me, that such simple combinators could represent any lambda term is such a huge idea!

1: http://www.infoq.com/presentations/Y-Combinator

2: http://rubymanor.org/3/videos/programming_with_nothing/

Jul 06, 2012 · 1 points, 0 comments · submitted by raju
Jul 05, 2012 · 10 points, 0 comments · submitted by iambot
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.