HNHacker News
TopNewBestAskShowJobs

iclelland

232 karma · joined April 20, 2009

submissionscomments
iclelland··on Linus Torvalds proposes a change to the Git commit object format
They're derived. You can tell that they're derived information by the fact that you can compute them for old commits, long after commit time, which is exactly what part of this proposal is to do. You can derive them simply by counting the maximum number of steps between a commit and any of its roots. The essential information isn't the generation numbers; it's the structure of the commit history -- the actual chains of commits, with all of the branches and merges. Generation numbers are just an artifact of counting.

On the other hand, this information is very handy, once you have it, for certain algorithms, and it could be expensive to re-compute all the time, which is why the proposal is to generate and store them explicitly. (This is also the reason that timestamps have been used before, even if they were a bit of a hack -- they're readily available, and way faster than recomputing generation numbers all the time)

iclelland··on An eruption from the Sun that happened today
Probably not much. According to the blog, this was a lower-energy explosion than, say, this one[1], which was aimed right at us.

[1] http://www.youtube.com/watch?v=himC51J23vQ

iclelland··on An eruption from the Sun that happened today
Yes. I couldn't see it at first, because of the advertising overlay, but there is a time readout in the lower-left of the video.

It looks like it's sped up about 60x.

iclelland··on Amazon Web Services are down
I would say, rather, that it is priced to have very specific sorts of customer using it.

The relationship between the pricing tiers changes fairly drastically, depending on how much you are already spending on Amazon Web Services. Gold, for instance, starts out at 4x the price of Silver support, but by the time you're spending 80K/month on services, it's only a $900 premium (and stays there no matter how much bigger your bill is). At the $150K/month level, it's a 2x jump from Gold to Platinum, which may or may not be a huge jump, considering the extra level of service you get.

iclelland··on A complete Internet web server built into an Ethernet (RJ-45) jack
If you're referring to the physical jack, then, essentially, no. They were standardised in the 1970s, and the form factor hasn't changed at all, while electronic parts have become much much smaller over the same time frame.

There may have been advances within the connector itself, to improve the signal-carrying properties of the internal connections, but the overall design of the connector is basically unchanged.

iclelland··on Google finally has a 404 page that isn't ugly
You can see the HTML 4.01 definitions at http://www.w3.org/TR/html401/struct/global.html#h-7.3

The complex parsing algorithm wasn't spelled out in excruciating detail, as it is in HTML5; much of it was implied, and left for the parser developers to figure out.

Strictly, the HTML, HEAD, and (BODY|FRAMESET) elements are required, in a valid document, but the tags delimiting them are optional. That way, code which manipulates the DOM can always count on a HEAD element being present, and CSS specifiers can use 'body' as a root, even if the tags themselves are missing from the source HTML file.

The first actual required tag in an HTML 4 document is <title>, as far as I know. Every HTML document has to have one, and it needs to be opened and closed explicitly. If it's the first thing in the document, it implies an <html><head> before it, and if body content comes after it, that will imply </head><body> as well.

You could put a <meta> tag anywhere before the first body content, and it would still be part of the implied HEAD element. As long as it doesn't come after the (explicit or implicit) </head> tag, it shouldn't cause the document to fail validation.

And no, none of this is valid XHTML. XHTML is always strict, and all opening and closing (or self-closing) tags must be present in the source file.

iclelland··on Don't waste your time by cd-ing in the terminal
Is 'cd $OLDPWD' any different from 'cd -' ?
iclelland··on Python 3 Wall of Shame
If this is true, then there's a bit of a circular dependency Django is a pretty high-level project, though, with a lot of other dependencies of its own. I believe that the stated position of the Django core team is that there's no point in porting Django until some (all?) of the core dependencies are functional on Py3k. This, at least means wsgi and the database connectors, and possibly more.

So I hope that the rest of the Python community isn't sitting around waiting for Django to take the lead here.

iclelland··on How to remove software cracks and keygens from file hosting sites
Not only that, but those who didn't spend their money on {software|music|movies} very likely managed to spend it on something else.

There is no giant pirate treasure hoard, where "pirates" cache these "billions of dollars every year", and we would not all be billions of dollars richer if only these pirates would give their money to the software / entertainment industries instead.

iclelland··on Running out of hex words?
Um, that's mostly because there's no real need to substitute 'a' with '4', because 'a' is a valid hex digit. Same goes for 'e' and '3'.

If you look, 'dead', 'cafe', 'beef', and even '1ee7' are in the list.

iclelland··on Security Fix in Open BSD
I figured that v1.61 had the initial line in it; 1.63 added the comment explaining its purpose. (the diffs are ugly, though, and hard to tell what lines went where sometimes)

The fix was in 1.75, though, over a year later. In the middle is v1.69, tagged as the release version for OpenBSD 3.0 (and the branch point for 3.1)

1.75 looks like the release version for 3.1 (and branch point for 3.2), so the bug would have been present in the released 3.0 version.

iclelland··on Run last command as root
Seriously, though, "!!" is just a special case of Bash's history expansion

man bash, and search for "^HISTORY EXPANSION" for all the details.

I often find myself running commands like

cp !:2 !:1 # reverses the order of the last two args

cd /somedir && !! # run the last command in a better directory

iclelland··on Run last command as root
I've always pronounced this command as

"sudo make me a sandwich"

iclelland··on Keeping node.js servers up forever
The application described in the article is specifically written to interface with Node.js servers. It keeps those processes running, and restarts them as needed. It is not a general process monitor.
iclelland··on Ken Perlin's Tiny Font
Even if it did, it would look horrible as soon as you changed the device orientation. It's optimized for horizontal RGB triples, and would probably not be legible at all if they were stacked vertically.
iclelland··on OK, here's the thing: this is only the entrance of the rabbit hole.
Naming things was even harder when filenames were restricted to five characters or less.

That's why they had to name it Forth.

iclelland··on Chmod -x chmod
My first thought was pretty similar:

cp /bin/sh chmod.new

cat /bin/chmod > chmod.new

mv chmod.new /bin/chmod

iclelland··on Word cube: solve in your preferred language
That's actually a set being constructed from a generator expression -- a real set comprehension would look like this:

    subset = {word for word in valid if len(word)==n}
but that's only available in Python 3.0.1+ or 2.7
iclelland··on Adobe's ad : We Love Apple
I don't think it's an article. Looks like it's just a banner ad from Adobe.

And it's a Flash banner ad, BTW, so don't even bother trying on your phone ;)

