s LearnSqueak.com

FROM FIRST LAUNCH TO WORKING APPS

Start here: your Squeak learning path

Set up a learning image, evaluate your first expression, and follow a practical route through Smalltalk and native desktop applications.

7 orientation steps6 core lessonsNo prior Smalltalk required
Try the finished example

Run in the SqueakJS playground

The separate playground loads the real Smalltalk image on demand. This lesson keeps its native setup instructions; browser compatibility notes appear beside each demo.

Choose your starting point

You do not need another programming language first. You do need a desktop computer, a Squeak image you can experiment in, and time to run each example yourself. These pages explain the native Squeak environment; the website itself does not execute Smalltalk.

  • Brand new: follow this page from installation through your first Workspace result.
  • Know another language: begin with Smalltalk messages and precedence, then classes and objects. Do not assume conventional arithmetic or method-call syntax.
  • Already use Smalltalk: choose the forms, calculator, Notepad or visual-reference projects.

Core tutorials here were executed in Squeak 6.1, 64-bit, build 23976. Pen Studio Lab is a separate collection whose guides retain their own Squeak 6.0 version notes.

1 · Get a working Squeak image

  1. Open the official Squeak downloads page. Choose a stable bundle for your operating system and processor. These lessons use the 6.1 release.
  2. Extract the bundle to a folder where you can write files. Keep its image, matching changes file, sources and virtual machine together. Use the bundle’s launcher; platform-specific instructions on the download page take precedence.
  3. On macOS, the official instructions say to drag the application out of Downloads before launching. Linux bundles use the included launcher script. Follow your operating system’s normal installation and trust checks.
  4. Open the image. You should see Squeak’s desktop, often with a welcome window. A Smalltalk image is a snapshot of a running object system, not a picture.
  5. Keep a separate learning copy before changing classes. Choose the image’s save-as option if available, or copy its matching image and changes files while Squeak is closed. Keep the original bundle available as a fresh starting point.

The bundle contains the virtual machine that runs the image. The sources and changes files help Squeak show you the code behind its classes. Avoid separating or renaming only one member of an image/changes pair. Official bundle and file-layout guidance.

Ready when: Squeak opens, responds to clicks, and you know which learning image you are using.

2 · Make your first expression answer

Open the World menu from an empty area of Squeak’s desktop and choose Tools → Workspace. Menu wording and the mouse button used to open a contextual menu can differ by platform. A Workspace is a scratch area for Smalltalk expressions.

  1. Paste the expression below.
  2. Select just the expression, without surrounding tutorial prose.
  3. Use the editor’s print it command. Common default shortcuts are Ctrl+P on Windows/Linux and Cmd+P on macOS; the editor menu is the authoritative fallback.
  4. Squeak inserts the result next to the expression. Remove that printed result before evaluating the same line again.
Workspace · Print it → 7
3 + 4

Try a message to a string:

Workspace · Print it → 14
'Hello, Squeak!' size
NATIVE SQUEAK CAPTURE
A native Squeak Workspace with a printed evaluation result
The existing language lesson shows Print it in the actual Squeak image.

Do it runs code for its effect. Print it also inserts a textual representation of the answer. Inspect it opens an Inspector on the answer. They are three ways to evaluate the same selected expression.

Ready when: you can obtain 7, remove the printed result, and run another expression without accidentally selecting old output.

3 · See an effect in the Transcript

Open Tools → Transcript. Return to a Workspace and evaluate this complete block with do it, commonly Ctrl+D / Cmd+D:

Workspace · select the whole block, then Do it
Transcript show: 'Hello from LearnSqueak'; cr

The message appears in the Transcript. The semicolon sends cr to the same receiver, Transcript, after show:. There is no terminal command to run here; both tools live inside Squeak.

NATIVE SQUEAK CAPTURE
Native Transcript and Workspace tools in Squeak
A real Transcript example from the development-tools lesson.

If nothing seems to happen, bring the Transcript forward and make sure you used Do it on the complete expression. This code writes to the Transcript, not to the web page or a file.

