skysight-inc/HackerNews huggingface dataset:
Not to focus too myopically on the given example, but I can’t help but wonder why it’s a requirement that the first file be handled specially? A less contrived example would make the argument more convincing.

If I wanted to compute the size of one file relative to a set, I’d probably do something like this:

queue()
.defer(fs.stat, "file1.txt")
.defer(fs.stat, "file2.txt")
.defer(fs.stat, "file3.txt")
.awaitAll(function(error, stats) {
if (error) throw error;
console.log(stats[0].size / stats.reduce(function(p, v) { return p + v.size; }, 0));
});

Or, if you prefer a list:

var q = queue();
files.forEach(function(f) { q.defer(fs.stat, f); });
q.awaitAll(…); // as before

This uses my (shameless plug) queue-async module, 419 bytes minified and gzipped: https://github.com/mbostock/queue

A related question is whether you actually want to parallelize access to the file system. Stat'ing might be okay, but reading files in parallel would presumably be slower since you'd be jumping around on disk. (Although, with SSDs, YMMV.) A nice aspect of queue-async is that you can specify the parallelism in the queue constructor, so if you only want one task at a time, it’s as simple as queue(1) rather than queue(). This is not a data dependency, but an optimization based on the characteristics of the underlying system.

Anyway, I actually like promises in theory. I just feel like they might be a bit heavy-weight and a lot of API surface area to solve this particular problem. (For that matter, I created queue-async because I wanted something even more minimal than Caolan’s async, and to avoid code transpilation as with Tame.) Callbacks are surely the minimalist solution for serialized asynchronous tasks, and for managing parallelization, I like being able to exercise my preference.
Logical Increments - PC Buying Guide
CD pioneer Phil Ramone dies
I've always wished I had had a sister. Most times I picture her younger, but Brian makes me reconsider. I wish I had had a sister like Brian's, and my best wishes go to him and family, this was a powerful piece and like a good movie it made me feel a part of it. Laura is exactly the name I have always wanted for my first daughter. I wonder if she'll cry on my shoulder when boys break her heart.

Relevant song[1], from the Flaming Lips' The Soft Bulletin album cited exactly here on HN on a previous thread for an article regarding the loss of a father. Coincidentally it was at the time my dad had a motorcycle accident of which he's still recovering. The feeling of being close to loss was real, and this song, and album, is now loaded with feeling for me.

