Computer ScienceTextbook

Deep into Pharo

Not rated yetRate this book

Deep into Pharo extends introductory Smalltalk study into libraries, source management, frameworks, language mechanisms and development tools. Alexandre Bergel, Damien Cassou, Stéphane Ducasse and Jannik Laval present Pharo as both a language and a live programming environment.

FormatPDF
LanguageEnglish
SubjectComputer Science
LevelUndergraduate
No. of pages420
Published2013
Read free online →

Deep into PharoFree

About this book

Published as a companion volume to Pharo by Example, this textbook moves beyond basic syntax into the wider system available to a Pharo programmer. Its preface describes five parts: libraries, source management, frameworks, language topics and tools. File handling, networking, visualisation, package management, exceptions and blocks appear in the verified contents. The text reflects the Pharo environment of its 2013 edition, so it is valuable to record that context when using code examples. The guide on this page reviews the preface and structure rather than claiming to cover every library or API in detail.

The attached edition contains 420 PDF pages, including front matter. Cover: source edition title page rendered from the PDF. The textbook and its original notices are retained; Academic Master’s study material is separate from the source text.

Book summary

Deep into Pharo develops practical libraries, source management, visualization frameworks, language mechanisms, and development tools for experienced Smalltalk learners. This guide follows the first edition of August 2013. Its five parts contain chapters 2–18 after the preface, with contributor biographies at the end. Treat the examples as instructions for that historical edition and record adaptations separately when working in another Pharo environment.

Chapter-by-chapter summaries

Chapter 2: Zero Configuration Scripts and Command-Line Handlers

The opening technical chapter connects Pharo’s interactive image with repeatable command-line work. Automated download and startup scripts reduce the amount of setup knowledge a developer must carry, while command-line handlers provide entry points for requested operations. The deeper lesson is reproducibility: another person should be able to reconstruct the environment and invoke the same task. Follow the edition’s examples in a recorded environment and identify the assumptions about image, virtual machine, and files. A successful interactive experiment becomes more useful when its essential steps can be performed consistently outside the original workspace.

Chapter 3: Files with FileSystem

FileSystem offers an object-oriented way to describe locations and manipulate files. Understanding references, paths, and filesystem operations helps avoid scattering platform-specific string manipulation throughout a program. Follow the distinction between identifying a resource and performing an operation on it, then examine how data is read or written through the appropriate abstractions. Test examples in a disposable directory with predictable contents. Check both the intended result and behavior when a file is absent or a directory differs from expectations. Clear resource boundaries make later networking and tooling examples easier to maintain.

Chapter 4: Sockets

Networking connects separate processes through communication endpoints. Client and server roles, connections, and data transfer introduce concerns that local method calls can conceal: peers may delay, disconnect, or send incomplete information. Trace the book’s TCP examples from connection establishment to resource cleanup and distinguish the bytes transported from the higher-level protocol those bytes express. A small server is a useful learning exercise because its behavior can be inspected from both ends. Record message boundaries and termination conditions explicitly. A successful single exchange does not by itself establish that repeated or interrupted interactions are handled correctly.

Chapter 5: The Settings Framework

Settings exposes application configuration in a structured form instead of hiding preferences inside implementation details. The chapter shows how an application can declare configurable choices and integrate them with a common interface. Distinguish a setting’s description, its stored value, and the code affected by that value. Good configuration also requires sensible defaults and an understanding of when changes take effect. Build a small example with one visible preference and test both the default and an altered value. This reveals whether the setting actually governs behavior or merely appears in an interface without a reliable connection to the application.

Chapter 6: Regular Expressions in Pharo

Regular expressions describe patterns of strings for recognition, searching, and rewriting. The chapter introduces Pharo’s Regex facilities and the relationship between a pattern and the strings it accepts. Learn to reason about alternatives, repetition, and grouping with positive and negative examples before assembling a complicated expression. Distinguish matching an entire input from finding a matching portion. When extracting or replacing text, check what the pattern captures and what the transformation leaves behind. Pattern-based validation is useful, but a complex nested language may call for the parser techniques developed in the final chapter.

