skysight-inc/HackerNews huggingface dataset:
Whether a function is anonymous or not is sugar. The important thing is functions aren't special, they can be passed around (i.e. the are 1st class objects).

I actually can't fathom having to code in a language in which you can't pass functions around.

Call backs is my biggest use of function passing. This is really, really huge.

Currying, decorating/wrapping functions

Replacing methods/functions at run time. Great for testing.

Putting them in data structures. Often dictionaries. Often to create more dynamic switch like logic. dict[key] = func_that_handles_key, etc. then later, dict[key](key)

Lots of data is code stuff.

Closures just make the passed functions more powerful / convenient as they capture their scope. Which is often used (at least by me in Python) to create function factories that return custom functions.

A contrived example but a pattern I use often. Logging object with warn, debug, error functions. You could hardcode / boilerplate each of those functions but that is boring, tedious, and nonDRY. So instead you create a function factory and use it to return anonymous functions, like so. Python.

def log_func_factory(level):
def closure(msg):
print level, msg
return closure

class logging(object):
debug = log_func_factory('debug')
warn = log_func_factory('warn')
error = log_func_factory('error')

With real code I'd not repeat those assignments and instead use a loop driven by data.

for level in ('debug', 'warn', 'error'):
setattr(logger, level) = log_func_factory(level)

Bam, data driven code. Very DRY, very concise, very dynamic. Maintenance is adding one text string in one place.
According to Wikipedia, Haskell 1.0 was defined in 1990 (http://en.wikipedia.org/wiki/Haskell_%28programming_language...), but Perl has had taint mode since v3 in 1989 (http://en.wikipedia.org/wiki/Taint_checking#History).

Anyway, I'm not sure why it would be less cool even if it were inspired by another language (which I'm sure it was; Perl, like English, elevates borrowing to an art form).
Windows 8: Improving our file management basics: copy, move, rename, and delete
Kingsgate Consolidated - Challenger Mine Production
It seems like this would be really useful for anyone looking to move to that area, intern or not. Awesome post. I will be referencing this in the future if I move to SF.

Did you go to or hear about any of the github hangouts? I've heard from some people in SF that those attract a lot of tech people.
These Orangutans Play with iPads
Vocabulary Activities
The perfect place to find vocabulary activities. Invigorate your vocabulary with the remarkable list of vocabulary activities this site consists of.
FINDING CHEAP CAR TRANSPORT
Four Corners posts its archives
Code promo
Guide des réductions, code promo et soldes pour économiser jusqu'à 95% sur vos achats sur Internet. Obtenez souvent en plus les frais de port et des cadeaux gratuits.
I expect that a lot of stuff involving private companies will play out in the civil court system. Asset seizures are more likely than trade sanctions.

Up until now many US companies have been afraid of China and the possibility of losing their ability to do business there. Once you are locked out of that market for other reasons, those fears vanish.
Carol Dweck: Mindset
That's not what steve-howard said, and it certainly isn't how GUID/UUIDs work: they are based on a combination of your MAC address, a process ID, a sequential ID, a timestamp, and a random number; with this algorithm, global uniqueness is confirmed. A "type 4" UUID, or as we like to call "not a UUID", is a 128-bit random number, and only got defined to retroactively deal with use cases of UUID that caused "too much information leakage" (such as Word documents).
Is this so different from 10 years ago, when no one realized that they wanted high-definition TV? I can't imagine that the demand for HD television was very high then either. Once it was available, manufacturers began making all of their equipment HD capable.

The fundamental cause of poor broadband network performance in this country is actually not a lack of demand, it's a lack of competition among ISP's -- otherwise, these speeds would come to market naturally.
I think the classic example of using anonymous functions is probably as arguments to map, filter, reduce, etc:

