Monday, February 16, 2009

Q&A: How to use the command line to create a new top-level Opera window

When I click the "quick launch" button (or whatever KDE calls them) to open a web browser, I like to have a new top-level window, not a tab of an existing browser window.

Opera, by default, creates a new tab in an existing window.  So, I hunted for a command line option to force it to create a new window.  Here are the command line options:

http://www.opera.com/docs/switches/

Sure enough, there's a -newwindow option to create a new window.  I try it, and what does it do?

It creates a new tab in an existing window.

Thanks, Opera.

Thursday, February 12, 2009

Firefox working again

A reboot seems to have cleared up yesterday's firefox issue. Weird.

I guess I should probably quit out of firefox when a package update is being installed.

Wednesday, February 11, 2009

Firefox broken by update to Kubuntu 8.04

I received an update for firefox today on my main office machine (running Kubuntu 8.04), and firefox is now completely broken.  All it does now is exit immediately with a 0 exit code.

I have temporarily switched to Opera, which seems quite nice.

Tuesday, January 20, 2009

Reset your windows password

I forgot my windows password recently. Fortunately, if you can boot from a CD, the following Linux-based utility will allow you to easily reset passwords:
http://home.eunet.no/pnordahl/ntpasswd/
W00t.

Friday, January 2, 2009

More finds from Pandora

Pandora continues to be an amazing way to discover new music. Two recent finds worth mentioning:

1. The Changes. I'm not quite sure how to classify them. Maybe if you threw Fine Young Cannibals, A-ha, The Smiths, and Wham into a blender, adding a dash of Joe Jackson, you'd end up with something like The Changes. I received their album Today Is Tonight for X-mas, and it's excellent. Plenty of big obvious hooks, with a lot of substance underneath. Sort of like the Killers, but better.

2. Guided By Voices. I received their album Earthquake Glue for X-mas, purely so that I would have a copy of the song The Best of Jill Hives, which would easily be on my list of the best songs ever. I'm actually a bit obsessed by this song at the moment---I think it might be perfect. I'm not quite sure where the rest of the songs on the album fall, but there's certainly some good stuff there.

Static fields and methods are unnecessary

Happy new Year! Right now I'm in Hilton Head, South Carolina on the last day of a family vacation. (Ah, vacation.)

I've been thinking quite a bit lately about how to design a very simple dynamic object-oriented language along the lines of Ruby. Every value should be an instance of an object, etc.

One ugliness that I wanted to avoid was the need for static fields and methods. However, for things like the standard input and output streams, you don't want to have to create new instances of these objects every time they are needed.

Today it occurred to me that all you really need is a language mechanism to define "singleton classes". A singleton class defines a single instance at runtime. Singleton classes are a convenient place to stash things like standard input and output streams.

Example:
module System::IO {
field in;
field out;
field err;

method init() {
self.in = new System::InputStream(:stdin);
self.out = new System::OutputStream(:stdout);
self.err = new System::OutputStream(:stderr);
}
}
Here, the keyword "module" means singleton class.

Now, consider some code where this singleton class (System::IO) is used:
import System::IO;

IO.out.print("Hello, world\n");
The import directive lets the compiler know that in this translation unit, the identifier "IO" will refer to the instance of the singleton class "System::IO". As long as some runtime magic can produce a reference to the instance of a singleton class, all field and method accesses are done through ordinary object references. No static fields or methods needed.

Wednesday, October 22, 2008

Engineers vs. Computer Scientists

I've been thinking lately about how people in other fields, such as engineering, view programming and computing in general. This morning I think I figured it out:
Engineers write programs to solve problems. Computer scientists write programs to create problems.
Neatly summarizes the situation, don't you think?