Chapter 7: Versioning Your Code with Monticello

Monticello manages versions of packages and supports collaboration through repositories and change comparison. The chapter connects package boundaries with the ability to save, load, inspect, and merge development history. Keep the working image distinct from the saved package versions: an image can contain changes that have not yet been recorded as a shareable version. Practice comparing two versions and explaining a change before resolving a conflict. A meaningful version history should communicate the evolution of the program, not simply accumulate snapshots. The edition’s workflow provides the foundation for the scripted loading and project configuration chapters that follow.

Chapter 8: Gofer: Scripting Package Loading

Gofer provides a programmatic interface for package loading operations that might otherwise be performed manually through Monticello. A script makes repository and package choices explicit and repeatable. Trace each instruction to the corresponding loading intention and check which version is actually selected. Automation is most valuable when it reduces ambiguity rather than merely shortening a sequence of clicks. Recreate a small package environment from a clean starting point and compare it with the original. This chapter concerns loading operations; the broader problem of coordinating compatible dependencies is developed through Metacello.

Chapter 9: Managing Projects with Metacello

Metacello addresses the dependency problem: a project may work in a developer’s image because particular packages and versions are already present. Configuration descriptions make those requirements explicit so that others can load a coherent project. Follow the case study by identifying package relationships, versions, and the intended loading arrangement. Distinguish a successful load in an existing image from reproducibility in a fresh one. Test a minimal configuration and inspect what it brings in. The important design issue is expressing compatibility and dependency knowledge in a maintained form rather than leaving it as undocumented experience.

Chapter 10: Glamour

Glamour supports the creation of browsers for navigating domain objects. Rather than building each interface from unrelated widgets, the framework organizes presentations and the flow of selection between them. Trace how a selected object in one view determines the content available in another. Start with a small domain and make the navigation meaningful before adding visual polish. The chapter’s larger argument is that exploratory tools can be tailored to a problem domain at reasonable cost. Evaluate the resulting browser by asking whether it helps answer a real question about the objects, not simply whether it displays them.

Chapter 11: Agile Visualization with Roassal

Roassal turns objects and relationships into interactive visualizations. Shapes, connections, layout, and interactions are chosen to make structure visible. The central design problem is deciding which property deserves a visual encoding and whether users can interpret that encoding consistently. Build a small graph whose underlying data you can inspect directly, then verify that each displayed element represents the intended object. Change one mapping at a time to understand its effect. Interaction should support exploration, such as locating related objects or inspecting detail, rather than being added solely because the framework makes it possible.

Chapter 12: Scripting Visualizations with Mondrian

Mondrian offers a domain-specific language for describing visualizations, particularly useful in software assessment. Built on Roassal in this edition, it lets the reader specify relationships and visual structure through concise scripts. The chapter extends the previous framework discussion by showing how higher-level descriptions can express a repeated analytical task. Map source objects to nodes and dependencies to edges, then explain how sizes, colors, or nesting answer a concrete question. Check that a visually prominent feature reflects the data rather than an arbitrary layout artifact. Reusable scripts should keep the analytical intent understandable.

Chapter 13: Handling Exceptions

Exceptions represent abnormal situations without requiring every ordinary result to carry a manually checked error code. The chapter examines signaling, handling, and the flow of control around exceptional behavior. Understanding the relationship between an exception and its handler is necessary before deciding whether to recover, propagate, or otherwise respond. Use small examples to trace exactly which expressions execute and which resources need cleanup. Avoid treating a broad handler as a substitute for understanding failure. An appropriate handler preserves the meaning of the program and makes a justified recovery possible instead of silently converting an error into misleading normal output.

Chapter 14: Blocks: a Detailed Analysis

