Arnt Richard Johansen's home page

Thank you, Poland!

Thank you, Poland!

[Tuesday, Dec 28, 2004 @ 15:57] | [tech] | # | G

Colourmap rotation

One of the things I like doing in the Gimp is this:

Original picture, with green grass Manipulated picture, with red grass

On the left: lawn with rock and axe, taken outside my parents' house this summer. On the right: the same picture, using Filters -> Colors -> Map -> Colormap rotation in the Gimp.

Of course, getting good results by colourmap rotation requires areas of some saturated, primary colour.

[Tuesday, Dec 28, 2004 @ 15:20] | [art] | # | G

Migrating from GreyMatter to Pyblosxom

The transition from GreyMatter to Pyblosxom was not entirely painless, though much easier than I had expected. CGI installation was a breeze (although it took me a while to figure out that even though the installation doc did not say anything about moving other files than pyblosxom.cgi and config.py into the CGI directory, Pyblosxom actually consists of a small suite of scripts whose path has to be specified in config.py.

Then came the whole business with URL rewriting. Having URLs like http://arj.nvg.org/pyblosxom.cgi/path/to/blog_entry.html looks ugly, and I'm not sure it is even compliant with the relevant URI standards to have pyblosxom.cgi as anything else than a directory in this case. So I wanted to redirect http://arj.nvg.org/path/to/blog_entry.txt to the pyblosxom script, but only if it does not exist as a regular file.

The solution I found (after reading up on mod_rewrite a while, and various swear words) was adding the following to my top level (but not sitewide) .htaccess:

RewriteEngine on

# If the requested file or directory does not exist
RewriteCond %{REQUEST_FILENAME} !-F
# Try serving it through Pyblosxom
RewriteRule ^(.*)$ /pyblosxom.cgi/$0 [L]

# Replace index.html with Pyblosxom
RewriteRule ^$ /pyblosxom.cgi [L]

Porting the visual layout was not very difficult, either. The "templates" in GreyMatter are quite similar to those in Pyblosxom, so I only had to retrieve them from the web interface and paste them together into Pyblosxom flavour files. Besides, most of the work was done in standalone CSS files anyway.

I opted not to write an import script, since I only had 8 entries in my old blog. Instead, I downloaded the source from the web interface, and inserted <p> and </p> where necessary. Non-Western text in Unicode was troubling, however. GreyMatter stores such characters in a puzzling internal format. After having given up typing the Russian word язык in on emacs, Yudit and KEdit, I pasted it from the web browser to Yudit.

[Tuesday, Dec 21, 2004 @ 17:34] | [tech/web] | # | G

Night vision is laterally independent

Couldn't get to sleep tonight, because I was too excited about going home for Christmas tomorrow. So I picked up the mobile phone (it was under my pillow, since I use it as an alarm clock), and read some news on WAP. After having read all my bookmarks, I put ut down.

When looking at the dimly lit room, I noticed that the image from my left eye looked darker than the one on the right. I had held the display of the phone up against the left eye when reading, since that is my dominant eye. So the left eye had got lots of the light, but the right eye next to nothing. Hence, the left eye was accommodated for day vision, while the right one was still in night vision mode.

It struck me that the first time someone discovered this, it must have been an important result in neurology. Consider this: in the pre-technological era when the human brain spent most of its time evolving, few light sources that would be seen only by one eye existed. Hence, there should be no evolutionary advantage of having a separate feedback mechanism for each eye, as opposed to a central "light meter" that responds to the overall brightness of the visual field. Therefore, the reason that the dilation of the pupil of the eye is controlled separately for each eye, must have something to do with some structure in the brain that was "already there", ie. evolved for a separate reason.

Trying to go back to sleep now -- have to be up in less than six hours.

(If you know something about this that I haven't mentioned, please feel free to drop me an e-mail.)

[Thursday, Dec 16, 2004 @ 02:15] | [science] | # | G

Serendipitous cognation

During a Usenet search yesterday, I hit upon a message written in Russian, a language I don't speak. As I was idly looking at the message wondering where to go next, my gaze hit upon the word язык.

Now, as mentioned before, I hardly have any Russian at all, but I do know the Cyrillic alphabet. I have also recently taken up a very slow and non-serious study of Czech. One of the very few Czech words I know is jazyk (language). It turns out that the Russian word does indeed mean the same as the Czech one, so they probably have common descent.

So studying smaller languages isn't quite useless.

(Yay! Posting in Unicode works! You may laugh, but being able to do all the steps from multi-language keyboard entry through storage to viewing the text in the web browser without any kind of trouble was far from the norm only a couple of years ago.)

[Monday, Nov 29, 2004 @ 19:26] | [language] | # | G

archive.org favourites

A while ago, I discovered the free movie archives at archive.org. There are lots of fun videos there. One of the most downloaded videos is Perversion for Profit (downloadable in two parts), a 1964 propaganda movie in which George Putnam spends half an hour continuosly ranting against pornography. Personally, I find Come Join the Fun even more amusing, as it is an edited version of the above, in which George Putnam appears to have the totally oppsite opinion. I think people who form their opinions mostly out of what they see and hear on TV and the radio should watch this movie and compare it to the original, since it demonstrates, in a striking manner, how much you can distort what a person says, simply by splicing and pasting together the video.

Other highlights include Pipe Dream, a computer animation of a collection of music instruments played solely by steel balls shot out of PVC tubing, and The Turing Test, a computer-rendered game show in which three (partly fictionalized) AIs compete against each other about who can provide the most human-sounding answers.

[Thursday, Nov 25, 2004 @ 18:06] | [miscellaneous] | # | G

Clean shoes

The youth club that I use to pass every time when I walk to the bus stop, appears to have been torn down, and entrepeneurs are busy building something new on the same site.

A large fence has been erected, which directs pedestrian traffic into the football field of the adjacent high school. This football field is very mud-prone, so after walking across it one day, my shoes became very dirty. I made a mental note to wash them sooner or later, but I never found the time nor energy to do so.

But then, only a few days later, the first snow came. And in the following days, lots of it. All the snow that I've trod in for the past few days appears to have actually worn all the dirt and mud away, without any deliberate efforth from my side. If I'd been a good boy and washed them earlier, none of this would have had any effect.

Laziness prevails!

[Friday, Nov 19, 2004 @ 22:44] | [miscellaneous] | # | G

Help stop software patents in the EEA!

NO E-patents!

[Monday, Oct 04, 2004 @ 20:24] | [tech] | # | G