skysight-inc/HackerNews huggingface dataset:
I guess I don't see the point of a Redis clone in Erlang when it would be easier to tack use cases onto something that already exists, namely Riak. It's a key-value store, it's in Erlang, it's distributed, it's getting a full-text search and it has adjustable parameters so you can pick how you want to deal with the tyranny of the CAP theorem.

The only think Riak doesn't have is a high-speed RAM-based data structure capability. But hey, Redis does that. ;-)
While magnet URIs come close I think this would actually be a better match for a purely functional data store, like Datomic for example.

If you namespaced each Datomic database and add a transaction ID you would get a reference to an immutable snapshot of that entire data store, including pieces of it, like datomic://myhost:<transaction-id>/path-or-query-into-db

The disadvantage of that is that it is data and not a website, however it's possible to use Functional Reactive Programming to let the site essentially be auto-generated from that data store thus giving you the 'website view' again.

That of course still allows your program to be lost, but if you were to add that program to that purely functional data store itself and thus also version your own program, then that is also no longer a problem.

And once you've done that call me, since you'll have built what I've been dreaming of for the past decade.
Erm, you are aware those "dudes a few centuries ago" included a mechanism in their constitution to allow adaptations?

Sure, "society" can change what I outlined about the enumerated RKBA. Just get 2/3rds of each house of the Congress, or a Constitutional Convention to propose it, and then the legislatures of 3/4ths of the states to ratify it.
> Something I miss from the language …

Does sound like you want to use channels, and break your logic into small independent parts.

You will have one goroutine using blocking Read() in a loop and feeding data to some channel. When it's done, you write to another channel that exists only for signaling:

defer {
doneChannel <- true
}
for {
data := make([]byte, 65535)
_, err := conn.Read(data)
if err != nil {
errorChannel <- err
break;
}
dataChannel <- data
}

and then in your other goroutine:

for {
select {
case data := <- dataChannel:
// Handle data
case <- doneChannel:
// Other goroutine is done
}
}

The only things shared here are the channels.

The way to avoid too much state and moving parts is to break the problem into isolated, manageable parts that communicate with channels. Often you will have hierarchical relationships like this, where one piece of dumb code exists to pass data from something lower down to somewhere higher up.

It's not hard, although some of the code gets a bit ugly and disjoint at times, especially in how anything synchronous has to use channels and goroutines. For example, today I wrote a simple worker pool implementation that runs a given function in parallel via goroutines and can adjust the number of workers dynamically at runtime. That function has to be declared not just as "func()" but as "func(abortChannel chan bool)", and the worker function has to honour the abort signal when it arrives from the pool. So channels do leak everywhere, even into APIs. (Yeah, I know I can use "chan struct{}" to avoid any storage, but I think "<- true" looks nicer than "<- struct{} {}".)

What is harder is to intelligently handle complex cascading failures. That's what Erlang, with its supervisor tree, is good at. Go's goroutines are "fire and forget" and cannot even be terminated programmatically from elsewhere in the program.
To quote General MacArthur the problem is that some startups don't die, they just fade way.
This article and many like suffer from one of my huge pet-peeves, absolutely terrible coding conventions.

I am a person who likes to scan articles, I'm busy and generally make a read now, read later, read never decision. The code from first scan was unreadable, short 1 character variable names, "why is there a hardcoded date marked 2006.01.02-15.04.05 there??", etc.

Readable code takes a little more time - but it's worth it!

Further, the entire example seems contrived. Am I right in thinking that simply firing up wireshark would solve this problem? Why is the author continuing to write something in nearly every language when a tool exists for exactly this purpose, is multi-featured and pluggable?

Even further, message passing! With the rise in recent years of message passing libraries in nearly every language, multi-threaded, distributed applications are becoming trivial to write. I do not see the Go code presented as anything other than messy, I have seen C++ code utilizing message passing libs that are smaller, prettier and infinitely more maintainable - again with no mutex or conditional variables!

