(-: Geekerie, logiciel libre et vilain gauchisme

Install IHaskell on Mac OS X

jupyter notebooks are awesome, and there are many kernels available for our favorite languages. I wanted to install IHaskell for some time, but always failed either to build it altogether, or to make it work. I finally succeeded today, and it wasn’t that difficult!

The dependencies have been installed using homebrew, and I already had a lot of stuff installed that I believe are also needed (XCode command line tools, xquartz, pango, cairo, python, jupyter, …)

I used stack to build and install IHaskell:

brew install stack
stack setup
stack install ihaskell

Last step, install the jupyter kernel. ihaskell has a subcommand for that:

~/.local/bin/ihaskell install

It needs a little help though to work properly with stack. The kernel spec is installed in ~/Library/Jupyter/kernels/haskell/kernel.json. In order to run the kernel in the stack environment, stack exec -- must be added before the kernel command in the argv entry:

{
    "display_name": "Haskell", 
    "language": "haskell", 
    "argv": [
        "stack", "exec", "--", 
        "/Users/glehmann/.stack/snapshots/x86_64-osx/lts-6.0/7.10.3/bin/ihaskell", 
        "kernel", 
        "{connection_file}", 
        "--ghclib", 
        "/Users/glehmann/.stack/programs/x86_64-osx/ghc-7.10.3/lib/ghc-7.10.3"
    ]
}

That’s it! It is now possible to select Haskell when creating a new notebook in jupyter!

Graphviz pour organiser les travaux

Changement de maison ! Et plein de travaux à faire, et à planifier.

La planification s’est avérée moins évidente que je ne le pensais, entre notre désir de se ménager un espace habitable le plus agréable possible le plus rapidement possible, et les nécessités techniques.

On était un peu perdu avec notre papier et notre crayon. Heureusement, graphviz nous a permis de simplement représenter les dépendances et de se rendre compte de ce qui devait impérativement être fait d’abord !

digraph travaux_sibiril {

tableau_electrique
electricite_salon
electricite_bureau
electricite_cuisine
electricite_chambre_parents
electricite_chambre_enfants
electricite_chambre_amis
casser_cloison
monter_cuisine
chauffe_eau_solaire
demonter_chauffe_eau
demonter_isolation
velux
refaire_isolation
finition_salon
monter_cloison
casser_cheminee
monter_poele
finition_chambre_parents
finition_chambre_enfants
finition_chambre_amis
finition_bureau
parquet_cuisine

tableau_electrique->electricite_salon
tableau_electrique->electricite_bureau
tableau_electrique->electricite_cuisine
tableau_electrique->electricite_chambre_parents
tableau_electrique->electricite_chambre_enfants
tableau_electrique->electricite_chambre_amis
demonter_isolation->velux
demonter_isolation->refaire_isolation
demonter_isolation->electricite_chambre_parents
refaire_isolation->electricite_chambre_enfants
refaire_isolation->electricite_chambre_amis
electricite_chambre_parents->finition_chambre_parents
/*casser_cloison->monter_cloison*/
casser_cloison->parquet_cuisine
monter_cloison->parquet_cuisine
chauffe_eau_solaire->demonter_chauffe_eau
demonter_chauffe_eau->monter_cuisine
finition_salon->monter_cloison
monter_cloison->monter_poele
casser_cheminee->monter_poele
casser_cheminee->finition_chambre_parents
electricite_cuisine->monter_cuisine
electricite_bureau->finition_bureau
electricite_chambre_enfants->finition_chambre_enfants
electricite_chambre_amis->finition_chambre_amis
monter_cloison->electricite_chambre_parents
parquet_cuisine->monter_poele
}

Travaux

1000+ commits in ITK

I just discovered today that I’ve passed the 1000th commit in ITK, and that I am now in the top 10 developers of that great project!

$ git shortlog -ns | grep -v 'KWSys Robot' | head
  9539	Luis Ibanez
  5614	Bill Lorensen
  3123	Brad King
  2579	Daniel Blezek
  1860	Matthew McCormick
  1561	Hans Johnson
  1513	Julien Jomier
  1268	Bradley Lowekamp
  1042	Jim Miller
  1015	Gaëtan Lehmann

I must say I’m quite proud of it!

Slow git gerrit-push

I’ve been annoyed by the very slow process of submitting changes to ITK since the beginning of the year. Each git gerrit-push took approximately 10 minutes to run.

That would have annoyed me a lot more a few years when I was doing it several times a day, but now that it is only a hobby, I just let it run while actually working.

But now in the train, with the internet access failing every minute or so, this is quite annoying. So I finally took a few minutes to search on my favorite search engine, and discovered that a simple

GSSAPIAuthentication no

in my ~/.ssh/config fixed the problem. git gerrit-push now runs in just a few seconds. And this is in the train, not with a fast connection.

I should have looked at it a lot earlier!

Sharing android network with a mac through USB

I’m often sharing my network on my android smartphone with my mac, and I’m often plugin my phone to my mac to charge the phone. It is quite obvious to me that the network should go through the USB connection, but unfortunately, I’ve never been able to make it work that way, and was always relying on the wifi to share the network.

I finally found that Mac OS X does not have the required drivers — which is a shame my opinion. Fortunately, there is a nice open source project to fix that lack: HoRNDIS.

I’ve installed it on the mac, restarted the mac, turned on the USB network sharing feature on the android phone and plugged the phone in USB. It works!