Older blog entries for Uruk (starting at number 11)

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.

Rewrote the search function GTKeyboard yesterday. I actually used to be using the version out of the GTK+ book written by Harlow, but it was pretty bad. Didn't work like it should, caused segfaults, all kinds of other nastiness. I rewrote it, and it works great, with the slight exception that I haven't built in a radio button to specify case-[in]sensitive searching yet.

Other than that, things are going pretty good. The code seems reasonably stable, I haven't heard any bug reports recently. The code is getting cleaner and more organized, and hopefully we'll have something reasonably nice very soon. :)

Learning perl-DBI programming right now too. This stuff is a LOT of fun. I didn't know SQL before yesterday. I don't know if I'm getting the wrong idea, but I feel like I learned half of it in one day - it seems like a really small language that's pretty obvious. I mean, as programming languages go, perl can be pretty englishy when it wants to, but it's nothing up against SQL which is very straight forward. The actual SQL stuff inside the perl is absurdly easy with DBI. Maybe I'll start my own privacy-invading big brother database now. What was your SSN? :)

Talked about push-down automata and converting them into empty-stack accepting push-down automata today with a prof. There seems to be a lot in that area that isn't well defined. Usually, when something has been rigorously explored, there are hundreds of "lesser" theorems describing odd properties of the structure at hand - but that doesn't seem to be the case with the push-down automata.

GTKeyboard 1.0 is now in the works - I've ironed out a few bugs that have been sent in to me from users, and I'm working on cleaning up the code, testing it as much as I can, getting the word out for other people to test it hard and send me the results, etc.

I have no idea when 1.0 is going to be finished, I'm hoping in about a month or so. All test results are appreciated as well as any constructive criticism about the GUI layout and so on.

Other than that, school, work, school, school, work, etc.

More GTKeyboard code hacked today - things are looking good so far. I fixed more long-standing annoying cosmetic bugs, and fixed the odd segfault that was reported recently by a user.

I probably need to go through a few more rounds of hunting and fixing before I release 0.99 which I hope will be out before the end of the week. I'm on spring break from school this week, which means the code is calling me...that is, if I wasn't going to be working twice as much at work to make up for that time. :(

Things are moving right along though.

Fixed several *really* annoying cosmetic bugs in GTKeyboard. I just added the ability to, via the menu system or via the configuration file, show/hide arbitrary elements within the keyboard. (F-keys, cursor keys, number pad, main keyboard). I was having a lot of small cosmetic problems with things such as:

Hide the number pad, and change the layout file to a german layout. The number pad keys pop up after the new keyboard has been generated, even though it should still be off.

I also made some fixes to the methods to show everything with respect to the subcategorization of widgets on the keyboard.

Somebody at GNU emailed me today asking me to verify a lot of information about GTKeyboard. Seems they're starting a database of GNU software. Sometimes their software page seems oftly full, so I guess that's a good thing to start subcategorizing and so on. Organization, and all that good stuff.

So it's looking like a hearty round of bug-hunting and responding to feedback, and then version 0.99. Or maybe there's something I'm forgetting...

Well, yesterday I came across a very cool GPL'd library called HRE - it does handwriting recogition with X11/UNIX. It was originally written for Solaris, and the code really showed that. Old K&R style everything, and Makefiles in a strange format that I was suprised GNU make knew how to interpret.

It took me about 2 hours, but I ported it to linux, and it will compile and run now under linux. I also ported a small Xt program that came with it to demonstrate the library. Some of the stuff in the Xt app doesn't work right yet, but the first pass for porting was just "get it to compile, dammit".

I'm going to be checking out the API (there's a ps doc that came with it) to see if there's anything there that might want to make it's way into another application of mine.

Very, very cool library. I'm looking forward to screwing with it. :)

Useless fact of the day: Yesterday, while I was supposed to be studying for an exam, I was actually playing around with a mathematics proof - I went by the prof's office this morning and verified my proofs, did that whole "peer review" thing. Did you know, that for an arbitrary closed polygon with n sides, (n >= 3) the number of diagonals that it is possible to draw is [ (n*n) - 3n ] / 2 ??? Not only that, but I can prove it 3 different ways. :) How the hell do you tell your professor that you're not going to do well on the exam because you wasted your time working on a math proof for fun? You don't. At least not with my professors.

Finshed rewriting most of the file handling code in GTKeyboard - I really, really hate writing string manipulation stuff in C. It's like pulling teeth from a rabid cheetah. I don't think it would be so bad if I hadn't learned perl, but since I have, and I know what it COULD be like, it's hard to get used to slogging through this stuff in C. And I'd love to use an external library to do the dirty work for me, but I don't want to tie the program down to any more external dependancies. Oh well.

It's coming along well though. I have spoken to several on again, off again contributors, and we've decided to release 0.99 once we're done stabilizing a few features. After that, it's bug fixing, code cleanups, and a 1.0 release.

After swapping some emails with a few people who have been contributing patches on GTKeyboard, I've decided that a lot of the code for handing resource files needs to get the axe. I've had a good submission using a different method of file handling, which I'm planning on using for the next release. I'm looking towards having one 0.99 release, hopefully within a few weeks, and then moving onto 1.0 after a few things happen

- Code cleanups. There's a lot of debugging code strewn about from older versions that needs to go.

- UI changes - pieces o the GUI need to change as they are not expandable and are, uh, well, a little bit ugly.

- Bug hunting and fixing. I'm hoping to have some intermediate features finished by 0.99 and ready for final bug testing by 1.0

2 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!