Archive for the ‘Uncategorized’ Category

buggy rss-generators

Tuesday, June 26th, 2007

Just like the most of pseudo-XML tools, many RSS generators are buggy. For example, many just put the text into a CDATA section, without checking if it contains the sequence “]]>”. As result, the feed might become invalid.


distinguishing usual numbers, infinities and NaN

Wednesday, May 30th, 2007

In a Scheme program, I need to distinguish infinities and NaN values. In Guile, it’s simple, it’s just the functions inf? and nan?. But when I took another implementation, I got troubles. I spent a lot of time and tried everything — =, eq?, equal?, but nothing helped. Fortunately, after a break, I found a simple universal solution.


CPSCM, a Scheme compiler

Monday, April 30th, 2007

For long time, I’m thinking about a generative Scheme R5RS implementation. It means that if I need Scheme for a platform XXX, then I take the implementation, adapt a small bootstrap core to the platform XXX, and automatically have got the full Scheme. CPSCM seems fit to this description.

why to have a forum on a shareware site

Tuesday, March 6th, 2007

I’ve just answered on a question if it worth having a forum on a shareware site. Yes. Here is why:


“undefined namespace prefix” with XSLT prefix and two predicates

Wednesday, February 14th, 2007

I’ve caught yet another libxml2/libxslt bug: Bug 407731.


postponing unquote

Saturday, February 10th, 2007

I need to generate S-expressions like:

(let ((val "datum")) val)

The actual expressions are more complex, the value “datum” is dynamic, therefore the special Scheme feature “quasiquote” should be used:


highlighting in the console

Thursday, February 8th, 2007

One of the unit testing tools (Testeez, to be more precise) is a bit too verbose. It displays not only the failed tests, but also the passed tests. When the number of the tests is big, it’s hard to find the failed one. Therefore, I decided to highlight them in red.


mysql statistics

Saturday, January 27th, 2007

Found an useful command: “SHOW STATUS” or, depending on the mysql version, “SHOW GLOBAL STATUS“. Of some interest also “SHOW VARIABLES” (or, correspondingly, “SHOW GLOBAL VARIABLES“).


the essence of functional programming

Wednesday, January 24th, 2007

I’ve transcripted the code examples from the paper “The essence of functional programming” by Philip Wadler.


Learning Haskell

Wednesday, January 17th, 2007

The main problem of learning Haskell is the very beginning, the first step: to write a working program, which
* as small as possible, and
* more than just print "Hello, World!"

Lexmark isn’t printing

Tuesday, January 16th, 2007

After returning from holidays, I found that printer doesn’t print anymore. After some investigation, I found that dmesg contains:

usb 2-1: new full speed USB device using uhci_hcd and address 7
usb 2-1: device not accepting address 7, error -71
usb 2-1: new full speed USB device using uhci_hcd and address 8
usb 2-1: device descriptor read/64, error -71


Saint-Peterburg. No bears, just beauties

Wednesday, December 27th, 2006

In streets of Paris, Amsterdam and London have appeared billbordy with an inscription “No Bears, just Beauties”, advertising St.-Petersburg as a tourist direction. I like the screenshots: 1, 2, 3, 4.

xslt 1.0 code isn’t reusable

Wednesday, December 13th, 2006

I’m building an XML site. One of the common tasks is to get a book by isbn. I needed 4(!) attempts to get it working!



Saturday, December 9th, 2006

I can’t remember what is what, so writing it down:
* orphan: line at the bottom, the rest on the next page
* widow: the last line at the top, the beginning on the previous page

Word to HTML

Friday, November 24th, 2006

I got an HTML export from Word. The HTML code was very ugly and, what’s worse, confused the site where I wanted to submit the text. I failed to refine the code with tidy, therefore wrote a quick Perl hack.


Consodoc is released!

Wednesday, November 8th, 2006

Hard to believe, but I forget to release Consodoc after the two-week beta period. Yesterday I read the announce of the new version of SCons, 0.96.93, and decided to close the task as soon as possible. Today I’ve tested Consodoc with the new SCons and announced the software.


Google Co-op and windows-1251

Friday, November 3rd, 2006

Google Co-op is a service that allows to create custom search engines. At the moment, it officially supports only English, but it seems other languages work as well.


messy Perl code

Tuesday, October 17th, 2006

I download my mail using fetchmail. During the process, “tail -f” shows the subjects of the incoming letters. Unfortunately, most of them are unreadable, something like “=?windows-1251?B?0e/g7CDt4CBwaHBCQg==?=“. Finally, I tired of it and decided to make life better.


use “perl -w”!

Saturday, October 14th, 2006

I thought “use strict” is enough and didn’t try to run an application with the “-w” flag. (Don’t blame me, it was under Windows.) As result, I played ping-pong with an user trying to identify an error instead of preventing the error.


joining entities

Wednesday, October 11th, 2006

XML tools are good when the input data is XML. And they are awful when the data is XML-like. As result, instead of using “xmllint --noent“, I had to write my own entity substitutor “”.