Tao of the Machine

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

MySQL

I finally had a good reason to install MySQL, so I did that this evening. Not without problems though. After unpacking the 13 Mb zip file, I ran the setup program... which didn't do anything. That is, it started a process, which just sat there without doing anything.

I've had installation problems with some programs before, so I decided to stop some services and kill some processes... anti-virus software first, then BlackIce, etc. Still to no avail. Eventually I killed just about every process that didn't look like it was crucial, and tried again. Then the setup worked. :-)

Unfortunately, I cannot say which service or process was the culprit. Not very helpful, eh? But if you are on Windows 2000, and encounter similar problems installing MySQL, you might want to try the same.

Next up: connecting to a MySQL database with Python...

Posted by Hans Nowak on 2002-12-18 00:37:20   {link}
Categories: programming

Charming

I'm still working on my personal editor, called Charm. It's written in wxPython and already has some interesting features. The current version is 0.1 12/20, where the 0.1 is the "regular" version number (indicating that it's not very mature), and 12/20 is the number of requirements met. I currently have a list of 20 requirements, features that the editor absolutely should have (IMO), and 12 of those are implemented. This is not a static list, by the way; I could come up with new requirements at any time.

One of these requirements is a command line. The component already sits in the top of the screen, ready to accept text. However, I'm not sure yet what this command line is going to do. At first, I envisioned that it could be used to add some vi-isms: dd for deleting a line, d$ for deleting until end of line, maybe :e to edit a file, etc. There's some drawbacks to this idea. If you add vi command X, you might as well add Y and Z, and before you know it, the program's a vi clone, or people expect it to be one (and are disappointed and frustrated if their favorite command isn't in there).

Adding my own command language, then? This seems appealing, and it's relatively easy to map a command line to a function call. For example, load "filename.txt" could easily translate to a function call someobject.load("filename.txt"). The drawbacks are obvious though: why would anyone (including me :) want to learn another command language? The command line was meant as a shortcut, to do something complex quickly without much GUI interference. A command like load could be added for sake of completeness, but doesn't match the criteria above.

So I'm not sure what to do yet. Using a vi subset? Or doing something else? I like the command line to be used for things that cannot easily be done in a GUI, or are quicker. Searching (or replacing) by regular expression, for example. Or vi's '50dd' syntax for deleting 50 lines (preventing you from pressing Ctrl-Y 50 times).

One thing I definitely want is a "help" function like the Python interactive interpreter has. If you type "help os.startfile" or something like that in the command line, then the help() function should be invoked, and the results should be pasted in a new tab.

What also (c|sh|w)ould be useful is inspecting Python standard library modules, to see how something is implemented. Maybe I'll add an option that opens them, read-only to prevent accidents.

Charm cannot be downloaded anywhere yet. Maybe later, when I have my New Site... whenever that is...

Posted by Hans Nowak on 2002-12-15 12:37:40   {link}
Categories: Python

An interview with Robert Jordan

At wotmania.

That's Robert Jordan, author of the Wheel of Time series, among other things. Some quotes:

"In the end, for most of us, the medals boiled down to managing not to die. If you're alive when the higher-ups think you should be dead, it discombobulates their brains, so they hang a bit of something on you to balance things in their own heads."

"[...] the only thing to do when you sell a book to Hollywood is to take the money, walk away very fast before they can take it back, and never, ever go to see the movie."

By the way, this site has some CoT spoilers as well...

Update. There's also an older interview, or parts of it, in the FAQ.

"Fewer than 100 men in the nations that are spoken of in the book. It is a semi-formal thing that is normally one is chosen to become a Blademaster by other Blademasters. There's no real organization. IF you want to become a Blademaster, you have to find other Blademasters who are willing to acknowledge you as an equal."

Hmm. Like hackers...

Posted by Hans Nowak on 2002-12-14 12:56:30   {link}
Categories: books

--
Generated by Firedrop2.