aviary

Computers July 26, 2005. 19:33:18

Finally wanted to get ruby-mode functioning in mmm-mode.

This link was the most helpful (and so are the links on the page): http://blog.invisible.ch/archives/000417.html

Finally, I settled for this:

;;; mmm-mode
(require 'mmm-auto)
(setq mmm-global-mode 'maybe)
(setq mmm-submode-decoration-level 0)
	
;;; ruby-electric (omg this is going to spoil me)
(require 'ruby-electric)
	
(defun ruby-indent ()
  (local-set-key \"\C-m\" 'ruby-reindent-then-newline-and-indent))
	
(add-hook 'ruby-mode-hook
          '(lambda ()
             (ruby-indent)
             (ruby-electric-mode)
             ))
	
;;; eRuby (ruby/html mmm)
(mmm-add-classes
 '((erb-code
    :submode ruby-mode
    :front \"< %[#=]?\"
    :back \"%>”
    )))
	
(add-hook ‘html-mode-hook
          (lambda ()
            (setq mmm-classes ‘(erb-code))
            (mmm-mode-on)))
(add-to-list ‘auto-mode-alist ‘(”\\.rhtml$” . html-mode))

Now, I spent 2 hours trying to figure out how the HECK to get indentation working within the HTML. When I first saw it wasn’t working, I thought it was just me, but someone has noted this before. My last attempt almost ran me out of ideas. Since ruby-mode looks for indentational keywords, I would add “< %" to the list, as it is always precedes in embedded ruby anyway. Unfortunately, that doesn't work, but I think the reason why is because mmm-mode suppresses the initial start string from the encapsulated mode, so ruby-mode never sees it.

Instead, I went straight to the functions that used ruby-indent-beg-re. ruby-beginning-of-indent finds where ruby-mode should start indenting, so I decided to include the "(" in ruby-indent-beg-re. Of course, with all the other stuff that ruby-beginning-of-indent puts in, this fix might not work at all, so I modified the function to use this instead:


- concat "^\\(" ruby-indent-beg-re "\\)\\b"
+ concat "^\\(" ruby-indent-beg-re "\\)\\b\\|\("

Before, then I thought I had it working, I needed a starting paren to get ruby to see where I wanted it to start indenting, so it wouldn't hurt if I added a open paren to when I wanted multi-line indented embedded ruby.

And that, with making the byte-compiled file using byte-compile-file in emacs, fixed it. It's too early to say whether or not I've broken something, but I don't think I have.

Computers, Technology July 17, 2005. 10:07:36

After my dual Athlon MP 2400+’s burnt out, I’ve been living in the laptop world. It definitely is a very different view from the desktop world, which I’ve preferred since the beginning of time. After getting the T43p though, I really miss the fact that I can use a dual screen of equal size on the desktop; not to mention that the density of pixels can be lower, so everything’s generally easier to view.

To actually be able to use that function though, I need a new processor. Of course, I have a few options - if I’m getting a processor, I can get an Athlon XP, an Athlon MP, or an Athlon XP-M; if I’m willing to upgrade the motherboard, I can get one that is pin compatible with Athlon 64, or even one that is Socket 939. For now, though, I think I’ll stick with XP-M. It’s cheaper, going to run a lot less hot, and works with my current motherboard, which can actually sport two XP-Ms at a later time.

For reference, the articles that I read yesterday on this topic are here:

Wikipedia, again, served very helpful.

That’s it for now, though I’m sure there’s a lot more articles that I’ve read about this topic that I never actually jotted down.

Computers, Technology July 15, 2005. 16:49:52

Message Authentication Signature Service works to standardize DomainKeys Identified Mail comes from Yahoo’s DomainKeys and Cisco’s Identified Internet Mail email authentications. I thought DomainKeys was good enough, but I guess I’ll read DKIM’s draft.

Computers, Technology July 11, 2005. 13:56:43

Stumbled upon EncFS in the Freshmeat feeds. encfs is a user-space filesystem encryption program that does things on the fly using the FUSER kernel module. This looks *really* interesting.

Computers, Technology July 10, 2005. 12:39:57

Saw this on the HDAPS mailing list a few days ago. How to make a DOS boot disk without using “the other OS,” because you’re a linux user, but need to upgrade firmware with projects that only run on dos (original post):

Subject: [Hdaps-devel] Updating hard disk firmware (Was: Re: Head parking)

Martin Knoblauch wrote:
> Download is simple, just don’t use the “IBM Download Manager”. Main
> problem is that one needs a bootable floopy drive and “the other OS” to
> create a bootable floppy. It would be great if IBM could provide floppy
> images for use with “dd” for the poor Linux users.

You may be able to use this process to avoid using either a floppy drive
or “the other OS”:

1) Download the appropriate firmware exe from
http://www-306.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-41008
(in my case, this looks like fwhd3313.exe)

2) Find a freedos disk image (I used one that came with biosdisk -
http://linux.dell.com/biosdisk/)

3) Create a disk image for the firmware executable:
cp /usr/share/biosdisk/dosdisk.img /tmp/fwdisk1.img
mount -oloop /tmp/fwtemp.img /mnt/tmp
cp fwhd3313.exe /mnt/tmp
umount /mnt/tmp