[1] http://www.youtube.com/watch?v=mzU6vinZwhc
A lot of people play Taylors for a reason. I agree they've flooded the market in 2013, but even 10 or 15 years ago, that wasn't the case. Back then, the CW was that what you said above applied to Martin (don't misunderstand-- I love Martins for what they represent, too). It's the guitar circle of life. Some people just wanna be different and don't want to play what everybody else is playing. I get that, but ten years from now it won't be Taylor, it will be some other maker. It's the nature of the business.
I'm getting +20k IOPs and nearly 1GB/sec read/write out of a mirror, something like 40K 1.5GB/sec out of a mirror+stripe on ZFS under FreeBSD. Disks are either 2x256GB SSD or 4x128GB SSD. Meanwhile BTRFS was so slow on random IO I had to toss it out in favor of the less reliable JFS or EXT4 on Gentoo.

Don't use RAIDZ if you want performance with ZFS however, and you need to set it up twice before you get how to performance tune it.
And that is the legal standard anyway. A judge is too enforce as much as possible of the original contract, even if it is found to be illegal. Judges are encouraged to make the minimum possible adjustments to make the contract legal.

This makes what seems to be common practice today, signing contracts you think to be illegal because they "can't be enforced" lunacy.
Writing descriptive commit messages with multiple lines.
Show HN: Perks - Twitter on Autopilot
Games with hidden developer messages
depends. for small commits, a one-liner suffices. For large commits, merge commits, etc., or for repos that require you to sign-off on the commit or whatnot, a one-liner followed by a blank line and then a nice paragraph or bullet-point list is necessary. "launching a full editor" is hardly a problem with emacsclient or vi[m]
There's still significant sources of light pollution all around in those pictures. I doubt that you'd have been able to see anything more than the handful of really bright stars on those nights.
Sorry, I don't see no clarity there.
And how would that fix the fact that stat works in individual files?, and more importantly, how does a function like that handles error? Individual level, group level? It is confusing.
The project I'm working on right now is about 6 months old. Promises have greatly simplified our data access layer. My argument here is mostly syntactic (not semantic, like the OP), but being able to assign promises to a variable has improved the readability of the code and the intent of the code, improving readability, testability, and flexibility. I don't claim that promises are the One True Way, but they get a lot of noise out of my way and let me focus more on what our code is doing than on how it's doing it.
The message pattern you describe sounds a lot like "the one-line hook"[1], and yes, it's very effective.

[1]http://onlinedatingmatchmaker.com/match-messages/
How to hack the recruitment process to find the best developers for your startup
"manufacturingporn.com" really sounds like you're dealing with another kind of material.
I'm sorry, but if anyone's business depends on ad-revenue, find a better way of making income. The ad-block rates will go up massively.

People are fed up with the crapload of popups, layerads, "you will be redirected to X in Y seconds", and other annoying kinds of advertising... for many websites one HAS to use an ad blocker to make the sites actually fucking usable.

The problem for the ad industry is that they opened the box of pandora and it's WAY too late to get the trust of the users back.
College Startups: The 'New Master's Degree'
Wilton "Beginning Javascript" is the essential bits of JS.

Zakas "Prof JS for Web Developers" is comprehensive.

Strom "3D Game Programming for Kids: Create Interactive Worlds with Javascript" teaches JS by creating games.
I agree with the parent poster that package management and graphical environments on FreeBSD is NOT very easy compared to Ubuntu, for example.

pkgng supposedly brings FreeBSD's package system close to Debian's which would be a great advance. I almost wonder why they didn't port Debian's system over completely. Is it a GPL thing, or did they do apt-get better?
Ask HN: Strong interest in idea from users...suggestions?
I had an idea for a while, and only recently started shopping around the idea to ideal customers. Its an SaaS with monthly subscription. I have ~50 perfect customers asking when it will be available. This is a huge market so these 50 are the tip of the iceberg. There is no way I can learn enough programming in 2-3 months to launch an MVP. What would YOU do in this situation?
Why doesn't Russia make a devil's deal with China to backstab NK, launch a surprise attack, and carve up the territory between them? With some nebulous hand-waving about their rhetoric leading to "global nuclear destabilization" or somesuch (even if it's clear from the lack of troop movements that the rhetoric is just rhetoric). They wouldn't have to deal with a popular rebellion in Iraq/Afghanistan, just send the people a little bit of food and start modernizing the countryside and they will be hailed as liberators.

Best to do it now, before they have to deal with another nuke club member in their backyard that's a total wild card...

And if Seoul gets demolished, South Korea isn't their ally, so that's Somebody Else's Problem.
Following that logic, OO is an orthogonal attribute to functional. Both of them can define functions, and thus OO is functional.
yep, that's true. But this way, at least you can find the hash and then if lucky, find out the real password.
Functional language has the declarative aspect while declarative language lacks the functional aspect. Just because A => B doesn't mean B => A.
Hopefully the workarounds aren't too painful. It's nice that Tesla doesn't have to buy/lease expensive real estate in Austin and deal with all the headaches associated with that. Unless it isn't worth it--I'm not well-versed in car dealership operations.
It looks like your network is failing.
If all you want to do is play around with molecules on a screen, check out PyMol.

But here's the rub: if you want to learn "bioinformatics", you're going to have to accept that most of the work is inherently not visual. I worked in about the most shiny, graphical part of biology possible (protein structure), and maybe only 20% of the work involved spinning molecules on a screen.

The real work of bioinformatics involves thinking very hard about problems that are deeply mathematical. The visualization part is strictly secondary -- though it gets the most attention, for obvious reasons.
my eyes hurt just by looking at the page, i didn't even want to look for the videos.
You're right, I might have misinterpreted. He didn't actually write anything else that implies he found the positive correlation counterintuitive. I don't know what the author's actual meaning was, so I still can't say for sure, but you're right, there was some cognitive bias involved in my reading. My apologies to the author.
I hate to break it to you, I'm a Lakers man :) I'd make the trek to Staples.

Added Sunday Street fests though :)
"Representative" is a dangerous term to use when you're already talking about distant outliers.
Awesome list dude!
First of all, that's not what "functional" means.

Second, OO is an orthogonal attribute to functional.

Third, your argument commits a formal fallacy of this form:

All cats have whiskers

Cats can have stripes

Tony has stripes

therefore tony is a cat.

---The possibility of an attribute in X, and Y containing that attribute does not imply that Y is an X.

the point is that whether something is declarative has no bearing on whether it is functional or not. It's an irrelevant point to bring up. Whether something is OO is equally irrelevant. That is what "orthogonal" means. I would go on to define for you "functional" "declarative", "formal fallacy" "logic", but this seems like a bottomless rabbit hole. I can only hope you'll try and find out what these words actually mean yourself.
The premise of the article is simple. Companies may lose money in the long run by cutting older workers and hiring younger workers in their place to save money. There's an obvious case to be made for experience and wisdom that comes with age to some older workers. A blanket policy of bias towards the young is going to lose that. Companies should be smarter about it and realize that some older workers do get better with age. They should try to hire boy wonders and keep some wise heads around. The author mentions a problem without naming it, which is the Peter Principle, where workers are promoted until they reach a level where they are no longer effective.
Possibly, yes. I'm not passing any judgement here, just pointing out that police, as agents of the State, are ultimately agents of violence, since the State is ultimately just "that entity which reserves for itself a monopoly on the lawful use of violence".

Personally, I agree with Bastiat that the State should be more more than the collective extension to our own individual, inate right to self-defense, so any violence which goes beyond that, I consider improper.

But I've said too much already, HN really isn't the best place for these discussions...
A sad demise, this page was part of my Linux using in the early 2000s.
Actually, you were right to correct me to begin with, see the other reply.
I'll leave freebsd-update aside, since Colin already touched on that.

I too am old, and often extremely grumpy. That said, I think you might be having a "senior moment" regarding your recollection of administering SunOS systems, if you're comparing the hassle of SunOS to FreeBSD.
Glad to see others are of same mindset as me.

This site is yet another useless wart on the ass of the internet. Creates no content yet proudly displays others works.

Also the creator is, you guessed it, another "founder" who can't code... https://twitter.com/andreasklinger
fyi, i submitted a game for ouya, and the system is not ready.

1) the dev sdk is not yet complete. Try figuring out how to bring up the in-game menu, or "pause" using the controller. Seems logical that's what the middle button should be for, but there isn't any sort of guidance on this in the api.

