15 Oct 2002 lmjohns3   » (Journeyer)

Hacking

Last night I got the hacking urge after working a little on GStreamer. I knew I had to wake up early today to head to work—our carpool group has decided to try to beat rush hour so we have to leave at 7—but just two hours of hacking was not enough : I couldn’t get to sleep. I just added measures and beats and a clock to the playondemand filter, which means I can start writing the sequencer library on top of it now. Drumbox is starting to appear possible. Yay !

So, at any rate, I finally managed to get to sleep, but I had to promise myself that I would get up early and hack before going to work. Sick, you say ? No ! Demented ! The early morning programming helped fuel the need for a green tea at home, and then the usual morning coffee at work ... now I am pretty wired but must wait til this evening to start building the sequencer. Looks like those plans to go running are getting thwarted.

Code generation

Work is fine, I’m getting to the middle stages of writing a code generator for CORBA 3.0. It’s difficult at this point because there is a lot of obscure debugging to do, and Python is probably not the easiest language to debug (can anybody say “eval” ?).

I am also starting to work on a code generator for GStreamer plugins and applications. It is remarkably similar in concept to this CORBA generator task, but the GStreamer app is more fun (because it’s not work, of course). And many thanks to the libglade-2 and Gnome 2 Python bindings, application building and execution is as simple as writing a script and editing an XML file (using Glade for the wysiwyg warm fuzzies along the way). As long as things like low latency and small execution time aren’t high on the priority list.

Red Hat 8

I finally saw a Red Hat 8 desktop last night. It looks really good. Kind of remarkable how the Gnome 2 desktop (or at least the Red Hat 8 version) is kind of splitting the difference between MacOS and Windows. It’s also nice to see the usability of Linux reaching out a little bit more toward the average computer user (though I think it’ll be a while yet before it’s on point, if there is really a point to reach). Over the past few months I have truly started enjoying using Linux myself : the Gnome 2 apps have made huge strides in usability and functionality, the looks are getting better all the time, and the same old Linux power is still there (I am just starting to learn shell scripting, for example.). Now, though, I am longing for all my programs to come out in Gnome 2 debian packages : evolution, gnumeric, gnucash, galeon, the gimp, emacs (but only for the font antialiasing !).

Emacs is really useful

Update ! I just discovered the isearch-regexp function in emacs. C-M-s. Your life as a programmer will never be the same. Now that I’m on the topic, I think I will list some (default on debian) emacs keybindings that I find helpful. “Point” is the cursor, “mark” is set by pressing C-<space>.

  • M-/ — completes the text preceding point by looking for matching strings in all open buffers. Dealing with long function and variable names is really easy with this.
  • C-/ — undo the last command.
  • M-\ — delete all horizontal whitespace surrounding point.
  • M-x tags-search – look through all files in a source tree for a given function or variable name. This will prompt you for a tree to use if you are not already visiting a TAGS file. Also see the ctags(1) function.
  • C-x r o — open a rectangle of whitespace with corners at point and mark. Useful in combination with the other rectangle functions for mass function/variable name prefixing or deprefixing, LaTeX table manipulation, etc.
  • C-x r k — kill the rectangle with corners at point and mark.
  • C-x r t — fill each line in the rectangle with corners at point and mark. This prompts you for the text to fill in. Very useful for things like mass prefixing rows of text.
  • M-l, M-c, M-u — downcase, capitalize, and upcase the word following point (the end of a word depends on the major mode). I never thought I would use these functions until I learned the shortcut keys. Now I can’t live without them ; Notepad and Word are evil demons because they do other things with these keys.
  • M-q — fill the current paragraph, wrapping long lines at the boundary set by C-u <numbers> C-x f (set-fill-prefix). This is really useful with filladapt mode.
  • C-f (C-b), M-f (M-b), C-M-f (C-M-b) — move point one character, word, or sentence forward (or back).
  • C-t, M-t, C-M-t — transpose the characters, words, or sentences surrounding point.
  • C-d (<backspace>), M-d (M-<backspace>), C-M-d (C-M-<backspace>) — delete the character, word, or sentence after (or before) point.

Happy typing !

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!