February 19, 2004

Bulk view

Twiddler problem unsolved

Still getting

usb 1-1: new low speed USB device using address 7
ohci_hcd 0000:00:02.0: urb c1361c00 path 1 ep0out 5ec20000 cc 5 --> status -110
ohci_hcd 0000:00:02.0: urb c1361c00 path 1 ep0out 5ec20000 cc 5 --> status -110
usb 1-1: device not accepting address 7, error -110

from my kernel. That’s with USB-OHCI support compiled in already.

Good idea for nethack.el

From the Emacs channel:

kanaldrache: yes, therefor i want a mapping function … take a
picture of that level when you leave it so that you can chekc nine
levels later “Mhh, where was that expensive shop? Level 4 or level
7?” without walking back or use you /oT

Checking planner-rss autocategories

I’ve added `planner-rss-category-feeds’ to planner-rss. This examines
the text of the note and copies it to different RSS feeds depending on
the regular expression match. In the future, I might actually just run
a lot of hooks on the thing.

If this works, I should have a new entry in



On orkut.com’s Geeks community, Joel said:

You’re right. Geekiness is the state of wanting to know and
understand everything. True Geeks can geek on any topic, after very
little preparation.

Example: My degree is Chemistry, I work in computers, and I do
theater tech/SF conventions/other cons/etc. on the side. My GF is a
mechanincal engineer (and just as much a geek). I make her crazy
sometimes because just talking about what she does at work I’ll pick
up enough about stuff (that she has a degree in and I don’t) to make
informed suggestions as to how to fix problems they’re having.

This goes hand-in-hand with the state of “Being an Engineer”. PEs
will make you believe that it involves much training, experience,
and certification. I claim that it is a state of mind, encompassing
a certain level of geekiness, and a whole lot of logical problems

nethack code to check if a character has something in the inventory

(defvar nethack-temp-log nil "String containing captured messages.")

(defun nethack-has-item-p (regexp)
  "Return non-nil if the character has an item matching REGEXP in the inventory."
  (let ((nh-filter-hook (append (list 'nethack-store-log) nh-filter-hook))
        (nethack-temp-log nil))
    (nh-send-and-wait "inv 1")
    (nh-send nil)
    (string-match regexp nethack-temp-log)))

(defun nethack-store-log (string)
  (setq nethack-temp-log (concat nethack-temp-log string "\n")))

(defvar nh-filter-hook nil "Hook that is called with the received line.")

(defadvice nh-filter (around sacha activate)
  "Insert contents of STRING into the buffer associated with PROC.
Evaluate the buffer contents if we are looking at a prompt and then
delete the contents, perhaps logging the text."
  ;; insert output into process buffer
  (with-current-buffer (process-buffer proc)
    (goto-char (point-max))
    (insert string)
    (forward-line 0)
    (if (looking-at nh-prompt-regexp)
	(let ((prompt (match-string 1)))
          (nh-log (buffer-substring (point-min) (point)))
          (unless (run-hook-with-args-until-success 'nh-filter-hook (buffer-substring (point-min) (point)))
	    (eval-region (point-min) (point)))
	  (cond ((or (equal prompt "command")
		     (equal prompt "menu"))
		 (sit-for 0)
		 (setq nh-at-prompt t)))))))