This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Scala tool for formatting the source code

23 replies
samira_t
Joined: 2011-01-03,
User offline. Last seen 1 year 26 weeks ago.

Hi,

I read the "Scala Style Guide" at http://davetron5000.github.com/scala-style/index.html
and tried to use the formatting option of Eclipse for automatic
formatting of my Scala codes. But it seems that Eclipse does not
support reformatting of Scala source codes. Is there any tool that I
can use for automatic formatting of my Scala codes? How the programmer
of Standard library maintain their code in a consistent format?

Thanks,
Samira

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala tool for formatting the source code

On 18/02/2011 17:08, Samira Tasharofi wrote:
> How the programmer
> of Standard library maintain their code in a consistent format?

Perhaps by paying attention to the coding rules set in the project? ;-)

(but admittedly, I use sometime Eclipse's reformatter, on Java code, when some previous
programmer was sloppy (eg. bad indent size) or when the SCM messed up indentation with its
automatic merge (matching wrong level of braces). So it is still convenient.)

Note: there are other IDEs (NetBeans, JetBrains) which might (or not) implement this feature.

Jesper Nordenberg
Joined: 2008-12-27,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala tool for formatting the source code

Samira Tasharofi skrev 2011-02-18 17:08:
> Hi,
>
> I read the "Scala Style Guide" at http://davetron5000.github.com/scala-style/index.html
> and tried to use the formatting option of Eclipse for automatic
> formatting of my Scala codes. But it seems that Eclipse does not
> support reformatting of Scala source codes. Is there any tool that I
> can use for automatic formatting of my Scala codes? How the programmer
> of Standard library maintain their code in a consistent format?

This might be what you're looking for:

https://github.com/mdr/scalariform

/Jesper Nordenberg

david.bernard
Joined: 2009-01-08,
User offline. Last seen 1 year 27 weeks ago.
Re: Re: Scala tool for formatting the source code
Eclipse ScalaIDE use scalariform to format code. IIRC to use reformat you should select the code to reformat.If it doesn't work, please open a bug ticket.
/davidB

On Fri, Feb 18, 2011 at 19:24, Jesper Nordenberg <megagurka [at] yahoo [dot] com> wrote:
Samira Tasharofi skrev 2011-02-18 17:08:
Hi,

I read the "Scala Style Guide" at http://davetron5000.github.com/scala-style/index.html
and tried to use the formatting option of Eclipse for automatic
formatting of my Scala codes. But it seems that Eclipse does not
support reformatting of Scala source codes. Is there any tool that I
can use for automatic formatting of my Scala codes? How the programmer
of Standard library maintain their code in a consistent format?

This might be what you're looking for:

https://github.com/mdr/scalariform

/Jesper Nordenberg


Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scala tool for formatting the source code
It definitely works, but I think it always runs on the entire file, selection or not.
What's your plugin version and update site?



On Fri, Feb 18, 2011 at 4:27 PM, David Bernard <david [dot] bernard [dot] 31 [at] gmail [dot] com> wrote:
Eclipse ScalaIDE use scalariform to format code. IIRC to use reformat you should select the code to reformat. If it doesn't work, please open a bug ticket.
/davidB

On Fri, Feb 18, 2011 at 19:24, Jesper Nordenberg <megagurka [at] yahoo [dot] com> wrote:
Samira Tasharofi skrev 2011-02-18 17:08:
Hi,

I read the "Scala Style Guide" at http://davetron5000.github.com/scala-style/index.html
and tried to use the formatting option of Eclipse for automatic
formatting of my Scala codes. But it seems that Eclipse does not
support reformatting of Scala source codes. Is there any tool that I
can use for automatic formatting of my Scala codes? How the programmer
of Standard library maintain their code in a consistent format?

This might be what you're looking for:

https://github.com/mdr/scalariform

/Jesper Nordenberg



samira_t
Joined: 2011-01-03,
User offline. Last seen 1 year 26 weeks ago.
Re: Scala tool for formatting the source code

Thank you all for your help. scalariform now "almost" works in my
eclipse. By "almost" I mean sometimes it cannot reformat my code. But
in most cases, it works.
The problem is that it does not work for "save action". Is it supposed
to work on save actions?

