Vitanuova for 2002 February 2 (entry 3)

< You know you're in a small world when...
Recursion and the enchanted forest >

Seen in an old edu-sig post:

"We have to reinvent the wheel every once in a while, not because we need a lot of wheels; but because we need a lot of inventors." - Bruce Joyce

(quoted by Jeffrey Elkner, who attributes it to the book Discovering Geometry)

He responded derisively, stating that the university was free but the compiler was not.

Richard Stallman, in Open Sources

slashdot had a link to an interesting piece about space elevators (which I'm used to calling orbital towers). It seems that they might be feasible.

If you had to climb to LEO under your own power -- as by walking up stairs -- but you could rest at any point -- it would take under four years, assuming that you could climb the height of the Empire State Building each day. Food, oxygen, and restrooms are serious problems, as is temperature -- considering how difficult it is to climb Mt. Everest, which is just about 2% of the way to LEO. But it would be very rewarding! You could climb up the tower, coming out there other end, so to speak, four years older, much stronger, very hungry, and receiving an "I climbed most of the way out of the Earth's potential well and all I got was this lousy t-shirt" or "I gave myself 400 megajoules of gravitational potential energy and all I got was this lousy t-shirt" or "I accelerated myself into low Earth orbit and all I got was this lousy t-shirt" shirt.

(OK, so that 400 megajoules calculation is bogus -- it's based on multiplying the minimum energy used to climb the Empire State Building by the ratio between an estimate of LEO height and the Empire State Building's height. Since the Earth's gravity falls off as you get higher, though, it's actually much easier as you go -- so you could climb faster and with less energy expenditure and acquire less potential energy. I should do the integral and found out how much energy you actually store.)

On a more serious technical note, there was an interesting claim that you can use measurements of gzip's compression efficiency on various files in order to detect, in a statistically significant way, what language and document type they are, and even who wrote them. I got several e-mail messages about this result, but I haven't found a good link to a good explanation of it yet. If I see a link, I'll link to it. But that's an interesting claim, and it goes on to say something like "you can identify individual authors based on how well gzip compresses their works" (so we could just look at the sizes of federalist.1.txt.gz, federalist.2.txt.gz, etc., to sort out the authorship controversy?).

I tried running something like

#!/usr/bin/python

compression_level = 9
import zlib, sys

results = {}

def entropy(s):
	# return zlib's estimate of the compression efficiency of s
	# (measured in bits per character)
	return len(zlib.compress(s, compression_level))*8.0/len(s)

for i in sys.argv[1:]:
	try:
		e = entropy(open(i,"r").read())
		results[e] = i
	except:
		pass

k = results.keys()
k.sort()
for i in k:
	print ("%.6f"%i), results[i]

and nothing jumped out at me.

In completely separate Python news, Python threads seem very easy to use. Maybe I'll write some multithreaded programs soon.


[Main]
Support Bloggers' Rights!
Support Bloggers' Rights!


Contact: Seth David Schoen