If you want to sell me on Go, make the code pretty, and present a USP.
This demo is great, so I hate to be a party pooper, but this is not how it'll look if you are actually travelling near the speed of light at all!

For example, you'd see stars concentrate more near the direction you are heading with substantial blue shift, and not a whole lot on your side.

At the subjective speed in this demo, the blue shift would be so much and the light cone so narrow that you'll probably just see one dot in the center and pitch black everything else.

I think a physically accurate depiction of how it'll actually look if you are traveling near the speed of light would be very cool.
Can you explain the correlation between VC connections and assholery? The vast majority of founders who raise VC money are not born with VC connections. They earn VC connections and build social capital by (usually altrustically) helping other founders, creating a product that makes people's lives better, creating jobs and building a company with traction and growth, etc.
I can't help but think that some of your "VC-istan" narrative is based on a mythological caricature of the startup world rather than reality. "VC-istan" isn't a perfect meritocracy, but it's pretty close. If you have a business with traction, VC connections will come to you, asshole moral character or not.
It doesn't use it to implement paging, but many things do use the disk as a cache (URL cache, keyboard cache, icon cache, Spotlight, app-specific caches, etc) and running low on disk space will cause the background cache cleaner daemon to run.
No Pragmata or Akkurat Mono? Amateurs.
> Doing that would erase the whole benefit of allocating a static array in the first place (you really don't want to be allocating memory for every packet that comes through).

The benefit is dubious. Performance is unlikely to be important in a single-connection logger. My advice is to lean on the garbage collector. Allocate away.

Buffered channels are certainly more complex, but if you're never sharing memory, shouldn't hurt you.
Show HN: Keep your page's timestamps up to date (weekend project)
HuffPo is itself a reflection of the death of journalism and has been since inception.
But being successful isn't enough. For an indie game, making ten million in revenue is a dream come true. For Activision, a game with an expected revenue of 10 million isn't worth the distraction. It's like trying to pitch a CRM for taxidermists or a Haskel IDE to VC funds: it may be a great idea, but the market isn't big enough to interest them.
Yeah sure, I was joking... :P
Source Code Pro looks way, way better on my machine. I hate what Macs do to fonts. http://i.imgur.com/DRywIsw.png
It would be harder to monitor inmates. Prisons have to monitor written letters, phone calls, and visits. As a taxpayer, would you want to allocate more of your hard earned money for computers for prisoners?
Yes, that is afaik the only way to abort a synchronous function call such as TCPConn.Read().
Audiophile iPhone app candy: Seedio = silent disco
> If I disagree with ATVI's compensation policies, I'm free to not own the stock (or even buy their products). If I don't like how much the Phillies are paying Cliff Lee, I'm free to never attend their games.

Except your actions have no impact, they are as effective as those of the "complainers" that you deride and serve the same purpose, namely egocentrism.

The typical rebuttal is that individual actions would make a difference if many people participated in them but this is a counterfactual: They don't, as evidence by the state of the world, and they won't, as evidenced by history.
In my experience it's nicer than DSM on the Mac.
Feel free to submit doc patches. I'm pretty sure I've made all of the relevant information/description/motivation available, it sounds like you just have to collect it into a single place now.

You can also catch us on irc #openldap if you want to ask questions about it and aren't posting to the openldap-technical mailing list. The py-lmdb guy has been on irc with us a lot lately, which is probably why his docs have so much info - he keeps asking questions and getting answers.
It is pretty neat, but I have yet to actually use it to fix a bug. The bugs that I cannot just spot tend to be bugs that occurred long ago in the program execution, something that record doesn't handle well (well, it could but it takes a lot of space to store all that info).

It seems that the only thing that reverse debugging helps me to do, i.e. find errors from not long ago, are something that is actually pretty easy to do. Maybe I am using it wrong.
Be a bad boss
Back in the 80's the punishment was deemed appropriate.
This was built in 40 hours at startup weekend boulder
City life is costly and difficult precisely because so many people freely choose to live there.
Not bad for 40 hours...good luck with the pitches, guys!
Federal time is different. It is day by day. Only way you can get time off of your sentence is by going through drug classes.
The Best Programming Video Game
They yelp portion is the icing to get people to bite. They also talk about a number of more nuanced legitimate ways different groups go about inspecting prisons, and getting information from inmates.

I think one of the comments on the article itself resonates with me. It talks about the distinction between rehabilitation and punishment. Are prisons for one, the other, or both, and are they effective in either capacity?

I also agree with the response prior to mine. Going to prison doesn't mean you're utterly stripped of all of your civil liberties and rights, nor should it. For one thing, even if we had 100% accuracy in convictions, I think that would be a dubious quality, and we sure don't have that.

Any one of the situations mentioned is far too nuanced and complex for a simple off-the-cuff "Do the crime, do the time" and screw you if you want to be treated like a human.
> You say that like Skype is actually forcing or even suggesting users switch.

Actually, a while ago, while logging into Skype, I got a clear invitation to switch to a Microsoft account.

I ignored it at the time, but I'm reconsidering in light of the mentioned attack.

Edit: There doesn't seem to be any switching possible; you can only merge a Microsoft account with a Skype account.
Complication rates are affected by hospital procedures and policies, staffing levels, training, and presumably the pressures that are or aren't put on doctors. All of those are under the control of the administrators who look out for the bottom line. Whether complications make money or cost money surely affects administrators' eagerness to revamp and/or enforce handwashing policies, update training for nurses, keep staffing levels high enough that inexperienced nurses are properly supervised, and put pressure on doctors with high complication rates.

To make it more concrete, there was an article on HN a few years ago suggesting that post-surgical complication rates could be reduced by creating surgery checklists where very basic surgical steps would be checked off as the surgery proceeded: patient identity verified, everything properly sanitized, materials accounted for afterwards, things like that. You would expect a hospital administrator to make a cost-benefit analysis taking into account the cost of researching this idea, creating a trial program, and monitoring compliance and effectiveness. The cost-benefit analysis looks like this: If the program is ineffective, we lose money. If it's effective, we lose even more money. If it's really, really effective, it could screw up the bottom line so much that I lose my bonus or even my job.
Most people don't have Alkaline soil. That's why you put lime on fields, because it is too acidic.

We don't use Iron Sulfate as a fertilizer because it is absorbed by the plants and in things like corn the increase in Iron can make the things raised in the soil poisonous to Children and pets.

This isn't "new". And and it isn't patentable because it is a chemical that has been used for fertilizer in Kale and Spinach for 100+ years.
"Iron sulfate, a readily available compound that steel foundries throw away by the tons."

It won't be free for long. Once there's a demand for it, steel foundries will sell it to the highest bidder. That effect has already happened with municipal recycling: NYC once had to pay to have its recycled paper carted away. Now there are companies that will pay good money to receive the recyclable paper that the residents of NYC throw away. (And it's valuable enough that NYC tries to prevent rogue collectors from stealing it off the curbs before the city's garbage trucks can get to it.)
>> "It should have been the case as soon as the iPhone 5 started shipping."

That would have been a nightmare. A lot of apps would need to redesign UI's and create new graphics. Let's say it took 2-3 weeks to get all that created, working, and tested. What if they had some urgent bugs they needed fixed before then? Or developers who didn't manage to get the device on launch day and had to wait a few weeks. Are they supposed to release updates which include iPhone 5 support having only tested the iPhone 5 portion in the simulator?
Paul Dix - Why Node and Scala will dry up: Go will drink their milkshake
Yeah, the channel approach was rewrite #3 :P It required me to have shared state in a horrible way as well, ruining the whole thing. There really isn't an elegant/functional way to do it, and sharing channels is error-prone itself. I ended up closing the connection to terminate goroutine B from A, and messaging on an already-shared channel to terminate A from B.

Having cascading failures in Go would be fantastic. The problem, unfortunately, is not very amenable to elegant solutions. I might do a writeup at some point.
"I can't speak for investors, but I've been burned more by horrible startups-- as an employee, so more than any investor ever could be-- because I was some combination of naive and falsely desperate (I have a strong work ethic, and that sometimes impels me to work stupidly hard) and I'm fucking sick of most of these goddamn dreams."

Easy there. Easy.

I actually agree with a lot of the things you have to say about the startup world -- there are a ton of idiot hucksters out here who take advantage of naive people, and it's hard to tell them apart from the good folks. I also agree that many of the products being built down here are pointless and derivative. But there are good people in this industry, and you, personally, can have a good outcome from working at a startup even if it means that you don't get rich. And also, just because you get a small percentage of a startup does not automatically mean you're being exploited.

You're setting up an implicit false dichotomy: that inexperienced people can choose between the promised land, or fall prey to the scheming machinations of the VC-backed startup world. But that's crap. The fact is, most jobs are bad. The worst jobs explicitly make the trade of units of your life for dollars. Most are just boring, meaningless, anonymous slogs for some bureaucracy where you can't change anything or even have much of a voice. Startup jobs, for better or worse, are the some of the only ones you can get as an inexperienced person where you at least have a chance of changing the world in some meaningful way. That carries value.

Personally, I'd rather give up a few dollars in earning potential when I'm young to do something idealistic and bold. There's really no better place to do that -- right now -- than at a startup company doing something you believe. Big companies are stable gigs, but designed mostly to keep you in your place (don't make waves, labor unit!) Academia is a fount of bureaucracy and disappointment. Research labs are (sadly) dead or dying, or available only to the most senior people. Startups are selling a dream, but at least they're doing it honestly. Nobody makes you take that startup job.