On Feb 18, 3:45 pm, Naftoli Gugenheim wrote:
> It definitely works, but I think it always runs on the entire file,
> selection or not.
> What's your plugin version and update site?
>
> On Fri, Feb 18, 2011 at 4:27 PM, David Bernard
> wrote:
>
>
>
>
>
>
>
> > Eclipse ScalaIDE use scalariform to format code. IIRC to use reformat you
> > should select the code to reformat.
> > If it doesn't work, please open a bug ticket.
>
> > /davidB
>
> > On Fri, Feb 18, 2011 at 19:24, Jesper Nordenberg wrote:
>
> >> Samira Tasharofi skrev 2011-02-18 17:08:
>
> >>  Hi,
>
> >>> I read the "Scala Style Guide" at
> >>>http://davetron5000.github.com/scala-style/index.html
> >>> and tried to use the formatting option of Eclipse for automatic
> >>> formatting of my Scala codes. But it seems that Eclipse does not
> >>> support reformatting of Scala source codes. Is there any tool that I
> >>> can use for automatic formatting of my Scala codes? How the programmer
> >>> of Standard library maintain their code in a consistent format?
>
> >> This might be what you're looking for:
>
> >>https://github.com/mdr/scalariform
>
> >> /Jesper Nordenberg

david.bernard
Joined: 2009-01-08,
User offline. Last seen 1 year 27 weeks ago.
Re: Re: Scala tool for formatting the source code


On Fri, Feb 18, 2011 at 23:20, Samira Tasharofi <samira [dot] tasharofi [at] gmail [dot] com> wrote:
Thank you all for your help. scalariform now "almost" works in my
eclipse. By "almost" I mean sometimes it cannot reformat my code. But
in most cases, it works.
The problem is that it does not work for "save action". Is it supposed
to work on save actions?

No you should call it explicitly.There is no save hook (on save action) like for java.On save, only builder is called.
/davidB 



On Feb 18, 3:45 pm, Naftoli Gugenheim <naftoli [dot] [dot] [dot] [at] gmail [dot] com> wrote:
> It definitely works, but I think it always runs on the entire file,
> selection or not.
> What's your plugin version and update site?
>
> On Fri, Feb 18, 2011 at 4:27 PM, David Bernard
> <david [dot] bernard [dot] [dot] [dot] [at] gmail [dot] com>wrote:
>
>
>
>
>
>
>
> > Eclipse ScalaIDE use scalariform to format code. IIRC to use reformat you
> > should select the code to reformat.
> > If it doesn't work, please open a bug ticket.
>
> > /davidB
>
> > On Fri, Feb 18, 2011 at 19:24, Jesper Nordenberg <megagu [dot] [dot] [dot] [at] yahoo [dot] com>wrote:
>
> >> Samira Tasharofi skrev 2011-02-18 17:08:
>
> >>  Hi,
>
> >>> I read the "Scala Style Guide" at
> >>>http://davetron5000.github.com/scala-style/index.html
> >>> and tried to use the formatting option of Eclipse for automatic
> >>> formatting of my Scala codes. But it seems that Eclipse does not
> >>> support reformatting of Scala source codes. Is there any tool that I
> >>> can use for automatic formatting of my Scala codes? How the programmer
> >>> of Standard library maintain their code in a consistent format?
>
> >> This might be what you're looking for:
>
> >>https://github.com/mdr/scalariform
>
> >> /Jesper Nordenberg

samira_t
Joined: 2011-01-03,
User offline. Last seen 1 year 26 weeks ago.
Re: Scala tool for formatting the source code

But in https://github.com/mdr/scalariform
it is mentioned that it works for save action.

