Coral is currently broken because I didn't maintain it through the pharo releases (the current CommandLine stuff is more or less extracted from it). However, the option-parsers part should still be OK, it's the hooking at image startup that is not up to date.
There were/are multiple goals : - make a text-file friendly syntax for code, to make it possible to quickly put some logic in a file with #!/usr/bin/env pharo at the top to run it as any other shell command. Obviously this has some overlap with filetree. - provide a framework to declare commands in a convenient way (with automatic --help documentation, completion helpers for shells, etc). This is using PetitParser to analyse the arguments list, and provides off-the-shelf parsers for the common patterns -x -aBc --long-option --foo=value. IMHO getopt could be nice for the VM options, but for scripts it's really procedural and string-oriented, at least for the implementations I have some experience with (ruby, shell). For any real script, you want something higher-level, like http://docopt.org There is also a problem specific to us : a given image can have many command line handlers installed, so there needs to be some dispatch / priority resolution to make the composition work. On 2 December 2014 at 11:24, Torsten Bergmann <[email protected]> wrote: >>Combined with a small image, it would be a terrific tool. > > That was/is the goal of Coral. http://rmod.lille.inria.fr/coral/ > > Dont know about its current state. > > Thx > T. > -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet
