Tao of the Machine

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

Old and new

In the category non-news: Got my new keyboard today. Good points for Gateway, which delivered in 2 days. Bad points for Belkin, the keyboard manufacturer. Rule #1 of keyboard design: Never move often-used keys. In this case, the whole Insert/Delete/Home/End/PageUp/PageDown block has been moved down, so that Insert is not at the same height anymore as the Backspace key, for example. (See the link to the product page, it has a picture.) This seems a minor point, but I keep on pressing Insert when I want Delete, and Home when I want End. :) Also, the keys are in the way when pressing Enter or Up, since the empty space between cursor and aforementioned block has gone.

Ah well. I guess that I will get used to it... :) Of course, that will cripple my usage of any other keyboard I might use...

Something else: Today it's a year ago that I left for the US. Strange. It seems like yesterday. I'm still not fully adapted to Florida, and I doubt I ever will be. :-) But, the move hasn't been quite as difficult as I feared it would be.

Posted by Hans Nowak on 2002-11-01 13:09:44   {link}
Categories: general

Another loony idea

What I want next is a program to manage links. Having all kinds of links in different browsers' bookmark files is not ideal, to say the least. Drawbacks include:
  • No access to a bookmark because you happen to be in the wrong browser. (I currently have IE5, Netscape 4.7, Mozilla, Opera and Phoenix installed. They all have bookmarks.)
  • I tend to lose bookmarks when moving to a different machine, uninstall a browser, reinstalling an OS, etc.
  • Bookmarks are unorganized. They're little more than a long list of titles of pages. Sure, you can organize them, but in some browsers this isn't so easy.
How can this be solved? I often think that it would be cool to have my whole link collection on the Net. It can be reached from anywhere, you can point your browser's start page to it, it is not affected by computer crashes and such, etc.

To make this work, we need a program that:

  • manages and organizes the links in categories
  • exports them to HTML at will
  • uploads them
Almost sounds like a blogging tool. :-/ Of course, being the twisted mind that I am, I think: why stop there? Why just store links in categories? Any scrap of information can be stored this way. And here we are back at an old idea of mine, a system I called Xi, and that stores all kinds of info... links, diary entries, scraps of code, mails, notes, ideas, maybe even more (pictures?). There actually was an implementation of Xi, last year, written in Delphi and Python, but I lost it in the Great Crash of December. That'll teach me to make backups...

I could even take this another step further and mix it with a content management system. It stores stuff, and is capable of publishing it as well. Hmm. This needs more thought...

Posted by Hans Nowak on 2002-10-30 22:03:28   {link}
Categories: ideas, programming

The return of the spider

Some random hacking this evening... today's victim was Tarantulon, a webcrawler. It makes offline copies of websites. Back in the day (1999 I think) I didn't have unlimited Internet access, so it was interesting to be able to download whole sites and view them offline later. I was frustrated with the (lack of) quality of existing programs that claimed to do this, so I wrote my own. The spider was better than anything else I found on the Net, although these days there may be competent tools.

Looking at the old code, there's a lot that I would do differently now. Still, thanks to Python, I can still read this code. :-) And work on it with ease, like I wrote the program last week. There is some stuff that I need to download, maybe that is a good reason to refactor the spider. There's also, as always, more options that can be added.

I already changed some stuff. The code that reads the so-called rescue file was slow, so I replaced it with a better algorithm. Much faster now. :) I was also getting tired of getting socket errors and timeouts, so I added a simple mechanism to do N trials per URL before giving up.

This code isn't ready for prime time yet (hey, are any of my programs?), but for whoever wants it, the current version can be found here. (This link will not stay forever.) The usual disclaimers apply; use at your own risk, code isn't perfect, etc. And there are no docs right now. Maybe someday I write the Great American Content Management Program, and use it to write docs for all my stuff. But until then... :-)

Posted by Hans Nowak on 2002-10-30 21:46:20   {link}
Categories: Python

I forgot the Kaa logo...


(courtesy of Christian Tismer)

Posted by Hans Nowak on 2002-10-28 18:34:54   {link}
Categories: Kaa

0.8 is here

An announcement in the newsgroup will follow soon. Download 0.8 here.

For those who have been following the weblog: there isn't really anything new since 0.7.7, but I souped up the documentation a little, etc. See the updated intro. Maybe soon I will be able to manage my whole site with Kaa. :-)

Posted by Hans Nowak on 2002-10-27 10:15:06   {link}
Categories: Kaa

Content management made easy?

Here's an idea. What if we had:
  1. an easy way to "tag" an entry, i.e. associate it with a certain word, e.g. "faq", "main", "index", "ideas-page", etc
  2. an easy way to display these tags in a list of entries, and/sort on them ("only show me the entries with tag X")
  3. an easy way to generate pages with the given entries
We already have #3, basically. It may not be easy enough yet, but it is already possible to select entries that match certain criteria. Entries with tag X would only be another criterion.

#1 would not be difficult, either. We already use categories and the visible key in the entry.misc dictionary. Adding a tag, or several, would be trivial.

#2 isn't there yet. We would need a multi-column widget, or a table widget, or something. Sorting isn't there yet either, but that isn't so difficult.

So what can we do with the above? Easy content management. Create a new "blog" (IOW, a collection of entries), add entries, and "tag" them to associate them with a certain page. Some entries will make up my FAQ. Some may make up my main page. Some are documentation. Putting an order in is trivial by adding "sub-tags", like a number. (For example, if there are 20 entries with the "faq" tag, then we could figure out the order of the FAQ questions by using the "order" key which contains a number.)

The tricky part is to get the "tag management" right. If that is easy to do, then building a site will be easy to do. Same for generating the custom pages. There should be some default, like, associate a page name with a tag name, and generate that page in a custom way. For those who want more, there's always pagegen.py.

Posted by Hans Nowak on 2002-10-26 18:33:04   {link}
Categories: Kaa, ideas

The Pike language

Downloaded the latest stable version of Pike today. Pike is interesting because it's a scripting language much like Python (when it comes to ideas, not syntax).

Note that the links on the homepage are outdated. Go to ftp.ida.liu.se for downloads.

From the tutorial:

Programs written in Python look very different from Pike programs, but Python and Pike are similar when it comes to ideas and use. Python is more widely used and has more libraries available. Pike on the other hand is faster, has a more advanced type system, and has better support for object-oriented programming. Pike's more C++-like syntax makes it easier to get started with for programmers who know C++, C or Java.
I believe that it could be faster, but "a more advanced type system" and "better support for OO" are dubious claims. What is "better OO", for example? There are many different flavors of OO, and which one is "better" is mostly a matter of taste. (Or, more often, a matter of what you are used to. E.g. someone schooled in Java or C++ will probably get very nervous at Python's version of OO.)

<ponder>I wonder if I will ever find a language better than Python. Maybe it has yet to be written. Lisp looks tempting, but I like my programs to be readable.</ponder>

Posted by Hans Nowak on 2002-10-26 13:05:08   {link}
Categories: programming

Generated by Firedrop2.