1.2 Installing and configuring Cuis-Smalltalk

Cuis-Smalltalk is an environment and a programming language executed on an idealized virtual computer. It is based on two major components: the Smalltalk virtual machine conceptualizing this virtual computer and an image representing the state of this computer.

The virtual machine is an executable program running on a dedicated host (GNU/Linux, Mac OS X, Windows, etc.). It is called the Open Smalltalk Virtual Machine, or Squeak VM in short. There are different flavors of VM, for various combinations of Operating System and CPU architecture. Therefore, one VM compiled for Windows on Intel architecture will not work in Linux on ARM architecture. You need the specific VM compiled for the combination of Operating System and CPU architecture your computer is based on.

The image is a regular file feeding the VM with all the objects defining the state of the virtual computer. These objects are classes, methods, instances of those classes as numbers, strings, windows, debuggers – whatever existed when the state of the virtual computer was saved. An image file saved on a given Operating System and CPU architecture will run identically on another system requiring only a compatible VM to be used.

The VM allows an image to be restarted with windows in the same locations between different operating systems and different CPU architectures without recompilation. This is what portability means to us.

What makes Cuis-Smalltalk special is the living entities in the image: its class population and arrangement, how the classes inherit from each other. The class count is typically less than 700.

To get you started easily, we encourage you to install Cuis-University12. Here you will find bundles for GNU/Linux, Mac OS X and Windows, for the Intel architecture. These bundles differ from the bare Cuis-Smalltalk distribution in that they package a customized VM, together with a matching Cuis-Smalltalk image that includes additional packages preinstalled 13 and some other packages ready to be installed that will make your life easier when you follow the examples and exercises in the book, or when you explore on your own. By the time you read this book, Cuis-Smalltalk will likely have evolved to a newer version, but what you learn here should, however, be easily transferable.

To get Cuis-Smalltalk running on your computer, extract the bundle and execute the run script on Windows/Linux – run.bat or run.sh – on OS X launch the Squeak application. Once you get Cuis-Smalltalk running, read the information displayed on the windows. When you are done, you can close these windows and adjust Cuis-Smalltalk to your preferences.

The Cuis University distribution should work for most common platforms, but there are always more platform variants than we can test for. If you have a problem, here are two sources of information. If you do not have a problem, you can ignore these for now.

1.2.1 Editing your preferences

Once you read the information on the default windows, the next thing you want to do is to adjust visual properties to fit your preferences and needs. To do so, access the World menu ...Background click → Preferences... then select the pin on the top right of the menu to make it permanent. Here you have the most important options: the choice for the font size, the themes whenever your prefer light or dark colouring. There are other preferences you can explore by yourself. Once you are done, do ...World menu → Save... to make your preferences permanent. In this book, we keep the default Cuis-Smalltalk theme, we suggest you do the same so your environment reflects the book screenshots.

ch01-Preferences

Figure 1.1: Set Preferences

1.2.2 Fun with window placement

The first tool to discover is the Workspace tool. It is a kind of text editor to key in Smalltalk code you can execute immediately. Do ...World menu → Open...Workspace...

Now we will ask Cuis-Smalltalk to change the window’s placement: click the blue icon (top left) to access the window’s options menu and experiment with the white area to place the Workspace window at the half left of the Cuis-Smalltalk environment.

ch01-img1a

Figure 1.2: Window options

The resize... option offers even more freedom to place the window. Try the following exercise:

 CuisLogo Use the resize... option to place the Workspace centered in the Cuis-Smalltalk environment.

Exercise 1.1: Middle placement


Footnotes

(12)

https://sites.google.com/view/cuis-university/descargas

(13)

Measures and units (Aconcagua), Dates and calendars (Chaltén), Improved and additional automated refactorings by way of LiveTyping (automatic type annotations), a finder widget, TDD Guru, DenotativeObject (classless objects)