From: Raphaƫl Van Dyck Date: Fri, 27 Nov 2026 15:20:58 +0000 (+0100) Subject: revise user manual X-Git-Url: http://evlambda.org/gitweb/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;p=evlambda.git revise user manual --- diff --git a/system-files/USER-MANUAL b/system-files/USER-MANUAL index 7ebb88e..acf7815 100644 --- a/system-files/USER-MANUAL +++ b/system-files/USER-MANUAL @@ -40,7 +40,7 @@
variable
Objects of type variable are commonly used to name objects and other kinds of entities. For example, the names of the types are objects of type variable: object, void, … An object of type variable is often simply called a variable when there is no risk of confusion.
empty-list
-
There is exactly one object of type empty-list. Its readable representation is () and its purpose is to represent empty lists of objects. The single object of type empty-list is often simply called the empty list when there is no risk of confusion.
+
There is exactly one object of type empty-list. Its simplest readable representation is () and its purpose is to represent empty lists of objects. The single object of type empty-list is often simply called the empty list when there is no risk of confusion.
cons
Objects of type cons are ordered pairs of objects. The first/second element of an object of type cons is called its car/cdr. An object of type cons is often simply called a cons when there is no risk of confusion. Conses are the building blocks of many data structures. In particular, conses can be chained together to represent nonempty lists of objects. A nonempty list of objects is represented by a cons whose car is the first element of the list and whose cdr is the sublist of the list obtained by omitting its first element. For example, the list (1 2 3) is represented by a chain of three conses: a first cons whose car is the number 1 and whose cdr is the second cons, a second cons whose car is the number 2 and whose cdr is the third cons, and a third cons whose car is the number 3 and whose cdr is the empty list.
vector
@@ -61,17 +61,16 @@
  • Lookup rules are needed because, as we will see later in this section, three environments are always active at any given time. The lookup rules determine which environments to consult and in which order.
  • A variable that is associated with an object through a binding belonging to namespace $X$ of environment $Y$ is said to be bound to the object in namespace $X$ of environment $Y$. A variable that is not associated with an object through a binding belonging to namespace $X$ of environment $Y$ is said to be unbound in namespace $X$ of environment $Y$.

    -

    Objects, bindings, and environments are represented by nonoverlapping patterns of bits located inside a region of the computer's memory called the heap. Each object, binding, or environment is uniquely identified by the address of the pattern of bits that represents it. Like objects, bindings, and environments, addresses are also represented by patterns of bits. A reference to an object, binding, or environment is an instance of the pattern of bits that represents the address of the pattern of bits that represents the object, binding, or environment. By abuse of language, we often confuse a reference to an object, binding, or environment with the object, binding, or environment being referenced.

    -

    The pattern of bits representing an object has two parts: one part specifying the type of the object and one part specifying which member of the type the object is.

    -

    An object, binding, or environment references another object, binding, or environment by embedding into its representation a reference to that other object, binding, or environment:

    +

    Objects, bindings, and environments are patterns of bits located inside a region of the computer's memory called the heap. Each object, binding, or environment is uniquely identified by its address in the heap. An address, which is a nonnegative integer, can be represented by a pattern of bits. A reference to an object, binding, or environment is an instance of the pattern of bits representing the address of the object, binding, or environment. By abuse of language, we often confuse a reference to an object, binding, or environment with the object, binding, or environment itself.

    +

    An object, binding, or environment can reference another object, binding, or environment by embedding a reference to that other object, binding, or environment:

    -

    The references embedded into the representation of an object, binding, or environment can be thought of as occupying memory locations denoted by the object, binding, or environment. For example, a cons can be thought of as denoting two memory locations: one containing a reference to the car of the cons and one containing a reference to the cdr of the cons. By abuse of language, we often say that a memory location contains an object, binding, or environment when in reality the memory location contains a reference to the object, binding, or environment.

    +

    The references embedded into an object, binding, or environment can be thought of as occupying memory locations denoted by the object, binding, or environment. For example, a cons can be thought of as denoting two memory locations: one containing a reference to the car of the cons and one containing a reference to the cdr of the cons. By abuse of language, we often say that a memory location contains an object, binding, or environment when in reality the memory location contains a reference to the object, binding, or environment.

    Multiple objects, bindings, and/or environments can reference a common object, binding, or environment, leading to the sharing of the common object, binding, or environment. An object, binding, or environment can reference itself directly ($X\rightarrow X$) or indirectly ($X\rightarrow Y\rightarrow\cdots\rightarrow X$), leading to the existence of a cycle.

    Objects of type void, boolean, keyword, symbol, and empty-list have the following uniqueness properties:

    Objects of type void, boolean, number, character, string, keyword, symbol, empty-list, primitive-function, and closure are immutable and cannot be altered. Objects of type cons and vector, bindings, and environments are mutable and can be altered in the following ways:

    Some of the concepts introduced in the section Programming Language will now be illustrated by providing a commented transcript of a sequence of evaluations conducted in a listener buffer. If you want to reproduce the evaluations, be sure to start with a fresh trampoline++ evaluator. To get a fresh trampoline++ evaluator, restart the evaluator (using the Restart Evaluator… command from the Eval menu) with Trampoline++ selected.

    The global functions used in the evaluations are listed below. For each function, a template function call, an indication of the outcome of the invocation, and a description of the function's behavior are provided. The variable in operator position is the name of the function (i.e., the variable bound to the function in the function namespace of the global environment). The arguments named after a type must be of that type, otherwise the invocation completes abruptly for a reason of type error.

    @@ -367,7 +372,7 @@
    The macro creates an infinite loop repeatedly evaluating the serial forms in sequence from left to right. For example, the macro call (loop) endlessly does nothing. The evaluation of the macro call normally does not complete but there are ways to exit an infinite loop.

    For any object $\object$, '$\object$ is an abbreviation for (quote $\object$).

    -

    Here is the commented transcript, where each gray box contains a form and its values. The character ⏎ marks the places where the Return or Enter key should be pressed.

    +

    Here is the commented transcript, where each gray box contains a form and its values. The character ⏎ marks the places where the Return or Enter key should be pressed. Left-clicking on a form copies it to the clipboard.

    > (+ 1 2)⏎
    3

    The evaluation produces a result consisting of the sum of the two numbers 1 and 2. Because numbers are self-evaluating, quoting the numbers is not necessary.

    > (+ '1 '2)⏎
    3
    @@ -436,20 +441,28 @@

    File Menu

    Save Buffer

    The command writes the contents of the selected file buffer into its associated file.

    -

    The command is not available in online mode.

    +

    The command is not available in online mode or when the display mode is HTML.

    Revert Buffer…

    The command reverts the contents of the selected file buffer to the contents of its associated file.

    +

    The command is not available when the display mode is HTML.

    Edit Menu

    Toggle HTML Mode

    The command toggles the selected window between raw and HTML modes.

    The command is only available when the selected window displays the contents of an all-caps file or an EVLambda source file.

    Clear Listener…

    The command clears the selected listener buffer.

    -

    All contents before the last prompt is deleted.

    +

    The contents before the last prompt and the record of the forms that have been evaluated are deleted.

    +

    Settings…

    +

    The following settings can be modified:

    + +

    The settings are stored in the browser's local storage.

    Eval Menu

    Evaluate Form

    The command evaluates a top-level form contained inside the selected file buffer.

    -

    The command is only available when the selected window displays the contents of an EVLambda source file.

    +

    The command is only available when the selected window displays the contents of an EVLambda source file in raw mode.

    A top-level form is a form that is not contained inside another form.

    The top-level form to evaluate is selected as follows:

    Only the trampoline and trampoline++ evaluators allow unbounded iterations through tail-recursive calls. The other evaluators are only useful as stepping stones to understand the trampoline and trampoline++ evaluators. The trampoline++ evaluator is an optimized version of the trampoline evaluator.

    View Menu

    -

    Select Other Window

    -

    The command selects one of the nonselected windows.

    -

    The command is not available when the selected window is maximized.

    +

    Select Previous/Next Window

    +

    The commands select the previous/next window (with respect to the selected window).

    +

    The windows are ordered from left to right and from top to bottom.

    +

    The commands are not available when the selected window is maximized or there is only one window.

    Toggle Maximized State

    The command toggles the selected window between unmaximized and maximized states.

    +

    The command is not available when there is only one window.

    +

    Delete This Window

    +

    The command deletes the selected window.

    +

    The command is not available when the selected window is maximized or there is only one window.

    +

    Delete Other Windows

    +

    The command deletes the windows other than the selected window.

    +

    The command is not available when the selected window is maximized or there is only one window.

    +

    Split Window Vertically

    +

    The command splits the selected window vertically. The selected window becomes the top window.

    +

    The command is not available when the selected window is maximized.

    +

    Split Window Horizontally

    +

    The command splits the selected window horizontally. The selected window becomes the left window.

    +

    The command is not available when the selected window is maximized.

    Buffer Menu

    The buffer menu allows the user to select the buffer displayed in the selected window.

    The buffer menu contains the following entries:

    @@ -610,7 +637,10 @@ Ctrl-zCtrl-zCmd-zundo Ctrl-yCtrl-yCmd-Shift-zredo Ctrl-Shift-zN/AN/Aredo - TabTabTabindentSelection + TabTabTabindentSelection + Esc then TabEsc then TabEsc then Tabmove focus forward + Esc then Shift-TabEsc then Shift-TabEsc then Shift-Tabmove focus backward + Ctrl-mCtrl-mAlt-Shift-mtoggleTabFocusMode Ctrl-fCtrl-fCmd-fopenSearchPanel F3F3F3findNext Shift-F3Shift-F3Shift-F3findPrevious @@ -624,8 +654,11 @@ Ctrl-Alt-hCtrl-Alt-hCtrl-Cmd-hToggle HTML Mode Ctrl-Alt-eCtrl-Alt-eCtrl-Cmd-eEvaluate Form Ctrl-Alt-lCtrl-Alt-lCtrl-Cmd-lLoad Buffer - Ctrl-Alt-oCtrl-Alt-oCtrl-Cmd-oSelect Other Window + Ctrl-Alt-ArrowLeftCtrl-Alt-ArrowLeftCtrl-Cmd-ArrowLeftSelect Previous Window + Ctrl-Alt-ArrowRightCtrl-Alt-ArrowRightCtrl-Cmd-ArrowRightSelect Next Window Ctrl-Alt-mCtrl-Alt-mCtrl-Cmd-mToggle Maximized State + Ctrl-Alt-ArrowUpCtrl-Alt-ArrowUpCtrl-Cmd-ArrowUpSelect Previous Form + Ctrl-Alt-ArrowDownCtrl-Alt-ArrowDownCtrl-Cmd-ArrowDownSelect Next Form