> (mapcar #'(lambda (x) (+ x x)) (list 1 2 3 4))
(2 4 6 8)

In that case, the anonymous function doesn't close over anything. Here's an example where it does (from On Lisp):

> (defun list+ (lst n)
(mapcar #'(lambda (x) (+ x n))
lst))
> (list+ (list 1 2 3) 10)
(11 12 13)

In this case `n` is closed over.

Both of these ARE pretty trivial, but the point I'm trying to make is that anonymous functions in many cases just make some code a bit more concise and avoids the need for nested named functions, which I guess is common in Python where `lambda` can only contain an expression.

I'm reading On Lisp now, and there are some examples early on of functions that return functions. In those cases, the functions being returned are almost always anonymous, just because naming them would be kind of verbose and unnecessary.

There are other, more complicated uses, for instance closures can be used as a sort of crude way of making objects, and supporting hacky encapsulation, which is described in a lot of Scheme textbooks, like SICP: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-21.html...

As for functional programming, it's a lot more than just first-class, anonymous and higher order functions. It also encourages or enforces pure functions: functions in the mathematical sense that do not have side effects, and always return the same value given the same arguments.

SICP is a good start, if you're curious about Lisp. It's a great book. There's other places too though, to get this stuff, if you wanted to dive into the Haskell world via Learn you a Haskell I'm sure you'd see some of what FP is about. I'm less familiar with it though.

edited for clarity and fix the SICP link
Best Home Warranty Companies - Choosing the Top Warranty Provider
If you are in search for the best home warranty companies, then you are probably a new home owner or are thinking about becoming a first time home buyer. Want to know about home warranty please visit us online.
IBurn 2011 is live
Startup Quote: John Doerr, Partner, KPCB
Good spot! We are planning to do a full site audit of that stuff, just been too busy with start-up life. We have 6 full time staff and not over a thousand like others.
Your biggest challenge will be building a great team.

- John Doerr

http://startupquote.com/post/9321949381/
Other cool things you should do:

- Go to a GitHub drinkup

- Rent a car for the day and drive on CA-1 S to Monterey. Visit the aquarium.

- Check out the Thursday-night "Nightlife" event at The Academy of Sciences

- Enjoy SF's music, food, and cocktail scenes

- Network
All good. Best of luck with it. :-)
Good examples of closures / first order functions in java is through a visitor; example below is like the ones in A Little Java, A Few Patterns

