aviary

Uncategorized January 5, 2006. 13:07:53

Since I’ve made this “link dictionary” for myself, I’ve found that digg.com is a much easier way to preserve articles that I find interesting. Also, slashdot articles seem a lot less intriguing after seeing the quality and volume of available stories. The only thing that I fear about digg is how they’re keeping the site updated and feature-rich. For instance, digg’s search absolutely stinks, and does not yet support searching within what you’ve dugg (which would be a requirement for a replacement of this in-house link accumulation blog). Hopefully that’ll change.

Not much has happened since I’ve last posted. I’m currently learning the .NET languages in hopes of being able to use that knowledge for cross-platform Mono/C# programming. Until next time, have a great time!

Daily Readings August 3, 2005. 22:10:20

Catching up from last week after the move…
Oh yea, and these links were generated from a script written in ruby too. =) Finally putting that knowledge to use. I do agree that ruby is really simple to code for. I just need to get used to the syntax differences and method names.

Slashdot

digg

OSNews

Flexbeta

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.

Technology, Articles July 26, 2005. 17:34:53

IBM DeveloperWorks has an article about setting up a wireless ISP on Linux.

Technology, Articles July 26, 2005. 17:34:11

IBM DeveloperWorks has an article that answers the question: “Why FreeBSD?”

Worth a read. Which reminds me - I hope I did post the research I did in May or June about BSD, as I’ve already forgotten which distro fits me best. If I did, this place is definitely useful, because I honestly don’t remember how I went about researching BSD.

Daily Readings July 26, 2005. 17:32:02

Also with readings from yesterday for previous days too.

Slashdot

Flexbeta

Daily Readings July 23, 2005. 10:02:19

Slashdot

Flexbeta

Daily Readings July 22, 2005. 14:35:13

Gave up setting a “periods” standard.

Slashdot

Daily Readings July 21, 2005. 15:18:35

Slashdot

Flexbeta

Daily Readings July 20, 2005. 22:22:43

Slashdot

Neowin