PowerBook overtemp

Lately, my PowerBook has become narcoleptic. It goes to sleep even when it’s plugged in and I’ve been using it actively. Pressing a key usually wakes it up right away but not always.

I asked about this today on a Mac users’ mailing list that we have at work and someone mentioned that this a known problem with a faulty trackpad temperature sensor. The machine thinks it’s overheating so it goes to sleep. I can see evidence of this in my /var/log/system.log files:

Power Management received emergency overtemp signal. Going to sleep.

The above message appears in my logs 71 times!

Doing a search on this message, it seems that this problem is pretty common.

Scsh: Scheme shell

If you are a fan of programming with Scheme, then you might like Scsh. Actually the name seems like a bit of a misnomer to me, since:

  • Scsh is not a comfortable interactive shell a la bash (though apparently some work is done on one called Commander S; no public release yet though).
  • Scsh has more power than shell script because there are functions for opening sockets and such, so it’s probably more comparable to Perl than to Bourne shell.

To give you the flavor of what it looks like, here’s a snippet of awk and the corresponding scsh, which I stole from here:

;;; Copy IN to OUT, prefixing each line with a timestamp,
;;; or, as we say in AWK,
;;; awk '{"date '"'"'+%b %e %T'"'"'" | getline d; 
;;;      close("date '"'"'+%b %e %T'"'"'"); print d, $0}'
;;;
;;; Quiz: why is the close() necessary?
;;;     -Olin 
;;;      May 1997

(define (add-date in out)
  (while (not (eof-object? (peek-char in)))
    (format out "~a ~a\n"
	    (format-date "~b ~d ~H:~M:~S" (date)) ; E.g., "Sep 3 22:43:11"
	    (read-line in))))

Of course the strength of Bourne shell is that it’s on every Unixy machine out there and Scsh is on, well, a few Scheme hackers’ machines.

links for 2006-10-19

  • The use of the GNU gettext utilities to implement support for native languages is described here. Though, the language to be supported is considered to be Oriya, the method is generally applicable.
  • run a utility (cssh) giving a couple of server names as parameters, and then xterms opens up to each server with an extra “console” window. Anything typed into the console is replicated into each server window (so you can edit the same file on N machines).