On Feb 18, 4:34 pm, David Bernard wrote:
> On Fri, Feb 18, 2011 at 23:20, Samira Tasharofi
> wrote:
>
> > Thank you all for your help. scalariform now "almost" works in my
> > eclipse. By "almost" I mean sometimes it cannot reformat my code. But
> > in most cases, it works.
> > The problem is that it does not work for "save action". Is it supposed
> > to work on save actions?
>
> No you should call it explicitly.
> There is no save hook (on save action) like for java.
> On save, only builder is called.
>
> /davidB
>
>
>
>
>
>
>
>
>
> > On Feb 18, 3:45 pm, Naftoli Gugenheim wrote:
> > > It definitely works, but I think it always runs on the entire file,
> > > selection or not.
> > > What's your plugin version and update site?
>
> > > On Fri, Feb 18, 2011 at 4:27 PM, David Bernard
> > > wrote:
>
> > > > Eclipse ScalaIDE use scalariform to format code. IIRC to use reformat
> > you
> > > > should select the code to reformat.
> > > > If it doesn't work, please open a bug ticket.
>
> > > > /davidB
>
> > > > On Fri, Feb 18, 2011 at 19:24, Jesper Nordenberg > >wrote:
>
> > > >> Samira Tasharofi skrev 2011-02-18 17:08:
>
> > > >>  Hi,
>
> > > >>> I read the "Scala Style Guide" at
> > > >>>http://davetron5000.github.com/scala-style/index.html
> > > >>> and tried to use the formatting option of Eclipse for automatic
> > > >>> formatting of my Scala codes. But it seems that Eclipse does not
> > > >>> support reformatting of Scala source codes. Is there any tool that I
> > > >>> can use for automatic formatting of my Scala codes? How the
> > programmer
> > > >>> of Standard library maintain their code in a consistent format?
>
> > > >> This might be what you're looking for:
>
> > > >>https://github.com/mdr/scalariform
>
> > > >> /Jesper Nordenberg

MattRussell
Joined: 2009-07-22,
User offline. Last seen 45 weeks 3 days ago.
Re: Scala tool for formatting the source code
On Friday, February 18, 2011 10:20:05 PM UTC, Samira Tasharofi wrote: 
Thank you all for your help. scalariform now "almost" works in my
eclipse. By "almost" I mean sometimes it cannot reformat my code. But
in most cases, it works.

The formatter only works if it can parse the source successfully, which might account for some of what you're seeing. Certainly, though, if you've got Scala 2.8 source that compiles successfully but can't be reformatted, that's a bug -- it'd be much appreciated if you could file an issue on Github:
  http://github.com/mdr/scalariform/issues
 
The problem is that it does not work for "save action". Is it supposed
to work on save actions?

Yes -- it used to, unfortunately it seems it stopped working at some point. I'll see if I can get it working again.
-- Matt
Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Re: Scala tool for formatting the source code

On Friday February 18 2011, Jesper Nordenberg wrote:
> ...
>
> This might be what you're looking for:
>
> https://github.com/mdr/scalariform

Well, that's an alarming development.

I cannot fathom why programmers want to surrender the precise layout and
appearance of their code to a program. There's certainly no way a
program is going to be able to format code the way I want it. I make
decisions about each line, block and file and while there are rules I
use, their are many exceptions, many cases were simple uniformity
cannot produce well presented code. Now, if a program could do that,
I'd use it, but given the vanishingly small probability of such a thing
existing (while Scala is still in use), I will not hold my breath.

> /Jesper Nordenberg

Randall ZSchulz

jibal
Joined: 2010-12-01,
User offline. Last seen 1 year 45 weeks ago.
Re: Re: Scala tool for formatting the source code
On Fri, Feb 18, 2011 at 9:05 PM, Randall R Schulz <rschulz [at] sonic [dot] net> wrote:
On Friday February 18 2011, Jesper Nordenberg wrote:
> ...
>
> This might be what you're looking for:
>
> https://github.com/mdr/scalariform

Well, that's an alarming development.

Prettyprinting has been around for at least five decades.
 

I cannot fathom

Inability to comprehend is not a virtue.
 
why programmers want to surrender the precise layout and
appearance of their code to a program.

You're allowed to modify the program's output, y'know. And interactive formatters allow you to selectively choose what code to format -- no surrendering is required.
 
There's certainly no way a
program is going to be able to format code the way I want it. I make
decisions about each line, block and file and while there are rules I
use, their are many exceptions, many cases were simple uniformity
cannot produce well presented code. Now, if a program could do that,
I'd use it, but given the vanishingly small probability of such a thing
existing (while Scala is still in use), I will not hold my breath.


