Re:PG on the cover of Forbes
by j_baker on Friday November 19, 2010 @02:07AM
(#1920708)
"Y Combinator--a computer term for a program that runs other programs"
Heh... completely wrong, but I suppose it's the best you can expect a non-techie/math nerd readership to get. Heck, it's probably close to the most you can expect the average programmer to get.
EDIT: And another one...
"Graham met Morris, an authority on the Unix computer language"
Re:PG on the cover of Forbes
by evanrmurphy on Friday November 19, 2010 @04:14AM
(#1920917)
> Heh... completely wrong, but I suppose it's the best you can expect a non-techie/math nerd readership to get. Heck, it's probably close to the most you can expect the average programmer to get.
How would you explain the Y Combinator to the Hacker News readership?
Re:PG on the cover of Forbes
by eliben on Friday November 19, 2010 @05:18AM
(#1921011)
The Y combinator is a programming construct allowing one to write recursive functions without explicitly calling themselves (unnamed recursive functions):
Re:PG on the cover of Forbes
by ostso on Tuesday November 23, 2010 @12:08AM
(#1932608)
The difference is that the whole point of the Y combinator is that it's a fixed-point combinator that doesn't use explicit recursion. Imagine that you didn't have "var", and couldn't name anything (which is the situation in, say, the lambda calculus). Using the Y combinator you could still define recursive functions.
Re:PG on the cover of Forbes
by meastham on Friday November 19, 2010 @05:41AM
(#1921042)
Like others have mentioned it's rather academic, but also pretty cool. It's a way of introducing recursive functions into the untyped lambda calculus. I think the easiest way to see it is using it in scheme to define an anonymous recursive function:
You'll notice that lines 6-10 define a procedure that takes a factorial function, performs one level of the recursion, and then calls the factorial function to compute the rest. The Y combinator, implemented in lines 1-5, basically allows us to start the recursion. A step by step derivation can be found at http://www.ece.uc.edu/~franco/C511/html/Scheme/ycomb.html
The really neat thing about this is that all that was required to create that factorial function was lambda, some arithmetic functions, and if. Arithmetic can be implemented using only lambdas (google church numerals) and so can if. Using these techniques you can create a factorial function using only lambda and function application (which is exactly the lambda calculus).
If you replace "program" in the Forbes article with "function" I don't think they're terribly far off.
Re:PG on the cover of Forbes
by taylorbuley on Friday November 19, 2010 @02:02PM
(#1922358)
I'm a coder/writer at Forbes. If I had to guess, that's exactly what an editor might say. Also, we're always crammed for word space so shorter (even if perhaps less nuanced) always wins.
Re:PG on the cover of Forbes
by ericb on Friday November 19, 2010 @07:21AM
(#1921201)
Wow, hmm.. I worked a MEDITECH a long time ago, and they actually used a programming language, MAGIC, that you couldn't recurse in. It used macro code expansion to take MAGIC code and output into a lower level language and recursion would make it loop infinitely. Maybe at MEDITECH it wouldn't have been so academic.
Edit: Not sure why this got downvoted, but in their internal programming course they talked about the recursion problem explicitly--I'm not making this up, as crazy as it sounds.
If you don't believe me, here is a link to a blog post with someone else mentioning it in the comments:
Re:PG on the cover of Forbes
by smanek on Friday November 19, 2010 @06:18PM
(#1923231)
That's like saying integers are an optional thing, and it's no big deal if your programming language doesn't have them. True, they aren't necessary (look at peano arith or pure lambda calc) - but it sure makes things a lot easier. It's much more concise and intuitive to write some search or divide and conquer algos recursively than imperatively.
Re:PG on the cover of Forbes
by axod on Saturday November 20, 2010 @02:59AM
(#1924097)
javascript doesn't have an integer type.
Possibly it makes things easier for some algorithms, but as I said, it is optional. It's not rocket science to rewrite any algorithm that relies on recursion to not need it.
Re:PG on the cover of Forbes
by spacemanaki on Friday November 19, 2010 @08:30AM
(#1921335)
The "meat" of it is really that (Y F) = (F (Y F)). In other words Y applied to a function F expands to F applied the original expression, so it builds up nested calls of F.
I can't do it justice, but it's definitely much more interesting and even beautiful than "meh". I guess there are always "practical" vs "academic" arguments to be made but I find stuff like the lambda calculus, Y, Church numerals, all really cool.
Re:PG on the cover of Forbes
by axod on Friday November 19, 2010 @09:56AM
(#1921533)
Yeah ok, it's sort of interesting as a curiosity. But it's going to be terribly inefficient if used, and doesn't really have any practical application.
I've always been more of a practical "why not just use a loop" kinda guy, so it's probably wasted on me.
Re:PG on the cover of Forbes
by abstractbill on Friday November 19, 2010 @02:13PM
(#1922398)
If you told me (before I knew about the Y combinator) that there was a function Y such that Y(F) = F(Y(F)) for every other function F, I doubt I would have believed you.
Re:PG on the cover of Forbes
by eru on Friday November 19, 2010 @10:59AM
(#1921721)
Loops are just a special case of recursion, and only necessary for languages that don't support recursion very well. As an example, Scheme and Haskell have no use for loops.
Re:PG on the cover of Forbes
by timtadh on Friday November 19, 2010 @03:44PM
(#1922726)
Except there is no difference at the machine instruction level between a recursive and iterative approaches. They are isomorphic to each other. That is why you can implement all recursive algorithms using an explicit stack and a loop and all iterative algorithms as recursive functions.
Re:PG on the cover of Forbes
by axod on Friday November 19, 2010 @05:35PM
(#1923093)
Huh?
There's a lot of difference in the unoptimized form of recursion - namely stack usage. Yes you can hack together tail call recursion to try and make recursion perform as well as iteration does, but what really is the point?
Re:PG on the cover of Forbes
by eru on Monday November 22, 2010 @09:43AM
(#1929896)
The concept of recursion in is independent of computers. Recursion is just the mathematicians idea of how to repeat get arbitrarily big objects out of limited definitions.
Loops are a just a special case, and not really closer to the hardware. Branches and jumps are closer to the hardware. "Yes you can hack together [a compiler] to try and make [structured programming] perform as well as [goto] does, but what really is the point?"
Re:PG on the cover of Forbes
by zackattack on Saturday November 20, 2010 @08:37AM
(#1924467)
i think it's a right brain bicameral lateralization thing, but if someone more knowledgeable than me can get more explicit, i would absolutely love to hear
Re:PG on the cover of Forbes
by GDH on Friday November 19, 2010 @02:25AM
(#1920740)
Thanks for the actual cover shot, I got my copy in the mail this morning while running out the door to go write a midterm. I noticed PG on the cover and spent half the day wondering if anything new was in the article.
Re:PG on the cover of Forbes
by evanrmurphy on Friday November 19, 2010 @02:33AM
(#1920756)
Slipping a link into the headline to (presumably) your startup, even if it is inside a "// not related" comment, is pretty tacky. You might even call it spam.
Re:PG on the cover of Forbes
by pg on Friday November 19, 2010 @12:23PM
(#1921970)
It has unusually clean design. I've noticed that in other consumer goods lately. E.g. cereal boxes. I wonder if it's the result of a/b testing, or just a fashion.
Re:PG on the cover of Forbes
by izaidi on Friday November 19, 2010 @07:27PM
(#1923379)
It was an existing trend accelerated by the recession. An excess of stuff is no longer fashionable. Hopefully it lasts awhile (the fashion, not the recession).
Re:PG on the cover of Forbes
by jdp23 on Friday November 19, 2010 @02:12AM
(#1920718)
i thought the virtual absence of women was interesting. Jessica Mah got two paragraphs near the end, Demi Moore a passing mention, and Jessica Livingston merited two sentences. she co-founded YC and is married to Paul, and they couldn't even ask her for a quote?
Re:PG on the cover of Forbes
by axod on Friday November 19, 2010 @04:36AM
(#1920950)
That's because most founders are guys?
It's like the leaflet I got from our local hospital the other day. It features on the cover an african, an indian, a few other minorities, and one small white person. It's like they're trying way too hard to appear diverse. (The area it serves is probably 90%+ white).
I'd rather they project what is actually out there.
Re:PG on the cover of Forbes
by ig1 on Friday November 19, 2010 @03:43PM
(#1922723)
JL got more of a mention than Morris or Blackwell. I don't think the article writer chose to avoid or include women particularly, rather it just reflected the subject matter they were writing about.
Re:PG on the cover of Forbes
by GDH on Friday November 19, 2010 @02:24AM
(#1920737)
Very true, Forbes often overlooks the women behind innovation. They tried to make up for it with the 100 most influential women issue last month, I would much rather see them include a few more articles each month on the subject.
Heh... completely wrong, but I suppose it's the best you can expect a non-techie/math nerd readership to get. Heck, it's probably close to the most you can expect the average programmer to get.
EDIT: And another one...
"Graham met Morris, an authority on the Unix computer language"
How would you explain the Y Combinator to the Hacker News readership?
You'll notice that lines 6-10 define a procedure that takes a factorial function, performs one level of the recursion, and then calls the factorial function to compute the rest. The Y combinator, implemented in lines 1-5, basically allows us to start the recursion. A step by step derivation can be found at http://www.ece.uc.edu/~franco/C511/html/Scheme/ycomb.html
The really neat thing about this is that all that was required to create that factorial function was lambda, some arithmetic functions, and if. Arithmetic can be implemented using only lambdas (google church numerals) and so can if. Using these techniques you can create a factorial function using only lambda and function application (which is exactly the lambda calculus).
If you replace "program" in the Forbes article with "function" I don't think they're terribly far off.
The Y Combinator is a way to make computer code self-referential without having to introduce names for parts of the code.
Or a bit less accurate:
The Y Combinator is a clever way to make computer code self-referential.
"It's a program that lets other programs see themselves."
...but I know it's much more involved than "a program that runs other programs".
This is a good description if you're into that sort of thing: http://mvanier.livejournal.com/2897.html
The meat of it is that you can 'do' recursion by building up functions that call other functions :/ meh
Edit: Not sure why this got downvoted, but in their internal programming course they talked about the recursion problem explicitly--I'm not making this up, as crazy as it sounds.
If you don't believe me, here is a link to a blog post with someone else mentioning it in the comments:
http://htmlcoderhelper.com/what-is-the-worst-programming-lan...
edit: rather than downmod me to -1 for stating a fact, why not reply?
Possibly it makes things easier for some algorithms, but as I said, it is optional. It's not rocket science to rewrite any algorithm that relies on recursion to not need it.
I can't do it justice, but it's definitely much more interesting and even beautiful than "meh". I guess there are always "practical" vs "academic" arguments to be made but I find stuff like the lambda calculus, Y, Church numerals, all really cool.
I've always been more of a practical "why not just use a loop" kinda guy, so it's probably wasted on me.
It seems to me logical for both parties to express programs mostly using loops.
There's a lot of difference in the unoptimized form of recursion - namely stack usage. Yes you can hack together tail call recursion to try and make recursion perform as well as iteration does, but what really is the point?
Loops are a just a special case, and not really closer to the hardware. Branches and jumps are closer to the hardware. "Yes you can hack together [a compiler] to try and make [structured programming] perform as well as [goto] does, but what really is the point?"
Above is a very hard sentence to parse for non-native speakers, just saying ;)
http://imgur.com/gOyI9.jpg
Update: Thanks for removing the link.
Congratulations, pg. If nothing else, being on the cover of Forbes must put a smile on your face.
http://en.wikipedia.org/wiki/Moore_Law
http://en.wikipedia.org/wiki/Self-fulfilling_prophecy
other than that it was guys, guys, guys. http://bit.ly/ycturgor2 has more.
It's like the leaflet I got from our local hospital the other day. It features on the cover an african, an indian, a few other minorities, and one small white person. It's like they're trying way too hard to appear diverse. (The area it serves is probably 90%+ white).
I'd rather they project what is actually out there.
http://news.ycombinator.com/item?id=1831471