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

It's a competitive environment, you take every advantage you can get, because so will the other guys. A public company in case you forgot is an institution designed to create value for share holders. So the fault is not with these companies but squarely on the idiotic governments with their ridiculous tax codes. They deserve everything they get as, to a lesser extent, do the people who vote for them.

comment 12y ago · link · parent

I was homeschooled, I can tell you It's not all like that. The Canadian government checked up on us twice a year. We followed the Alberta curriculum (using ADLC), well known for being strong in the maths and sciences. I wrote the same provincials that the other Alberta students did (in a supervised setting at the same time as everyone else.) I found it better prepared me for self motivation and learning on my own. At university I was on the deans list and scored better than 95% of students (exactly what percentile I don't know, but I'm pretty sure it was the highest of all students in the same year of computer science.) I scored 100% in calculus and published three peer reviewed math papers in conjunction with my professor as a first year student. So you can't discriminate across the board like that, even if in general you're probably correct.

comment 12y ago · link · parent

The same with any other incremental backup. You have a backup retention policy and go back to the last good one. Being in the cloud doesn't change that.

comment 12y ago · link · parent

Yes, obviously. That's why I said you should restore from backups in that event. If you lose your backups on S3, congratulations, you had better odds of winning in your state lottery. The big difference is not just the price as you say, but the flexibility.

comment 12y ago · link · parent

The advantage of cloud servers is if one experiences corruption or goes down you just kill it and start a new one. If your cloudy EBS equivalent experiences corruption, you restore from snapshot and off you go again. Either way it involves less downtime than HN seems to have. The downside is it costs more (usually, depends on how high your server management and data center overheads are.) I'd like to point out that despite several high profile down time incidents in the aws, never was there a case that I'm aware of where you couldn't just restore from your last snapshot to another availability zone or region.

comment 12y ago · link · parent

You're a waste of bandwidth, and a poor specimen of humanity.

comment 12y ago · link · parent

The predictor already exists, there's a common FMRI experiment in neuroscience where with about 80% accuracy the scientists can predict you're about to push the button about one second before you decide to do it. Someone no doubt will post a link, I don't have time to Google it now. I'm guessing it's the inspiration for this story.

I'm more curious about what you guys think. I've long thought the arguments against free will are much stronger than those for it, but it's an unsettling idea to live with.

comment 12y ago · link · parent

Geez, take your own advice. And please leave this community.

comment 12y ago · link · parent

How meaninglessly proletarian and small minded. Like the smashing of weaving machines during the industrial revolution. The impossible fight against change and the inexorable march of technology. Also shame on France for imposing a minimum 15 minute delay for picking up a customer. France, where free market competition is second to politics and special interests. Look at the anti Amazon legislation.

comment 12y ago · link · parent

Sure, but PayPal is stupid and deserves the condescending tone, so it's not annoying in my opinion.

People who refuse to fix security flaws when informed of them are being stupid, yes?

comment 12y ago · link · parent

The graph shows a decreasing level of extra happiness per additional dollar earned, and caps out at $100k. The data here does not support the article at all, it supports the mainstream view. What a rubbish article.

comment 12y ago · link · parent

There are different kinds of lock freedom, but in this case if you read carefully, that's a normal operating state and does not block consumers. It's the race I mentioned. The consumers have to be written to skip over a limited number of null entries and then check the actual producer index. In most cases that means a little extra iteration. It would be very rare to need check the producer index, which makes it fast.

comment 12y ago · link · parent

Not really a patent troll. Too aggressive in defending their patents, yes, but will within their rights to try. Especially as it appeared to them that their ideas had been ripped off after they pitched them to Nintendo.

comment 12y ago · link · parent

I'd rephrase that as it's easy to create a safe implementation, but the dangers and biggest payoffs are realized when you don't access both producer and consumer counters in the same thread all the time. cache lines shared between the consumer and producer and written to by at least one of them are the hottest points of contention. With careful design you can get that to zero in the common cases.

comment 12y ago · link · parent

I've seen many queues implemented similarly to this, and it works fine. Every thread that calls fetch and add receives a different result, therefore, wrapping asside, there can only be one thread with access to each slot. If there is only one consumer and one producer you don't need fetch and add at all (that is how fastflow is implemented.) You must check that your slot is populated by either comparing with the other index (producer if your the consumer), which is stupid because that cache line is highly contended. The better way is set a slot to null after you've consumed it, and if your the producer, you first check if the current slot is null before attempting to increment the index. A race condition exists where the slot can be null before incrementing but not afterward (e.g. only one slot free but several producers saw that and incremented.) In reality all that means is the producer can skip slots and the consumer must keep incrementing if it sees a null slot rather than assume an empty queue (can be tempered by checking x slots and then falling back to checking the producer index.) Consumer and producer indexes must be on seperate cache lines and some effort can be made to keep consumer and producer on sperate cache lines in the actual queue. e.g. each slot can be a whole cache line and pop() and push() can be batched to work with 8 elements at a time. In other words OP is a noob and I could write a queue that whoops his hiney (danger: attempt at humor.)