2) my game is developed using unity, and runs on android (it's in the google play store). We get my game building using the official Ouya plugin, but without dev hardware, our ability to test is extremely limited, but we do our best to plug in an xbox controller and make sure everythign works. .... so we submit the game to ouya, and they reject it citing "the game takes turns every one second after starting, and the music keeps playing after exiting the game"..... since my game doesn't actually have "turns", and we use Unity as an engine so don't actually do anything special for exiting, I emailed them back asking for clarification ... and got no response.

rant: they name the controllers buttons OUYA. wtf seriously? they couldn't use ABXY?
Agreed. I imagine some filters are going to block that domain.
Your website font on Windows is just plain terrible looking.

Regardless of that... I love this!
Problems with the TSA
Had a power nap, and now I'm back. Your feedback has been awesome
Same here. Pretty sure it's browser detection only.

I wish developers would honestly stop doing that already. Capabilities and stability are far more important than a logo.
I think the problem with macros is that they do not always compile and do not always work fine. Debugging macros is hard by any definition, because you have to reason about both what is written and what goes on behind the scenes. A macro is great if the same genius is both writing the macro and using it, otherwise it sucks, in practical terms.
With a function things are much easier – one know what gets in, and you can tell the author of the function what has gone wrong; much easier then trying to understand how the macro did unwind; with macros the additional complexity is that one has to understand what the user of the macro was trying to do.
Man, KDE has come so, so, so, so far since a year or two ago. With a bit of tweaking, with a few different Plamsa theme, Oxygen, and Oxygen color schemes, you can customize it if you like and it looks great out of the box even if you don't. Between that, Qt5, SDDM and plans shaping up for KF5, I'm really excited about the direct of KDE Plasma.

KWin has more features than Mutter and is more stable than compiz. It has several interesting features related to the application menus, Plasmoids are actually fairly nifty and useful if you're into that sort of thing. And to top it off, a default Kubuntu install uses a little less than .5GB of RAM at the plasma desktop.
I think his point is that there's usually a very strict ordering to the events on an HTTP server - you parse and sanitize your input, make some database calls, and generate a response - at best, letting something else do the sequencing and composition for you doesn't gain you much, as it might in a reactive GUI. At worst it leaves room for subtle bugs or code that's less clear (arising from the statefulness of the Promse object itself).

Using a Promises, as opposed to reducing a list of computations async-style, also limits you to the Promise object's interface, so you lose (or at least add cruft to) the flexibility and composability of using native lists. By sequencing computations with lists, if I want some insight into what's happening, I just List.map(apply compose, logFunc). With promises, I have some work to do.

Promises have their uses, but it's definitely a tradeoff, and for most HTTP servers, I'd argue that their utility does seem a bit limited. I'd similarly say that making a point of using FRP to build a server would probably be a bit overkill for the task.
You didn't read the thread. He's suggesting doing human studies instead of animal studies.
> The idea that webservers are "all about side effects" gives me a chill. The whole architecture concept of HTTP is no side effects, so to claim that it's all about side effects seems odd. It should only be the case for POST PUT or DELETE methods, and only in very specific ways.

There's nothing incongruous about that. It is the case that side effects should only happen on POST, PUT, and DELETE methods (and the like), but almost all webservers are written because of a need to use these.

If your webserver is all GETs and HEADs, then it is either trivial and you would have used someone else's instead of writing your own, or its sole purpose is to repackage and serve existing data from other sources - a rare use case among all webservers.

If you were to take an inventory of all the webservers out there, you would doubtless find that almost all of them exist in large part in order to create side effects.
Full Stack Hustler
Redefine your MVP to something you CAN build within a month. It probably doesn't need all of the features you envision in your mind. Engage the users you already have and give them the bare basics to get started and let it grow organically over time. Choose languages and frameworks which will let you build this fast and don't worry too much about performance or scalability till later.

Maybe also try to get some help from the community there is already some excitement around your product.

But if you can finance it, hire a programmer.
HTML5 from the perspective of a Flex developer
Running Marketing Experiments with Purpose
Really? You are worried about having to switch majors because you might not be employable and yet you want to be picky? If it is a language you don't know then tell them you'll freakin learn it just for the job!
It looks like you're able to return one of those queues from a function and allow some other code to call .await(). Being able to return something is a useful feature of promises too, seems like there might be more overlap there.
> I just feel like they might be a bit heavy-weight and a lot of API surface area to solve this particular problem.

The surface area is `.then()`
Ask HN: How hard would it be for me to get into an American college?
Hello,

I'm a last-year high school student from Portugal. I've been programming for a few years and always planned to follow Computer Science or an equivalent degree such as Informatics Engineering. It was always a plan for me to take I.E. on my local university - it's cheap and it gets me a job. However, I've been thinking a lot about American universities and their attractive opportunities lately and so I've started to wonder how hard it would be for me to get into one and what I would have to do.

I'm obviously going to be honest about it - MIT, Harvard, Stanford and other "big names" are the universities that most attract me but, of course, those are also the most expensive and never in the world would I be able to afford any of those. On the other hand, I try not to be modest about it, and consider myself as a university-approved student because I can fluently speak English and have been programming for a few years. I also have certain things to vouch for me such as my GitHub[1] or my Launchpad[2] account. I also consider myself a nice guy, the kind of guy who wants to learn new things every day and I believe I have almost all of the characteristics that would make a university want me as one of their students.

I do know that a GitHub account is probably not enough to get me into college with a scholarship but I was hopeful it would help.

For me, it's okay if I take my degree where I live, it's not like I'm going to be sad, but lately the idea of studying in an American university has been occupying my thoughts and my parents said that I shouldn't give up on my dreams even if I can't afford them without help. I'll be finishing high school in a couple of months with good grades and I'd also like to know if it's too late to get into an American college/university this September.

[1]: https://github.com/davidgomes/
[2]: https://launchpad.net/~davidgomes
Plus you can guess (with absolute certainty since they changed the domain to read the google.com cookie) they use it as an unblockable tracker to build a database of sites you're registered on.
HN comment threads are my favorite learning environment.
This should give you a really good idea what it's like trying to get a DUNS number (a requirement for doing contract work with the government as a business). Their entire business is basically the front-end to a scam. Somebody pulled a network contact to wedge their company in between businesses and the federal government.

You are guaranteed to get scammy-sounding emails and phone calls from D&B after signing up. Emails with subjects like "Your business is in danger!" or messages like "Your business credit report has some big issues!" and you find out that in order to get "protection" or to find out what these "issues" are, you have to pay Dun and Bradstreet a shitload of money.

That company is a SCAM and a perfect example of how completely retarded/bought-and-paid-for the United States government is.
Losing someone close is really hard. I am not good at eulogies, but I lost my grandfather to cancer earlier this year and for some reason I wasn't able to function at all for the coming few weeks. I grew up in a joint family and he was a constant positive presence in my life growing up; but after moving away for school/college, I hadn't had much real-life interaction with him except for phone calls/holidays. As a recent college graduate, who was a few weeks into a new entry level job, I had to take a break because this was the single most depressing period in my life. I had never experienced death of a close relative or friend before this, and for some reason I never thought death could be that painful. I had imagining it akin to a really bad breakup, but it was much uglier and painful.

I think the single worst thing is coming to the realization that they are just gone. I can never again hug him, hear his him laughing, talk to him about the n number of awesome shared experiences, or just enjoy another moment with him.

I still haven't fully dealt with this as I am not sure there is a protocol for dealing with such events except picking yourself up and keeping your mind engaged other stuff till you don't feel that much grief. I guess another approach is to push grief into the background and celebrate the life lived. Good luck to the OP dealing with this loss.
It's an easy way to avoid race conditions, say you have 2 ajax calls that are required to render your Main view. If either or both of the calls fail, you want to show a Default view.

One answer would be to just do them synchronously, perhaps nesting one of the api calls inside the other's callback (event-handler or otherwise). And then for the Default view, you'd need to have the code that handles the failure in 2 different places (or at least 2 tests for failure).

Another answer would be a state machine which can be grouped and chained (pipe'd) with other similar state machines, to guarantee an order of operations when you need it. With this, you create a promise which is only resolved when both of the promises for the 2 ajax calls are complete, and that promise then pipes the results to the next promise in the chain which renders your view. For the Default view, if either of the ajax calls fail then the parent promise will fail, allowing you to handle the failure in one place.

Code example:

Deferred.when( ajax1(), ajax2() ).then( /* success */ mainView(), /* fail */ defaultView() );
Your data will be safe with us!
I also lost a sister very recently. If you ever want to talk, my email is: trevor (at) strieber (dot) org.