4 · Follow the core learning path

Complete one small result before moving on. Each lesson includes visible code, native screenshots, and runnable examples or checkpoints. The order below builds toward two useful desktop applications.

  1. Smalltalk in Squeak

    Before you start: Workspace evaluation.

    Objects and messages, assignment, blocks, conditions and collections.

    Checkpoint: Explain why unary messages run before binary messages, and binary messages before keyword messages.

  2. Classes and objects

    Before you start: Smalltalk language basics.

    Use the Browser to define a class, add methods, create independent instances, inspect state and run tests.

    Checkpoint: Create two counters whose values change independently.

  3. Your first Morphic objects

    Before you start: Variables, messages and blocks.

    Create shapes and text, position objects and add a simple animation.

    Checkpoint: Open a morph, change its extent and color, then remove it.

  4. Form controls and events

    Before you start: Morphic basics; classes are helpful.

    Build a model and connect text input, buttons, checkbox, list and slider through selectors and notifications.

    Checkpoint: Describe which object receives a button action and how the view learns about a change.

  5. Build a calculator

    Before you start: Forms and model methods.

    Construct a display and keypad, then connect input to a tested calculation model.

    Checkpoint: Enter a decimal calculation, clear an entry and recover from division by zero.

  6. Build a Notepad

    Before you start: Forms, model state and basic file concepts.

    Build a multiline editor, add file actions and guard unsaved changes.

    Checkpoint: Save a generated practice note, modify it, cancel closing, then reopen the saved file.

Keep the Smalltalk cookbook alongside these projects when you need a practical string, collection, date, random-number or file example.

5 · Know where each kind of code goes

What you seeWhere it goesHow to run it
A Workspace expressionA Workspace text paneSelect the whole block and use Do it, Print it or Inspect it as labeled.
A method, beginning with its selectorThe correct class and instance/class side in the System BrowserPaste into the method pane and accept. A return begins with ^.
A class definitionThe Browser’s class definition pane, or Workspace when explicitly instructedAccept or Do it according to the lesson.
A complete chunk-format .st source fileThe native File ListSelect the file and choose fileIn. It may install several classes and methods.

The .st extension alone does not tell you which format it contains. Each download is labeled. Do not paste an entire chunk file into a Workspace and treat it as one expression. A checkpoint marked as a Workspace block is evaluated as a complete block; its temporary variables disappear after that evaluation.

NATIVE SQUEAK CAPTURE
Squeak System Browser showing a tutorial class
The Browser keeps classes, categories and methods together. Its panes are different from a Workspace.

This native demonstration is reused from the development-tools lesson. Play is optional; Stop restores the still image.

6 · Use a repeatable practice routine

  1. Predict: read the expression and say what you expect to happen.
  2. Run: copy one complete example, using the evaluation command named beside it.
  3. Compare: check the result, native screenshot or expected behavior.
  4. Change: adjust one value, message or condition. Predict the difference before running again.
  5. Explain: identify the receiver, selector and arguments.
  6. Clean up: close tutorial windows and stop animations using the lesson’s controls.

When a debugger appears, keep the first error message and the selected expression. An error is evidence about an object or message; adding random punctuation rarely helps. Return to the last working example and compare one change at a time.

For application downloads, file in the source once, then run its documented launcher. Re-filing source replaces methods with the same names, so use a dedicated learning image.

7 · Save the right thing

Save the image to preserve your current classes, objects and open tools. Save or file out source to keep code you can load into another image. Save inside an application, such as Notepad, writes that application’s document to a separate file.

These are different operations. A saved Notepad document does not export the Notepad class. A downloaded .st source file does not include every live object in your image. Keep the tutorial source and a separate practice image so you can recreate your work.

You are ready to begin: you can open Workspace, run and inspect a small expression, identify where source belongs, and explain the difference between saving an image and saving a document.

Begin Smalltalk in Squeak →

Official Squeak documentation and Squeak by Example provide broader background. The examples on this site state their tested image version.