Better HN
topnewbestaskshowjobs
Log inSign up

slashdev

17,493 karma · joined May 14, 2013 (13y ago) · 5,497 submissions

Founder of revscope.co

Revenue focused web analytics to help you quickly identify where to focus your effort to best increase revenue.

And embersofvictory.com

Retro turn-based strategy game.

Submissions

comment 12y ago · link · parent

You guys are all right and wrong at the same time. The article both blames and exonerates Google. Depending on what quotes you pick you can support a case for either. The people who are saying it shouldn't blame Google are right, Google is just complying with the law. That the article is inconsistent with where it's laying the blame, is the fault of sloppy journalism.

comment 12y ago · link · parent

I mean too complicated for writing, reading, and maintaining and generally just working with from day to day. It costs too much time to do the same thing.

comment 12y ago · link · parent

Correct. I have to duplicate much of the code for in64 keys and values, the lack of generics hurts there.

comment 12y ago · link · parent

I love Rust from a theoretical standpoint, it's more beautiful than Go. But Go is more practical, when it comes to getting things done with a team, it just makes more sense (maybe not for every case!)

comment 12y ago · link · parent

Yes, concurrent with a writer. If there is more than one writer, the writers must use a mutex, but the single writer and readers don't block each other. I updated the text to make it clear.

comment 12y ago · link · parent

I just spent the weekend learning Go and writing a single writer multi-reader hashtable for threadsafe access. I picked it deliberately because it's against the philosophy of the language, which is to share by communicating instead of sharing data structures directly. It was painful to write:

  // Do NOT reorder this, otherwise parallel lookup could find key but see empty value
  atomic.StoreInt32((*int32)(unsafe.Pointer(uintptr(uint64(slot)+4))), val)
  atomic.StoreInt32((*int32)(unsafe.Pointer(slot)), key)
However, the non volatile, non unsafe parts of the code were an absolute joy. Testing was a joy, compiling was a joy, and benchmarking was a joy. I was impressed that it allowed me to bypass the type system completely and do nasty, nasty things in the pursuit of performance. I want a language that lets me do nasty things where I must, but that makes the other 95% of the program, and the job of compiling, testing, and maintaining that program easy. Go excels here. Rust, C++, Haskell, Scala will never be good at that because they're too damn complicated (although each of them make the nasty parts a little less painful!)

The end result of my weekend's hacking? On an i7-4770K @ 3.5ghz

  BenchmarkGoMapInsert-4  20000000               110 ns/op
  BenchmarkHashIndexInsert-4      100000000               25.6 ns/op
  BenchmarkGoMapLookup-4  50000000                78.5 ns/op
  BenchmarkHashIndexLookup-4      100000000               17.7 ns/op
About 4x faster than Go's builtin map, for int32 key/value on both insert and lookup. And it allows any number of reader threads concurrent access with a writer without any synchronization or blocking, unlike Go maps. It doesn't allow zero keys, unlike go maps, and it doesn't allow deletes. Hardly apples to apples, but the performance of pure Go code is impressive nonetheless. 200 LOC, not counting tests.

comment 12y ago · link · parent

Sure there are hardware errors too. But in the context of this discussion getting the compiler to check for bugs at compile time vs having runtime failures leads to less buggy software. The more you can push that burden onto your tools, which are far more perfect than human beings, the better.

comment 12y ago · link · parent