Here's how to handle the nonsense in the startup world: take control of your life. If you're a programmer in this world, you're privileged to live in one of the most favorable labor markets in human history, so there's no excuse for complaining about being trapped in a shitty job. Take the best job you can find...and quit if it sucks. You'll have a new job in a month. Don't count on getting rich, because you probably won't. And if some nimrod gets rich with a derivative iPhone app and you're still working in the salt mines? Hey....at least you're not selling insurance or writing COBOL in a basement in Albany. Or literally mining salt.
What other solution would you want? You could use `SetDeadline` if you like. But closing the connection seems reasonable too.

I think you're framing the problem wrong. You're not asking to shutdown a goroutine, you're asking "How do I abort from a synchronous read from a network connection that is blocked?"
Great team here, taking a stab at solving a problem for many businesses with APIs and their customers: businesses with packed roadmaps.
Could you elaborate on this?

I haven't been exposed to Huffington Post much, aside from seeing some hyperbolic sensational posts back during the Bush Administration days which just made me doubt their commitment to any type of journalistic integrity. I've kind of avoided them since.
I'm afraid many of the conventions you complain about are standard Go, err, conventions... (Although see my complaint elsewhere.) Because they are so widely used, people who use Go won't bat an eyelid. Unfortunately that doesn't make the article a great introduction to Go.

I hope these talks can help sell you on Go http://blog.golang.org/2013/01/two-recent-go-talks.html

To be more explicit:

Short variable names generally reflect the idea that you know what a variable is for just by knowing its type. Thus you have a file named f, a time t, a variadic argument called v. When the type is not enough, a longer name is recommended. Naming things is hard though...

The hardcoded date is a wonderful piece of the time package, which I fully appreciate will look bizarre at first. (And therefore isn't a great thing to use in a first look at Go, without explanation). See the official documentation http://golang.org/pkg/time/#pkg-constants
This reminds me of one of my favorite odd Yelp finds, reviews for Occupy Wall Street http://www.yelp.com/biz/occupy-wall-street-manhattan-4

I love the photo of the fat cat sleeping in a pile of money.
All of the problems I mentioned are solved for technical users, or special situations with the right equipment available (like a CAC reader... I certainly don't have one of those integrated into my mobile phone, or laptop for that matter).

That doesn't help when we need a general solution with usability that comes close to remembering a password.
That reminds me some of Perl run-time features like dual-value scalars, that wasn't available in Perl until Scalar::Util::dualvar
LMDB is only meant to be an embedded engine. Distribution/replication are features to add in higher level layers. E.g., memcacheDB built on LMDB exists, you can add repcached or something else to do replication over that. We're also adding LMDB to HyperDex and Riak. We may end up writing our own cluster manager at some point, if we don't like the ones we can work with today. But the key is to stick to Unix philosophy - write small modules that focus on one particular task. LMDB addresses storage in a single node. Some other component above it can do distribution/sharding/whatever.
Elastic tabstops [1] would work perfectly with proportional fonts.

1. http://nickgravgaard.com/elastictabstops/
Good luck actually getting your hands on an EdgeRouter. They're apparently backordered forever from everywhere.
Why Los Angeles could become the next technology epicenter
As for the first part anyone who would ask you that probably hasn't heard of the Dunning-Kruger effect, and you should respond by educating them (politely) that you providing such a rating probably isn't very useful http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect

The second part can easily be achieved by linking to your github profile. If you don't contribute to any open source projects you probably have some side projects you wouldn't mind making public on github (if not, then start one).
Anyone know why this is listed under https://news.ycombinator.com/ask?
HP is obviously left-wing (socialist) blog & rant site, and socialism is a road to slavery as opposite to freedom. What is in that to explain?
Timing Is Everything: Google Glass and The Tragedy of Color (the app)
You probably should add a "2012" tag in the title. Numba has progressed quite a lot in the past 8 months.
Correlation != causation. Come on - you're not even trying.
> I don't know if Freenet will be that repository (the one time I tried it, it was glacially slow).

Freenet is only slow because of all the indirection it needs to do to guarantee anonymity. You could get the same distributed-data-store semantics "in the clear" for a much lower cost, and then layer something like Tor on top of them if you wanted the anonymity back.
Should I be Happy that my Book is Being Pirated?
Just the same, though: considering how many people are unaware how and why famous bloggers focus on the topics they do, it would be quite an eye-opener for them to learn what led Klein to writing about this topic, and now. In that sense, I consider it somewhat fraudulent (unless he really honestly just discovered all this on his own, which I doubt is within his abilities).
> I don't know if things get worse in other countries.

Due to the decentralized nature of education in the US, there is higher variation in outcomes. This likely leads to greater illiteracy in the US than in other industrialized countries.
I think he's talking more about linking to third-party sites that don't go down, not links to his own. :)
You could setup splunk free (or one of the OSS clones like logstache or greylog2) on the Linux host and use that web interface for visualizing and searching the logs.
> What is the cost of clean water today? How much for a fridge?

A fridge is much more expensive, but it's also much more a luxury. You don't need to refrigerator to avoid diarrhea, it just helps. Pure running water on the other hand is extraordinarily cheap and makes avoiding waterborne illness easy. (Due to the fact that running water is provided by public utilities, not free markets.)

I'm not saying the free market doesn't have a part to play in good hygiene, but trying to rely on the free market for a water supply and food handling regulations has been an unmitigated disaster everywhere it's been tried.
> I know I can use "chan struct{}" to avoid any storage, but I think "<- true" looks nicer than "<- struct{} {}".

I disagree. struct{}{} tells me that the value isn't important. Whenever I use map as a set, rather than a key-value store I use map[string]struct{} (say), rather than map[string]bool. Then I am forced to use the double assignment to check for membership of the set. And that's exactly what I want. I'm able to make my intent more obvious in the code I write. No one will ever look at it and say "but what if it's false?" - I dislike using booleans instead of empty structs in the same way I dislike other C programmers using integers as booleans.