Sounds like a case of making the perfect the enemy of the good.

-- Jim

MattRussell
Joined: 2009-07-22,
User offline. Last seen 45 weeks 3 days ago.
Re: Re: Scala tool for formatting the source code
On 19 February 2011 05:05, Randall R Schulz <rschulz [at] sonic [dot] net> wrote:
>> https://github.com/mdr/scalariform
>
> Well, that's an alarming development.
>
> I cannot fathom why programmers want to surrender the precise layout and
> appearance of their code to a program

Each to their own, of course, but I wrote Scalariform because I find coding without a formatter to be a pretty harsh experience:

* It eases some of the mechanics of manipulating code text. I'm constantly messing stuff up as I add / edit code, and I find it unbearably tedious to manually reindent / fix spacing that way.

* You do indeed surrender the precise layout of your program. YMMV, but I find an automatic formatter can get close enough to an acceptable style often enough that this is not an issue.

* You can selectively disable an automatic formatter for regions of the source

* Mumble mumble...something about enforcing consistency of code style across a team...mumble mumble. Probably not a bad idea, to be honest, but not a particularly big issue for me.

Would you be willing to try it across some of your source? I'd be interested to hear how much you find unacceptable -- both cases where an automatic rule would have solved things, and cases where no simple automatic rule could plausibly have done the right thing.

-- Matt
Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Re: Scala tool for formatting the source code

On Saturday February 19 2011, Matt Russell wrote:
> On 19 February 2011 05:05, Randall R Schulz wrote:
> ...
>
> Would you be willing to try it across some of your source? I'd be
> interested to hear how much you find unacceptable -- both cases where
> an automatic rule would have solved things, and cases where no simple
> automatic rule could plausibly have done the right thing.

I really don't have any interest in a program that leaves my code
untouched and I want to write my code the way I want to write it, not
write it in a manner I dislike and have a tool make it into one I do
like.

I really don't think this sort of program is a useful thing and I don't
think it's good for people to have it or to use it. I very strongly
believe that we should write our code the way we want it written. What
is the real motivation for writing code in a form other than the way
you want it?

MattRussell
Joined: 2009-07-22,
User offline. Last seen 45 weeks 3 days ago.
Re: Re: Scala tool for formatting the source code
On Saturday, February 19, 2011 3:01:01 PM UTC, Randall R Schulz wrote:
> I really don't think this sort of program is a useful thing and I don't > think it's good for people to have it or to use it. 
You're entitled to your opinion, but I would ask that you at least try out the tool before making an assertion like that.
> I very strongly believe that we should write our code the way we want it written. What > is the real motivation for writing code in a form other than the way you want it?
I use a code formatter to get code into the form I want it. As above, to "ease some of the mechanics of manipulating code text". No-one, I assume, writes perfect code in a linear fashion. We add bits, move bits, refactor, and so forth. In doing so, the formatting gets messed up. 
Take, for example, moving a local def block to a containing scope, which will then require a change of indentation. Rather than reindenting by hand, I get a tool to do the job. My mode of operation is to invoke a formatter interactively very frequently during editing. I find that that way, I don't have to worry so much about maintaining the layout of the source and can concentrate on the more interesting parts of coding.
-- Matt
Jim Powers
Joined: 2011-01-24,
User offline. Last seen 36 weeks 2 days ago.
Re: Re: Scala tool for formatting the source code

On Feb 19, 2011 10:01 AM, "Randall R Schulz" <rschulz [at] sonic [dot] net> wrote:

> I really don't have any interest in a program that leaves my code
> untouched and I want to write my code the way I want to write it, not
> write it in a manner I dislike and have a tool make it into one I do
> like.
>
> I really don't think this sort of program is a useful thing and I don't
> think it's good for people to have it or to use it. I very strongly
> believe that we should write our code the way we want it written. What
> is the real motivation for writing code in a form other than the way
> you want it?