comment 12y ago · link · parent

When I was a kid growing up in Canada we used to smuggle cheese across the border, because it was 4x cheaper in the US. Brought 120lbs over in one run along with computer parts and other things Canadians pay too much for.

comment 12y ago · link · parent

My brother writes scifi books and publishes them on Kindle. Without getting too specific his take home has been over $10k per book, with 3 books published this year. Which is amazing for a new author. Lookup Jasper T Scott on amazon if you're curious.

comment 12y ago · link · parent

It would be interesting if Firefox or chrome ever started to ship by default with software capable of circumventing censorship. Probably they would just get censored themselves.

comment 12y ago · link · parent

You could trust them otherwise? You can't trust politicians, period. Their interests and incentives don't align with ours. Your default mode should be to distrust them, to expect them to lie when it serves their ends. Anything else is, quite frankly, a very naive world view.

comment 12y ago · link · parent

TCP is actually extremely complex, see http://en.m.wikipedia.org/wiki/Transmission_Control_Protocol

I don't think I could implement it in under 4000 sloc, and I'd guess it'd be over two months worth of work for just a minimal TCP stack that could interoperate with the internet at large.

comment 12y ago · link · parent

Maybe you're right about the timescale, maybe you're not. Don't lose sight of the fact that you are merely a biological computer, and a terribly inefficient one at that.

Whatever nature can build, we can build better given enough time and resources. We have more building blocks available to us, and we have intelligence. Nature merely had lots of time.

comment 12y ago · link · parent

Yeah, it may well. But it won't need 10 billion of us around, that's for sure.

And humans can be useful to, as expendable biological robots that are cheap to manufacture and run while also being intelligent and versatile. Although most of us probably wouldn't call that living.

comment 12y ago · link · parent

People like to laugh, but if we can invent real AI, and there's no reason to suspect that we cannot since nature did it blindly, then it's just a matter of time until the end of the human race. We will likely either become them or be destroyed by them (or maybe some of us kept in zoos or as pets.) You cannot firewall or imprison a god, especially with humans being so divided, short sighted and manipulable. Simply put it's still survival of the fittest, what happens when that's no longer us is pretty inevitable. The only real question I see is how long will it take?

One happy thought is that the AI uses us as slaves to build a way off the planet to a place more habitable for an AI. Someplace nice with lots of raw material for chips and lots of energy. Maybe a super massive blackhole, maybe another solar system nearby.

comment 12y ago · link · parent

Yeah, that will work, if everything is hot in cache there won't be a big difference between a radix style tree and a hash table. Obviously python doesn't fit that description usually.

comment 12y ago · link · parent

Python also does this.

comment 12y ago · link · parent

Yes, that's correct. However, that's still over a thousand cycles for a tree of depth 5 below the cached part. That's a modestly sized tree (or several smaller trees.) Don't forget lot's of things compete for cache, it's usually safer to assume a cold cache unless you know your data structure is very high traffic.

comment 12y ago · link · parent

I can already tell you that no tree can ever compare performance-wise to a well designed hash table (like python's.) "costly string compares" are much cheaper than cache misses. And for class attributes and the like Python doesn't even do the string compares, just a quick pointer compare.

cache miss = 100 cycles

cache miss + tlb miss = 200 cycles

memcmp compares many bytes per cycle, it's clear to see that the cache misses will dominate the runtime, and trees involve O(log(N)) cache misses. A hash table is typically two cache misses. For interned python strings it's only one.

comment 12y ago · link · parent

That's the problem I see, it's memory efficient, but lookups will cost thousands of cycles for modestly sized trees. A hash table on the other hand can do lookups in a couple hundred cycles (cold cache for both.)

comment 12y ago · link · parent

And the government remains powerless to close this loophole? They really do seem to be owned by the wealthy and corporate interests. That's sad. The wealthy are little more deserving of their wealth than the poor are deserving of their situation. In fact, if we really do have no free will as science seems to suggest, then the only thing separating the rich from the poor is luck. Then the current inequality is particularly sick.

comment 12y ago · link · parent

So what you're saying is the universe is mapped COW, and everytime there's a new observer, UniverseOS runs it with fork().
1
180181182183184