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
Get the Coral image. Make sure you have a Pharo virtual machine to run it.
Launch the image, then generate the wrapper script by evaluating:
You can also generate a debugging version of the script with:
Make sure both wrapper scripts are executable:
chmod +x coral.sh coralDebug.sh
You can now run coral scripts:
The image comes with example Coral scripts which can be generated by:
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:
- testing, bug reports and fixes
- feedback on the current features
- use-cases, examples of what you’d like to use Coral for
- Jean-Baptiste Arnaud
- Olivier Auverlot
- Adrien Barreau
- Camillo Bruni
- Marcus Denker
- Stéphane Ducasse
- Damien Pollet
- Igor Stasenko