Hacker News Comments on
Jim Weirich: Adventures in Functional Programming
Cultivate
·
Vimeo
·
11
HN points
·
5
HN comments
- This course is unranked · view top recommended courses
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:
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.
Umm, Jim Weirich's explanation in this video makes pretty much perfect sense: http://vimeo.com/45140590
⬐ dkuralNot 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:30Audio: "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.
⬐ CritoHe 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: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.
⬐ baddoxIs the Ruby hiding in that video? I briefly skimmed it and all I saw was JavaScript.⬐ tesmar2⬐ eggsbyYou are correct, I edited the comment with the right video.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!