Skip to content

Instantly share code, notes, and snippets.

@seandenigris
Created May 5, 2012 17:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seandenigris/2604215 to your computer and use it in GitHub Desktop.
Save seandenigris/2604215 to your computer and use it in GitHub Desktop.
Pharo Smalltalk REPL server
"Works out of the box in Pharo 2.0. For prior versions (definitely works in 1.3 and 1.4), first file in https://gist.github.com/2602113"
| command |
[
command := FileStream stdin nextLine.
command ~= 'exit' ] whileTrue: [ | result |
result := Compiler evaluate: command.
FileStream stdout nextPutAll: result asString; lf ].
Smalltalk snapshot: false andQuit: true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment