Chaotic Rulers


I’m currently working with one of my students on a laser-based range finder. To assess the precision of the device, I needed a calibration piece. Because of the setup, the piece should look like a stair.

The piece should allow a wide range of different readings, say from 1 to 10 centimeters in known increments, say, 1cm. The naïve way of building such a piece is to build a stair with 10 steps. However, if you do it like this, the piece is wide, cumbersomely so. Is there a much better way to do so?

Read the rest of this entry »

The protoshadok number system


We’re so used to our positional notation system that we can’t really figure out how to write numbers in other systems. Most of the ancient systems are either tedious, complicated, or both. Zero, of course, plays a central role within that positional system. But is it indispensable?


In one of my classes, I discuss a lot of different numeration systems (like Egyptian, Babylonian, Roman and Greek) to explain why the positional system solves all, or at least most, of these systems’ problems. I even give the example of Shadok counting (in french) to show that the basis used isn’t that important (it still has to be greater than one, and, while not strictly necessary, preferably a positive integer). But can we write numbers in a positional system without zero?

Read the rest of this entry »

Le café des sciences


This week, as you might have guessed, was pretty busy as the semester is coming to a close. Among many things, I prepared lecture notes, marked assignments, and all that, but I also got to launch the café des sciences de l’UQAR.


A university is a place where we are supposed to transmit knowledge, but more importantly transmit a love of knowledge and keep alive the joy of discovery. The café des sciences is about that transmission: once a month a guest comes to talk about what his point of view on science is, what research he (or she) is conducting, and everybody is invited. Not only professors. Not only students. Everyone. That’s why the café des sciences will not always be held within the university walls, but will visit café in the general Rimouski area.

You can read more about the café des sciences here. You’re all invited!

You can follow us on twitter at

Suggested Reading: Computing with Quantum Cats


John Gribbin — Computing with Quantum
Cats: from Colossus to Qubits
 — Prometheus Books, 2014,
295 pp. ISBN 978-1-61614-921-5

(Buy at Amazon)

(Buy at Amazon)

The book presents the genesis of the various ideas that may lead, one day, to a practical quantum computer. Gribbin takes a well-documented historico-biographical approach to the topic, while avoiding getting too deep into the science part of the story. On great many occasions, he cuts short an interesting avenue with a “but that’s another story”, which I find most frustrating. Those are the good parts I want to know about!

Despite all this, the book is still worth reading. It will expose you clearly (albeit summarily) the various ideas behind quantum computing, and is a good starting point if you’re interested in quantum computing, as the book also ends with a bibliography on the topic.

The quantum cats of the title refers, of course, to the famous Schrödinger cat gedankenexperiment, but the term also to macroscopic objects exhibiting quantum behavior.

Bad Graphs!


One of the good things of the peer review process is that if you publish, you’re eventually going to have to review papers for conferences or journal in your (perceived) area of expertise. Sometimes you get pearls such as “the resulting results of algorithm X are resulted” (true story), or “the dynamics of the attorney of yes no plasmodium” (also true), but sometimes bad science comes from the bad presentation of results.

This is also a (essentially true) story. So I’m reviewing a paper that proposes some kind of method for predicting the value of (some) parameter that minimizes some error function. The method is fast, but not analytic. The graph in the paper looks something like:

Read the rest of this entry »

Linear Interpolation (Interpolation, part I)


In a couple of different occasions I discussed the topic of interpolation, without really going into the details. Lately, I had to interpolate data and that got me interested (again) in interpolation; and I think I should share some of the things I learned.

In this first post (of a series), let us begin by the simplest interpolation of all (after constant interpolation): linear interpolation.

Read the rest of this entry »

New Way of Computing Square Roots?


I sometimes have quite nerdy readings. As of late, I’ve been reading Le fabuleux destin de \sqrt{2} (The Fabulous Destiny of \sqrt{2}, one might translate) by Benoît Rittaud. This book is a treasure trove of \sqrt{2} facts, and one caught my eye more than the others so far: an iterative method to compute square roots of any (positive) number.

When the method is first presented, he leaves to the reader to find a demonstration (though he gives one much later on, several chapters later), but let’s see what we can find.

Read the rest of this entry »

Introducing Theano & PyLearn


Today I am going to talk about my day job a bit. Contrary to previous jobs, a good part (but not all) of what I do now is either public domain or open-source. Two the projects I joined recently are Theano and PyLearn.

Theano is a mathematical expression compiler that maps expressions described in Python to machine-efficient code, either targeting the CPU or the GPU. PyLearn is a work in progress that aims to provide a comprehensive machine-learning framework for Theano.

Read the rest of this entry »

Surrogate Functions


In some optimizations problems, the objective-function is just too complicated to evaluate directly at every iteration, and in this case, we use surrogate functions, functions that mimic most of the properties of the true objective-function, but that is much simpler analytically and/or computationally.

Lately, I have done some thinking about what properties a surrogate function (or surrogate model) should have to be practical.

Read the rest of this entry »

Log Books


The other day, I was discussing with a friend about my log books, and it seems that, while it’s fairly common with scientists of all sorts, it’s not a generalized practice amongst computer scientists and programmers. But it should: the log book is not only for chemists.

First, the log book serves as… a log. A written trace of your activity during the day. While this sounds silly, it may be useful in retrospect when it is needed to assess time spent on a particular (class of) task(s), to get a good idea of were you are spending your time at work.

Read the rest of this entry »