Pharo Smalltalk for scripting

What is Coral?

Coral makes it possible to write shell scripts with Pharo. It’s actually several parts:

A wrapper shell script
To seamlessly invoke the VM from the command line.
A tiny syntax extension
Smalltalk has no syntax to declare classes and methods outside of the code browser. Coral’s syntax extension allows to declare classes, methods, and to evaluate code, all in a simple text file.
A lighter, prepared image
The Coral image is configured to launch quickly, without a graphical interface, and is preloaded with packages useful for scripting, like access to the system’s filesystem and processes.

Installing & Using

  1. Get the Coral image. Make sure you have a Pharo virtual machine to run it.

  2. Launch the image, then generate the wrapper script by evaluating:
    CoralInstaller generateCoralScript.

    You can also generate a debugging version of the script with:
    CoralInstaller generateCoralDebugScript.

  3. Make sure both wrapper scripts are executable:
    chmod +x coral.sh coralDebug.sh

  4. You can now run coral scripts:
    ./coral.sh someScript.cst

The image comes with example Coral scripts which can be generated by:
CoralInstaller generateAllExamples.

Contributing & Support

For support, best is to contact us on the mailing list.

Please be aware that Coral is still a very young project; you’ll be more than welcome to take part in its evolution! Besides code, we need:

Contributors