Lepiter

Lepiter is a knowledge base consisting of linked notebook pages. See How to get started with Lepiter (FAQ).

This very page is provided by Lepiter. It is made out of:

Playground

A playground is where you start to play with live code.

In its simplest form, it looks like the example below: a single Pharo snippet containing code that you can play with. If you evaluate the code with PrimaryModifier+G, or clicking on the inspect button, you will get an inspector with the resulting object to the right.

Code snippets

Now, a playground is actually just a live document that happens to start with a code snippet.

Documents can have multiple snippets. Each snippet provides a scope and allows you to manipulate the code in isolation from the rest of the code. At the same time, the overall page still behaves like one contiguous page sharing the same set of variables.

For example, in the page below we have two snippets. Evaluating the first one, initializes a variable. Evaluating the second snippet uses that variable. In this case, it builds a visualization.

Other kinds of snippets

A document can have multiple kinds of snippets. Here is the same example as above, but with an extra textual snippet.

Example usages

The Playground is typically the start for most code explorations, but can be a versatile tool with many different kinds of applications.

For example, any Playground becomes a code query box when using a scripting DSL. For example, in the example below, inspect the result of the query and you will get a list of methods.

Beyond Pharo programming

The applications go well beyond coding in Pharo. For example, this very page is based on the same engine, only in this case it captures documentation.

Equally, you can also play in other languages: