mwolson.org Blog - /Personal

Sat, 28 Aug 2004

Steph's birthday

Happy birthday, Steph Buss! Hope you have a good one. You're turning 24, right? ;^) This is my birthday present to you. Now when people search the internet or happen upon this page, they'll think you are the `perfect age', if such a thing exists. It's been good to know you these past 5 years.

Also Grandma: Happy birthday to you as well. I'll be there to celebrate it with you next week.

I just spent a few hours working on this beautiful thing.

(defun my-erc-page-me (match-type nick message)
  (interactive)
  ;; I don't want to see anything from the erc server
  (when (and (eq match-type 'keyword)
             (null (string-match "^[sS]erver" nick))
             ;; or from those who abuse the system
             (let ((cur-time (float-time))
                   (cur-assoc (assoc nick my-erc-page-nick-alist))
                   (last-time))
               (if cur-assoc
                   (progn
                     (setq last-time (cdr cur-assoc))
                     (setcdr cur-assoc cur-time)
                     ;; attempts by a particular nick must be
                     ;; more than 10 seconds apart
                     (> (abs (- cur-time last-time)) 10))
                 (progn
                   (push (cons nick cur-time)
                         my-erc-page-nick-alist)
                   t))))
    (shell-command
     ;; escape (') characters by turning them into ('"'"'), which
     ;; works for all shells i have tried so far
     (concat "zenity --info --text '"
             (replace-regexp-in-string
              "'" "'\"'\"'"
              (format my-erc-page-message nick))
             "'"))))

To see the whole thing, visit Projects: Emacs Config Files, namely `erc-init.el'. In short, now when people try to get my attention through instant messenger, it will only notify me once every ten seconds maximum. It also marks my first sortie into the wonderful world of associative lists.

I had an interesting talk with my roommate. He was curious about some of the standards that we have here, like about divorce. Two things I told him.

  1. It's bad for the kids.
  2. It makes everyone involved poorer.

It's been a lot of fun having Jimmy as a roommate, and I hope things work out well for him in his chemical engineering (and culture-understanding) endeavors.