Thursday, July 30, 2009

Age as Defined by Emacs Release Notes

Emacs is (considering) dropping support for some operating systems that I have actually used! I'm officially getting old.

An excerpt from NEWS.23.1:
** The following platforms will be removed in a future Emacs version:
If you are still using Emacs on one of these platforms, please email
emacs-devel@gnu.org to inform the Emacs developers.

*** Old GNU/Linux systems based on libc version 5.

*** Old FreeBSD, NetBSD, and OpenBSD systems based on the COFF
executable format.

*** Solaris versions 2.6 and below.
Plus some others that I haven't used.

Sunday, July 26, 2009

Contractual record

A self respecting geek father wouldn't be a complete person unless he scrambled to write some Python to help him keep track of the duration and time between contractions. I just worked this manually from the command-line but you could totally turn this into an application with graphs and charts and people would buy it.
import time
timings = []

def start():
timings.append([time.time()])
if len(timings) > 1:
diff = timings[-1][0] - timings[-2][0]
print "Since last: %s (%.2f seconds)" % (howlong(diff), diff)

def stop():
s = timings[-1]
s.append(time.time())
print "Duration: %.2f seconds" % (s[1] - s[0],)

def howlong(t):
v = (t // 60), t - ((t // 60) * 60)
return '%d minutes %.2f seconds' % v

Friday, July 3, 2009