bc : 2 little tricks you’ve ever wanted to know

If you’re looking for a good calculator on Linux / Unix, you can use bc. bc is “an arbitrary precision calculator” supporting bignumbers and many operators … well it will mostly do whatever you want (check the fine documentation).

Anyway, about those 2 little tricks I promised :

  1. change the scale variable (eg : scale=10) to set “the total number of digits after the decimal point”. Defaults to 0 -> Not cool.
  2. use the last variable to recall the last value you computed -> Cool.

That was it ! This is what I always need and forget, so I decided to blog it once for all…

If you really don’t know bc yet, give it a try !

Update: you can start bc with a default scale of 20 by using the “-l” option on the command line … (Thanks to Luke).

Linux : Best picture viewer

I previously asked an open question : “which is you favorite Linux picture viewer ?” and got a few answers in the comments, but unfortunately none of them made me happy. I tried quite a few on my own but without much success, till today.

Doing some more googling, I found a great picture viewer : FEH. It’s mostly command line based, it is fast and easy to use.

If you want to have the slideshow of the pictures in a directory then “feh dirName” will do it (even recursively if you add the “-r” option). You can zoom in and out with a middle-click drag left/right, you can do basic editing and delete on the fly.

Check out the feature list of FEH for more…

How likely was that ?!

Having a look at Twitter… oh ! someone added me as a friend … who is he ? no idea … but he has like 467 “friends”… so I guess he’s adding pretty much anyone.

Looking at his “friends” I notice this LvP whose face looked familiar. Following the bread crumbs (LvP’s blog), it turns out that I really know him ! OK, more like “I once knew him”, since I sort of worked with him like 3 months, 7 years ago.

For the story, he was the production director of the french computer game company, Cryo-Networks, in which I did a 3 months coding internship for a game based on Franck Herbert’s Sci-Fi masterpiece, Dune. The purpose of this internship was to code a random 3D landscape / ground / planet generator. So ? How cool is that ? The final result was even really not so bad ! (it was based on the Perlin noise and, by the way, I owe big to Hugo Elias for his really nice website).

So how likely was it to find LvP (Louis van Proosdij) on Twitter ? Pretty slim odds, right ? Looks like the World is as small as it is said, after all !

Building GNUCash on Debian

I’ve just been through hell to get the HEAD revision of GNU Cash to build and run on GNU/Debian … The problem was that GNUCash depends, amongst many other dependencies, on Guile and on the SLIB library for Guile.

If you want to save you some hours, use the following Debian packages (and stick to those versions !)


guile-1.6;1.6.8-6;The GNU extension language and Scheme interpreter
guile-1.6-dev;1.6.8-6;Development files for Guile 1.6
guile-1.6-libs;1.6.8-6;Main Guile libraries
guile-1.6-slib;1.6.8-6;Guile SLIB support
libguile-ltdl-1;1.6.8-6;Guile's patched version of libtool's libltdl
libqthreads-12;1.6.8-6;QuickThreads library for Guile
slib;3a4-4;Portable Scheme library

Good luck !