iclelland··on Adobe's ad : We Love Apple
Yes, the iPhone supports client-side SQLite databases, accessible from JavaScript, and it has the ability to cache web resources, so that they can be used without network access (again, from JavaScript, you can tell whether you have a network available, and change application behaviour accordingly). Those are both from open standards.

Web sites can also declare themselves to be "web apps", in which case the user can link them to the phone's home screen, and they can look just like native apps, with splash screens on startup; even hiding the usual safari navigation if you want.

iclelland··on How Plastic Popped the Cork Monopoly
This is a novel use of the word "monopoly" -- There are currently (from the article) over 600 natural cork producers, and yet a single company, gaining 20% market share, with what looks like nearly 100% of the synthetic cork market, is somehow the one who "broke" that "monopoly"?
iclelland··on Avatar still only #26 when box office receipts are adjusted for inflation
The site makes it very clear, actually, that they adjust ticket sales in each year independently, based on the year that the tickets were sold. http://boxofficemojo.com/about/adjuster.htm goes into all of the details.

That being said, I don't know how much their calculations should be trusted, as they claim to use $7.35 as the ticket price for 2009 as well as 2010, but show Avatar's 562MM as adjusted up from 555MM starting in 2009 dollars.

iclelland··on [dead]
No it isn't. The only link in that article (http://www.sedo.com/search/details.php4?language=us&doma...) is to a domain acquisition service, who will try to acquire the domain from its current owners (CNet, in this case), if they're willing to sell -- and there's no indication that they are willing.

In related news, YCombinator.com is up for sale! See here - http://www.sedo.com/brokerage/acquisition.php?tracked=&p...

iclelland··on Unladen Swallow 2009Q3 Released with LLVM optimized Python
Actually, it's 10.3x less memory (they've subtracted 1), so it's using 9.7% as much memory as the previous release. I would have said that 90.3% less than before, but maybe that's just me
iclelland··on Potential Quicksort replacement in java.util.Arrays with new Dual-Pivot
Having N > 1 requires you to do a sort on the pivots. From the algorithm:

  3. P1 must be less than P2, otherwise they are swapped.
iclelland··on You will live for longer than 1% of the entire history of human civilization.
No, just no new books. Still plenty already written for a few hundred lifetimes' worth of reading, though.
iclelland··on A periodic table of visualization methods
It seems to be missing "Periodic table" as a visualization method.
iclelland··on How to store data for a billion years
That's pretty much what I was thinking, reading this. First off, a frequency measurement -- "once in a billion years", 3.16887646 × 10^-17 hertz (thank you, Google calculator) can't really be used as a probability, as they are trying to do.

Then, even if you assign that nonsense statement some sort of charitable reading, like "one bit has a 50% chance of spontaneously changing state over a one billion year period", and infer that every bit has a 1/10^9 chance of flipping every year, then the odds that 8×10^9 bits do not change at all over the course of a year are (1-10^-9)^(8×10^9), or about 0.034%.

Granted, it'll still take a long time for that whole gigabyte of data to be completely scrambled, but I think we'll still be using error correction and occasional refresh, even with a technology this reliable.

iclelland··on Deep Crack
http://www.amazon.com/Cracking-Secrets-Encryption-Research-P...

Deep Crack was big news some ten years ago, but this is just a random link to wikipedia, with no other commentary about why it might be relevant now.

On a related (but just as irrelevant) note, a friend of mine had one of the production-defective CPUs from that machine that she wore on a pendant for several years.

iclelland··on Ask HN: Why do I have to type print "x: "+str(x) in Python?
To be fair, that's not quite the same as perl/shell-style interpolation.

In perl, "$x" pulls the value of $x from the variable namespace. In your Py2.6 example, the "{x}" format in the string has nothing to do with a variable named x; rather it references the keyword args supplied to format.

To simulate perl's

  print "x: $x";
you would

  print "x: {x}".format(x=x)
← PreviousPage 3 of 3