Microblog: A very long article Wikipedia article on the orientation of toilet paper [Jun 7th, 22:52] [R]

Thursday, August 18th, 2011

Journalisme du dimanche

Translation: [ Google | Babelfish ]

Categories: [ Grumbling | Science ]

Soit une dépèche AP Un Suédois essayait de fractionner des atomes dans sa cuisine (via fr.news.yahoo.com) commençant par (le gras a été rajouté)

« Un Suédois arrêté pour avoir tenté de réaliser une fission nucléaire dans sa cuisine »

Cette dépèche, reprise par Zignonet, devient Il essayait de construire un réacteur nucléaire dans sa cuisine (via fr.news.yahoo.com encore une fois) et commence par (le gras a été rajouté)

« Un Suédois de 31 ans a été arrêté fin juillet pour avoir fait une fission nucléaire à son domicile »

On n'a pas besoin d'un doctorat en physique nucléaire pour comprendre que tenter de réaliser et faire ne signifient pas la même chose. Il faut avoir appris à lire pour comprendre la différence, certes, c'est peut-être là que le bât blesse.

Un peu plus loin, AP indique

« il avait provoqué une petite fusion sur sa cuisinière »

que Zigonet interprète comme

« il avait réussi à provoquer une fission nucléaire dans sa cuisine »

Un élève de l'école primaire est capable de reconnaître que les mots fusion et fission ne sont pas les mêmes, même s'ils n'y a que deux lettres de différence entre les deux. Tout le monde conviendra que par exemple lapin et clampin, bien que n'ayant que deux lettres de différence, ne signifient pas la même chose : l'un est un adorable rongeur aux longues oreilles, tandis que l'autre non.

Les cours de physique atomique du lycée permettent de savoir que la seule fusion nucléaire obtenue sur Terre à ce jour concerne des atomes d'hydrogène, et que si l'apprenti Oppenheimer avait obtenu une fission nucléaire, la police n'aurait retrouvé personne à arrêter (mais les problèmes de surpopulation à Stockholm auraient été promptement résolus). Avec les histoires récentes de Fukushima, tout le monde devrait cependant savoir ce qu'est la fusion du combustible nucléaire (qui n'est pas la même chose que la fusion nucléaire), c'est à dire que ce dernier, produisant naturellement de la chaleur, peut fondre sous l'effet de cette dernière. On peut donc supposer que c'est ce qui s'est passé dans cette cuisine. AJOUT en lisant le blog du bonhomme je ne suis même pas sûr qu'il se soit agit de ça. Il a fait chauffer de l'americium, du radium et du beryllium dans de l'acide sulfurique et ça a explosé, probablement sous l'effet de l'ébullition de l'acide (qui bout à 337 °C, alors que les trois premiers fondent à 1176, 700 et 1287 °C respectivement).

En conclusion, quelques mots de différence changent complètement le sens d'un texte, et ce n'est pas parce qu'on publie des trucs sur le Web qu'on est un journaliste.

[ Posted on August 18th, 2011 at 17:41 | no comment | ]

A More Complicated PasswordCard!

Categories: [ IT ]


Angela Bartoli

To protect the password card from theft, there is one possibility. First, randomly generate and memorize a secret key composed of 12 numbers between 0 and 35 (one for each line of the card). Then for each letter of the mnemonic, shift this letter to the right (looping around the end of the line back to its beginning if needed) by the amount indicated by this line's secret key's digit before reading the symbol.

For an 8-symbol mnemonic, the entropy of this secret key is 41.4 bits, which gives a reasonnable amount of protection to the card even if it is stolen.

One obvious drawback is of course the strain it puts on the brain (although some may say it's good for the organ's health to work it out this way) and the time it takes to read one password. Another drawback is that the secret key is hard to remember, and if you forget it, you loose all your passwords.

Translating the secret key into letters and digits might make it easier to remember.

[ Posted on August 18th, 2011 at 17:24 | no comment | ]

Tuesday, August 16th, 2011

A Better PasswordCard?

Categories: [ IT ]


The PasswordCard sounds like a good idea (and it actually may be in practice), but I don't like it so much for three reasons:

  • The entropy is too low (64 bits spread over 232 symbols) and generated from an unknown source of entropy.
  • You have to memorize a cryptic symbol and a color for each password, which makes it easy to forget which symbol/color pair is associated with what password.
  • I didn't invent it :)

My current idea is to generate a similar card using a hardware random number generator so that each symbol on the card has an entropy of 6 bits (2592 bits in total on he card). I also would like to get rid of the method that consists in choosng one spot on the card and reading in one direction, and instead use the card as a lookup table for a substitution cipher: you choose a cleartext mnemonic for a given website with a length corresponding to the length of the password you want to generate (e.g., “EXAMPLEC” for an 8-symbol password to be used on example.com), and you generate the corresponding password by looking up the symbol corresponding to “E” on the first row of the card, then the one corresponding to “X” on the second row, “A” on the third, “M” on the fourth, and so on.

The drawbacks are numerous:

  • Reading a password this way is very slow and error-prone (the alternating gray and white areas and the repeated header lines make it only slightly less painful).
  • Generating two passwords from the same card is fine as long as the two mnemonics don't share the same characters in the same positions (e.g., “EXAMPLEC” and “EXNIHILO” share “EX” in positions 1 and 2) (if this is the case, the entropy of those particular symbols will be divided by the number of passwords sharing them).
  • The mnemonics are meant to be easy to remember, and therefore easy to guess by the thief of the card (that's howerver only slightly worse than the case of the stolen PasswordCard).
  • It requires a computer to generate a card that is readable in a small format, so the random bits are temporarily stored on a system that may be compromised (if the physical size of the card does not matter, you can generate such a card by rolling a pair of 6-sided dice about 729 times and writing the symbols down by hand).

There is one benefit though: the card looks very geeky :)

As usual, any comment/idea/criticism is welcome.

[ Posted on August 16th, 2011 at 23:14 | 1 comment | ]

Monday, August 15th, 2011

Hardware Random Number Generator

Categories: [ DIY/Arduino | IT ]


Software random number generators are usually so-called pseudo-random number generators, because they produce a deterministic sequence of numbers that have some of the properties of true random numbers. Obtaining genuinly random numbers howerver requires a non-deterministic processus as the source of randomness. Thermal noise in electronics or radioactive decay have been used, usually requiring an external device to be built and plugged to the computer.

Peter Knight's TrueRandom generates random bits by using the Arduino's ADC (with nothing connected to the analog input pin) to measure electronic noise. It flips the pin's internal pull-up resistor while the measure takes place to increase the amount of noise. The software then keeps only the least significant bit of the result, filters it using Von Neumann's whitening algorithm (read pairs of bits until they are of different values and return 0 (respectively 1) on a 01 (respectively 10) transition). There are several functions that generate different types of numbers based on those random bits.

I reused that code, modified it to allow using another pin than the Arduino's Analog0 and I made my own random number generator. I also wrote a Python script that reads the bits from the serial port, uses the SHA-1 hashing algorithm to distil the data (the raw data has about 6 bit of entropy per byte, distillation produces data with 7.999 bits of entropy per byte; based on the work of Jeff Connelly on IMOTP) and writes them to the standard output or into a file. On my Duemilanove, it can output about 1500 bits/s, while it outputs 1300 bits/s on a JeeLink. The latter makes it an easy-to-transport device that is reasonnably sturdy and fits in the pocket, even if its features (it contains a radio transceiver) are a bit overkill for the job (not to mention expensive).

I also adapted the core of the TrueRandom software to run on my ButtonBox (which is conveniently always connected to my desktop computer). There the output rate is a mere 300 bps, but it's still reasonnably fast for generating a few random numbers when needed (for example for generating one's own PasswordCard). The access to the ButtonBox is shared among multiple clients using button_box_server.py, so a modified Python script was used for obtaining the stream of random bits through the button_box_server.

