Skip to main content
Engineering LibreTexts

1.1: Getting Started

  • Page ID
    36336
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Squeak is available as a free download from www.squeak.org. There are three parts that you will need to download, consisting of four files (see Figure \(\PageIndex{1}\)).

    The Squeak download files.
    Figure \(\PageIndex{1}\): The Squeak download files.
    1. The virtual machine (VM) is the only part of the system that is different for each operating system and processor. Pre-compiled virtual machines are available for all the major computing environments. In Figure \(\PageIndex{1}\) we see the VM for the Mac is called Squeak 3.8.15beta1U.app.
    2. The sources file contains the source code for all of the parts of Squeak that don’t change very frequently. In Figure \(\PageIndex{1}\) it is called SqueakV39.sources. Note that the file SqueakV39.sources is only for versions 3.9 and later of Squeak. For earlier versions, use a sources file corresponding to the main version e.g., SqueakV3.sources for versions of Squeak from 3.0 up to 3.8.
    3. The current system image is a snapshot of a running Squeak system, frozen in time. It consists of two files: an .image file, which contains the state of all of the objects in the system (including classes and methods, since they are objects too), and a .changes file, which contains a log of all of the changes to the source code of the system. In Figure \(\PageIndex{1}\), we see that we have grabbed the Squeak3.9-final-7067 image and changes files. Actually, we will use a slightly different image in this book.

    \(\bigstar\) Download and install Squeak on your computer. We recommend that you use the image provided on the Squeak by Example web page.1

    Most of the introductory material in this book will work with any version, so if you already have one installed, you may as well continue to use it. However, if you notice differences between the appearance or behaviour of your system and what is described here, do not be surprised. On the other hand, if you are about to download Squeak for the first time, you may as well grab the Squeak by Example image.

    As you work in Squeak, the image and changes files are modified, so you need to make sure that they are writable. Always keep these two files together. Never edit them directly with a text editor, as Squeak uses them to store the objects you work with and to log the changes you make to the source code. It is a good idea to keep a backup copy of the downloaded image and changes files so you can always start from a fresh image and reload your code.

    The sources file and the VM can be read-only — they can be shared between different users. All of these files can be placed in the same directory, but it is also possible to put the Virtual Machine and sources file in separate directory where everyone has access to them. Do whatever works best for your style of working and your operating system.

    Launching.

    To start Squeak, do whatever your operating system expects: drag the .image file onto the icon of the virtual machine, or double-click the .image file, or at the command line type the name of the virtual machine followed by the path to the .image file. (When you have multiple VMs installed on your machine the operating system may not automatically pick the right one; in this case it is safer to drag and drop the image onto the virtual machine, or to use the command line.)

    A fresh SqueakByExample.org image.
    Figure \(\PageIndex{2}\): A fresh SqueakByExample.org image.

    Once Squeak is running, you should see a single large window, possibly containing some open workspace windows (see Figure \(\PageIndex{2}\)), and it’s not obvious how to proceed! You will notice that there is no menu bar, or at least not a useful one. Instead, Squeak makes heavy use of context-dependent pop-up menus.

    \(\bigstar\) Start Squeak. You can dismiss any open workspaces by clicking on the X in the top left corner of the workspace window. You can collapse the windows (so that they can be expanded again later) by clicking on the \(\circ\) in the top-right corner.

    First Interaction.

    A good place to get started is the world menu shown in Figure \(\PageIndex{3}\) (a).

    \(\bigstar\) Click with the mouse on the background of the main window to show the world menu, then choose open . . .workspace to create a new workspace.

    The world menu, a contextual menu, and a morphic halo.
    Figure \(\PageIndex{3}\): The world menu (brought up by the red mouse button), a contextual menu (yellow mouse button), and a morphic halo (blue mouse button).

    Squeak was originally designed for a computer with a three button mouse. If your mouse has fewer than three buttons, you will have to press extra keys while clicking the mouse to simulate the extra buttons. A two-button mouse works quite well with Squeak, but if you have only a single-button mouse, you should seriously consider buying a two-button mouse with a clickable scroll wheel: it will make working with Squeak much more pleasant.

    Squeak avoids terms like “left mouse click” because different computers, mice, keyboards and personal configurations mean that different users will need to press different physical buttons to achieve the same effect. Instead, the mouse buttons are labeled with colors. The mouse button that you pressed to get the “World” menu is called the red button; it is most often used for selecting items in lists, selecting text, and selecting menu items. When you start using Squeak, it can be surprisingly helpful to actually label your mouse, as shown in Figure \(\PageIndex{4}\)2.

    The author’s mouse.
    Figure \(\PageIndex{4}\): The author’s mouse. Clicking the scroll wheel activates the blue button.

    The yellow button is the next most used button; it is used to bring up a contextual menu, that is, a menu that offers different sets of actions depending on where the mouse is pointing; see Figure \(\PageIndex{3}\) (b).

    \(\bigstar\) Type Time now in the workspace. Now click the yellow button in the workspace. Select print it.

    Finally, there is the blue button, which is used to activate the “morphic halo”, an array of handles that are used to perform operations on the on-screen objects themselves, such as rotating them or resizing them; see Figure \(\PageIndex{3}\) (c). If you let the mouse linger over a handle, a help balloon will explain its function.

    \(\bigstar\) Click the blue button on the workspace. Grab the handle near the bottom left corner and drag it to rotate the workspace.

    We recommend that right-handed people configure their mouse to put the red button on the left side of their mouse, the yellow button on the right, and use a clickable scroll wheel, if one is available, for the blue button. If you don’t have a clickable scroll wheel, then you can get the Morphic halo by holding down the alt or option key while clicking the red button. If you are using a Macintosh without a second mouse button, you can simulate one by holding down the ⌘ key while clicking the mouse. However, if you are going to be using Squeak at all often, we recommend investing in a mouse with at least two buttons.

    You can configure your mouse to work the way you want by using the preferences of your operating system and mouse driver. Squeak has some preferences for customising the mouse and the meta keys on your keyboard. You can find the preference browser in the open item of the World menu. In the preference browser, the general category contains an option swapMouseButtons that switches the yellow and blue functions (see Figure 1.2.1). The keyboard category has options to duplicate the various command keys.

    \(\bigstar\) Open the preference browser and find the swapMouseButtons option using the search box.


    1. Visit http://SqueakByExample.org and look for “Download Squeak” in the sidebar.

    2. We will avoid the term “red-click” and use “click” instead, since this is the default.


    This page titled 1.1: Getting Started is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.