4) Create a blank disk image for the extracted contents:
dd if=/dev/zero of=/boot/fwdisk.img bs=1474560 count=1

5) Run qemu to extract files and write the disk image:
qemu -fda /tmp/fwtemp.img -fdb /boot/fwdisk.img
A:\>fwhd3313

exit qemu

6) Set up grub to boot the new disk image (requires memdisk from
syslinux - http://syslinux.zytor.com/):
$EDITOR /boot/grub/grub.conf
title IBM Hard Drive Firmware update
kernel /memdisk
initrd=/fwdisk.img floppy

7) Reboot and select the “IBM Hard Drive Firmware update” option

It allowed me to run the firmware update program, however it didn’t
believe my drive needed updating, so I haven’t even successfully tried
the entire process. Please let me know if it works for you.

DISCLAIMER: I also provide no guarantees. Hopefully your hard disk
won’t fly off the spindle or anything else bad. If it does, blame
someone else.

Frank
- —
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University

Computers July 10, 2005. 12:19:00

After seeing Post-It Notes in action, I decided to give Stickies (MacOS name) a try.

I’m glad that I found these free alternatives to not free 3m’s software version.

I’m current using the second one as the first one seems to lacks development.

Computers, Technology July 10, 2005. 11:29:00

Some projects that I’ve either found before and forgotten about, or never found at all:

  • bootsplash - does exactly what its name suggests
  • supermount-ng - kernel space automounter upon insertion and ejection; would’ve been helpful if we found out about this years ago while trying to set up library linux computers to treat floppies like windows does
Computers, Technology July 8, 2005. 13:15:07

Someone asked Slashdot for suggestions for an Open Source Web-based File Management. An older ask Slashdot covered the same thing. The following looks promising:

  • UMich’s mfile, which is expected to be released soon.
  • Knowledge Tree
  • OpenFile
  • WebDAV is, of course, a logical solution, but I never got it to work *reliably*, and not at all with HTTPS on both Windows and OSX. But this comment thread suggestions:
    • Use a combination of Plone for the server side (it’s based on Zope)
    • Use Novell’s free NetDrive client on Windows to actually mount your WebDAV shares to a drive letter, and be happy that it supports HTTPS. (Though you have to hunt for the download link.)
    • WebDrive for Windows
    • Goliath for MacOS (9 and X), but I’m not sure you can create a mountpoint.
    • Cadaver for a unix command line.
  • FSGuide, a Norton Commander-like web-based file manager.
  • Horde
  • Webmin with Fireanager module, using Usermin module to configure access
  • ByteHoard - PHP based
  • phpFileMAnager

Novell GPL’d iFolder, but is an Mono/.NET application.

Computers June 11, 2005. 01:20:20

After attending college for a year and finding out about the rough computer programs I have to deal with during the year, I decided to purchase an IBM Thinkpad. Last year, I brought 4 computers to school - a linux desktop server with windows installed as a last resort backup, a dual processor desktop to serve as my primary workstation, a tablet for the heck of it (it was also the only recent pc laptop I really had access to), and a sub-notebook pc. My dual processor desktop also had dual video out to drive two 19″ LCDs so I’d have my huge desktop to work from. Unfortunately, that desktop fried out, so I was left with only my tablet and my sub-notebook pc for the rest of the spring term. After having to spend hundreds of hours using Altera Quartus II 4.2 Web Edition on a 900MHz Pentium III-M tablet pc, I decided that I would not stand for this.

