News for hackers. Stuff that matters.

ginkgo

Re:Show HN: Write a sort, watch it go on Monday September 26, 2011 @05:20PM (#3040784)
The input set is problematic because it contains every number from 0 to VA.length exactly once.

This allows "algorithms" like this:

  for x in [0...VA.length]
    while (VA.get(x) > x)
      VA.swap(VA.get(x), x)
Re:Miguel de Icaza: Learning Unix on Wednesday September 07, 2011 @12:27AM (#2968358)
When I forced myself to learn touch-typing with a qwerty keyboard i used gtypist. I found it to be sufficient for its purpose.

The only gripe i had with it was that it required typing two spaces after a period. I found this just plain weird, so I fixed it in the tutorial files.

I guess using a blank keyboard also helped quite a bit..

Re:IBM’s Watson Now A Second-Year Med Student on Thursday May 26, 2011 @09:23PM (#2590100)
Actually, this seems like the perfect opportunity for pharma companies to "help" in creating the database.

That's actually what they are already doing when pitching new drugs to doctors. Now they only have to convince the system designers and not thousands of practicing doctors.

Re:"The worst algorithm in the world?" on Wednesday May 11, 2011 @04:41PM (#2538335)
My personal favorite has always been permutation sort, where you try all possible permutations of a sequence and check if it is sorted.

What's nice about it is that it is deterministic yet ridiculously slow.

It can also be really easily implemented in Prolog[1] where you simply define what a permutation and being sorted means. After that you just search for a sorted permutation.

[1] http://rosettacode.org/wiki/Sorting_algorithms/Permutation_s...

Re:The most surprising demographic crisis on Saturday May 07, 2011 @04:51PM (#2524526)
They could promote polyandry.
They could simply get a PrimeSense license. I see no reason why they wouldn't get one.
Re:Introducing Gofix on Saturday April 16, 2011 @12:49AM (#2453202)
If the python project had something like that, the current python 3 situation could maybe have been avoided.
Re:Meet America's Money Destroyers on Sunday April 10, 2011 @01:14PM (#2429877)
Call me paranoid, but I don't like the idea of all my money transactions being traceable. It's less that I worry about my bank or government but about, for instance, super-market chains linking my buying-behavior to my bank account or card number.
Re:Why T-shirts matter at tech companies on Friday April 08, 2011 @07:40PM (#2426017)
Especially in hot weather I actually prefer short-sleeved shirts to t-shirts. The tightly woven, thin fabric of a shirt does not stick as much to the body as a t-shirt. Though I have to admit, that I have never been to Australia in summer. And a suit would definitely be out of the question for me as well during the hot season. :)
Re:Chinese Infinite Magical Hard-Drive on Thursday April 07, 2011 @10:28AM (#2419566)
How could a program work that can detect such scam-drives? As long as we don't care about crashing the formatting, at least.

It could work by writing a specific pattern in the first few bytes of the device and then reading/writing in 2^n steps to check if the pattern cycles.

I think I have some counterfeit thumb-drives lying around. Maybe I will try writing something like that..

Maybe it's possible to make this a closed circuit by channeling the "burnt" water back into the solar cell. This way, the daily water consumption could be brought down to (almost) zero.

I guess that this would need distilled water anyway.

Re:Python is now Python 3 on Tuesday October 19, 2010 @08:59PM (#1809502)
This update broke the python-cheetah package which I was relying on.

For now, I have to use a self-compiled 2.6 python package. I have locked the python and python2 packages from further updates for now. I hope this situation get better soon.

Re:The physics of Angry Birds on Wednesday October 13, 2010 @10:11AM (#1787115)
Re:Early 1900s in Colour on Sunday May 16, 2010 @11:57AM (#1352192)
I wanted to post the same thing. The quality of those pictures is incredible.

You can find all reconstructed images here: http://www.loc.gov/exhibits/empire/

Re:How Grandmas May Play Favorites on Saturday November 14, 2009 @12:20PM (#941856)
The sex determining chromosomes are just two among 23 chromosome pairs in the human genome.

All the number-play in the article is completely pointless.

Re:Ask HN: If C++ is so bad, what should game developers use? on Sunday October 18, 2009 @04:20PM (#888748)
There is a very interesting talk by Tim Sweeney to this topic: http://lambda-the-ultimate.org/node/1277
Re:Snow Leopard is a terrible name on Thursday September 03, 2009 @08:18AM (#802273)
Ocelot would also be a good name.
Re:Introducing Surinx (Ruby syntax w/ Java typing) on Wednesday August 26, 2009 @11:24AM (#787317)
Or you could simply make your python code tail-recursive:

  $ time python fib.py 40
  102334155

  real	0m0.013s
  user	0m0.000s
  sys	0m0.010s