Saturday, August 31, 2013

First release of Tioga that works on win32

While I usually don't announce releases of tioga, as it is now mostly in maintenance mode, with not a lot of new features, today is a different story. I finally got around to try and build it on windows, and after a bit of a fight, I got it to compile and work there (I got hit by the classical fopen(file, "w") for binary files, that don't make any difference on Linux and Mac, but that do on Windows...). The release is already available on the rubyforge download page. Gems will be available later on today.

To actually make it work on windows, here is what you need to install:

  • Ruby, using the one-click installer. The 1.9.3 version works just fine. Don't forget to click the box to add the executables to the PATH
  • the Ruby DevKit, at the same location. Make sure you take the one matching the Ruby version you installed (there's an explicative text on the side). You need to unpack it in the directory where Ruby got installed
  • you need to get a LaTeX distribution, try out proTeXt
  • at this point, you may need to reboot
  • then, just open a windows terminal (Execute cmd.exe) and run:
    gem install tioga
    

And that's it ! That also means that ctioga2 works on windows, if you run:

gem install ctioga2

Tuesday, August 27, 2013

Announcing version 0.5 of ctioga2

I've just released version 0.5 of ctioga2, my plotting program. While there is still quite a lot of improvements I'd like to get in some day, the past few days have seen a lot of activity. Probably the most important change is the new space-separated command file format, much simpler than the old one (which is still supported, although marked clearly as deprecated now). Another important change for the users is the large improvement of error reporting: in most cases, ctioga2 pinpoints the exact location where things go wrong; it also features reporting on LaTeX errors. The last important feature is also the introduction of real contour plots, such as the one below, coming from the documentation:

Now, I feel like ctioga2 is coming close to gnuplot in terms of features and ease of use. Part of my plans for the website is to create a gnuplot mockup gallery, in which I would take as many examples from the gnuplot website as possible (ie all the ones ctioga2 can reproduce) and compare the code and look of both.

Among features I'd like to implement for ctioga2, here are the ones that I think are the most important ones:

  • plot styles (histograms, bars, impulses), in the spirit of the plot with instruction of gnuplot
  • complex axes: broken axes and linked axes
  • full control of the tick labels and positions (alternative formats, placing ticks at multiples of π, and labelling them as such...)
  • full styling using CSS-like stylesheets
  • a windows port would be nice, too

But maybe you have other ideas you'd like to see before that ?

Thursday, August 1, 2013

Importing lots of files into git-annex

If, like me, you find git-annex very appealing, but have been moving files without it for a while, here is a little script that may help you through the transition. I've just converted my MP3 library to git-annex, but, now I must convert all my copies of the library on various computers to track one (or more) of them. The trick is to teach git-annex about the already existing files, as re-downloading a 20GB library through a 80 KB/s upload DSL line doesn't sound that funny. Here is how I did it.

First, convert one repository to using git-annex. Then, switch to another computer, move away the directory containing the files to a backup directory, and git clone the first repository. Then, from the directory created, run:


~ ./import path/to/old/backup/copy

Where import is the following script:


#! /bin/bash

src="$1"

IFS=$'\n' 
for f in $(find -type l); do 
    if stat -L "$f" >/dev/null 2>/dev/null; then
        echo "File $f ok"
    else
        tg=$(readlink "$f" | sed 's/.*git/.git/' )
        dir=$(dirname "$tg")
        if [ -r "$src/$f" ]; then
            mkdir -p "$dir"
            cp -avl "$src/$f" "$tg"
        fi
    fi
done

Once this is done, you'll need to run

~ git annex fsck

Of course, there is no warranty !! It saved me lots of download time, but it could irretrievably damage your data, put your dog in danger or set fire to your house, so use with care !