Tao of the MachineProgramming, Python, my projects, card games, books, music, Zoids, bettas, manga, cool stuff, and whatever comes to mind.
Last 10 archives
:: About me
:: Oasis Digital
Old and newIn 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.
Another loony ideaWhat 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:
To make this work, we need a program that:
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...
The return of the spiderSome 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... :-)
I forgot the Kaa logo...
(courtesy of Christian Tismer)
0.8 is hereAn 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. :-)
Content management made easy?Here's an idea. What if we had:
#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.
The Pike languageDownloaded 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>