I haven't had the patience to generate a few megabytes of random data to test the generator with the DieHarder test suite, but the output of Fourmilab's ent test tool looks reasonnable.

[ Posted on August 15th, 2011 at 11:08 | 2 comments | ]

Friday, August 12th, 2011

Password Management with the PasswordCard

Categories: [ IT ]

It all started a few days ago with this Xkcd strip. Someone pointed it out passwordcard.com to me, and it made me wonder how safe are the passwords generated with that tool. Those passwords are meant to be used on all those websites that require you to create a user account with a password. Using a single password for all those web sites means that when the attacker of one of those websites gets your password, he can access your account on every other website where you have an account.

Beware that I'm no mathematician, and neither am I a specialist in cryptography or information theory, but here are my thoughts on this system.

The generator is based on what looks like a 64-bit key, so in theory, the entropy is 64 bits, which is reasonnably much (it would take 6x108 years to break at 1000 attempts per second). However, since you need to feed the key to an unknown web server, the practical entropy is much less, since someone else than you knows the key. But let's assume you can generate the card yourself on a secure computer.

The symbols on the card are upper- and lower-case letters, and digits, which makes overall 62 possible combinations. This gives 5.95 bits of entropy per such symbol, if the symbol is randomly generated. Since the card is generated from 64 bits of entropy, you can take up to 10.7 symbols to generate one or more passwords without loosing any entropy. That is, a password made of one symbol will have 5.95 bits of entropy, a password made of two symbols will have twice that (11.9 bits), three symbols will be 17.9 bits and so on. If you take more than 10.7 symbols, the entropy of each symbol will be reduced, so that the entropy of the symbols in all your passwords altogether will never exceed 64 bits. For example, if you take 16 symbols to make 2 passwords of 8 symbols each, the entropy of each password will be 32 bits instead of the 47.6 bits of a single, 8-symbol password. A 32-bits-of-entropy password takes 50 days to break (at the example rate above) against about 7000 years for the 47.7-bit-of-entropy password.

Here are a few examples of password types and strengths:

  • 1 password of 6 symbols: 35.7 bits of entropy, cracked in 1.8 years
  • 1 password of 7 symbols: 41.7 bits of entropy, cracked in 112 years
  • 1 password of 8 symbols: 47.7 bits of entropy, cracked in 7000 years
  • 2 passwords of 6 symbols each: 32 bits of entropy, cracked in 50 days
  • 2 passwords of 7 symbols each: 32 bits of entropy, cracked in 50 days

However, if the card is stolen, the thief only has to test a few tens of thousands combinations to find a password made of 4-8 symbols (29 x 8 symbols, 8 reading directions and 5 possible password-lengths is 55680), which represent 15.8 bits of entropy and takes less than a minute to crack. Loosing the card is therefore a bad move.

As a conclusion, the password card is fine on the following three conditions:

  • Use a real random number for the key (e.g., by rolling 25 times a 6-sided die) or a hardware random number generator (there will be a post on that soon).
  • Use the card for passwords totalizing no more than 10 symbols (best to use only one password of 8, 9 or 10 symbols).
  • Do not lose your PasswordCard.

Disclaimer: once again, I'm no specialist in cryptography or information theory, but the above is based on how I understand those things. It may be completely wrong.

[ Posted on August 12th, 2011 at 21:52 | 2 comments | ]

Thursday, July 14th, 2011

5 ans

Translation: [ Google | Babelfish ]

Categories: [ Blog ]

5 ans de blog, 914 messages (plus 73 dans le microblog), 371 commentaires et 209900 spams.

[ Posted on July 14th, 2011 at 22:27 | no comment | ]

Saturday, July 9th, 2011


Categories: [ IT ]

I followed my dream, and I wrote the Automatic Transparent Syntax HIghlighting software.

I have files (mainly source code) put as-is on my web site. Those files can be browsed with a regular web browser, and Apache's internal file indexing is used for accessing the directory structure. When the user requests a (source code) file of a known type, it would be nice to highlight the syntax. atshi.php does just that, automatically (no need for the webmaster to manipulate the files) and transparently (the user doesn't know a PHP program is being executed).

