Muli Ben-Yehuda's journal

September 29, 2004

life’s little amusements

Filed under: Uncategorized — Muli Ben-Yehuda @ 12:41 AM

I just received an email from a VMWare recruiter. Those of you who know the sort of subjects I’ve been interested in lately might find it amusing, or perhaps ironic is a better word.

Advertisements

September 21, 2004

how to get around the hardware standards

Filed under: Uncategorized — Muli Ben-Yehuda @ 1:22 PM

Reading Rob Pike‘s Systems Software Research is Irrelevant.

Rob mentions that a large amount of work goes into supporting standards. These include application level standards (e.g. HTML / HTTP), system level (e.g. POSIX) and hardware level (buses, instruction architectures).

Solving the third one is easy – just run everything under a hypervisor. That makes the hypervisor a “standard” you must write to, but hopefully, it’s a much simpler standard.

Solving the first two is more difficult. I am especially interested in “magical POSIX compatibility” for a LISP operating system…

September 20, 2004

emacs geekery

Filed under: Uncategorized — Muli Ben-Yehuda @ 10:49 AM

I have no idea why I haven’t done this years ago.

(global-set-key "\C-x\C-f" 'find-file-at-point)

September 15, 2004

todoo.el 1.6

Filed under: Uncategorized — Muli Ben-Yehuda @ 10:19 AM

New todoo.el is up.

One conceptual problem that I’ve been struggling with wrt todoo.el is how to properly save the folding state whenever it changes. The problem is that changing the folding state does not make emacs think the buffer has been modified, so emacs will happily let you close it without saving. What I did at first was hook into todoo’s “save and exit” function, which is fine if you hit ‘todoo-save-and-exit’. But what happens if you just hit ‘kill-buffer’? lossage. So then I hooked into ‘kill-buffer-hook’, which fixed the ‘kill-buffer’ case. But what happens if you hit ‘save-buffers-kill-emacs’? again, lossage.

Last night the correct solution hit me in the face. If the problem is that changing the folding state does not cause the buffer to be modified – fix that. Just call (set-buffer-modified-p t) wherever we change the folding state. Did that, it works. Yay ๐Ÿ™‚

But this is only half of the solution. The second half is saving the metadata whenever you save the data. ‘save-buffer’ has several hooks, including ‘after-save-hook’. Trying to get it to work led to some interesting effects, because my ‘after-save-hook’ called a function that ended up saving a buffer, which called ‘after-save-hook’, which called my function, etc, etc, ad infinitum. Fixing that was pretty simple – just nil the hook in the lexical scope of my function so that it does not get called again.

Then I hit another bug, that apparently existed since the first day. My code to serialize the folding state into the metadata buffer changed the location of the cursor on the screen. I never saw it, because the buffer was always destroyed after saving the metadata previously. Now that I saved the metadata on every save, it was very visible and annoying. I wrapped it in ‘save-excursion’ – no change. I saved and restored the point manually – no change. After some minutes of head scratching and debugging, the culprit ended up being a call to ‘end-of-buffer’, which effects the scrolling status of the buffer. Well, duh! the help for ‘end-of-buffer’ even says “Don’t use this command in Lisp programs! (goto-char (point-max)) is faster and avoids clobbering the mark.” And that works like a charm…

Ergo – todoo.el 1.6.

listening to music with my new headphones is such a joy

Filed under: Uncategorized — Muli Ben-Yehuda @ 9:48 AM

Currently listening to Rage Against The Machine’s “Know Your Enemy”, and the base is just amazing. Thank you for the headphones, ladypine!.

September 12, 2004

Filed under: Uncategorized — Muli Ben-Yehuda @ 6:06 AM

05:47 AM in the morning, and I’m awake. Un-fscking-believable. Does feel good, in a weird sort of way – its been a while since I’ve seen the dawn.

September 9, 2004

the problem with reading blogs of MS developers …

Filed under: Uncategorized — Muli Ben-Yehuda @ 9:11 PM

… is that you get to view such lovely code snippets:

traceLogHandle = CreateFile(TRACELOG_FILE_NAME, FILE_APPEND_DATA,
FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);

My god, the ugliness.

Patterson and Hennessy, oh wow

Filed under: Uncategorized — Muli Ben-Yehuda @ 9:07 PM

A new book was waiting for me at the library at work today. Normally, this would be a very happy event (I *love* new books), but right now, I’m pretty depressed. Why? Because the book is the third edition of Hennessy and Patterson’s Computer Architecture: A Quantitative Approach, and it is over a thousand pages of goodness-filled knowledge, and I HAVE NO TIME TO READ IT.

I wonder how far I’ll get with 50 pages every weekend for the next few months.

(For those of you keeping score, I am also reading Feynman’s Lecture Notes on Physics, and will be reading selected chapters of the second chapter of Introduction to Algorithms (Cormen et al) as soon as my copy arrives at the library at work. A new semester will be starting soon, too, with the associated work load, and there’s always Work).

Writing a long entry whining about lack of time for reading books has a certain delicious irony, too. I think I’ll go read my book now.

lisp, how I love thee

Filed under: Uncategorized — Muli Ben-Yehuda @ 1:22 PM

It all started a couple of days ago. It was afternoon, I was working at the office and planning on a quick dinner somewhere before heading back to the office (don’t ask). One of my pleasures when eating alone is reading a good paper or book. I searched the web for interesting papers and happened upon this wiki, with its excellent Operating Systems and Lisp sections. Browsing the Lisp section, I came upon a link to Richard P. Gabriel‘s momentous essay on the Evolution of Lisp. I printed it out and started reading. I read it during dinner. I came back to the office and read it. I went home and continued reading it. While reading, I chased people and places and projects it mentioned on the web. I stayed at home yesterday, and alternately worked and kept reading it. It opened up many trails, and I wandered down them. A whole world I only had a dim inkling of before, the world of lisp, opened before my eyes.

Sometime around noon, I was filled with a strong urge to write some lisp of my own. I started with a small interpreter, but then decided to write something useful instead. As it happens, I’ve been using a hacked up Emacs TODO mode for a few months as a short-term memory replacement. It works very well, but has a few annoying shortcoming: it didn’t keep the “folding” state when exiting and reentering the buffer (the folding state is which items are hidden and which are shown, a-la outline mode), and it didn’t keep my position in the buffer when closing and reopening it. I set out to write some lisp to fix them, and within a few hours, did. It was a pleasure, and now I want more!

You can find the hacked todoo.el on my code page.

September 5, 2004

It’s about fscking time

Filed under: Uncategorized — Muli Ben-Yehuda @ 9:24 AM

Had my first *real* workout this morning in a long time, where *real* is defined as “Muli is about to faint if he doesn’t stop exercising Right Now”. Had a couple of good workouts last week with ladypine as well, but for some reason, I haven’t pushed myself to the brink when we were working out together.

I have too many things to do at the office today, followed by a talk to the Tel Aviv Linux Club on OLS 2004 in the evening, and then going out with friends. Good morning, World!

Next Page »

Blog at WordPress.com.