phimuemue

Category: misc

An interesting bijection

I came across the following identity recently: . This can be proved in various ways. Here, I will describe a “combinatorial proof”.

Addendum: Encoding tuples with numbers

I described how to encode tuples of natural numbers into natural numbers. Now, I wrote (hacked) a small piece in Haskell to try it in practice.

Intermezzo: A brainf***-interpreter

Here’s a 290-characters interpreter for the brainf*** programming language I wrote.

A quick and dirty unification algorithm

The following is a very simple unification algorithm in Haskell.

A winamp plugin: Making of

This post shows the basics of writing a very simple plugin for my favourite music player. There is no special knowledge necessary. A bit of C++, basic experience in Visual Studio, the Winamp SDK some time and patience and a bit of common sense are enough (in my opinion).

How to algorithmically simulate probabilistic distributions using other distributions

In this article, we explore (in short) how we can generate random numbers of any distribution if we have a corrupt toin coss generator (i.e. a random toin that produces 1 with (unknown) probability and 0 with (unknown) probability ).

Fibonacci numbers “the other way”

Every programmer comes to the point where he or she must/should/wants to implement a programm for calculating fibonacci numbers. But I think my way is quite a new one.

A little… extension for C++

Loops are used on a daily base by almost every programmer. Especially for-loops occur quite often. Now, have you ever felt it’s quite cumbersome to code something like the following: for (int i=0; i<10; ++i){ do_something_here(); } while you just wanted to write 10 times { do_something_here(); } and wanted C++ to understand it? Don’t [...]