One of the virtues of programming languages are their constrained grammars. Because of this fact it is possible do do interesting things with the resulting parse tree, compiling for one, pretty printing is another. Automatic pretty-printing of code is really quite useful. You see, the way you format your code may be great for you but could suck for me. I often automatically reformat code in my emacs buffers (using emacs' scala-mode and scaliform in combination) because the results generally put the various constructs into predictable visual locations lowering my cognitive load while reading. Of course you are free to keep your source code in the way that is most comfortable to you, but others may not share your tastes this is where automated tools like pretty-printing with personal customizations comes into play. Since I use code formatters to help me digest code and I've not yet witnessed the collapse of the universe doing so I don't think the existence and use of such tools harms anyone.

--
Jim Powers

Peter C. Chapin 2
Joined: 2011-01-07,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scala tool for formatting the source code

On Sat, 19 Feb 2011, Randall R Schulz wrote:

> I really don't think this sort of program is a useful thing and I don't
> think it's good for people to have it or to use it. I very strongly
> believe that we should write our code the way we want it written. What
> is the real motivation for writing code in a form other than the way
> you want it?

You aren't always the one writing the code.

I work with students in group projects. It is desirable that we all produce
consistently formatted code and students are often not very good at that.
One way to handle the issue is to agree on a style and then encode that
agreement into the configuration of a code formatting tool. Then the rule is
simple: run the code through the formatter before committing it to the
repository. In fact, we could even create a pre-commit hook that does this
automatically (although we haven't). This is an easy and effective way for
everyone to generate consistently styled code when working on the same
project, despite differences (legitimate or otherwise) in personal
preferences.

I agree that code formatters don't do a perfect job. However, a good
formatter does a good enough job to make it very worthwhile in the situation
I described. I definitely support their use.

Peter

dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: Re: Scala tool for formatting the source code
Code formatters have two main goals:
1. Automatically formatting code which, for some reason, got badly formatting. In fact, the most basic operation -- indentation adjustment -- is found on all IDEs and code editors with varying degrees of sophistication.
2. Reformatting other people's code to something that doesn't offend your sensibility. Perhaps you are very concerned about what the code looks like, but the fact is that there are many programmers out there -- good and bad -- which don't give much of a damn. 

On Sat, Feb 19, 2011 at 03:05, Randall R Schulz <rschulz [at] sonic [dot] net> wrote:
On Friday February 18 2011, Jesper Nordenberg wrote:
> ...
>
> This might be what you're looking for:
>
> https://github.com/mdr/scalariform

Well, that's an alarming development.

I cannot fathom why programmers want to surrender the precise layout and
appearance of their code to a program. There's certainly no way a
program is going to be able to format code the way I want it. I make
decisions about each line, block and file and while there are rules I
use, their are many exceptions, many cases were simple uniformity
cannot produce well presented code. Now, if a program could do that,
I'd use it, but given the vanishingly small probability of such a thing
existing (while Scala is still in use), I will not hold my breath.


> /Jesper Nordenberg


Randall ZSchulz



--
Daniel C. Sobral

I travel to the future all the time.
Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala tool for formatting the source code

On 19/02/2011 10:22, Matt Russell wrote:
> Each to their own, of course

Sure, it is better to have a tool and not use it... than not have the
tool when we need it! ;-)

> but I wrote Scalariform because I find
> coding without a formatter to be a pretty harsh experience:

Not me, but I send back to your initial sentence...

> * It eases some of the mechanics of manipulating code text. I'm
> constantly messing stuff up as I add / edit code, and I find it
> unbearably tedious to manually reindent / fix spacing that way.

Not me, again, but I have a good editor... :-) And I am quite maniacal
with the look of my code.

> * You do indeed surrender the precise layout of your program. YMMV, but
> I find an automatic formatter can get close enough to an acceptable
> style often enough that this is not an issue.

What I don't like is "acceptable style".
I appreciate Eclipse's formatter because you can tweak it to your
heart's content, to fit exactly to your taste or to the team rules.
Last time I checked (perhaps too quickly) Scalariform, it was enforcing
what seems to be the consensus around "good coding style for Scala" and
that's all. No flexibility. I can have missed options, though.

Again, nothing against your tool or its usage, just a remark of a
potential user.

Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala tool for formatting the source code