The problem is programmers are humans and humans make errors (lot's of them.) Any model that relies on humans being perfect is fundamentally flawed. It's why all software has bugs. And sometimes those bugs endanger the whole internet or crash your car. The higher quality your team is, the higher quality their tools and automated tests the fewer bugs you will have. The more complex your code the harder for humans to understand and the more bugs you will have. It's a tradeoff, and I'm personally not certain on which sidebof the tradeoff this code is. Since most of the nastiness is on the library side, probably it's a good thing.

comment 12y ago · link · parent

That's very high. Maybe you guys just get very high quality applicants, but we hire less than 1% of resumes we receive and less than 5% of those who go through the first interview and coding problems. We're a python shop, also full remote, so maybe that's why.

comment 12y ago · link · parent

You need to think like an evil cable monopoly. It's a great thing because then they can charge consumers for their broadband service and charge content companies as well. A whole new source of revenue. And they can keep on jacking up the prices whenever they want, because they've got the customers of the content company hostage and can ransom them for nearly any level that would still let the content company turn a small profit.

comment 12y ago · link · parent

Yes, also the part about humans producing more complexity than nature is ridiculous. Nature wins at complexity hands down with what amounts to an overly complex collection of hacks on hacks over billions of years. It's like if instead of fixing design flaws in your code you kept designing new systems to alleviate the worst flaws of the existing systems. For billions of years. Sort of like evolving an OOM killer.

comment 12y ago · link · parent

It doesn't matter, performance is not the only concern. Connections and domain knowledge are even more valuable. Let's say you're Amazon and you pay your CTO a respectable $250k/year. Along comes Microsoft or Google and offers him ten times as much. He's rational so he accepts and take with him all of Amazon's technical secrets to success. Even if there were national regulation capping executive pay in the US, other countries would hire away all of the top players with all their knowledge and connections. It would be a disaster. Is executive pay crazy? Yes, often. But the market supposedly is efficient and the pay is that high for rational reasons in many cases (not all!)

comment 12y ago · link · parent

Good luck attracting and retaining talent if you can't pay market prices for executives.

comment 12y ago · link · parent

The argument the author makes that all truths are equal and therefore science is no "truer" that anything else is a straw-man. It's valid from the definition of the word, but misses the point. Science is "truer" than other things, because in reality we don't know the truth. Science "truths" are more likely to be true than many other things because they have stronger supporting evidence. For example gravity is better supported by the evidence than the existence and deeds of an historical figure.

comment 12y ago · link · parent

Yeah, I don't see an advantage to this.

comment 12y ago · link · parent

Well I'm going to try something like a prefetch thread soon with some common request types that just fetch/modify a single object. It will be interesting to see if that makes any difference to throughput. Something less speculative that helps a lot is just hoist the loads in your code as far away from where you use them as possible.

comment 12y ago · link · parent

You can't always prefetch though. Look at linked lists and trees. You have to execute the code and wait the 100+ cycles at every node access because you can't predict where the next node will be.

comment 12y ago · link · parent

This is not related at all. Hyperthreads are hardware threads that share the execution resources of a core. They have nothing to do with OS threads, other than an OS thread is scheduled to run on a hardware thread.

comment 12y ago · link · parent

How could it not? It's not a nuclear process so carbon in must equal carbon out. All carbon is sourced from the atmosphere and returns to the same. There may be different ratios of carbon compounds though, e.g. less co2 out than in and more other types of carbon compounds out.

comment 12y ago · link · parent

Here in Panama snakes bite about 2500 people per year (out of 3 million), mostly in the dry season. Here it is common practice to burn the rain forest around settlements to combat snakes. Only about 25 people die, but more have amputations because the most common snakes here are pit vipers with tissue destroying venom. Snakes here are typically not aggressive, the largest danger is stepping too close to one. I've had several near misses with snakes while out running trails in the rain forest (about one snake per month, though usually not venemous.) I've also had a big pit viper attack my car when I drove about a meter from it. You should have seen the face of the guy who washed it when I told him that the streaks were fer-de-lance venom!

comment 12y ago · link · parent

Seems like it would be easy to follow the identified snopes links and parse the true or false they give in order to put a verified or debunked link with every share (linking to snopes). Now that would be useful. All this data mining is interesting, but just tells us what we already know (people share lot's of rumors that are frequently false.) Why not do something about it?

comment 12y ago · link · parent

No, it was a well written article that made its point articulately. This post is snarky and only briefly touches on some positives of TDD without addressing the points raised by DHH. I don't know either of these guys by name, but I upvoted DHH and not this post because it is simply better written.

comment 12y ago · link · parent

Well maybe my example is unlikely, although one could argue that the YC brand is worth something in that it will let you raise more from other investors. However, it doesn't need to be so extreme, just that companies that are further along are less risky to YC and it seems strange for YC to artificially offer higher than market prices to said company thus lowering demand. Why would YC want fewer lower risk companies and more high risk ones? The incentives don't seem rational to me.

comment 12y ago · link · parent

What about a startup that comes to YC with a product and customers already as opposed to just an idea? Surely they give up less than 7% equity? The risk for YC is maybe an order of magnitude less and the equity % should reflect that lowered risk (not saying .7% either, but lower.)

5365.

Why didn't the Captain of the Titanic Close the Watertight Doors?(physics.stackexchange.com ↗)

2 points · by eloff · 12y ago · discuss

5366.

Diagnose Asthma with Only a Blood Test(medicalxpress.com ↗)

1 points · by eloff · 12y ago · discuss

comment 12y ago · link · parent

What's the advantages/disadvantages when compared with CoreOS? They seem to be direct competitors.

comment 12y ago · link · parent

Could you connect your thoughts to themselves and to the article please? I have no idea why you think the article is stupid, and also no idea how you get to 70% of the population dying over a five year period.
1
178179180
184