Tao of the Machine

Programming, Python, my projects, card games, books, music, Zoids, bettas, manga, cool stuff, and whatever comes to mind.

zephyrfalcon.org is mine

To many, this will not be a surprising choice. I had more interesting ones on my list, but could not make a decision. This will do.

(You can't go there yet, it will take a few days before all administrivia are done with.)

Posted by Hans Nowak on 2003-01-10 23:10:19   {link}
Categories: general

Thursday roundup

  1. Hmm... it seems Lee-Z has a new employer. The name and logo look suspiciously like there is a connection with my previous employer, CSS. (The connection may not be immediately obvious, but CSS has a bee in their logo, and they use honeycombs a lot. Compare this to BeeOne.) Maybe Johan will tell me if the CSS developers have started a new company. :-)

    There's a picture with people on the site, but it's too small to make out familiar faces. Hmm...

  2. Crossroads of Twilight arrived today. I read some rumors on the Net, that Perrin will actually get it on with Berelain, and that Gareth and Siuan are killed. Let's find out if that is true. (They also said that Egwene will negotiate with Elaida, then merge her Aes Sedai faction with the White Tower. What a sellout. I hope that isn't true.)

  3. I'm still looking for a suitable domain name. Ideally, I want something that I somehow consider personal (maybe in a twisted and non-obvious kind of way). I have a long list of things I don't want though:

    • something too obviously personal, like "hansnowak.com"
    • something that is just a boring word with a number, like "force9"
    • something that is too long (unless it's deliberately very long :-)
    • something that would make my mother frown ;-)
    • something that has a color in it (colors are nice, but they suggest that the website has that color in it)
    • something too obviously Pythonic (the site will cover more than just Python)
    • something that sounds marketroid (like WidgetDesigns.com)

    Any ideas?

Posted by Hans Nowak on 2003-01-09 16:36:45   {link}
Categories: general

Domain names are so 1999

Just an observation, but are domain names starting to become irrelevant? To get to certain often-used pages, I just type some words in the "URL bar" of my browser (Phoenix), and courtesy of Google's "I'm feeling lucky" I get there.

So I don't have to learn the URL of the Vaults of Parnassus, but just type "vaults of parnassus". Ditto for "effbot online", "python", "wapsi square", "python start page", etc. This may be an important development -- it means you can get to a site by typing some intuitive words, rather than memorizing or bookmarking (possibly long) URLs.

There are drawbacks too, of course. What if Google doesn't take you to the desired page? Or what if it once did, but someone manipulates it and suddenly you end up somewhere else? I guess you have be more specific then. For example, "tao of the machine" used to lead to this weblog, but doesn't anymore. So now I have to type "tao of the machine nowak". No biggie.

All this might make sense if I wasn't looking for a domain name myself... :-)

Posted by Hans Nowak on 2003-01-08 22:06:07   {link}
Categories: general

Exceptions

Until now, Kaa always wrote error messages and exception traceback to the console window. Not everybody can read those, though, so it was time for a change. Kaa 0.8.4 will have two new dialogs, one that displays error messages (could be used for anything really, warnings, even an "About..." message), and one that displays an exception.

sys.excepthook doesn't work with Tkinter. It doesn't catch the exceptions that occur in widget methods (not sure about exceptions that occur anywhere else). After some poking around, I found a way to set Tkinter's "except hook". Not sure how reliable it is, but here goes:

# define the exception hook as a method of your main frame
def excepthook(self, exctype, value, traceback):
    print 'excepthook called'
    # do something nice

def __init__(self, ...):
    # set it
    Tk.report_callback_exception = self.excepthook
  1. Normally __init__ will be defined first, of course...
  2. I made this a method of my main frame, so the except hook can create an exception dialog with that frame as its parent. Defining it as a function would probably work too.
If this works, then I don't need to worry about uncaught exceptions anymore. They will be displayed in a nice window, and helpful users can copy & paste this in a bug report.

Get the development version 0.8.4 here. No guarantees, make a backup of your database before you install it, etc.

Posted by Hans Nowak on 2003-01-07 22:21:48   {link}
Categories: Kaa

A lot of wholesome Python goodness

OK, I probably shouldn't do this, since it's not ready for prime time yet. Not quite. But what the heck. Here's a development release of Charm.

I added a category for Charm, since it's getting quite significant (for my own coding, that is). A project at least as important as Kaa.

What is Charm? It's an editor; some would say an IDE. It's written in Python of course, and like many of my projects, it heavily uses Python's dynamism and introspection. It may not be interesting to you at all, but for me, it's rapidly becoming the #1 Python development environment. That is because it does what *I* want. *You* may have very different ideas about what an editor/IDE should do. So be it then. Charm is not for everyone.

Some of its features are:

  • tabbed editors. (vim is cool, but I was getting really tired of having 20 different windows in my taskbar. Because of the clutter, you cannot see which file belongs to which window.)
  • command line a la vi (although it's rudimentary right now; supports ":" (jump to a line) and "!" (execute command or current file). (No, it is not my goal to emulate all vi commands.) In addition to the tabs, there's a file selector.
  • get quick Python help in a new window (page).
  • view a Python (standard library) module. (May seem insignificant, but how many people actually browse the standard library? This feature should help. It opens modules read-only to prevent accidental overwriting.)
  • execute (the current) Python file in a separate process.
  • wxStyledTextCtrl with folding, whitespace viewer, indentation guides, EOL indicator, cut/copy/paste, undo, syntax highlighting, and many more goodies (not all of which have been integrated yet). (Obviously, it uses wxPython.)
  • integrated Python shell (PyCrust and PyCrust with Filling). Open as many shells as you want, they all get a separate tab. You can also open a shell and import the current module in it, for inspection.
More features are coming up. What it doesn't have, and probably never will, is integration with a debugger. I don't use debuggers. <shrug> As said, Charm may not be for everyone. Download it, play with it, but don't expect too much.

One more warning/tip: You may not like my hideous color scheme, or my settings. Look at options.py to change them.

Posted by Hans Nowak on 2003-01-07 00:22:03   {link}
Categories: Charm

Lines, lines, lines

Just for kicks and giggles, here are some line counts of some of my projects.

Project I am currently working on (a.k.a. "work"): 27,000
Seeker 4 1): 95,000
Kaa 0.8.2: 2,600
Mygale: 3,300
Charm: 1,500
Astrologica: 2,200
Tarantulon: 1,000

1) Skewed, because card data are stored as Python files.

This just goes to show that line count doesn't mean anything. Seeker would be my largest project by far, except that the core is a mere 1500 lines. The rest is card data. (Hmm, maybe Seeker 5 will not do this, but use a certain format... maybe XML, maybe pickled data, maybe something else. Refactoring, anyone?)

The 27,000 lines for "work" are not skewed. My largest Delphi program at my previous employer was around 25,000 lines also, except that 100 lines of Python are worth a *lot* more than 100 lines of Delphi. It's not the largest program on earth, but it's nothing to snort at, either.

Posted by Hans Nowak on 2003-01-06 19:16:20   {link}
Categories: programming

effbot/effnews

The effnews (or is it effbot.exe?) program is dope, man. It's at 0.7 and not done yet, but it works quite well so far. Just drag an URL to the main frame.

I wonder if Fredrik is going to add an option where you can open the post's link in your favorite browser. AmphetaDesk has something like that, and it's very useful if the RSS doesn't include the whole post (like mine, or Mark Pilgrim's).

Posted by Hans Nowak on 2003-01-06 19:00:24   {link}
Categories: Python

Got root?

Kaa 0.8.2 (the current version, not available to the public yet) also includes a new setting: "root", which is basically the URL where your weblog can be found once uploaded. For example, in my case it's http://home.earthlink.net/~wurmy/weblog/. This link wasn't necessary before, but is now used for RSS. After all, people will need to know where to find your weblog, and permalinks with an absolute URL rather than a relative one are more useful too. ;-)

Should Kaa write an alternate RSS file for *all* posts? I wonder. Feel free to leave comments. ^_^ (Not that I expect anybody to, not unless I link to one of Mark Pilgrim's posts... <0.5 wink>)

Posted by Hans Nowak on 2003-01-05 14:03:42   {link}
Categories: Kaa

--
Generated by Firedrop2.