📄️ Where to Learn Pharo?
The following pages of this guide will teach you the basics of Pharo programming language and environment that are necessary to use Cormas.
📄️ Running Code in Playground
Before starting, make sure you already have Pharo installed. If not, follow the Installing Pharo section from our How to Install Cormas tutorial.
📄️ Pharo Syntax
Pharo is a live, object-oriented language. Everything is an object, and you send messages to objects to make them do things. This short guide covers only the essentials you need to read and write the code for Cormas models.
📄️ Pharo Environment
In this short guide we will teach you how to use navigate the Pharo environment and use 4 main tools: Playground, Inspector, System Browser, and Debugger. We will also teach you how to search for methods and classes with Spotter and how to browse implementors and senders of different methods and classes.
📄️ Collections
This guide introduces you to collections in Pharo - groups of objects used to organize and manipulate data. You will learn how to create and use arrays, ordered collections, sets, and dictionaries, understand what makes each type special, and explore how to iterate over them with messages like do, select:, and others. These operations are essential for building models and handling data effectively in Cormas.
📄️ Messages
In Pharo (and therefore in Cormas), everything is an object - agents, cells, plots, and even numbers and strings. Objects interact by sending messages to each other. Messages are how we tell an object what to do.
📄️ Initialize Method
When you create a new class in Pharo (for example, a class representing an agent, a cell, or a model in Cormas), that class can have a special method called initialize. This method is used to set up your object when it is first created and to assign default values to its attributes.