You can view the code, highlighted by itself of course (recursive computing is fun). It expects to be called as /path/to/atshi.php/path/to/example.pl and uses the PATH_INFO variable to find the path to the file to be displayed (in the example above, example.pl). It uses the GeSHi library for the actual syntax coloring (which is therefore a dependency), and theoretically supports any file format/programming language supported by GeSHi. In practice however, ATSHi detects the files that it should highlight (source code must be highlighted, but .tar.gz or .jpg must not) by checking first the filename's extension, or, if the file doesn't have one, checking the “magic header” (the one starting with #!) followed by the name of the interpreter. It also recognizes the filename Makefile. If it's unable to recognize the file, it simply sends its content (with proper Content-Type header) to the browser and lets the latter deal with it. Finally, the highlighted version also provides a link at the top of the page for downloading the raw file (atshi.php sends the raw file instead of the highlighted version when you append “?src” to the URL).

But this was all quite a simple job, and even if it was my first PHP program, it was quite simple (PHP is an horrible language, but the doc is good, which helped a lot). The real problem was getting Apache doing my bidding. Here's a sample of the .htaccess I use:

RewriteEngine on
RewriteRule ˆlatex/latex.css - [L]
RewriteRule ˆpoppikone/poppikone.css - [L]
RewriteCond /home/mweber/weber.fi.eu.org/www/$1 -f
RewriteRule ˆ((software|leffakone|poppikone|latex)/.*)$ /atshi/atshi.php/$1

The two top RewriteRule (with the L flag) prevent ATSHi from highlighting the stylesheets used in the corresponding directories (those stylesheets must be sent as-is to the browser). The bottom RewriteRule actually catches specific paths and rewrite the URL using atshi.php. Finally, the RewriteCond just above allows rewriting only if the path (identified as $1 when the regexp in the RewriteRule below is evaluated) is a regular file (highlighting directories doesn't make sense, does it?); note that you must put an absolute path in the condition.

The difficult part here was not really to get the URL rewriting properly written (although mentioning the absolute path trick in Apache's doc would have been nice). The really difficult part was to find out that the bloody Firefox always looks in its cache instead of asking the server if something has changed. So after making a change, Firefox still didn't show what was supposed to be showing… Erasing the cache before every test is therefore a must.

[ Posted on July 9th, 2011 at 20:01 | 2 comments | ]

Wednesday, July 6th, 2011

Syntax Coloring

Categories: [ IT ]

I had a dream last night, where I added automatic syntax coloring to the source code files that can be found on my website. These are currenty simply put in directories and accessible through the web server, and colors would make them more readable (I'm not sure anyone is reading those, but who cares).

The idea would be to use Apache's URL rewrite engine to serve a CGI/PHP/something page that reads the source code and spits out an HTML version with colors and whatnot.

I just found GeSHi, a tool written in PHP that does exactly that. It shouldn't be too difficult to implement.

[ Posted on July 6th, 2011 at 13:18 | 1 comment | ]

Thursday, June 16th, 2011

The Infernal Op Amp

Categories: [ DIY ]


This is driving me crazy. To the left (click the image for a bigger version), you can see a basic differential amplifier based on a LM324AN op amp. If the op amp is perfect and the resistors are be exactly 10 kΩ, the potential Vout (on point 3) would be equal to the difference of potential between V+ and V- (on points 2 and 1, respectively). In other words, Vout = V+ - V-.

When working with a real op amp, the things are not that simple, but they should remain quite close to the ideal case. In fact, if we set V4 to GND, we get reasonnable values. However, if we se V4 to +5.05V (which is also the positive supply of the op amp), the values don't make sense to me anymore.

Here's what I measured (the millivolt values are at least ±0.1 mV, but the volt values should be reasonnably accurate):

V4 set to0 V+5.05 V
V- =1.3 mV2.83 V
V+ =0.1 mV2.51 V
Vout =1.9 mV0.65 V

When V4 is set to 0 V, the values of V- and V+ seem to be consistent with the specs of the chip regarding input offset current and input bias current (input current of 100 nA accross a 10 kΩ resistor is 1 mV).

When V4 is set to 5.05 V however, I really don't understand what laws of physics makes the difference between V+ and V- so large (0.32 V, which just happens to be half of Vout. But that's maybe just a coincidence). Further experiments have shown that Vout remains constant at 0.65 V when 2.7 V < V4 < 5.05 V, but decreases when V4 < 2.7 V.

The goal of the device is to measure the voltage across a 0.05 Ω shunt which would be placed at point 4, with 5 V applied on its R4 side and the load (a low-power electric motor) between the shunt's R2 side and the ground.

Any comment on the subject will be appreciated.

[ Posted on June 16th, 2011 at 09:42 | 1 comment | ]

Current Monitor

Categories: [ DIY ]


This schematics of a current monitor can be found in many datasheets as examples of applications of an op amp. I wanted to find out the relationships between RS (the shunt), R1 and R2. Here's how it goes:

  • V1 = A·(V+ - V-) (1) (A is the open-loop gain of the op amp)
  • V+ = VSS - V·R1/R2 (2) (Common emitter transistor setup, see more particularly this image)
  • V- = VSS - RS·iload (3)
  • V = V1 - 0.65 (4) (voltage drop between the base and the emitter of a common transistor)

Combining (2), (3) and (4) into (1), we get

V + 0.65 = A·(VSS - V·R1/R2 - VSS + RS·iload),

from which follows

V·(1 + A·R1/R2) + 0.65 = A·RS·iload.

We assume A is very large, therefore A·R1/R2 >> 1, so it simplifies into

V·R1/R2 + 0.65/A = RS·iload.

We assume A is very large, and thus 0.65/A << V·R1/R2, leading to

iload = V·R1/(R2·RS).

[ Posted on June 16th, 2011 at 09:40 | 1 comment | ]

Tuesday, May 24th, 2011

New Op Amp

Categories: [ DIY ]

I finally got the courage to try out the new op amp model (LT1495) I received last week.

I tried out the current monitor circuit, and it works. The supply voltage for the op amp was 5 V, and I measured the current going through a red LED, powered with 15 V (coming from a supposedly 12 V power adapter). The measurement was 33,6 mA instead of the 31 mA given by the amperemeter. Not very accurate, but I don't actually need high accuracy.

Next step: trying to re-build the motor speed-controller circuit, get it stable enough that it doesn't reboot the Arduino all the time, and check how the current monitor behaves when the current is switching on and off all the time.

[ Posted on May 24th, 2011 at 21:52 | no comment | ]

Monday, May 16th, 2011

Tyco Slot-Car Controller A/D Conversion

Categories: [ DIY/Arduino ]


I hooked the Tyco slot-car controller to the Arduino's analog input with a 400 Ω pullup, and set the A/D converter's reference voltage to INTERNAL (meaning 1.1 V). The sampling rate is 100 Hz and the output values are between 0 and 1023. The movements are two successive slow squeezing-and-releasing of the trigger, followed by three quick squeeze-and-release.

  • In the lower picture (red) are the raw data.
  • In the second lower picture (green), the raw data is filtered by a 4th-order, low-pass Butterworth filter, with a 5 Hz cutoff frequency.
  • In the third lower picture (blue), a 32-levels quantization is applied to the raw data.
  • In the top picture (purple), the quantization is applied to the filtered data.

A value of 1023 (the maximum) indicates that the electrical contact is broken i.e., that the trigger is in the rest position or its maximum.

I have tried hardware filtering with capacitors (1 nF, 100 nF and 1μF), but the digital filter gives the best results. I don't doubt that more advanced hardware filters would have produced similar, if not better results, but they would have required more components, and if you can afford to do it in software, why bother with the extra hardware? Software filtering is amazing… The code for the software filter has been generated on this very useful website.

Additionally, conductive grease applied to the variable resistor may reduce quite much the noise (or shortcut the whole coil of wire…)

[ Posted on May 16th, 2011 at 21:56 | no comment | ]

Sunday, May 15th, 2011

The Infernal Op Amp 2

Categories: [ DIY ]

I don't have a proper explanation as for the why, but the op amp problem I had recently is solved by using a virtual ground set to 1/2 Vsupply.

My understanding there is that the differential amplifier acts as both an inverting and non inverting amplifier, and that it needs a negative supply (or a virtual ground, which amounts to the same thing) for the non-inverting part. Using a virtual ground as mentioned above has two drawbacks:

  • it brings the reference point of Vout to 1/2 Vsupply, which makes it much less nice to use with the Arduino's analog input (only the upper-half of the input range is used because of this offset) and
  • the maximum allowable range for the signals is between 1/2 Vsupply and Vsupply-1.5V (for the LM324), which is not much even when Vsupply is 12 V.

Moreover, the differential amplifier needs well matched resistors: R1||R2 = R3||R4 (R1||R2 is the equivalent resistance of R1 in parallel with R2), othwerwise it has an additional DC offset which gets amplified by the gain of the differential amplifier, making the whole thing useless for my purpose of amplifying the very small voltage across a shunt.

On the bright side though, I found another op amp, the LT1495, that can accept inputs beyond Vsupply and with a very low input offset. Its only drawback is that it costs 25 times more than the LM324 (which was very, very cheap, but still).

[ Posted on May 15th, 2011 at 20:52 | 1 comment | ]

Saturday, May 7th, 2011

Slot Car Speed Controller

Categories: [ DIY/Arduino ]

I just tested the first prototype of the speed controller for the Tyco slot cars. Currently, the Arduino reads the potentiometer with analogRead() and applies PWM (with analogWrite()) on the base of a BC547 transistor. The transistor acts as a driver for a FQP70N10 MOSFET which controls the motor. The MOSFET doesn't seem to heat at all (I selected this model for exactly that reason) and speed control works (i.e., I can drive the car on a simple ring circuit, down to quite low speed).

My initial idea was to drive the MOSFET directly with the Arduino, but I noticed after buying a pair of those that they it's not a logic-level MOSFET. Driving it with 5 V would theoretically work (I need about 1 A, which is well within the capabilities of the device), but the internal resistance would be much higher that the value touted on the datasheet, and thus dissipate more heat (exact figures for the resistance at 5 V are not available from the datasheet).

This was a proof of concept, and the concept is therefore proven, I can start working on measuring, with the Arduino, the current delivered to the motor.

[ Posted on May 7th, 2011 at 22:21 | no comment | ]

Monday, March 14th, 2011

Arduino Workbench

Categories: [ DIY/Arduino ]


Here's a mini-workbench for Arduino prototyping, made of 6.5 mm plywood.

The Arduino board stands on whatever-they-are-called threaded thinggies you use to screw the motherboard into the computer case without it touching the metal. Arduino screw holes are 3.2 mm in diameter, so I had to drill them to 3.5 mm. It survived the treatment.

The breadboard had an adhesive back, so this one was easy.

The LCD has one potentiometer (top) for contrast and one switch for the LED backlight (depending on the power source, backlight may consume too much current, so it can be switched off if needed). The connectors at the end of the ribbon cable are made from component legs and shrink tube.

The drawback is that now it takes much more space than it used too…

[ Posted on March 14th, 2011 at 22:29 | no comment | ]

Saturday, March 5th, 2011

Comparaison: Ordinateur

Categories: [ IT ]

«  Alors tu vois, le processeur c'est comme le moteur de ta voiture. Et le clavier c'est comme le volant… – Et le système d'exploitation c'est comme l'essence alors ? – Euh…  »

C'est n'importe quoi hein ? La comparaison avec la voiture ne vaut pas tripette, parce que la voiture n'est pas un automate programmable (enfin, pas encore). Voila une comparaison qui me paraît plus correcte (arrêtez-moi si je me trompe): le restaurant. Dans un restaurant et dans le désordre, on trouve:

  • Le cuisinier : c'est lui qui fait (presque) tout le travail, comme le processeur.
  • Le cuisinier lit des recettes et les exécute : ce sont les programmes.
  • Les recettes sont composées de gestes à effectuer qui indiquent au cuisinier comme agir: ce sont les instructions.
  • Les recettes indiquent comment transformer des ingrédients crus (viande, légumes…) : ce sont les données fournies en entrée au programme.
  • Ces ingrédients sont transformés en plats : ce sont les données fournies en sortie par le programme.
  • Les ingrédients et les plats doivent être posés quelque part à un moment donné, par exemple sur des plans de travail : ces derniers servent de mémoire centrale.
  • Certains ingrédients crus doivent être stockés pendant un certain temps, par exemple dans des réfrigérateurs : ce sont les mémoires de masse.
  • Il existe un certain nombre d'opérations qui sont souvent répétées et que le cuisinier a appris à effectuer lors de sa formation professionnelle (émincer, fouetter, incorporer, ciseler…): ces instructions sont l'équivalent du noyau du système d'exploitation.
  • Il existe aussi des recettes de base qui sont souvent répétées et qui entrent dans la composition des plats (roux, bouillon, pain…) : elles forment l'interface de programmation qui sert de base à tous les programmes. Certaines de ces recettes peuvent être commandées directement par le client (le pain par exemple), et représentent les logiciels utilitaire (ou commandes de base) fournies avec le système d'exploiatation.
  • Le restaurant a des clients : ce sont les utilisateurs.
  • Les client s'addressent à un serveur : ce dernier joue le rôle de l'interface utilisateur.
  • Le client peut choisir dans un menu ce qu'il désire manger, et donc les recettes que le cuisinier va executer : ce menu est la liste des programmes que l'utilisateur peut lancer, qui sont parfois regroupées dans un menu (déroulant ou non).
  • dans les restaurants, le cuisinier est rarement seul, il est aidé par le boulanger, le patissier, le saucier: ce sont des coprocesseurs, spécialisés dans l'exécution de certaines tâches.

Enfin, on peut considérer que les casseroles sont comme les registres du processeur, elles servent de stockage temporaire pour les opérations élémentaires.

Après, la comparaison a ses limites: on peut copier des données, mais on ne copie pas un gateau au chocolat…

Aussi, il manque la possibilité au client de donner des ingrédients à la cuisine, c'est à dire à l'utilisateur d'entrer des données dans l'ordinateur.

[ Posted on March 5th, 2011 at 22:00 | 2 comments | ]

Tuesday, March 1st, 2011

Comparaisons: DVD

Translation: [ Google | Babelfish ]

Categories: [ Grumbling ]

In English below

Il m'est venu l'autre nuit l'idée suivante : si on transposait les restrictions imposées sur la plupart des DVD dans la vie réelle, qu'est-ce que ça donnerait?

Imaginons qu'on veuille acheter une copie d'une œuvre d'art. Au lieu de recevoir l'objet attendu, on se retrouve avec:

  • l'objet, mais enfermé dans une vitrine
  • la vitrine est intégralement faite de glace sans tain, on ne peut donc voir l'objet qui s'y trouve, sauf si celui-ci est éclairé depuis l'intérieur de la vitrine,
  • la vitrine est fermée à clef,
  • la clef de la vitrine doit être achetée à part,
  • cette clef est dans une boite scellée, sans ouverture apparente,
  • il est interdit par la loi d'ouvrir la boite pour en sortir la clef,
  • lorsqu'on pose la boite sur la vitrine, la lumière s'allume, mais seulement après que la boite nous ait bien fait comprendre qu'on est indigne de poser nos yeux sur l'objet qui s'y trouve,
  • on n'a pas le droit de ranger la boite n'importe où dans la maison, et la partie de la maison où est rangée la boite ne nous appartient plus.

Imaginons maintenant qu'on acquierre une copie pirate de ladite œuvre d'art : on reçoit une copie qui est éventuellement plus petite que la version qui aurait été livrée dans la vitrine, et peut-être un peu moins bien polie, mais au moins, on peut en disposer à sa guise.

Après ça, c'est vous qui voyez.

I got the following toughts the other night: how would it be if you would transpose into real life the restrictions that are imposed on most DVD?

Let's imagine you wants to buy a copy of a work of art. Instead of getting the expected object, you would have:

  • The object, but enclosed in a display cabinet.
  • The display cabinet would be entirely made of half-silvered mirrors, so that you cannot see the object, except if it's lighted from the inside of the cabinet.
  • The display cabinet is locked.
  • You need to buy separately the key to the display cabinet.
  • This key is in a sealed box, with no visible opening.
  • It is forbidden by law to open the box and extract the key.
  • When you place the box on the top of the display cabinet, the light goes on, but only after it has been made very clear that you are not worth watching the object.
  • You are not allowed to place the box wherever you want in your house, and the place where the box is located is not your property anymore.

Let's now imagine that you acquire a pirate copy of said work of art: you get a copy that is possibly smaller than the one that would have been delivered in the display cabinet, and possibly a bit less well polished, but at least, you can do with it whatever you please.

After that, it's your call.

[ Posted on March 1st, 2011 at 21:49 | no comment | ]

Saturday, February 19th, 2011

Arduino with Vim

Categories: [ DIY/Arduino | IT ]

If you are used to Vim as a text editor, the Arduino IDE is terrible to use. After a little bit of fiddling, here are my tips to program an Arduino using Vim.


To compile the Arduino software, I found the Makefile by Alan Burlison and I modified it to suit my needs. You can get the modified version and use it at your own risks.

It has been modified as follows:

  • Support for arduino 0022 only (but you can change the version number in the Makefile). Versions prior to 0018 are not supported.
  • Binaries are located in /usr/bin.
  • The board is by default atmega328.
  • The programming protocol is stk500v1 and the speed is 57600 bauds.
  • The terminal emulator is xterm and the serial communication software is picocom.
  • The serial port is /dev/ttyUSB0.

All these default values can be changed in the Makefile.master file. Moreover, the following changes have been made:

  • After killing the serial communication software, sleep for 1 second
  • Before starting the programmer, the DTR signal is triggered with stty to reset the board (programming would otherwise not be possible)
  • Warnings remain warnings (GCC's -Werror flag has been removed, because I had a weird warning that I don't know how to fix)
  • The sketch's .pde file is hardlinked into the build directory, and is #included in sketchname_pde.cpp instead of copied into it. This allows GCC to report the errors on the proper line of the .pde file as well as report the proper path for this file in its error messages (when compiling sketchname_pde.cpp, GCC is in the build directory; since it would include ../sketch.pde, the error messages relative to this file would point to a file name starting with ../, but since Vim is in the parent directory, the path to sketch.pde would be wrong and Vim's QuickFix fails to find the file).
  • Linking is made by gcc instead of g++ because of a bug in linking to libm (which is needed if you want to do floating point computations, so it links against it by default).
  • A vim: line has been appended to make Vim recognize the file as a Makefile

To use this Makefile, put Makefile.master into your sketchbook directory, and create in your sketch's directory a Makefile which contains include ../Makefile.master. If you want to add extra libraries (here RF12, GLCDlib and Ports), it looks like this:

LIBS = RF12 GLCDlib Ports
LIB_DIRS = $(addprefix ../libraries/,$(LIBS))
include ../Makefile.master

Typing make inside the directory where the Makefile resides builds the sketch. make upload uploads it, make monitor starts the serial communication software on the serial port and make upload_monitor does both sequentially. Finally, make clean cleans up the build directory created when buidling the sketch.

Arduino Syntax File for Vim

Get arduino.vim by Johannes Hoff and put it in your ˜/.vim/syntax/ directory. It will let Vim recognize .pde files are as arduino, turning on C++ syntax highlighting plus Arduino-specific keywords.


Vim allows to open multiple tabs: run vim -p *.* in your sketch's directory, and it opens all the files (except the Makefile) in separate tabs. Use Ctrl-PgUp and Ctrl-PgDown to switch between tabs.

To close all tabs at once, you can use :tabd q, but this is tedious, so I made a shortcut: Add command Q tabd q to your .vimrc and you can close all the tabs at once using :Q. You can do the same with :w, :wq and :x if you want.

Type :help tab to learn more about tabs (especially, :tabe xyz opens file xyz in a new tab. I thought you'd be glad to know).


You can call make from within Vim by typing :make but that's tedious also. I added the following mappings to my .vimrc:
imap <F9> <ESC>:make<CR>
map <F9> :make<CR>

This lets F9 calls :make (whether you're in command mode or in insert mode). You may want to add set autowrite in your .vimrc so that your files are automatically written when you call make.

Now, at least in Debian, after the call to :make has completed, when you return to your file's screen Vim redirects you to the file that contains the first error in make's output. In my setup, this is a warning in a file belonging to Arduino's core, which I don't want to modify. I could of course press Ctrl-O to return to the file I was editing just before running :make, but that's too much work. What I wanted is to be able to let Vim jump to the files containing warnings and errors, but to force it to ignore system files. The solution is then to add to your ˜/.vimrc the following (all in one line, without spaces after the equal sign):

autocmd Filetype arduino set errorformatˆ=\%-G../libraries\%.\%#,\%-G../../libraries\%.\%#,%-G/space/mweber/tmp/arduino-0022\%.\%#

It requires some tuning, because your Arduino directory is probably not in /space/mweber/tmp/arduino-0022, but since you're smart, you have already understood how to adapt it to your setup.

Please note that to get this setup to work properly, you need to append // vim:ft=arduino to all of the .pde, .cpp and .h files belonging to your sketches, otherwise the Vim will not do the ignoring above. And for this to work, modelines must be enabled by adding set modeline to your ˜/.vimrc.

Finally, since you opened all your files in tabs already, tell Vim not to open the file containing a warning/error in the current tab, but rather in the tab that already contains the file. You do this by adding set switchbuf=usetab in your ˜/.vimrc.

In short, your ˜/.vimrc has now these extra lines:

command Q tabd q
command W tabd w
set modeline
set autowrite
set switchbuf=usetab
imap <F9> <ESC>:make<CR>
map <F9> :make<CR>
autocmd Filetype arduino set errorformatˆ=\%-G../libraries\%.\%#,\%-G../../libraries\%.\%#,%-G/space/mweber/tmp/arduino-0022\%.\%#

[ Posted on February 19th, 2011 at 19:22 | 2 comments | ]

Saturday, February 12th, 2011

Button Box

Categories: [ DIY ]


Here's the Button Box. It has three illuminated push-buttons, one knob (which also acts as a push-button) and one light-dependent resistor (the small thinggy on the lower-right corner) which are controlled by an RBBB microcontrller (software-compatible with the Arduino). Here's the control software.


The push-buttons contain each one bi-color LED (red-green); its color depends on the direction of the current. Each LED which is controlled using PWM, which allows to quickly reverse the direction of the current and create the illusion of a yellow/orange color. Moreover, the Box senses the amount of ambient light (with the light-dependent resistor) and adjust the intensity of the light depending on that: by night, the LEDs are on only 1/64th of the time, while in daylight they are on at 100%, making them more visible.


It connects to the computer through a serial-to-USB adapter. It's a bit ugly like that, but who cares.


The current through the LEDs is limited by a 150 Ω resistor. The push-buttons use the microconstroller's internal pull-up resistors. The light-dependent resistor (rated 4 – 11 kΩ, whatever this exactly means) forms a voltage divider with a 1 kΩ resistor, and its value is read by one of the analog inputs of the microcontroller.


The white PCB is the RBBB, which is powered by the USB-BUB (serial-to-USB adapter, based on an FTDI chip). It's not the cheapest solution, but those components were the easiest to obtain.


The USB-BUB has its outputs rewired to the row of holes along its side, and is soldered sideways to the RBBB using a row of pin headers. The RBBB is then screwed through one ready-made hole to the bottom of the box through an additional piece of plastic glued (with cyanoacrylate glue) to the bottom. This gives a thickness of almost 5 mm which is enough to hold the screw (a bit thicker would have been better). The same is done to the other end of the RBBB which has a similar hole. This holds the USB-BUB enough for the USB cable to be inserted and removed.


Side view. ABS project boxed are nice, because they are easy to drill and cut through with a hacksaw or even with a knife for smaller details.


Inside view with the side walls removed. It's quite tight inside, but it fits nicely.

[ Posted on February 12th, 2011 at 23:04 | 3 comments | ]

Thursday, December 30th, 2010

Compte tours pour circuit auto, troisième partie

Translation: [ Google | Babelfish ]

Categories: [ DIY ]


Le compte tours est enfin terminé, équipé d'une nouvelle version du logiciel afin de corriger des bugs (signal de faux départ lorsque la voiture démarre pendant la configuration, calcul erroné de la durée du premier tour) et d'ajouter des fonctionnalités (un appui sur l'un des deux boutons noirs pendant la course termine le chronométrage et revient à l'écran de configuration sans perdre la configuration précédente). Le bouton RESET (rouge) devient inutile, sauf en cas de plantage du logiciel, ce qui n'est pas encore arrivé.


Voici le portique que j'avais construit l'été dernier. Il est en place dans le circuit de Noël 2010 et relié au boitier.


Les LEDs infrarouges sont montées sur le portique et éclairent la piste.


Elles sont montées en série avec une résistance 82 Ω et alimentées sous 5 V, ce qui donne un courant de 12 mA environ.


La lumière des LED infrarouges est détectée par des phototransistors placés sous la piste. Les rails de guidage du morceau de piste servant à l'origine de compte-tours sont percés de fentes (le picot de guidage des voitures faisait avancer à travers cette fente une roue portant des nombres), et la lumière d'une LED peut donc atteindre le phototransistor correspondant, qui reste cependant bien protégé de la lumière ambiante.


Chaque phototransistor est relié au +5 V par une résistance pull-up de 1 kΩ. Les entrées de l'Arduino sont connectées aux collecteurs des phototransistors. Lorsque ces derniers sont éclairés, le signal est bas (0), et lorsqu'une voiture passe, il est haut (1).

[ Posted on December 30th, 2010 at 13:58 | 1 comment | ]

Circuit auto Noël 2010

Translation: [ Google | Babelfish ]

Categories: [ Games ]


Un circuit compact cette fois-ci, car la place habituelle que j'utilise pour monter le circuit est occupée par le sapin de Noël. Grande innovation cependant cette fois-ci, l'ajout du compte tours électronique.

[ Posted on December 30th, 2010 at 13:27 | 4 comments | ]

Thursday, December 16th, 2010

Compte-tours pour circuit auto, deuxième partie

Translation: [ Google | Babelfish ]

Categories: [ DIY ]

Après plusieurs mois à prendre la poussière, j'ai finalement acheté les composants nécessaires pour construire une version fonctionnelle du compte tour pour circuit auto. Le circuit est le même que celui du prototype, mais l'Arduino Duemilanueve a été remplacé par un RBBB, plus petit et nettement moins cher.


L'interface utilisateur se compose d'un écran LCD (4 lignes de 20 caractères) et trois bouton. Le bouton rouge est relié au reset de l'Arduino. Les bouton noir du milieu sert à choisir l'item suivant dans le menu, et le bouton du bas sert à agir sur l'item sélectionné.


À l'arrière du boitier se trouve un connecteur D-sub à 9 plots récupéré sur une vieille carte mère, où le connecteur du port série était encore relié à la carte par un cable ruban. 4 plots sont utilisés : +5V, 0V, et les signaux venant des pistes 1 et 2.


Le circuit blanc est le RBBB, le brun est morceau de carte à prototyper. Il comporte le potentiomètre pour le contraste de l'écran, et les différentes résistance (pull-down des boutons noirs, limiteur de courant du buzzer). La paire de fils rouge/noir devant à gauche vont au buzzer qui est fixé sur la face avant, derrière un petit trou. Les deux circuits sont fixés par des vis sur le morceau de boitier que j'ai découpé pour laisser passer l'écran, et ce moreceau est vissé sur le fond sur un plot prévu à cet effet.

L'écran LCD est connecté en mode 4bits, et comme le rétro-éclairage contient déjà deux résistance de 10 Ω en parallèle, j'ai pu le brancher directement sur le +5V.

[ Posted on December 16th, 2010 at 13:21 | 1 comment | ]

Thursday, December 2nd, 2010

Linux Tablet Comparison

Categories: [ IT ]

I currently found 3 tablet computers running Linux (all have Bluetooth and WiFi, options are between parentheses):

First line reads: screen size, resolution, weight, autonomy, OS, price.


10.6", 1024x600, 800g, 3 – 5 hours, Ångström, 500 EUR

ARM FreeScale i.MX-37, 256 MB RAM, 4 GB Flash, Ethernet, (3G), SDHC reader, 1 USB host, 2MPx camera

Hacking: root access with ssh by default


11.6", 1366x768, 1000g, 6 hours, Meego, 450(570) EUR

Intel Atom N450, 1 GB RAM, 16(32) GB Flash, (3G+GPS), SDHC reader, 2 USB host, 1.3 MPx camera

Hacking: ?


10.1", 1024x600, 480g, 10 hours, Android+Ångström, 300(350) EUR

ARM Cortex A8, 256 MB RAM, 8(16) GB Flash, Micro SDHC reader, 1 USB host + 1 slave, 0.3 MPx camera

Hacking: replace Android with Ångström

[ Posted on December 2nd, 2010 at 11:12 | no comment | ]

Friday, September 10th, 2010

My Own Maemo Repository

Categories: [ IT ]

I built my own maemo repository to distribute my small and insignificant applications. The APT source is deb http://users.jyu.fi/~mweber/maemo/ fremantle main and the two currently available apps have their own .install files: pointscounter.install and maemo-dict.install.

[ Posted on September 10th, 2010 at 10:49 | no comment | ]

Sunday, August 29th, 2010

Guinness en gelée (2)

Translation: [ Google | Babelfish ]

Categories: [ Cooking ]

Variante de la première expérience de Guinness en gelée.


  • 1 boite de Guinness (440 mL)
  • 10g sucre glace
  • 2g κ-carraghénanes



Mélanger finement le sucre glace avec les κ-carraghénanes. Chauffer la Guinness à 80 °C, y verser le mélange de sucre, mélanger puis mixer. Verser dnas un récipient pour la conservation. Laisser refroidir.


  • On obtient un gel cassant bien noir avec de la mousse sur le dessus (gélifiée elle aussi, donc stable).
  • 2g de gélifiant ça fait trop, le gel est bien résistant, mais on ne sent quasiment que le goût amer de la bière, les autres arômes étant emprisonnés par le gel.
  • La mousse risque de moisir rapidement, je conserve le produit au frigo.

[ Posted on August 29th, 2010 at 17:53 | 4 comments | ]

Thursday, August 26th, 2010

Guinness en gelée (1)

Translation: [ Google | Babelfish ]

Categories: [ Cooking ]

Erwan l'a proposé sur f.m.b.l., je l'ai fait. Même pas peur.


  • 1 boite de Guinness (440 mL)
  • 10g sucre glace
  • 2g gomme xanthane
  • 2g gomme de konjak


Mélanger finement le sucre glace avec les gommes. Verser dans la Guinness et mixer. Laisser prendre au réfrigérateur.


  • Le gel commence à prendre durant le mixage, et il devient plus solide et plus homogène durant le repos au réfigérateur.
  • Après quelques heures, il reste très « tremblant », mais c'est définitivement un gel.
  • Le mixage introduit une grand nombre de bulles d'air, donc la préparation a la même couleur qu'une Guinness qu'on vient de tirer, un beige/brun. Je ne vois pas comment obtenir à froid une préparation noire. J'essayerai à chaud un autre jour avec un autre gélifiant (agar ? carraghénanes ? tara ?).

[ Posted on August 26th, 2010 at 21:53 | 4 comments | ]

Wednesday, August 25th, 2010

QR Code Generator for WiFi Configuration

Categories: [ IT ]

http://zxing.appspot.com/generator/ generates a QR Code that contains SSID, key and encryption type of a WiFi access point. This can be displayed on screen or printed on paper and used for automatically configuring a mobile device for connecting to the wireless network (provided the phone has a camera and can read the barcode).

[ Posted on August 25th, 2010 at 21:59 | 2 comments | ]

Monday, August 16th, 2010

Compte tours (prototype)

Translation: [ Google | Babelfish ]

Categories: [ DIY/Arduino ]


Le prototype de la partie électronique du compte-tours pour circuit auto est prêt. Le code source est disponible .

La diode IR et le phototransistor sur la droite permettent de simuler le passage de la voiture sur une piste. Le buzzer juste à coté donne le départ avec un signal sonore, signale un faux départ avec un autre signal sonore et la fin de la course avec un troisième. Les deux boutons au milieu permettent de choisir les options du menu.

Le menu propose trois options, une par ligne. Un des boutons permet de passer à la ligne suivante (et repart du haut une fois arrivé à la dernière ligne), l'autre permet d'activer l'option choisie. La première option permet de choisir le nombre de tours de la course ; la second permet alternativement de choisir la durée de la course (en minutes) ; la troisième démarre la course.

Durant la course, pour chacune des deux pistes, le nombre de tours parcourus est affiché, ainsi que le chronomètre du tour en cours, le chronomètre de la durée totale de la course et, après le premier tour, la durée du tour le plus court.

Lorsque le nombre de tours est atteint par un des participants, ses chronomètres sont arrêtés et le signal de fin de la course retentit. Lorsque l'autre participant parvient au nombre de tours choisi, ses chronomètres sont arrêtés à leur tour.

Lorsque la durée choisie est écoulée, les deux chronomètres sont arrêtés.

[ Posted on August 16th, 2010 at 21:02 | 1 comment | ]

Thursday, August 12th, 2010

Oscilloscope rudimentaire

Translation: [ Google | Babelfish ]

Categories: [ DIY/Arduino ]

J'ai bricolé hier un script python/GTK qui représente de manière graphique les données produites par le programme-exemple AnalogInSerial. Le code source sans documentation se trouve . Le code est dans le domaine public.


L'entrée analogique n'étant reliée à rien, elle produit surtout du bruit, de fréquence régulière (trop lent pour être les 50 Hz du secteur, mais comme la fréquence d'échantillonage est de l'ordre de 70 Hz, il se peut que le signal soit mal échantilloné) et d'amplitude constante.


Ce qui est plus surprenant, c'est que l'amplitude du bruit diminue lorsque l'Arduino est soulevé de la table.


L'amplitude augmente temporairement lorsqu'on tapote le connecteur (ici le circuit est posé sur la table).


La valeur moyenne lue augmente lorsqu'on souffle sur le connecteur (le circuit est en l'air), tandis que l'amplitude des oscillations diminue. Ensuite, la valeur moyenne diminue très progressivement (sur plusieurs secondes), avant de retrouver son niveau de départ.

[ Posted on August 12th, 2010 at 22:46 | 4 comments | ]

Wednesday, August 11th, 2010

Hello World LCD

Translation: [ Google | Babelfish ]

Categories: [ DIY/Arduino ]


J'ai récupéré l'écran LCD (4 lignes de 20 caractères) de feu Poppikone et je l'ai branché sur l'Arduino. Le Hello World livré en exemple avec la bibiothèque LiquidCrystal fonctionne :)

[ Posted on August 11th, 2010 at 23:51 | no comment | ]

Tuesday, July 27th, 2010

Compte-tours pour circuit auto, première partie

Translation: [ Google | Babelfish ]

Categories: [ DIY ]

But du projet: construire un compte-tours électronique pour mon vieux circuit auto Tyco. Le portique est prêt : deux diodes IR éclairent la piste juste au dessus des voitures. Le compteur mécanique original fonctionnait grâce à un morceau de piste spécial, dont le rail guide était ouvert sur le dessous pour permettre à l'ergot des voitures de faire tourner une roue numérotée. J'ai placé deux phototransistors sous ces fentes : en temps normal, ils reçoivent le faisceau des diodes IR, mais quand une voiture passe, celui-ci est interrompu.

L'interface de sortie est simple à souhait : un fil pour chaque voie, dont la tension passe de 0 à presque 5 V lorsque le faisceau est interrompu. Plus qu'à espérer que la différence soit assez grande pour faire basculer une entrée numérique de l'Arduino.

[ Posted on July 27th, 2010 at 12:14 | 3 comments | ]

Wednesday, July 21st, 2010

Hacker un circuit auto Tyco

Translation: [ Google | Babelfish ]

Categories: [ DIY | Games ]

Le circuit auto est alimenté par un transformateur 12 V/6 W. Le problème, c'est que la tension délivrée baisse lorsqu'on lui demande de débiter davantage de courant, et donc que lorsque deux voitures roulent ensemble, leur accélérations ne sont terribles. De plus, lorsqu'une voiture sort de la piste, le transformateur n'a besoin de débiter que la moitié du courant, la tension augmente brusquement et la voiture restante accélère soudainement. Si elle est en entrée de virage, elle sort de la piste aussitôt.

J'ai donc utilisé une alimentation stabilisée à la place du transformateur, et tous ce problèmes s'envolent (évidemment, les fabricants de jouets ne sont pas prêts à remplacer un petit transformateur à 5 EUR par une alim à 150 EUR). J'ai d'abord règlé l'alim sur 12 V, mais les résultats n'étaient pas terribles. Après quelques essais, j'ai découvert qu'une voiture roulant à fond (j'en ai mise une sur cales pour les tests) recevait 17 V. J'ai donc réglé l'alim sur environ 16 volts, et là ça marche drôlement bien.

Une voiture consomme environ 300 mA dans les virages, et peut consommer brièvement jusqu'à 700 mA quand on accélère à fond. Et quand on utilise deux voitures en même temps, les deux peuvent accélérer à fond au besoin. Aussi, fini les sorties de pistes provoquées par la sortie de l'autre voiture. Que du bonheur.

Prochaine étape, construction d'un compte-tours/chronomètre éléctronique à base d'Arduino. J'ai déjà les diodes IR et les phototransistors, mais l'Arduino et l'écran LCD alphanumériques sont restés à la maison.

[ Posted on July 21st, 2010 at 19:28 | no comment | ]

Monday, July 19th, 2010

Circuit auto 2010

Translation: [ Google | Babelfish ]

Categories: [ Games ]


Il y a deux ans, j'avais ressorti mon vieux circuit auto. Cette année, Emma me l'a redemandé, on en a donc construit un nouveau.

Je me suis rendu compte que les deux voitures d'origine ne fonctionnaient pas très bien dans le looping : l'avant de la carosserie frottait contre la piste et les roues avant ne touchaient plus le sol, ce qui faisait que la voiture restait parfois accrochée sur une mauvaise jonction entre deux rails et sortait de la piste. J'ai donc limé l'avant de la carosserie, et maintenant ça marche beaucoup mieux.

J'ai aussi expérimenté un looping « carré » avec des lignes droite entre chaque quart de looping, mais la voiture noire n'a pas assez de tenue de route pour rouler tête en bas.

[ Posted on July 19th, 2010 at 15:58 | 1 comment | ]

Thursday, July 8th, 2010

4 ans

Translation: [ Google | Babelfish ]

Categories: [ Blog ]

4 ans de blog, 808 messages, 252 commentaires et 205 000 spams.

[ Posted on July 8th, 2010 at 13:26 | 2 comments | ]

Saturday, July 3rd, 2010

Obese Debian Kernel

Categories: [ IT ]

To run the Maemo SDK on a 64-bit computer, you need to enable VDSO compat in the kernel. To do so on Debian Lenny, you need to recompile the kernel. The problem is that when you follow the instructions, you get a 400+ MB package, because the binaries contain all the debugging symbols. After some time spent in search for the solution, I found it: export INSTALL_MOD_STRIP=1 before running make-kpkg. This calls strip on the modules when creating the .deb package.

Here's the procedure:

apt-get install kernel-package ncurses-dev bzip2 module-init-tools initramfs-tools procps fakeroot

apt-get install linux-source-2.6.xx

cp /usr/src/linux-source-2.6.xx.tar.bz2 /some/path/

cd /some/path/

tar jxf linux-source-2.6.xx.tar.bz2

cd linux-source-2.6.xx

cp /boot/config-2.6.xx ./.config

make menuconfig

make-kpkg clean



make-kpkg --rootcmd fakeroot --initrd --revision=custom.001 kernel_image kernel_headers

[ Posted on July 3rd, 2010 at 15:49 | no comment | ]

Tuesday, June 29th, 2010

DICT-NetMOT Gateway Updated

Categories: [ IT ]

The DICT-NetMOT Gateway I wrote some time ago suffered from an annoying bug: when the list of dictionaries at the source website is updated, the gateways uses the wrong dictionary (not-so-long story short: dictionaries are identified by index, and when the indexes change, it looks up in the wrong one). This has happened one time too many it seems, because I decided to fix this and get the gateway to download the list of dictionaries instead of using a hard-coded list. Currently the list is downloaded only on startup, so if it changes, the gateway needs to be restarted. If I am motivated, I may get it to reload automatically after a given timeout. EDIT: I was motivated, I just changed it; it now reloads after 1 day. (2010-06-29).

Short names for dictionaries, used as DICT identifiers, are generated automatically, so this may not work properly for dictionary names I haven't seen yet (there is a risk of short name collision, there is not checking against it).

Dictionaries which should be looked up by default can be specified with a (hard-coded) list of regexps against which the dictionary's long name is matched.

Also, some unidentified time ago, I updated the gateway to use the new NetMOT interface. I noticed that it started to use AJAX to provide the user with a list of suggestions while typing in the query box. I then used this feature to add support for ‘prefix’ and ‘glob’ matching strategies (‘prefix’ is mandatory in the DICT protocol, so before that the implementation was incomplete, but who cares?).

[ Posted on June 29th, 2010 at 08:08 | no comment | ]

Wednesday, June 23rd, 2010

Life Subset

Translation: [ Google | Babelfish ]

Categories: [ Blog ]

Pour filtrer le contenu «  moins intéressant  » du blog, c'est à dire les résumés de livres, de films, les bières et les chocolats, il suffit d'ajouter le paramètre subset=life à l'URL du blog. Pour les plus fainéants, voici des liens directs vers les version HTML et RSS du blog.

To filter out the “less interesting” content of the blog i.e., the book and movie summaries, the beers and chocolats, you just have to append the subset=life parameter to the blog's URL. For the laziest of you, here are direct links to the HTML and RSS versions of the blog.

Jos haluat suodattaa “vähemmän kiinnostavan” sisällön pois, eli kirjojen ja elokuvien yhteenvedot, oluet ja suklaat, sinun tarvitsee vain lisätä subset=life blogin URL:iin. Tässä vielä laiskimille suoria linkkejä HTML- ja RSS- versioihin.

[ Posted on June 23rd, 2010 at 23:37 | no comment | ]

Thursday, June 3rd, 2010

I'm a Geek!

Categories: [ Grumbling ]

I'm 86% geek, to be accurate:

86% Geek

Was there anyone to doubt it?

[ Posted on June 3rd, 2010 at 18:11 | no comment | ]

Sunday, May 30th, 2010

Micro blog 2

Translation: [ Google | Babelfish ]

Categories: [ Blog ]

Il y a un an, j'ai ajouté une fonctionnalité de micro blog (RSS), que je n'ai jamais vraiment utilisée. Je ms suis dit il y a a quelques jours que je pourrais l'utiliser pour garder une trace des videos et images amusantes vues sur le web. On verra bien si je l'utiliserai davantage à partir de maintenant.

J'ai aussi fait en sorte d'afficher la dernière entrée dudit microblog dans l'en-tête du blog, histoire de lui donner un peu plus de visibilité.

[ Posted on May 30th, 2010 at 17:18 | no comment | ]

Thursday, May 27th, 2010

Xorg intel Driver and Refreshing Graphics

Categories: [ IT ]

The not-so-new-anymore computer at work has an intel graphics card, I therefore use the intel Xorg driver. Since Day One, bitmaps (background images) in Firefox got scrambled when they were being repainted. For example, when the top of the page has a background image, after scrolling down and up again, the image is redisplayed by slices, and each slice was repainted upside down.

I finally found the culprit today, after trillions of CPU cycles used for recompiling various versions of Firefox: if I set the AccelMethod option in xorg.conf to XAA (the default value being EXA), it works properly.

Now I just have to find out why the computer crashes (and shuts down) when I restart xdm.

[ Posted on May 27th, 2010 at 20:02 | no comment | ]