Friday, February 18, 2005

Some crap from college

Ok. Here's something completely unrelated to things I usually write here :)

For one course at my college I was required to write so odd-ass code, and I thought someone would be interested to take a look.
The first thingie is a primitive digital signaturing tool for executable files. It works by scanning the compiled code for a free segment and writes a RSA signed key part that can be verified later, if needed.
The code is on Python script that patches the original program for watermarking, and creates a new script that can be used to verify the watermark. It was an interesting experiment with public-key cryptography and RSA, and was rather entertaining.
Anyway, here's the code. [link]

The second thing is an alternative for GNU's Gettext program. It scans the source code of C/C++ program and extracts all the strings, and prepares the source code for automatic translation. There were 3 versions of this program.
First was a fun one, coded in Python, where I used Finite State Machine method. It worked flawlessly but was immensly slow because I used char-by-char processing of the text, which was totally un-efficient.
Here's the [code].
Here's the FSM's [code].
Here's the diagram of the FSM: [picture].

Second was a rewrite, without any FSM, using regular expression. This one was extremly fast, but later found out that Python's regex engine is very weak, and crashes horribly on deep recursions in the expression. That was very discouraging, since I became a real Python fanatic and that was disappointing.
Here's the [code].

The last version was rewritten in Perl with basicly the same code - but it worked twise as fast and didn't crash at all! Odd stuff...
Here's the [code] :)

All this was probably a total waste of your reading time... But it's my blog so... Stuff it! ;)

Tuesday, February 08, 2005

New centralized logging

Ok, this was due for quite a while now... Anyhow, as you can see on the screenshot, we now have a foldable panel with all log messages from the program. The debug message level can be controled from the settings dialog.

Oh, and btw, this concludes my list of TODOs! And this means one thing - I'm wrapping things up. Time to get this baby polished and shrink-wrapped.

Monday, February 07, 2005

PyQLogger update dose

New UI for main screen

Here button text is not shown, and you can see the status bar.

Now apparently, some people like text under buttons, so now it's possible to enable it as well:

Here you can see the text under the buttons, the status bar is hidden, together with the panel with the posts (it's collapsed to left side)

I'm still not quite sure I like this new design, but i'm getting used to it. In other news, three new plug-ins were created:

  1. Code paste plug-in. Using code2html program, you can now paste colored source code
  2. reST plug-in. Since it's a python program, and there are lots of Python freaks who like blogging in reStructuredText format, I've whipped a quick plug-in that works with it as-well.
  3. Textile tags plug-in. As a test for 'Menu plug-in' type, i've made this puppy, which helps me write Textile text by providing almost the same functions as the main toolbar.

Wednesday, February 02, 2005

Choose Python

Ok. Being a Python fan. And being a Trainspotting fan, when I came across this I had to post a link. Awesome:


Random bla bla.

Hmm... This mo rning I went to my GMail box to check for new mail, and was surprised to find there 50 new invites! WTF? Well, anyhow, if anyone needs one - drop me a note here. Although, these days, everyone who's at least a bit geeky has account there...

In the totally unrelated news:
I am nerdier than 94% of all people. Are you nerdier? Click here to find out!
Dunno how the heck did that happen :-S

And now some stuff from the PyQLogger front:

  • I'm writing this post with 2.0 version, having it spell-checked on-line , with all the plug-ins working just great.
  • I've made a new plug-in that's called Templates. It allows you to store a set of pre-defined text blocks with keywords and then just press Ctrl-J while editing, select the needed template from list and it pastes the code! Very handy.
  • I've kicked old post editor out of the window, now the only possible editor is Scintilla. I think it's the right way (and since it's ALWAYS installed with PyQt, availability is not an issue here)
  • The progress is really good these days, and I'm hoping to get closer to some sort of a beta next week or so. No promises though.