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

With that many threads the cost of spinning on the lock while the owner is sleeping is more apparent. I don't think that's very representative of real world scenarios, but it's useful for evaluating the "spin" cost of the lock (some algorithms just pin the CPU at 100% when spinning, which is horrible from a heat heat/power perspective.)

comment 12y ago · link · parent

750 LOC/hour on average? The secret to that is either having a very loose definition of code (e.g. counting generated files, copy and pasting huge amounts of boilerplate, etc) or a very loose definition of honesty. Nobody is that productive, especially not working 10 hours a day. If I do 750 LOC in a week, that's a good week!

comment 12y ago · link · parent

I bought it for my upcoming trip. I also bought stars & empire which contains 10 "galactic tales" from popular indy authors. At $.99 it's tough to go wrong on that one. And I have 78 hours of flying and airports, so I need the length...

comment 12y ago · link · parent

Ah, I was forgetting about rounds, you're correct that you won't be able to match the memory bandwidth then.

comment 12y ago · link · parent

How do you square that with the performance of the AES-NI instructions? That is theoretically 16 bytes per cycle from the manual. Per core. That is way in excess of memory bandwidth, even with DDR4.

comment 12y ago · link · parent

Thankfully the go language designers were more focused on practicality than purity. Shared nothing concurrency is nice in theory, but it is so slow by comparison to just sharing memory between threads. But then I write high performance servers and concurrent data structures using lock free algorithms (including in go), where even a mutex is a luxury, so maybe the problems you work on are very different to what I work on. But I'm very happy go can accommodate the evil things I do in the name of performance.

comment 12y ago · link · parent

I think it just shed light on who were really your friends and who were not.

comment 12y ago · link · parent

I've done most of my Go programming on library code. A sync library for relational databases to sqlite (for mobile devices) and an embedded database. Lack of generics has bothered me a little, but copy and paste with a multiple-cursor editor really makes short work of it. I think the worst part is really our natural aversion to code duplication and the ugliness of it. e.g. having to write min/max for integers is pretty ugly (although not as ugly as converting your ints to float64 and using the stdlib min/max.) However, I spent more time thinking that it was ugly than writing min and max. Sure it's ugly, but programming is not art, it's engineering, and Go is a language for engineers.

comment 12y ago · link · parent

Lack of generics != lack of abstractions.

The Go community freely acknowledges that generics are a nice feature, and that lacking them is a pain point of Go sometimes. Although many Go developers will tell you that sometimes turns out to be not that often in reality, which has also been my experience.

Rob Pike has outlined the tradeoffs inherent with generics here: http://research.swtch.com/2009/12/generic-dilemma.html

The bottom line is it's not a feature that comes for free, and if most of the time you don't really need it, maybe the costs aren't worth it. That's a bold statement for a programming language these days, since generics is a central feature of every popular, modern, statically typed language. Whether they are right or wrong I won't attempt to say. The language may well get generics one day, but it's early days still and the team is rightly focusing on more important features for the moment.

comment 12y ago · link · parent

Not sure where you get that figure, the nearest star is only 4.24 light years away.

comment 12y ago · link · parent

> The whole point of GC is to create a situation where you don't have to think about allocations!

I would say for most uses, that's true. For high performance code, it's not. You have to be aware of your allocations on the fast path whether you are using malloc, GC, or something else. Schemes used in C++ to reduce allocations with malloc (which is slow as dirt) also work in Go.

Let's get real here for a second. A maximum pause of 10ms is one-third of your frame budget at 33fps. If you reduce the garbage you're generating it won't even be that much. I don't see how that makes it a show stopper for games.

At the same time, I don't see how it's a great language for games either. Go is slow at calling into C, like 2000 cycles slow. And to do any kind of work with with the cpu vector units, you need to call into C. That seems to be a bigger issue than the GC in my opinion. Rust seems much better suited for games, and I would expect to see some triple A titles using the language once it's more mature.

comment 12y ago · link · parent

I don't buy that argument. Lua has a much worse STW garbage collector and it's commonly used in games.

Furthermore with games you can do tricks like allocating out of an arena with bump pointers and then resetting the pointer at the end of the frame.

Lots of games are developed with JVM, .NET, or Lua. GC doesn't seem to be a show stopper for them, you just have to be smart about allocations.

comment 12y ago · link · parent

People use the JVM in soft realtime / financial applications, and the trick is to reduce allocations, especially of objects that are long-lived enough to make it to gen 2.

Go is better suited than Java for those kinds of applications, because it's easier to avoid allocations (Java doesn't have stack allocations, but Go does.) Also hard upper limits on GC time are very helpful for those cases where allocations can't be reduced any further. The standard library additionally has a Pool type that allows for reducing pressure on the GC through object reuse.

comment 12y ago · link · parent

The x86 instruction baggage is a red-herring. It takes maybe 3% of the transistor budget to support it.

I saw an interesting interview once with an ARM exec who leveled and said they don't really have a big power advantage over Intel, despite what people commonly think. I didn't manage to find the article with Google though.

comment 12y ago · link · parent

Most people don't think advertising changes their behavior, but the numbers say the opposite. We're surprisingly naive about how easily influenced the human brain is. For this reason I'm extremely careful about what kinds of friends I keep. I might not have much control over how they influence me, but I can control the kinds of people I hang out with.

The science of consciousness suggests, with the caveat that it's very early days, that we don't actually have free will, and are we really just the sum of our past environments and genetics interacting with our current environment. Your genetics and past are immutable, but your current environment can be changed, and that's likely the best chance you have of putting the future "you" on a good course. So watch what kind of inputs you feed into your brain computer, because those will determine the outputs.

