5

I prefer interfacing with programming languages through a standard bash terminal. While Squeak and Pharo are well documented, they don't seem to have a CLI, just a VM GUI.

GNU Smalltalk and Slate have a normal CLI but no installers for Linux, Mac, or Windows--and they require a complicated MSYS configuration on Windows.

There seems to be no Smalltalk implementation that has both a CLI and multiplatform installers. I'd love to pick up this language, but I can't seem to find a Smalltalk that suits me.

Do Squeak and Pharo have secret CLI modes? Does anyone know where GST or Slate installers are posted? Are there other free, open source Smalltalks that have these two features?

mcandre
  • 22,868
  • 20
  • 88
  • 147
  • 2
    http://stackoverflow.com/questions/3067563/using-squeak-from-a-shell – Frank Shearar Aug 04 '11 at 10:32
  • All: Coral doesn't seem to work on my system (Mac OS X). – mcandre Aug 06 '11 at 05:41
  • Coral is sill really young. I hope to get a functional release for september. We need external feedback so you're all very welcome to come discuss what improvements are needed first on the [mailing list](http://lists.gforge.inria.fr/mailman/listinfo/pharo-coral) and [issue tracker](http://code.google.com/p/bluecoral/issues). – Damien Pollet Aug 06 '11 at 14:24
  • 5
    **Smalltalk = language + environment**. If you _really_ want to get what's special about the language (although I didn't want to hear this when I started), and have it rearrange your neurons (which should be the point of learning a new language), there is no option but the image and its tools (until you "get it" and make the next generation tools). Without the environment, Smalltalk is just better Ruby (much less syntax, blocks for any argument, live system, nicer web frameworks...) – Sean DeNigris Aug 30 '11 at 22:54
  • 2
    I would take @SeanDeNigris comment seriously. If you are `learning` Smalltalk you should do it the right way. There is hardly anything to learn with the Smalltalk language. You can pick up that up in a few hours. The Smalltalk `Paradigm`, the `Tao` of Smalltalk is what you want to learn and that is done in the IDE, in fact it `is` the object system and the IDE. If you want to learn from the CLI you can use the IDE to push keystrokes into a terminal, even Coral terminal as is suggested here. The management and organization of coding took a retrograde step Java,Python, Ruby etc. – vfclists Jan 07 '13 at 21:34

2 Answers2

7

Yes, Pharo has a "secret" CLI mode. It is called Coral.

Lukas Renggli
  • 8,754
  • 23
  • 46
  • Based on its dependencies (OSProcess, PetitSmalltalk, PetitParser, AST-Core) this should also work in Squeak. – Frank Shearar Aug 04 '11 at 13:36
  • Almost: Coral uses `FSDiskFileSystem` in the `FileSystem` package, which may or may not work/load in Squeak. I haven't had a chance to try yet. – Frank Shearar Aug 04 '11 at 13:48
  • Coral is exactly what I want, but it doesn't seem to work on my computer. After following the instructions and adding coral.sh to PATH, `$ coral scriptHello.cst` doesn't do anything. My Mac dock widens to accomodate an icon, immediately shrinking again. – mcandre Aug 04 '11 at 18:17
  • mcandre: sounds like a wrong VM. The VM I currently use with Coral on Mac is the [Cog Carbon one](https://ci.lille.inria.fr/pharo/view/Cog/job/Cog-Mac-Carbon/). – Damien Pollet Aug 06 '11 at 14:29
5

Extending on Lukas' answer, here's a script to load Coral into Squeak:

Installer ss
    project: 'OSProcess';
    install: 'OSProcess-dtl.63'.
Installer ss
    project: 'rb';
    install: 'AST-Core-lr.88'.
Installer lukas
    project: 'petit';
    install: 'PetitParser-lr.218';
    install: 'PetitTests-lr.34';
    install: 'PetitSmalltalk-lr.47'.
Installer ss
    project: 'fs';
    install: 'FS-Core-StephaneDucasse.4';
    install: 'FS-AnsiStreams-cwp.1';
    install: 'FS-FileStream-cwp.1';
    install: 'FS-Disk-cwp.1'.
Installer ss
    project: 'CoralSqueak';
    install: 'Coralsqueak-fbs.2';
    install: 'Coral-fbs.55'.

It's based on a near-to-head version of Coral (Damien's just started on a redesign of parts of Coral), and adds a few methods to Squeak that Coral expects.

Once installed, follow the standard instructions:

SmalltalkImage current saveAs: 'coral.image'.
CoralInstaller generateCoralScript.
CoralInstaller generateCoralDebugScript.
"Optionally: CoralInstaller generateAllExamples."

And then from your command line:

$ chmod +x coral.sh coralDebug.sh
$ ./coral.sh scriptCarpet.cst
Frank Shearar
  • 17,012
  • 8
  • 67
  • 94
  • 1
    Thanks much, but Coral doesn't work on my computer. After following the instructions and adding coral.sh to PATH, `$ coral.sh scriptHello.cst` doesn't do anything. My Mac dock widens to accomodate an icon, immediately shrinking again. – mcandre Aug 04 '11 at 21:57