I had planned to wait at least a year to decide what I would purchase, and to get a better impression of what kind of conditions I needed to satisfy. I’m glad I made that decision because this year I have a much different list of priorities than I did last year:

  • Power. The more, the better. Last year, I would’ve traded power for something smaller, but when you’re working with circuits, a 10.4″ screen just won’t do.
  • Light. Not equivalent to being small. Something can be huge and still be light (when it is not as heavy as you expect it to be). Infers thin.
  • Okay graphics. Something that will allow me to play games like Crack Attack and hopefully SimCity 4 and The Sims 2: University. Should be able to drive a 19″ LCD (I mean, I have two of them already) at 1280x1024.
  • Long battery life. I need to be able to use this for a whole day, maybe not continuously, but pretty damn close. This is no different from what I wanted last year, of course.

That list generalized into the following component requirements:

  • 14.1″ screen, and hopefully SXGA+ resolution, because XGA (1024x768) on a 14.1″ screen is just pitiful. I do XGA on 10.4″ screens already. Likewise, no 15″ UXGA. They’re simply too big.
  • Pentium M. No Pentium III-M, no Pentium 4-M. Only Pentium M. Intel has made so many crappy interm chipsets that don’t really do SpeedStep well on either windows or linux that I’m pretty sick and tired of having to live with a “steedstepable” computer when it’s not.
  • Centrino would be nice, so I won’t have to carry a darn wireless card.
  • Secondary bay battery. How else would a laptop achieve day-long computing if it doesn’t have support for a secondary bay battery? If it didn’t have a secondary bay battery and had day-long computing capabilities, it would be known all over the world. And I know of no such unit (my 10+ hour sub-notebook doesn’t count. You can’t do anything on it).

The wishlist? PCI-Express. 128MB+ mobile graphics card. ABG integrated wireless. Bluetooth. USB 2.0. Firewire 800. S-video (for movies, DDR, etc). Gigabit Ethernet (half my network at home is on gigabit already). Cheap.

This lead me to one conclusion: An IBM Thinkpad.

Cheap? Heck no. Firewire? Nope. Half my requests churned out an incredibly expensive machine: $2000+. I finally found a model, T43 2687-D3U, that fit. It was cheap too - $1500 stock. I was almost set on buying it. I even attempted to order it online, but the online form failed. With Memorial weekend coming up, it wouldn’t make any sense to rush the order as no one would act upon it until the following Tuesday (it was Friday). Over this weekend, out of sheer luck, I got hold of someone who would let me use their EPP discount. Suddenly, a whole new world of pricing and opportunity presented itself.

I immediately went to look up my dream model, which cost $3600, to see what price it was in EPP. It was an amazing $2500. The closest online seller priced it at $3300, nowhere CLOSE to what I’d be able to get it from. I could conceivably sell my unit a year later to get another one with EPP pricing and still not lose any money.

And that’s how I met the T43p 2668-G2U. I placed the order, paid $250 tax and another $90 for the secondary bay battery (which was, of course, cheaper than any online retailer also), and waited. I was told that it was on at least 10 days’ backorder, and that it had to be built, shipped from Asia to a warehouse, and then reshipped from there. I waited patiently, and anxiously. People on the forums were also being very nervous about their units, one of whom actually ordered my model a whole week before I placed my order. I regarded all his status posts with caution, reasoning that if he ordered his a week before mine, then all the events that happened to him should happen to me a week later.

Scheduled to be shipped on June 14, my thinkpad arrived on June 9, two days after being shipped from HK. Needless to say, I’m very very impressed with the unit, and have never seen any other computer quite like it before. It’s fast, well built, light, thinner than any powerful Dell I’ve ever seen in my life, and is just a joy to work with.

I’ve reformatted it, installed a clean version of windows, installed all the programs I use and need, changed the settings to fit my quirks… I just need to install linux on it and find the properly undervolting settings for the unit.

All I need now is a name for it.