Archive for the ‘Uncategorized’ Category

symbolic and hard links under win32

Friday, January 25th, 2008

To my surprise, symbolic and hard links are partially supported even by windows 2000. Here is a small summary:

(more…)

how to analyze FICS games

Sunday, December 16th, 2007

I play chess on freechess.org. Sometmes I like how I play. But the sad truth is that my good play is illusion. Thanks computers to reveal me a lot of mistakes.

Here is how I feed the games to the computer.

(more…)

recording audio under Linux

Sunday, November 11th, 2007

The blog is the place to remember what I always forget. Here is a note how to record a mp3 on my system.

(more…)

mass-upload to picasaweb from Linux

Friday, September 28th, 2007

Picasaweb is a Google’s service for publishing web photo albums. The mainA drawback of this service is that under Linux you have to upload each image manually. The evil empire (not microsoft) knows about the problem, but has’t released even a temporary solution. Fortunately, I managed to find a workaround:
(more…)

literate programming failed

Friday, September 7th, 2007

Those who
* know what is literate programming,
* the ideas and the technical implementation behind it, and
* think this metodology doesn’t work,
can find this fragment funny (Documented LaTeX sources (.dtx files), emphasis by me):
(more…)

the real need of LinkedIn

Sunday, July 29th, 2007

Many conferences create and share the list off all the participants. Before, I had a problem: I was not able to make an use of this list, and was not able to through it away (too valuable resource). And now I know what to do. I scan the list, find those who communicated with me, and create connections on linkedin. Fine. By the way, here is my profile.

webcam under linux

Tuesday, July 24th, 2007

After lots of trials and errors, found: to capture from webcam:

spcaview

To get a video:

mencoder -fps 6 tv:// -tv driver=v4l:width=320:height=240:\
fps=6:device=/dev/video0:hue=-40:saturation=-40:contrast=-40 \
-ovc lavc -o test.mpg

To view the result:

mplayer -fps 3 test.mpg

I still have to find how to set correct fps on input and output, and to tune brightness parameters.

getting /dev/dsp

Tuesday, July 24th, 2007

After spending a lot of time to make sound working, I found how to create /dev/dsp. In my case (00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)), it’s just:

modprobe snd-hda-intel

updated conference checklist

Saturday, July 21st, 2007

Based on experience of XML Prague 2007 and GTTSE’2007, I’ve updated conference checklist. The main addition is the section “before departure” and especially the item “switch off all the alarm clocks”.

GMail rejects mail from Hotmail

Friday, July 20th, 2007

For a few days, smtp.gmail.com has a bad SSL certificate. As result, some well-behaved mail clients and transfer agents can’t send mail to and from GMail. Quite possible, it’s the answer for a report that messages from HotMail to GMail are not delivered.

exponential serie on updating a string

Monday, July 16th, 2007

First, I was going to increment a string using this construction:

s = s + "xx...xxx"

Then the addition became more complex, and I decided to re-write updating as:
s = "%sxx...xxx" % (s, ...)

I run the program and found my Linux in a deep swap freeze. Fortunately, the system recovered, and I had a chance to find what happened.

(more…)

surprises from windows

Wednesday, June 27th, 2007

I’ve spent at least an hour tracking down an error in integration of my software with another software. Finally, I’ve found that Windows (ok, command.com/cmd.exe) command chdir isn’t so easy. If one wants to go to a directory on another drive, the flag /D must be used, otherwise nothing happens. Did you know it?

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.

(more…)

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.

(more…)

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:

(more…)

“undefined namespace prefix” with XSLT prefix and two predicates

Wednesday, February 14th, 2007

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

(more…)

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:

(more…)

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.

(more…)

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“).

(more…)