HNHacker News
TopNewBestAskShowJobs

hansbo

765 karma · joined February 1, 2012

submissionscomments
hansbo··on Phdtree: create and discover your academic family history
Similar idea to The Mathematics Genealogy (which is, as the name implies, only for mathematicians).

http://genealogy.math.ndsu.nodak.edu/

hansbo··on Sweden Needs More Trash, Because It Has Turned All It's Got Into Energy
In my home town of Trollhättan, the entire public transportation network was driven on biogas from the organic trash of the people. While sorting the garbage into organic/inorganic was a bit of a pain, the result was really impressive.
hansbo··on Hopefully more controversial programming opinions

  It's a mistake to introduce new programmers to OOP before they understand the basics 
  of breaking down problems and turning the solutions into code. 
Given how well I remember my classmates with little-to-none programming experience struggled with understanding pointers while not being able to write the simplest algorithms, I thought this was a no-brainer. Is it really a controversial opinion?
hansbo··on Why Men Can't Have It All
I don't know if it's based on culture or laws, but this article doesn't really ring true to me as a Swede. My father, like many (probably not most though) fathers I know, spent as much time home with the children as the mothers did. As I intend to as well when the time comes. It is very possible for both parents to keep up their professional careers if the burden is split between them, I think.
hansbo··on How big is the entire universe?
Interesting. I had no idea that the curvature of the universe was an indication of its size. Does this imply that a flat universe is also infinite?
hansbo··on How the Norwegians Reacted to Terrorism
I apologize for continuing off-topic, but the links you provide only seem to indicate that the left-wing youth of Norway are supporting Palestine. This is not an uncommon opinion; in fact, being Swedish, I can't recall that I've ever met anyone who supports Israel in their occupation.

The links you provide equates this to antisemitism, which is very strange to me. Who was it, you mean, who were being "enthusiastically for" terrorism?

hansbo··on Don't Vote
While everything written is true, I disagree with the notion. I personally believe that it is the duty of every citizen to utilize his or her vote in an informed manner. But this is a purely ideological standpoint -- of course one vote very seldom matters.
hansbo··on Beware of blind elitism
While banning Safari is very strange, the author acknowledges the browser issue:

"I know many would fault me for [not supporting IE] on TNL.net but the design deci­sion of not sup­port­ing older inter­net explorer browsers was based on ana­lyt­ics data that showed me that only 5% of my over­all audi­ence was using those"

Remember, ignoring IE users is not necessarily about elitism, but can also be a financially sound decision.

hansbo··on Peter Sunde's request for clemency [Google translate]
The problem with this text is that it is very emotional, and I think a lot of the impact gets lost in translation.
hansbo··on I Can Be Just As Capable. Let Me.
There's a huge difference between problems "here", and problems "there". If a problem exists in our own culture, close to home, we have much more power to change it. Not everyone can be an activist, but everyone can behave appropriately.
hansbo··on Row in America over gay characters in EA video games

  [The Florida Family Association] says there are no gay characters in the
  Star Wars films and describes the inclusion of LGBT
  (lesbian, gay, bisexual and transgender) elements as
  "propaganda".
How can anyone possibly make the argument that allowing free choice of romantic partner in an RPG is "propaganda"? It seems very strange to me.
hansbo··on Why some nations become wealthy while others remain stuck in poverty
It's a very simple premise, but I've always felt it to be true. Give people the sense of being in control, or at least have the potential to be in control (Democracy, property rights, et.c.), and they will work hard for a better future. This tends to give a lot of stable growth.
hansbo··on Torvalds: More bitwise tricks
"More bitwise tricks..

So my quest to calculate the hash and the length of a pathname component efficiently continues. I'm pretty happy with where I am now (some changes to the code have happened, it you actually want to see the current situation you need to check out the kernel mailing list post), but finding the number of bytes in the final mask bothers me.

Using an explicit loop is out - the branch mispredicts kill it. And while at least modern Intel CPU's do quite well with just using the bit scan instructions ("bsf") to find where the first NUL or '/' was in the word, that sucks on some older CPU's.

So I came up with the following trick to count the number of bytes set in the byte mask:

  /* Low bits set in each byte we used as a mask */
  mask &= ONEBYTES;
  /* Add up "mask + (mask<<8) + (mask<<16) +... ":
  same as a multiply */
  mask *= ONEBYTES;
  /* High byte now contains count of bits set */
  len += mask >> 8*(sizeof(unsigned long)-1);
and I'm wondering if anybody can come up with something that avoids the need for that multiply (and again - conditionals don't work, the mispredict costs kill you).

Because that multiply isn't free either."

EDIT: Thanks for the tips, I'm new here

hansbo··on Female Passengers Say They Were Targeted for TSA Body Scanners
Really disturbing - but not unexpected. Give people the power to choose who they want to see naked and it's inevitable that some people will abuse this power, I think.
← PreviousPage 4 of 4