Fast, really?

I was looking at this very interesting set of benchmarks of web frameworks. I started to really get deep into the results, taking ideas on new tools and technologies I could learn to make my websites faster.

And then I realised, why bother being fast? The slowest framework will always be faster than any website that displays some kind of advertising! (that is any website). What slows the web down is not underperforming networks, hardware or software, it is advertising. The reason people hate advertising on webpages is the ever growing intrusion that it represents but also, the fact that it ruins page loading time.

Don’t believe me? Run an adblocker and you will see the difference!

Serge Brussolo : immersion totale

Lire un livre de Serge Brussolo, c’est comme écouter le requiem de Mozart ou regarder un film de Stanley Kubrick. Dès les premières lignes (les premières mesures, les premières images), on est dans un autre monde. Il n’y a pas le temps d’adaptation nécessaire en général à passer de la réalité à la fiction.

Tous les livres de Brussolo ne se valent pas bien sûr. Certains sont même de purs ratages — cependant toujours rattrapés par de véritables chefs d’œuvre. Mais quel qu’il soit, un livre de Brussolo garantit ce dépaysement total, cette noyade dans des mondes oniriques. Le génie de Brussolo, c’est ça ! C’est l’incroyable capacité qu’il a, dans un style dépouillé et riche à la fois, de nous emmener dans ses fantasmes, au plus profond de son moi.

Brussolo, c’est l’immersion totale. Encore plus qu’une évasion du réel, un autre réel semblable au réel des dieux : une invention humaine qui se met à vivre par elle-même.

Tabular display in Linux terminal

A command I like in Linux is ‘column’. It allows the display of ordered data (typically CSV) in a tabular way in the Linux terminal.

For example, assume you have the following file:

$ cat data
server|location|usage
mars.example.com|New York|web
saturn.example.com|Beijing|database
mercury.example.com|Sidney|nosql

You can display this file nicely as follows:

$ column -t -s '|' data
server               location  usage
mars.example.com     New York  web
saturn.example.com   Beijing   database
mercury.example.com  Sidney    nosql

-t indicates that we want tabular display and -s specifies the separator we use. I like to use the pipe (‘|’) as data separator, but usually the semi colon (‘;’) is used for CSV data.

Why no busybox for Android

I found out why there is no busybox by default on Android. It looks like it is for licensing reasons. On the Android command line, the all-in-one executable used is toybox as it is under the BSD license whereas busybox use GPL v2.

The little drawback of this situation is that toybox is not as feature complete as busybox. For example, it is lacking the vi editor. There is not even ed to quickly edit a file.

In the end this is not the biggest issue as there are so many busybox installers around. But I also find it a shame that for non technical reasons we have less functionalities. That’s not what open source is supposed to be about.

Poor Man’s Service Starter

There are situations where there is no easy init system on a box. Most of the time, it is because we are dealing with cheap VPSes which don’t even have enough memory to run systemd. However, you want to do a simple and straightforward thing : start a light service.

sysvinit is a very good service starter, but not really suitable as far as user services are concerned. You wouldn’t start your HTTPD by putting an entry in /etc/inittab. You could write rc scripts, which time consuming if you want to do things right. Or, you could install so-called service managers a.k.a. process supervisors. But there is a simpler solution : use plain old cron.

In a crontab, instead of the “5-star” field, use “@reboot” and you’re done. For example :

$ crontab -l
@reboot /path/to/service

Please note that it works very well on Red Hat and associated distros (CentOS…) But it seems not to be the case in other environments. Anyway, give it a try!

Compiling vim on a Raspberry Pi 3

Just for the fun of it and in order to test my newly acquired Raspberry Pi 3, I ran the compilation of vim on it to see how its quad-core arm 64-bit processor compares to my main PC Core i5.

For reference, this is the set of commands I ran on both machines :

$ git clone https://github.com/vim/vim
$ cd vim/src
$ ./configure --prefix=/opt/vim --with-compiledby=lyderic --with-features=huge
$ time make -j 4

On the Intel Core i5 PC, this took 33 ½ seconds. It is not a super fast CPU but a low-power i5-5250U that runs at 1.60GHz (my desktop is an Intel NUC).

On the Raspberry Pi, the compilation was achieved in a little more than 2 minutes.

That said, I found that running the Raspberry Pi as a desktop computer, although not as smooth as a current desktop PC, is convincing. It was not really usable until the last iteration (Model B 2), but now, it seems to be there.