Blocks are lexically scoped closures and a foundation of Pharo’s compact control structures. They can capture surrounding bindings, receive arguments, and be passed as objects, connecting message sending with flexible behavior. Study where a block is created separately from where it is evaluated. Trace variable access and return behavior in small examples, especially when a block outlives the immediate context in which it was defined. Understanding these details clarifies callbacks, collection operations, and exception handlers from earlier chapters. The purpose is to reason about execution precisely rather than regard blocks as convenient but mysterious syntax.

Chapter 15: Exploring Little Numbers

This chapter examines integer representation from a language implementer’s perspective. Powers of two and binary structure provide the basis for understanding how small integers are encoded. Separate the mathematical value from the representation used by the runtime, and note when an operation concerns bits rather than ordinary arithmetic meaning. Work through short examples by hand before checking the image’s behavior. Representation knowledge explains performance and implementation choices, but application code should not assume that every implementation uses identical limits or encoding details. Keep the chapter’s historical runtime context visible in your notes.

Chapter 16: Fun with Floats

Floating-point arithmetic provides fast approximate numbers with finite precision. The chapter investigates why calculations that look equivalent algebraically may differ computationally and why direct equality is often unsuitable for approximate results. Examine scale, rounding, and the accumulation of error instead of labeling every unexpected result a software bug. Compare exact arithmetic where available with floating-point output for a small example. Choose any comparison tolerance in relation to the problem, not as a universal magic constant. The broader lesson applies beyond Pharo: numerical representation is part of the meaning and reliability of a computation.

Chapter 17: Profiling Applications

Profiling identifies where an application spends time so that optimization addresses evidence rather than intuition. Frequently executed work can matter more than a conspicuously complicated method that rarely runs. Establish a representative workload, inspect measurements, and form a specific explanation before changing the program. Re-measure the same task after the change while checking behavior remains correct. The chapter emphasizes the tradeoff that optimization can make code more complex. A justified improvement therefore includes both an observed benefit and a clear account of why the modification targets the measured bottleneck.

Chapter 18: PetitParser: Building Modular Parsers

PetitParser represents parsers as composable objects, allowing grammars to be assembled from smaller recognizers. The chapter connects recognition with the structure and transformation of parsed input. Work from a minimal grammar to a richer one, testing both accepted and rejected examples. Keep lexical details, syntactic composition, and the production of meaningful results conceptually distinct even when a framework combines them. A parser should explain the language it accepts, including boundary cases and failures. Compare this approach with the regular-expression chapter to understand when compositional grammar structure makes a problem easier to express and maintain.

Study instructions

  1. Record the Pharo image and package versions used; separate the 2013 examples from any adaptations to your environment.
  2. Use a disposable image or project for each major experiment and preserve a reproducible loading procedure.
  3. Write a tiny working example for every library before integrating it into a larger application.
  4. Trace control flow explicitly in the blocks and exceptions chapters, then predict results before evaluation.
  5. Finish with a small tool that reads or parses data, offers a useful browser or visualization, and includes a measured performance check.

Questions for reflection

  • What is preserved in an image that has not yet been captured in a reproducible package configuration?
  • How do closures and exception handlers change the flow of a message-based program?
  • When is a structured parser clearer than an increasingly complicated regular expression?

Sources and coverage

This original study guide follows the complete linked source edition and all of its substantive chapters or named teaching sections. It condenses their main ideas and relationships; the study tasks are guidance for reading alongside the complete resource. It does not reproduce the source exercises or answer key. Book source; Complete source PDF.

About access & copyright

Check this edition’s source and licence before reusing its files or content. A library listing does not grant additional rights.

Read our Library Access & Copyright policy

Live environment

Understand the preface’s view of Pharo.

Beyond syntax

Recognise the book’s progression into system facilities.

Reading structure

Distinguish the five verified parts.

Version awareness

Interpret technical material within its edition.

Reader ratings & reviews

Be the first to rate

No ratings yet

0%0%
0%0%
0%0%
0%0%
0%0%

Share your thoughts

Your review helps other students choose the right resources.

Rate this book

How helpful was this book?No sign-up needed. Your rating appears instantly.