June 2008 Archives

I have taken the last two days off as a break from writing Java and JavaScript, and finally took a proper look at Squeak. It is impressive, and similar to working in Emacs in some ways (though much cooler).

The greatest feature of Squeak, and Emacs (and Lisps), is that the documentation for the language and environment is always around and accessible. If I don't know how a function works in Emacs or which methods an object has in Squeak, I can look it up while working in them. This has saved me from asking many stupid questions on the #emacs and #squeak IRC channels, heh.

Anyway, the break was needed because JavaScript reminded me of Scheme, and I had forgotten how horrible coding in Java can be (e.g. RedundantType x = new RedundantType...). Squeak's user interfaces may inspire Sandals in some ways, we shall see.

Check out the Squeak Language Reference

Lying on the beach,
Sun cooking my bacon,
Putting on sandals, sifting sand,
I'm building a beach house today.

Oh, the ocean glows.
Can you see it now?
Guitars, surf boards, dancing people!
Party time on Java island!

Here's a function for Emacs that counts the number of words in a buffer by using a regular expression:

(defun wc ()
  (interactive)
  (message "Word count: %s" (how-many "\\w+" (point-min) (point-max))))

The regular expression matches against one or more word characters. It doesn't move the current point of the buffer so you don't have to keep re-positioning the cursor every time you run this function.

The reason I'm posting this is because I was searching for something like this and everyone keeps suggesting to use the "wc" shell command while in Linux, but I'm in Windows! How can I use it? Another thing I found is that people write up functions that loop through words and count them. I'm guilty of doing that, but using the above function is much much easier.

Emacs has most everything that you can think of. The problem is that it's all hidden away somewhere and you have to take the time to dig around.

Update: The how-many function is defined in replace.el. To find out more about it, press C-h f how-many RET.

There was a 0-day exploit of WordPress mentioned on reddit the other day and I was freaking out a bit and asked for recommendations for a new blog engine. MoveableType was mentioned and so I took a look and I like what I see so far. The static publishing is pretty neat and some of the plugins look good too.

So now all I have to do is move my old WordPress blog posts from the old MySQL database to the new database. Hopefully there's a script somewhere on the Internet for doing that so I don't have to do any work.

In other news, I have started work on the documentation for EventCal and hope to work on the code-base very soon. Also, I am currently discussing the resurrection of the Pizza Business game. Ideas are being tossed out and I'm looking at which programming languages we can use for the project.

About this Archive

This page is an archive of entries from June 2008 listed from newest to oldest.

March 2008 is the previous archive.

July 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Jobs

Powered by Movable Type 4.1