new Top(new Anchovy(),
new Top(new Tuna(),
new Top(new Lettuce(), new Bot())))
.accept( new RemVisitor(new Anhovy() );

This removes those smelly Anchovies from your tuna sandwich -- and can be implemented with a closure or not. If accept() method returns a new Top w/o Anchovies and RemoveVisitor stores what to remove in its field then it is a closure.

This book is cool for lisp programmers to learn programming with recursive objects like composites and decorators.
http://en.wikipedia.org/wiki/Tao_Te_Ching
The translations vary greatly. (from making it sound like new age mumbo jumbo, to mystic mumbo jumbo, to a profound philosophy), need to find one that's right for you.

"The C Programming Language" by K&R (I read this very young 12-13, it's life changing aspects probably had a lot to do with my age)

"The Hobbit" by J.R.R. Tolkien

"Welcome to the Monkey House" by Kurt Vonnegut Jr.
This article is a verbatim duplicate of http://www.thedogfiles.com/2011/03/21/moscow%E2%80%99s-wild-...
which was submitted to HN here: http://news.ycombinator.com/item?id=2919182 . The article on thedogfiles.com is dated 03/21/2011 by the comments, this article had its first comments on 08/13/2011.

This looks like pretty blatant plagarism.
Vuclip Searches and Trans-codes Web Video to Mobile
The Financial Times had a much better write up a while ago: http://www.ft.com/intl/cms/s/2/628a8500-ff1c-11de-a677-00144...
One really nice thing about VTA light rail is that they have wifi now. It's still really slow, but that has helped tremendously. Also, if you are interning somewhere to the south, such as San Jose, there is now an express light rail line starting at the Santa Teresa station during commute times that is pretty speedy.
Excellent point.

I use a browser extension to show up and down votes on Reddit and I really miss that info here on HN. Not that we get to see comment scores anymore but I still miss it even on my own comments.
The shortest programming distance between one and infinity? - Ask MetaFilter
Sort visualizers:
http://www.sorting-algorithms.com/
http://cg.scs.carleton.ca/~morin/misc/sortalg/
http://math.hws.edu/TMCM/java/xSortLab/
Make Money Online With Google+
Make| Money Online| With Google+ Internet is the biggest market in todays world. Business offline is slowly turning into an online one and finding space in world wide web. With the invent of new services such as the new social networking site Google Plus
Depends on the language. "Closure" (at least to me) doesn't imply this bevaior in a language with mutable variables. And then you have pure languages and languages which only support mutation through reference values, in which his explanation would be correct.
hyperspace - michio kaku
Living room sets| living room furniture| modern living room sets
Living rooms are not considered a living room without living room sets! They are a major thing in a living room. They not only serve their function as a resting area, but they also decorate the room.
with a patch
What happens if bar is not final and/or not static?
Heh, thanks Micah!
Testing the Efficiency of Free Classified Ad sites in Australia
Post free ads or online classifieds in jobs, real estate, rentals, autos, items for sale ads. Most effective online classifieds advertising for consumers.Please visit our website for more details.
A road or railway can impact quite a large area, due to fringe effects. It can cut migration paths. The most valuable nature reserves are the ones that are completely untouched, and a long way from any human activity. On the other hand little islands urban forest are just a waste of real estate (and a great source of wild animals on roads). Wildlife "corridors" may be a useless waste of space, or incredibly useful ... I'm not too sure. I guess it depends on how the animals use them.

Hopefully won't do too much damage, though. As you say, Alaska is really big.
They also have to be cost effective.
If you look at the Blu-ray version of 2001, you can see that they're IBM TelePads.
I think you mean "Emirates." An eremite is a religious recluse.
On the role of bacon in visualization
There are already options that support Markdown. Here is an example of one:

https://github.com/adamzap/landslide

Markdown isn't expressive enough for presentations so you end up having to use HTML anyway.
I don't get why it's broken? Any numbers/data to share? Why does Angry Birds contain ads if they're broken? Honestly, not trying to be a dick, just trying to understand the problem.
I believe there is under "A Better Metric"

dx is the number of days the user is registered. If the user made one post and then stopped, his karma score would shrink over time as dx approaches infinity while the numerator remains constant.

The numerator technically has an extra term for each successive day, but it looks like that additional term is 0 if no comments were made on that day.
Complex Sentence Generator - English Vocabulary Educational Tool
This is a very good tool for paraphrasing sentences and spinning articles.
LeapFrog Text and Learn
Rentals hold key to real estate market’s future
Fuel Up: 2012 Volkswagen Up revealed
Iceland's On-going Revolution
I'd be interested to see how much traction Science Exchange[1] is going to get. As someone who grew up in a family of scientists and who has been involved in the scientific community for a long time, I've got to say, my gut reaction is revulsion at the whole concept. Outsourcing experiments to the cheapest bidder? 99designs for science? I feel a really powerful revulsion.

I can't see any of the many scientists I know outsourcing their work. It beats the point! Maybe for the corporate science industry -- where they just need to perform certain tests as cheaply and quickly as possible, and with a preferred result if possible -- it could gain some traction. But I don't see this gaining anything in the universities. Or rather, perhaps I hope it doesn't.

[1] http://scienceexchange.com/
Addressing the Justice Gap
Guides to DIY Educational Solar Toy
Google hacking exposes large caches of personal data
I have to disagree...somewhat.

Since Reddit is open source, I could create a copy right now that would have no content on it. Lets say I populated it with all of the old, highly rated posts. This would be valuable as a source of high quality content, but has less value to me because it lacks current events and interaction with other users.

I said 'somewhat' because there clearly is a value in having high quality content, so I see it as a trade off. I think there's a market for both high-quality/low-volume sites as well as lower-quality/higher-volume sites.
Oh please, Microsoft Surface...how many years ago was that before your precious iPad? There is probably not a single thing that Apple designed that is not without precedent. It just looks that way to your infatuated eyes.
If it's not static you wouldn't be able to reference it from the static context (the inner class baz). It could be non-final though, because it's a field not a local.

The second part is the more interesting part, and is part of what people are talking about when they say that Java doesn't have closures: you can't modify closed over local (stack allocated) variables. However you can call methods that modify or otherwise modify heap-allocated objects, for instance if bar was an array you could modify it's contents, or if it was a Vector you could call addElement() or whatever.

In the GP's case, bar is a member field, not a local, so I don't think it needs to be final, and a quick test checks out. But if those were variables local to a method and you referenced them from an anonymous inner class, they would have to be final.

See: http://c2.com/ppr/wiki/JavaIdioms/ClosuresThatWorkAroundFina...

If I recall correctly, from digging into the famous Guy Steele quote "we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." I think this decision was made at the time because programmers didn't like the idea of heap-allocated local primitives. I could be totally off base here though. That wiki page mentions something about preserving the threading model, which sounds reasonable, but I don't know enough about Java's history to be totally clear on the motivation.

edited because I'm a pedant.

and the relevant message from Guy Steele: http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/m... (that whole thread is fascinating, massive respect for GLS as if I didn't already, and helped quell some of my hipster Java hatred.)
Announcing the release of Fedora 16 Alpha
Fashion Style and Fashion Tips
Drop Dead Gorgeous Daily is the largest online source to find style advisor, fashion tips, fashion trends, glamour magazine and much much more.
Well, one out of several hundred thousand is a pretty low failure rate.
Every branch of the military has been 'building a force' for years. They all want to be the branch that is more necessary than the others (and therefore gets more funding/prestige). The reality is that 'cyber warfare' is less warfare and more espionage. It's probably already being handled by the NSA/CIA/etc.
It is funny that you get downvoted in this thread as soon as you show some slight disagreement with "Why". At least, felipemnoa cared to explain: "the best way to learn is to make a lot of mistakes, in everything". I don't care that much about karma (would "Why" care? I doubt) so I will say here why I don't agree.

Mistakes are good, to some extent, but not in everything. Would you tell someone that unsafe sex is ok, and that one should learn its danger by doing the mistake, catching a STD, and then not doing it again? Would you tell someone that building a bridge without double checking pressure contraints and simic conditions is ok, that one will learn by one's mistakes when the bridge will fall apart? Hmm, so there are some limits to this "learn by your mistakes" thing, right?

In coding, the same. It is ok "to write dangerous or “crappy” code" (Why quote) in personal projects, not in those where life are at stake, eg. airport traffic control or medical software. It is ethically not ok to write dangerous code in these case, and I would say it is the same when your code will have to be read, used, debugged by others. I admire people taking risks, too, like I admire someone eating 50 eggs in 1 hour, but I would not always advise my friends and relatives or coworkers to take those risks. Sometime, most of the time, the reward is not good enough.

I appreciate "Why" writting skills, he is or was an impressive guy, but taking to the letter every of his tweets should not be mandatory on HN, I believe.

Thanks for explaining why and where I'm wrong, if it is the case.
Thanks for the PadMapper shout out!
An idea for a mobile mouse
Facebook kills Places, but emphasizes location sharing more
I spent 5 minutes trying to figure out what the fuss was about before I realized they fixed it! Woops.
However, a question remains: will they eventually sell out and do similar privacy-controversial decisions as LinkedIn? Will everyone have to move again? I'm sure 3 years ago LinkedIn would deny that they would do anything like their recent move, but here we are. People keep moving from a service to another, hoping that it will be better, but what's to stop the new service from doing the same tricks once it gets big enough?
Agreed. I lurk...a lot.

I rarely open my mouth. There was a short period where I looked to snipe with some witty comment, but I quickly out grew that.

I've made one post and I am rarely finding things pertinent to the tribe that haven't already been posted, so instead I look for new interesting content here and only open my mouth when I think I have something valuable to add to an existing discussion.

I think something like the proposed solution would leave a user like me out in the cold. I am by no means saying this objection should kill the idea, you gotta break a few eggs, and if I happen to be one of them, so be it. It should be given some thought though.
"The other distinction is that Y Combinator didn’t let investors snag any participants early, as it previously has."

We don't have any power to stop companies from taking investment. Nor would we want to, especially in these uncertain times. We usually encourage companies to take money before DDay if a legit investor makes them an offer that doesn't require a lot of negotiation.

What we did differently this time was that we didn't hold an event we have in the past called Angel Day, at which we introduced startups early to a select group of angels. We found this was turning into a de facto early Demo Day, and that was bad because it was causing the startups to be pushed into fundraising mode early.
Mainly Entertainment
I'm very excited for Windows 8 and these posts are a big help in that (as well as what I perceive to be a great opportunity for the Windows platform across phones, tablets and desktop).

Maybe Microsoft will actually do this correctly instead of implementing it like Nautilus, where the copies aren't queued and thus happily trash the disk (hell, even the pause feature is quite welcome).
Comma before "but" too, please.
We don't see a call schedule for you or any calls from us in the past. The email was likely just an automated email from the system before we processed your email to support. Don't worry, we won't actually call you:)
Can you imagine Apple reassuring its users that there will be a "vibrant market" for 3rd party providers of what became Lion features for a long time?
Oops, apologies for that, it looks like one of the reps picked up your account before seeing your email to support. Your account has been deleted.
"Duck extends Bird" is not the wrong thing at all. As other comments have pointed out, the justifications in the article don't apply to someone who is just starting out learning the basics of OO.
Other than Startup Roots, are there any other good ways to find Bay Area startup internships?
Baby Boomers Destined for Wage Slavery Until They Drop Dead
For anonymous - GUI event-handlers/callbacks.

Say in MFC, or wxWidgets, or similar you have to explicitly say this even tones to this function, with anonymous functions this is easier, you can just "inline it". If I'm not wrong, in .NET something like this:

With functions (.NET, C# kind of)

button1.Click += new EventHandler(OnButton1Clicked)
somewhere you would have to declare OnButton1Clicked

with anonymous function:

button1.Click += delegate(Event e) { Console.WriteLine(e.ToString()); };

or for newer .NET (both of my examples might be wrong, check the docs)

button1.Click += (e) { Console.WriteLine(e.ToString()); };

but what the other folks said in answers to you is how most of the time anonymous were used - map/reduce type of situations, or your "C" sort() if you can plug anonymous there.
One copy tool that's not well known is RichCopy from Microsoft. It's a great copy util when dealing with huge amount of files. It supports parallel copy, resume from failed, and copy only changed files.
Theresa James and Roger Prince, Lakme Fashion Week 2011
I lived on the red line and rode it daily for 5 months. I don't know about all the claims made by the post, but I do know that I rode the line on a pretty regular schedule and I think I often saw the same dogs taking the line at roughly the same time. Trains come every 90 seconds so it's hard to say exactly, but it was a common enough phenomenon that I thought I recognized some of the dogs after several months.
I would imagine most interns are under 21 and thus cannot do most of these things.

Though I do recommend visiting the Aquarium in Monterey, the Exploratorium and the California Academy of Sciences (During the day if you're under 21)
Strange. I definitely got a call from someone claiming affiliation with y'all that referenced info about the plan DebtEye generated at 8:19PM Eastern today (8/23). The number was a chicago number that ended in 0969, and asked me to call back at (866) 771-3511. I hate talking to people on the phone, and had you not called me, I'd have considered using your service.
I would be extremely surprised if this happened at the byte-code level.
Academic researchers already outsource about 2% of their experiments.

It's not driven by laziness, but by one institution having facilities or expertise that another doesn't. Often it's simply a way for universities to share machines so expensive that they can't all afford one of their own.
There's two flavors of monthly data cap.

I have a Linode with a data cap of 300GB per month; if I use more than that, I pay a reasonable amount ($0.15/GB) for the excess. So if I use a lot of data one month, I get a charge on my credit card, and life goes on. I'm completely comfortable with this.

A residential Comcast connection has a data cap of 250GB per month; if I use more than that, they turn off my connection and ban me for a year. So if I use a lot of data one month, I find myself abruptly and semi-permanently screwed. I am absolutely not comfortable with this since the consequences are so severe and long-lasting.