Hacker Newsnew | past | comments | ask | show | jobs | submit | SenorWilson's commentslogin

Probably the fact you're using google, facebook, and twitter. All 3 will store some information... Nice name for your session cookie btw :)


Here's a possible answers: http://www.theregister.co.uk/2011/06/09/apple_maiden_data_ce...

Possibly giving HP some money :)


Cheers for the link. Now I wonder what they're running on from a software perspective.


You'd think they'd go Open Compute and cut out the middle man (Dell, HP, etc).


I don't really think it is possible to say one is better than another without a specific application in mind. Probably just chose whatever one they wanted at the time.


You can, you can talk about which operations need to be fast, as shown by the big-O complexity. You can also talk about constant factors, the cost of specific operations such as comparisons, and locality of reference. In my opinion the latter aspects should be emphasized more because you sometimes come across people who built their careers around slightly more optimal datastructures in terms of big-O complexity, which are nevertheless impractical in any but the most extreme situations due to constant factors (which may only get a footnote mention).


You don't seem to be disagreeing. The point was that you need to know which properties matter to your application before you can truly decide where you should worry about emphasis.

But, for those that want a good example of what you are talking about, it seems to mirror the recent post by Carmack regarding ray tracing. If I recall, the point was that, though ray tracing is better in O terms, it has an outrageous constant factor.


I was disagreeing with the notion that you can only say which algorithm to use if you know the specific application. There are general trade-offs between algorithms which hold independent of any specific application.


But the thought is that the specific application will determine which trade-offs are acceptable and/or applicable. So... I'm still not sure how you are disagreeing.

Now, you can list out the various tradeoffs easily enough. And some algorithms are superior to others, I would imagine. However, which to use and the impact it will have on an application depend more on the application than the datastructure.

Or, am I completely off my rocker?


Another wrinkle is that the constant factors can be data-dependent: which data structure to choose can heavily depend on the distribution of data you typically see.


I find lowering the brightness on my monitor 10x better than f.lux.


Are you some kind of genius?


If you enjoy 'tac', you might also enjoy 'sponge'.

Spong 'soaks up' input an releases it all on one chunk so that you can do things like:

  cat foo | sponge foo
(`cat foo > foo` does not work)

That's neat and all, but what if you don't have sponge? Well, just use tac twice!

  cat foo | tac | tac > foo
(Obviously this is rather wasteful ;))


I cannot understand how this works.

"cat foo > foo" breaks, because the shell truncates the file "foo" while it's setting up the redirection, before it launches "cat foo", and so cat has nothing to read.

"cat foo | sponge foo" works because the shell is not responsible for writing to foo; it launches cat (which opens the file for reading) then launches sponge (which eventually opens the file for writing).

I would thus expect "cat foo | tac | tac > foo" to fail in the same way as "cat foo > foo" because the shell is still going to open the file foo and truncate it, but experimentation shows that it does actually work. Is it because the shell launches each pipeline one at a time, so cat has read the file before "tac > foo" truncates it? Is it a race-condition or a corner-case?


That's a good question. I had though it worked because the truncate would not actually happen until tac actually wrote something, but now that I look at it more I don't think that is actually the case. `cat > foo` immediately truncates foo before anything is written. Also `tac foo > foo` doesn't work, which discredits my hypothesis that tac's buffering was causing it.

Furthermore `cat foo | cat > foo` does not work, but `cat foo | cat | cat > foo` does work.

I suspect this behavior is actually a race condition of some sort.

Edit: definetly a race condition, shown by larger files:

  % wc -l foo
  1310720 foo
  % cat foo | cat | cat > foo
  % wc -l foo
  16384 1


Without it there would be lots of comments that questioned the reason for early termination.


"Had to leave for personal reasons" would sound a lot better.


I thought it was weird at first too, but after learning Objective-c I can say that it is beautiful.


You could probably install backtrack on a Pi, although it may require some tweaking if no one has created an install already.


Building web frameworks is all the rage.


Haha yeah, I was too. I had to keep reading to find out; maybe that was the point.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: