Monthly Archives: March 2011

Why No Comments?

There are two primary reasons that comments are not enabled on this site.

  1. These are just notes I write to myself. They don’t get much attention other than when I want to remind myself of something. It wouldn’t be fair to solicit comments and then just ignore them.
  2. Comment spam. Related to the above, I just don’t check in often enough and would not effectively moderate and eliminate spam.

This does not mean that the site will never be opened up to comments. There are times when I would really like to get other opinions. It’s just a matter of available attention at the moment.

Tidying up the Ubuntu Grub2 Boot Menu

My wife and I share a computer that dual boots Ubuntu Linux and Windows. Too, when we upgrade computers, I tend to take the hard drive(s) from the old computer to the new computer. The boot menus created by the grub2 program can be a bit confusing for the uninitiated. As kernel updates are added, the list gets longer. The old Windows drive appears in the list, as well as the recovery partitions that manufacturers often put on Windows drives. In the normal course of things the Windows menu items can get pushed out of view at the bottom of the screen.

“Where’s the Window menu item!?” “Which of all these Windows choices is the right one?”

Not a happy situation.

In the interests of domestic harmony (and to assure that a Windows recovery partition is not booted inadvertently), a little clean up is required.

Continue reading

Parsing Signed Numbers in ANTLR

One of the more interesting things I’ve been working on lately is a scripting language to drive a simulation system. It describes nominal values of key parameters, how to vary them, do an analysis, gather the results and present those results. ANTLR and ANTLRWorks are usually great tools to create the lexer and parser of such a scripting language. That’s how I started out this time too. Since I thought it would be trivial, I left parsing signed numbers to nearly the end of the project. It was a bit of a surprise how difficult this was.

Continue reading