Or a Whale, II

17/08/2010

Tomorrow’s flowers are in the seeds of today.

Chinese proverb

Read the rest of this entry »


Or a Whale.

10/08/2010

HAMLET:
   Do you see yonder cloud that’s almost in shape of a camel?

POLONIUS:
   By the mass, and ’tis like a camel, indeed.

HAMLET:
   Methinks it is like a weasel.

POLONIUS:
   It is backed like a weasel.

HAMLET:
   Or like a whale.

POLONIUS:
   Very like a whale.

Hamlet, Act III

William Shakespeare

Read the rest of this entry »


Rediscovering The Past

03/08/2010

Progress, as conceived by most people, consists in replacing older objects, techniques, or philosophies by newer, better, ones. Sometimes indeed the change is for the better, but sometimes it is just change for change—ever had an older device of some sort that was perfectly adequate for your usage, yet you still replaced it with a newer version with no net gain? Unfortunately, the same happens with ideas, especially with mathematics and computer science.

But there are lessons to be learnt from the past. I’m not talking about fables and cautionary tales; I’m talking about the huge body of science that was left behind, forgotten, superseded by modern techniques.

Read the rest of this entry »


One Does not Simply Rename Into C++

13/07/2010

Programming is in many ways more art than science—I do not want to start that debate in this post—in that you need more than mere functionality and correctness to have great code. For code to be great, it has, amongst other things, to be beautiful in that strange, vague, language-specific way.

As you know, this blog is C and C++-centric. Those are the two main languages I use both for personal and for professional projects. I resisted the transition from Pascal to C a long time, for many reasons. One was that at that time C compilers were flimsy, while we had a couple of really great Pascal compiler, such as Turbo Pascal—quite the upgrade from my Apple II’s USCD Pascal. Another was that I found C just ugly, clunky, and primitive; it was terse and inelegant. But over the years, I learnt to like the way C gives you pretty good control on what code is generated—not that you can predict right down to the assembly instructions what the compiler will generate; but you still have a very good idea if you understand even vaguely the underlying machine.

Read the rest of this entry »


Upgrading to Lucid Lynx

23/06/2010

Every once in a while, if you’re not using a rolling release distro like, say, Arch Linux, you have to dist-upgrade your machines. Dist-upgrading consist in upgrading pretty much everything on your computer to the new version sets that correspond to the next distro. I just upgraded from Koala to Lynx.

And, well, …

Read the rest of this entry »


Wallpaper: Douceur retrouvée

20/06/2010

Douceur retrouvée (1920×1200)


The CFM-00

15/06/2010

Parallel computing is the next paradigm shift, everybody knows this, but not everyone is taking the proper action to face it adequately. One thing to do is to read on the subject and force oneself to code using threads and various degrees of parallelism; and that’s pretty easy now that a quad core machine doesn’t cost all that much. But the next step, distributed computing, necessitates, well, more than one machine, and if you have different levels of memories and communication channels, all the better.

So out of a bunch of old x86 PCs, I’ve decided to build my own portable mini-cluster with 8 nodes. Nothing all that impressive, but still plenty of fun to build.

Read the rest of this entry »


Wallpaper: Jardin de givre

07/05/2010

Jardin de givre (1920×1200)


The Complex Beauty of Simplicity

04/05/2010

As I have said before, some of my friends took the very wise decision to go back to school (that is, university) and, accordingly, they’re doing all the undergrad maths courses. As I try to help them whenever I can, I decided to ask them to solve a simple puzzle… or so I thought.

So the problem is as follows:

You have a circle of center C, radius r\geqslant{}0 and some point Z, with Z\neq{}C. Find the projection P of point Z against the circle with center C and radius r. The method should work whether Z is inside or outside the circle.

Read the rest of this entry »


The Large Hideous Collatzer

27/04/2010

Mathematics is still full of surprises. The solution to simple to state problems may elude mathematicians for centuries. One example is the celebrated Fermat’s Last Theorem (stating that equations of the form x^n+y^n=z^n have no integer-only solutions for n > 2) that was finally solved by Andrew Wiles with tools Fermat couldn’t possibly know nor understand1.

Another one of those problems is the Collatz Conjecture. Proposed by Lothar Collatz in 1937, the conjecture is that a simple recurrence function—that we will discuss in detail in just a moment—terminates for all natural numbers. This one, however, isn’t solved yet.

Read the rest of this entry »