On 19/02/2011 16:01, Randall R Schulz wrote:
> I really don't think this sort of program is a useful thing and I don't
> think it's good for people to have it or to use it. I very strongly
> believe that we should write our code the way we want it written. What
> is the real motivation for writing code in a form other than the way
> you want it?

Sometime, you get code that isn't your. It can be written by a messy
coder or one using conventions that irks you; it can have been messed up
by HTML formatters, or imperfect merge tools, etc.
Such tool can be useful to get at least something readable, for code
inspection / study.
Or just to format to your own rules, when you accept code useful for
your open source project, from a programmer not disciplined enough to
follow your coding style.

MattRussell
Joined: 2009-07-22,
User offline. Last seen 45 weeks 3 days ago.
Re: Scala tool for formatting the source code
Philippe Lhoste <PhiLho [at] gmx [dot] net> wrote:

> Last time I checked (perhaps too quickly) Scalariform, it was enforcing what seems to be the consensus
> around "good coding style for Scala" and that's all. No flexibility. I can have missed options, though.
>
> Again, nothing against your tool or its usage, just a remark of a potential user.

Not at all, that's quite accurate -- it's still an immature tool from the point of view of having a wealth of configuration options. The strategy has been to write a formatter that satisfies me (selfish, I know) and then to add further features as and when people ask for them, on the principle that I'd do a poor job of guessing what people actually want. So if it doesn't format your code the way you like it, please do raise a ticket on Github, and I'll see what I can do.

-- Matt
Philippe Lhoste
Joined: 2010-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala tool for formatting the source code

On 20/02/2011 13:40, Matt Russell wrote:
> Not at all, that's quite accurate -- it's still an immature tool from
> the point of view of having a wealth of configuration options. The
> strategy has been to write a formatter that satisfies me (selfish, I
> know)

Not so much, that's how most open source projects started... :-)
Principle number one of OSS (particularly when started by an
individual): scratch your own itches. It provides motivation for working
on it.

> and then to add further features as and when people ask for them,
> on the principle that I'd do a poor job of guessing what people actually
> want. So if it doesn't format your code the way you like it, please do
> raise a ticket on Github, and I'll see what I can do.

The problem of flexibility is vast... :-) Will think about it.
Another alternative is to take the source code and see what we can do
about it (again, scratch...). Might be a good learning experience. Or
might be way over my head of Scala beginner... :-P

Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Scala tool for formatting the source code


On Sat, Feb 19, 2011 at 4:22 AM, Matt Russell <mattrusselluk [at] gmail [dot] com> wrote:
* You can selectively disable an automatic formatter for regions of the source

How?
 
MattRussell
Joined: 2009-07-22,
User offline. Last seen 45 weeks 3 days ago.
Re: Scala tool for formatting the source code
On Friday, February 18, 2011 11:39:50 PM UTC, Matt Russell wrote:
On Friday, February 18, 2011 10:20:05 PM UTC, Samira Tasharofi wrote:

The problem is that it does not work for "save action". Is it supposed
to work on save actions?

Yes -- it used to, unfortunately it seems it stopped working at some point. I'll see if I can get it working again.

The format save action should be working again after tonight's nightly build of wip_exp_backport. 
-- Matt
Seth Tisue
Joined: 2008-12-16,
User offline. Last seen 34 weeks 3 days ago.
Re: Re: Scala tool for formatting the source code

>>>>> "Matt" == Matt Russell writes:

Matt> Not at all, that's quite accurate -- it's still an immature tool
Matt> from the point of view of having a wealth of configuration
Matt> options. The strategy has been to write a formatter that
Matt> satisfies me (selfish, I know) and then to add further features
Matt> as and when people ask for them, on the principle that I'd do a
Matt> poor job of guessing what people actually want. So if it doesn't
Matt> format your code the way you like it, please do raise a ticket on
Matt> Github, and I'll see what I can do.

Scalariform is great. I had tried an earlier version and found it
wanting, but I tried again recently and found the current version to be
much better. I'm finding it very useful.

And yeah, I should have submitted a few issue reports the first time
around :-(

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland