Older blog entries for Uruk (starting at number 18)

I've been working quite a bit on Perl/Tk stuff recently on an in-house project for my company. Also I've been working with python and Tkinter. Python is quite a joy to program in as it's very clean and sleek, but sometimes I find myself wishing for the messy chaotic beauty of perl in the language too. Well, they are separate languages.

I've been developing a medium sized application recently through an outside consultancy to translate some really old crusty HTML to XML. Please don't ask for this code yet, since by XML's very nature, in order to actually convert this using a program, the code contains a lot of assumptions about the format of the source HTML. It has been an interesting project if a bit infuriating at times. For people looking at coding something similar, do not pass go, do not collect $200, read all the documentation for XML::Parser and HTML::TokParser before you even start.

gtkeyboard has not had much work on it recently other than a few small patches contributed by users recently, and a few bugfixes put in place for a really braindamaged segfault that was happening on Debian GNU/Linux machines (due to odd placement of the dictionary file on debian)

As for the perl/tk stuff and the python/tkinter stuff, things should be appearing on my page relating to them and downloadable code sometime between now and when I die. :) I'm working 1 full time job, 1 part time job, and I have 2 classes this summer, so I've got my plate a bit full.

I've been hacking python for the last few days. About a week ago, I was in the bookstore browsing the programming section, and I found a book on python. I'd been meaning to pick it up, since it's getting more and more use, and because I really enjoy learning new languages.

I bought the book, went home, and hacked till about 4AM or so. What a cool language. It's almost as weird as perl, just weird in its own way. (enforcing whitespace, a bit of strange syntax here and there, and making you refer to your class data as if it were static class data)

But python is very easy to write, and very readable. Quite a nice language. I started in on Tkinter last night, and I'm working on writing a really good file selection widget. I'm sure a dozen have been written, but it's fun to just try to pull it off myself, since in order to write it, you have to know how to read directories, update 5-10 different widgets, signals, the whole deal. It mostly works. Mostly

I may be going overseas for about a week next month to look into business opportunities in Germany. I would LOVE to live in Germany. Since I last lived there, I've wanted to go back.

So I haven't gotten much done in terms of my core coding (other than the gtkeyboard-1.1 release last week some time) - I've been too busy playing with new things like perl/XML parsing, python, LISP, and working on an article for TPJ which I'm revising heavily.

Sheesh. I haven't written here very often in a while. Oh well. A lot of stuff has been going on, etc.

We're bugfixing for gtkeyboard-1.1, and it's looking pretty good so far. Fixed some evil installation problems, polishing word completion, and a few other nice things.

I taught myself python over the weekend. It's criminally easy. I do need to get around to actually programming more with it since I don't want to say I know the language till I've written a few thousand lines of code in it.

I guess I find the indentation and whitespace issues annoying, but tha'ts probably normal for python beginners or so I'm told. Maybe I'm just used to perl where you can be as pathologically weird as you want to be. At any rate, the language looks interesting, and I'd like to get busy with a real OO language that isn't as klunky as java is. I am really starting to dislike java the more I work with it.


I've been busy recently - just got a chance to hack some new things into GTKeyboard last night.

Final exams are this week, and stress abounds. Grades are fine, I just hate having to know 4 months worth of material for one 3 hour sitting. Seems pointless considering that since there are so many exams, the moment you finish one, all those precious useless facts are gone instantaneously. Anyway.


I'm working on finishing the word completion feature. After that's done, I'm going to write a few custom caches for different programming and writing tasks and distribute them as part of the package. Things like maybe a perl programming cache, where when you type 'p', you are listed with the following choices:

print pack pop push printf

etc. Instead of being given options of non-programming related words. If you're programming in perl, and you press 'p', you'll probably more often be referring to 'pop' or 'push' than, say, 'parakeet' or 'piqued'.

Caches for other tasks other than programming are really hard - but of course that's probably why readline stuck to command completion rather than trying to take on english.

I haven't built in the right features to allow the user to save whatever it was they were typing in a new cache, but I'm working on that....it shouldn't be more than about 2 hours of hacking, it's just finding those 2 hours that is the problem.

Sigh...exam at 1:00PM today, and then again at 7:00PM - it's 11:14AM.....(EST)

Haven't posted here in a very long time although I have been reading the articles. Frankly, the articles have been a bit dull for the past few weeks, because Advogato seems determined to talk about nothing but itself. But that's neither here nor there...

I finally finished version 1.0 of GTKeyboard which was distributed about a week ago. I've already started on revisions for 1.1. I haven't heard of any bugs in the program from the users, but there may be a couple. There are a few people who feel that it was a bad choice to make implicit redirecting the default on gtkeyboard, but after having gotten lots of emails saying that most people used it to type into other things, it seems more reasonable to make that the default. Not only that, but it is configurable via ~/.gtkeyboardrc so it's kinda hard to feel bad for those people. :)

The revisions in the upcoming 1.1 are going to be *very* cool. I got a piece of code from a guy calling himself Dr. Tom a while back that does word completion ala GNU readline. The neat part is that it's for whole words, not for commands like at the shell, and it can work off of a cache if we choose, meaning that words that the user has typed frequently in the past will be listed as options ahead of other words that are not as frequently used. I've been having a lot of fun playing around with that source code recently...

