Smalltalk Online Compiler / Interpreter
Write and run Smalltalk code online directly from your browser with our free Online Smalltalk Compiler / Interpreter. Practice object-oriented programming, message passing, collections, blocks, and Smalltalk expressions without installing Pharo, Squeak, GNU Smalltalk, or configuring a local Smalltalk virtual machine.
How to Use This Smalltalk Compiler
- Write or paste your Smalltalk code
Enter your expressions in the Code Editor. You can experiment with objects, messages, variables, arithmetic, collections, blocks, and other Smalltalk features supported by the execution environment. - Click the Run button
Select Run to execute your Smalltalk code. If the program contains invalid syntax or an unsupported message, review the returned feedback, correct the relevant expression, and run it again. - Check the Output screen
Your program result appears in the Output panel. Use the available controls to copy, download, or delete the output before testing another Smalltalk program.
Key Features
- Free Online Smalltalk Compiler / Interpreter: Write and execute Smalltalk code directly from a modern web browser.
- Zero Installation: No need to install GNU Smalltalk, Pharo, Squeak, or configure a local Smalltalk VM for supported examples.
- Instant Execution: Click Run and quickly view program output or interpreter feedback.
- Message-Passing Practice: Learn how Smalltalk objects interact by sending messages to one another.
- Object-Oriented Programming: Experiment with objects, methods, classes, inheritance, and polymorphic behavior.
- Blocks and Collections: Practice Smalltalk blocks and common collection-processing patterns.
- Dark and Light Mode: Switch the Code Editor theme for comfortable coding in different environments.
- Output Controls: Copy, download, or clear generated output directly from the Output panel.
1. How do I print output in this Smalltalk compiler?
In a GNU Smalltalk-style environment, you can print a value followed by a newline using printNl:
You can also print calculated values:
Enter the code in the Code Editor, click Run, and view the result in the Output screen.
Some Smalltalk environments such as Pharo or Squeak commonly use Transcript:
Transcript availability depends on the Smalltalk implementation configured by the online compiler.
2. Do I need to install a Smalltalk VM such as Pharo, Squeak, or GNU Smalltalk?
No. You can use this Online Smalltalk Compiler / Interpreter directly from your browser without installing a local Smalltalk environment for supported code.
A desktop Smalltalk system may still be preferable for image-based development, graphical tools, advanced debugging, package management, or larger applications.
3. Is Smalltalk a purely object-oriented programming language?
Smalltalk follows a strongly object-oriented model in which values such as numbers, strings, collections, and classes are treated as objects, and computation is primarily expressed through message sending.
For example:
Here, size is a message sent to the string object.
Another example:
The exact messages available depend on the Smalltalk implementation being used.
4. Can I test message passing, blocks, and collections in this online Smalltalk compiler?
Yes. These are core Smalltalk concepts and can be tested when supported by the configured runtime.
You can also test simple message chains:
This makes the compiler useful for computer science students and OOP learners who want to practice message passing, blocks, collections, and classic Smalltalk programming concepts without setting up a full local environment.