On Tue, Dec 2, 2014 at 4:42 PM, Damien Pollet <damien.pollet@gmail.com> wrote:
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.

For me the leverage is coming from the ability to declare classes in a file and use them.
A l�� GST.

Can't we have that?

Coral is interestingly engineered but what good does it gives if we cannot use it?
Maybe a Coral-light would be way sufficient as a part we can hook into the system.

Like you see in the ScriptRunner of Guille in Scale.

Turn bits of Coral into the ScriptRunner and we can go a long way (and in a lot of places, including sending scripts around through whatever servers).

Phil
��

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 <astares@gmx.de> 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