Up to Timo Korvola's home page


Miscellaneous hacks

Scientific computing

pypetsc
Partial bindings from Python to MPI and PETSc. I wrote these mostly in 2004 and my interest was FEM with unstructured grids. Hence e.g. distributed arrays are not supported but partitioning is. The bindings were created using Swig.

Emacs lisp

sgrep.el
A simple interface to the sgrep search tool.

Sawfish stuff

shrink-yank.jl
Eight commands which complement the excellent grow-pack.jl (included in the distribution). With these you can shrink or move windows so that they overlap with fewer other windows. I can now get most of my window positioning done from the keyboard!
quot2.jl
An improved version of quote-event from the distribution. This version can also handle mouse button events. Old code but still works.

If you are feeling adventurous, you can also have a peek at my experimental Git repository of Sawfish at http://koti.welho.com/thk/sawfish.git. It is based on the official Sawfish Git repository. I also have an older, now obsolete repository at http://koti.welho.com/thk/sawfish-svn.git. It is a git-svn clone of the old Subversion repository with my additions on top. Note the changed addresses.

Some LispMe functions for the Palm

sort.scm
Merge sort and other useful stuff.
dbdb.scm
Functions for reading datebook (calendar) entries. Load sort.scm first. I usually run (dbdb-show (dbdb-dupes)) after syncing. Use command-d to clear the output buffer, dbdb-show doesn't do it.

These are rather tersely commented because I want to keep them small enough to be loadable as Palm memos (< 4096 characters).

Perl hacks

fixlinks
This little script converts relative symlinks containing ".." into absolute form. It is occasionally useful if your directory structure has symlinks at unusual places that confuse packaged software. Absolute symlinks also cause occasional lossage but the occasions are different. There is an utility called symlinks for converting absolute links to relative if that is what you desire.
flexop
This script uses ObexFTP and Expat to provide plain text (not XML) directory listings and downloading of all files in a directory. It has only been tested with a Siemens ME45.
vcsjoin
Combines multiple vCalendar files into one. Requires Data::ICal. Useful for processing calendar entries of the ME45 after downloading them with flexop -d telecom/cal.
xgrep
A simple command line tool for making XPath queries: like grep but for XML. Uses XML::LibXML

TeXnicalities

mylatin1.sty
This first sets up latin1 input encoding and then changes some characters to do something more useful.
todo.sty
Boxed marginal notes to remind yourself about unfinished things. The command is \TODO, all caps, so it is also easy to find in document files. The document option final makes all ugly reminders about finishing those boring details disappear like magic…

Other stuff

protractor.ps
A protractor for kayaking. After years of using a handheld compass, I finally decided to invest into something more precise, namely a Suunto Orca. To gain the benefit of the increased accuracy, an instrument was needed for reading bearings from a chart. It is possible to use a handheld compass for that, but it is rather clumsy, particularly as most models tend to have the bearings written on the rotating part rather than the fixed one (so you really need to rotate it, rather than just look at the northernmost figure on the rim). Unable to find a suitable protractor, I ended up designing my own.

This is a Postscript program. Edit the parameters in the beginning, then send to your Postscript printer or use Ghostscript. Print or photocopy onto an overhead slide, cut the excess away and make a hole for tethering (overhead slide is slippery: it will be in the sea if you don't tether it). Test that the result is waterproof. I use a photocopied version myself, it seems to endure water reasonably well. If you printed with distance ticks on the course arrow, measure them to ensure that the output was not accidentally scaled.

Bearings are read from the south side of the compass rose. This is convenient if you are sitting in a kayak with the chart on the foredeck, north pointing away from you. The bearing mark style (numbers every 30° etc.) was chosen to match the Orca. If you configured the declination correctly, you can read magnetic bearings directly. Note that these are are not yet accurate compass bearings because of other sources of error, such as magnetizable objects near the compass or, often with the Orca, failure to mount it with perfect alignment.

http://koti.welho.com/thk/sourcenav-ng.git
Note the changed address. A Git repository of Source Navigator NG with some modifications. Source Navigator is probably the best free C++ source code browser out there, despite its lack of proper support for namespaces and templates. The NG version is a fork, if one can use that term considering that development of the original version seems to have stopped in early 2005. My repository is a git-svn clone of the NG repository with a few patches thrown in. The NG repository was in turn converted from the original CVS repository.