This week is going to be final exams week at school, so everything is nuts and I'm trying to find spare time to code. One of my computing theory classes has just spent some time on turing machines. As it turns out, it's *extremely* easy to program a turing machine, (I used perl, but only because I didn't want to spend much time doing the file parsing) and will let you get a better grasp of what's going on in them. I guess I should eventually post that source to my site, which I will do if I remember.

Damn headhunters! Sorry to go off on a tangent, but I'm sick of losers emailing me asking me if I want to apply for a lucrative position manning a radar tower in Nome, Alaska. Well, maybe they're not asking me to do that, but people actually drop me emails thinking that I'm going to be interested in taking a job as a TRAINEE doing VISUAL BASIC for about HALF of what I'm currently making. It's like they're trying to present me with my *nightmare* job, just to see if I'll accept it if it's put in front of me enough times.

Rant, rant, rant, rant, rant.

Life is a haze of beer, code, exams, work, and MP3s.

School and work, school, school, school, and work. The semester is going to be over in about 3 weeks. It can't happen soon enough.

Sometimes it really *feels* like I'm burning out, but even when it feels that way I can usually get over it with some sleep or cold pizza.

I'm going to go fix some bugs in some crufty piece of perl I wrote months ago - you know, if somebody wants to use something repetitively, they should let you know when they ask you to write it so you don't do it as quick and dirty as you usually to throwaway data munging perl scripts. Oh well.

Hmm...read the newest meta article about advogato and everything that's surrounding it. Quite interesting. It seems to me that at times, people really just want to predict extreme consequences for relatively simple things happening. It seems like everybody wants to be a doomsayer or an unshakeable optimist.

Kinda funny how that article degenerated into name calling, arguments about sexism, and started to border on slurs about other people's sexual preference/identity. IMHO all of that stuff has nothing to do with free software and is therefore completely uninteresting to me when I come to advogato, but if that's what people want to talk about, they'll post regardless of what you think about it.

Did anybody but me see the article that said something along the lines of "This was our last chance for a site with rational discourse, and it has now failed"? -- that's just a little too weird for me, especially since it's in response to just one "bad" thread.

With regards to advogato, I think it works decently, I don't feel offended or oppressed by any of the ratings, and despite the limitless amounts of vitriol, I don't think that advogato is going down the shitter just because some people think that "Journeyman" is a sexist term. Chill out folks - use advogato for what it was meant to be - a place for the discussion of free software.

Other than that, in free software news, I've been learning Perl/Tk, which is CRIMINALLY easy. :) It's quite nice - last night in about 1 1/2 hours I was able to write an image viewing program which supports .xpm, .xbm, .gif, and .jpg (through Tk::JPEG). Really, it should be harder. :) I've always enjoyed perl, but I'm starting to respect it more and more since I've picked up some experience with DBI and Tk. It also seems to be roughly 20x faster than java on my machine too. :)

GTKeyboard 1.0 is coming along - actually the coding pace has slackened a bit as I've been involved with several other things simultaneously, but it will be out as soon as I'm done putting it through the wringer. As far as I can tell, the codebase that we've got now, (roughly 1.0pre6) should be released as 1.0, but I need to test it a bit more thoroughly before I'm convinced that it can roll without further modification.


GTK+ has been pissing me off recently - I've been finding and dealing with a lot of memory leaks in my program that were caused by the lack of a call to g_free() for some things that I didn't know needed to be free'd(). I emailed gtk-list about it, and apparently, moving forward, all strings being returned will be g_strdup()'d.

I've had to hunt through the GTK+ source in order to find out which calls return values that have to be freed by the caller, and which calls return values that are just pointers to the guts of a widget. (Which would be bad to free). I don't mind poking through the source on that, (I've learned a lot about the guts of GTK+ that way) but I wish that kind of stuff was in the RDP.

I guess it's really not a small thing when one of your calls is in a loop and leaks a few hundred bytes of memory each time through. Oops. And after all the hunting, I'll probably still miss something...

I've been using memprof (which I think Owen wrote) to do this stuff. It's not bad.

Back to debugging...

Whew. Fixing a whole lot of bugs recently. Some of the font and color issues in the program were really nasty, with a new color clobbering your selected font, and a selected font clobbering your color, etc. It wasn't all that pretty. But it's much better now.

Unfortunately, I had to change a few of the variable names, (only some smaller obscure ones) that conflicted with other variable names. I was having some strange problems with the hashing algorithms in glib, and rather than patch glib, it's easier to just slightly change the variable names on things that aren't used that often anyway.

I fixed two segfaults that were reported. They only happened in cases which I would have never thought to test. I love it when people report that stuff. I mean, I can test the application, but there's some things that I would never use the application for, and other people help me catch that type of stuff.

After all, if the number of possible interactions with a GUI program isn't infinite, it's damn close. :)

Just hanging out with my friend Budweiser tonight, tightening up some code. Version 1.0 should be out Real Soon Now. (GTKeyboard)

Other than that, I've been hacking wayyyyy too much java for work recently. That language is so klunky, I swear. Sometimes it seems as if it discourages programming styles that are efficient with respect to the CPU. Other times, the OO abstraction is quite nice. Example: It takes less than 5 minutes to learn how sockets work in java if you know java and have a background in sockets in another language. On the other hand, it takes for-fucking-ever to compile and run things. Oh well. And I'm going to be programming swing stuff at work soon. I think that if bosses realized that for the most part, people just stare at the screen stupidly when a compile is running, that they'd revolt against the usage of the java language. :)

Tonight I'm going to be heading along with a guy from my LUG down to the Research Triangle LUG (TRILUG) for their meeting. That should be fun. Despite the fact that I have two exams tomorrow, I think it'll be good to get outside the house, and in fact outside of our city. (Richmond, VA)

Lots of things are coming due very soon. Stress is annoying. You know the deal - none of it is really all that hard, but there's just a lot of it.

9 older 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!