(I don't like to dwell on the no free will part, I find it useful to pretend I have an "I" and a free will, even if it may not be true.)

comment 12y ago · link · parent

That was my thoughts as well. But I don't think most people think that way, especially given the misleading wording of the article. I hate to contribute to the "rest of the world is stupid" theory, or pretend that I'm immune from such things, but in this case I really do think the vast majority of people won't evaluate things in a probabilistic way like that. Most people just aren't trained to think in terms of odds instead of emotions (and it constantly annoys me.) At least that is my experience, and it may not be representative.

Anecdote, I go swimming in a river known to have Caiman (small alligators) downstream and everyone thinks I'm a huge risk taker. Nobody comments on the 3 hour drive to get there and back in heavy rain and high speeds. It's obvious, mathematically speaking, which is the riskier activity.

comment 12y ago · link · parent

That makes more sense, the article makes it sound like Google engineers were browsing through people's private photos, at least that's what every non-technical person who reads it will take away. It seems obvious to me that it must have been some kind of automated process that flagged the images.

comment 12y ago · link · parent

Needs 2013 tag, this is old news.

comment 12y ago · link · parent

As you say, the trend has been overwhelmingly to serial buses, but that doesn't seem like it's changing to me: http://fgiesen.wordpress.com/2014/03/23/networks-all-the-way...

comment 12y ago · link · parent

So what's special about this database? What properties does it have that are superior to the currently available alternatives? This article is all hype and no substance.

EDIT: GitHub has more information. It's a scalable ordered key-value store (think a distributed version of Berkeley db.) Storage is based on RocksDB (a variant of LevelDB) and consensus is achieved using Raft. The database is written in Go. It's meant to "tolerate disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention."

What's not clear at all is where it sits CAP wise. It says it's available and strongly consistent. Which would be CA, which is not an option (especially for something claiming to be failure tolerant.) It must either sacrifice write availability or consistency in the event of a partition. No idea which way it leans.

5331.

Networks All The Way Down(fgiesen.wordpress.com ↗)

2 points · by eloff · 12y ago · 1 comment

comment 12y ago · link · parent

Ditto, the guy is a real software engineer.

comment 12y ago · link · parent

This estimate doesn't seem to account for enrichment. For every KG of uranium mined, you get a much lower ratio of enriched fuel.

comment 12y ago · link · parent

You're thinking logically, it really is the rest of the world that's crazy in this case. Two teens, in a relationship, who can legally have sex with each other (and likely have) what is the fuss about?

comment 12y ago · link · parent

I find it quite pleasant to be alone with my thoughts. I've always liked taking long showers and walks for exactly this reason. Sometimes, when I'm working on an interesting problem, I can pass entire days mostly just thinking and pacing.

comment 12y ago · link · parent

FTL communication of any kind disrupts causality as we understand it. It's likely not possible.

The article is wild speculation, but so is everything regarding aliens. Even educated guesses are really just wild speculation because there are too many unknowns. We don't even know how many worlds can support life, how many forms life can take, how often life might evolve intelligence, etc.

I wonder sometimes if maybe there's a easter egg hidden in physics. If there were an easy way to convert matter to energy that we have yet to discover, we will likely destroy ourselves once we discover it. All it would take is one psycho with the right resources to unleash a kind of devastation that would make nuclear weapons look like fireworks. There might be no intelligent life out there because discovering the kind of energy resource that allows for easy interstellar travel might also make it too easy to kill ourselves.

Another possibility is the end game of intelligent life is not travelling around 21st century style, but digitizing our consciousness and living in a virtual world. Why travel to the stars when it makes more sense to turtle up in a giant computer and enjoy life? Something like a Dyson sphere.

Another possibility is the aliens are out there, they've just perfected the invisibility cloaks we're currently working on. Star Trek style, they're monitoring us unseen so as not to interfere with our civilization.

It's fun to think about, but it's all wild speculation at this point.

comment 12y ago · link · parent

That's quite impressive! I'm curious how it works, is it finding these movies through google video searches? Or what?

comment 12y ago · link · parent

Yes, there are exceptions, and the converse doesn't hold. But it works as a simplification when you're hunting for a job. You're right that the underlying problem is finding work where you're valued and, I'll add, where you work with great people. If pointy haired boss did the hiring, your coworkers are likely going to be inept to add to your misery.

comment 12y ago · link · parent

I know you're not being serious about the bank thing, but I just want to say, if you're a programmer and you love what you do, and you're good enough to be choosy, don't work for anyone (especially banks!) whose main job is not software. There are a few exceptional companies, but mostly it's a good rule of thumb. Working for Dilbert's pointy haired boss is just not a recipe for happiness - who cares if it pays well. Life is short, if you don't enjoy your job, change your job!

At any rate that was advice given to me by my father, who worked in the IT department of a large oil company, had a long line of pointy haired bosses who took the credit for anything that went well, which was eventually gutted and outsourced leaving just him and a couple others as insurance. I've regretted it when I did not heed that advice.

comment 12y ago · link · parent

I think here there's some truth to both propositions (why are people so black or white in their thinking when the world is always shades of grey?)

Clearly without demand (consumers with money) you can't create jobs in the economy. Just as clearly, without entrepreneurs willing to take the risk and put in the effort, and the investors who fund them, you can't create those jobs either. So the truth of the matter is that economics is complex, and you need plucky entrepreneurs, wealthy investors, and consumers with lots of disposable income to create jobs, among a whole host of motivations, cultural and societal influences, international trade and agreements, infrastructure, even healthcare, and other human factors.

1
177178179
184