File: help.html

package info (click to toggle)
gambc 4.9.3-1.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 85,020 kB
  • sloc: ansic: 1,047,649; lisp: 243,942; perl: 19,018; sh: 6,385; makefile: 6,303; objc: 3,757; cpp: 2,143; sed: 498; java: 305; awk: 198
file content (120 lines) | stat: -rw-r--r-- 7,745 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<html>

<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.25, maximum-scale=1.6">

<script>

function gestureStart() {
  var metas = document.getElementsByTagName('meta');
  for (var i=0; i<metas.length; i++) {
    if (metas[i].name === "viewport") {
      metas[i].content = "width=device-width, initial-scale=1.0, minimum-scale=0.25, maximum-scale=1.6";
    }
  }
}

document.addEventListener("gesturestart", gestureStart, false);

</script>

</head>

<body>

<br/>
<br/>

<p>
Gambit REPL is an interpreter for the Scheme programming language which closely conforms to the Scheme standard and also provides a large number of extensions. The following documents define the R5RS Scheme language and the extensions specific to the Gambit system, on which Gambit REPL is based.
</p>

<ul>
<li><a href="event:r5rs"><strong>R5RS document</strong></a>
</ul>

<ul>
<li><a href="event:gambit"><strong>Gambit extensions to R5RS</strong></a>
</ul>

<h2>Views</h2>

<p>
Gambit REPL's user interface provides 4 views which are selectable with the tabs at the top of the screen. The views can be switched from portrait to landscape by turning the device. The landscape layout is recommended on iPhone, as it gives a keyboard with more keys and text output with fewer line breaks.
</p>

<ul>

<li><strong>REPL</strong><br/>
This is the Read-Eval-Print-Loop with which the user interacts with the interpreter. Enter an expression to evaluate or a command, tap <strong>return</strong> and the interpreter will execute the command and display the resulting value(s) if there are any. Tap <strong>return</strong> on an empty line to dismiss the keyboard. Place the insertion point on a previous line and tap <strong>return</strong> to copy that line at the bottom. Tap the <strong>STOP</strong> key to interrupt a long computation (this key is available in landscape layout on small devices). The list of special <i>comma</i> commands can be listed by entering <strong>,?</strong> (comma and question mark). On iPad, the keyboard function keys can be assigned scripts by naming the script with the name of the function key, for example <strong>F1</strong>.

<li><strong>Wiki</strong><br/>
This view visits the Gambit wiki in the web browser. Internet access is required. The Gambit wiki contains useful information for using Gambit REPL and Gambit in general. The wiki can be edited by any user with an account (if you don't have an account you should <a href="event:create-account"><strong>create an account</strong></a>; it is free). Please contribute!

<li><strong>Help</strong><br/>
This view gives access to the documentation. It contains the <a href="event:r5rs"><strong>R5RS document</strong></a> and the <a href="event:gambit"><strong>Gambit manual</strong></a>, in HTML and PDF formats. The HTML formats include navigation buttons (move to previous/next section, table-of-contents, index, etc). Tap the <strong>x</strong> button in the upper right to return to the main help view.

<li><strong>Edit</strong><br/>
This view contains a set of editable scripts. The first line of the script can be a comment containing the name of the script (three semicolons, a space, and the name of the script, such as <strong>main</strong>, <strong>F1</strong>, <strong>~/test.scm</strong>). Giving names to scripts improves the usefulness of debugging messages, and it is necessary when saving scripts to the app's Documents folder. The <strong>main</strong> script is useful for customizing Gambit REPL; it is executed when the app is launched. By default the <strong>main</strong> script simply shows the splash screen, but this can be changed, for example, replacing the call <code>(splash)</code> by <code>(emacs)</code> will directly enter the emacs-like editor when the app is launched. Tap the <strong>+</strong> button to create a new empty script. Tap the <strong>Run</strong> button to execute the script. Tap the <strong>Save</strong> button to save the script to the Documents folder. The name of the script must start with <strong>~/</strong> followed by a letter, and end in <strong>.scm</strong>, and contain only letters, digits, '<strong>.</strong>', and '<strong>-</strong>'. Saving a script which only contains the script name will remove the script from the Documents folder. Tap the <strong>Delete</strong> button to delete the script from the Edit view.

</ul>

<h2>Specific Predefined Procedures</h2>

<p>
The following predefined procedures are specific to Gambit REPL.
</p>

<ul>

<li><strong><code>(splash)</code></strong><br/>
Shows the splash screen.

<li><strong><code>(repl)</code></strong><br/>
Shows the REPL view.

<li><strong><code>(repl-eval</code> <i>input</i><code>)</code></strong><br/>
Shows the REPL view and simulates the user typing the characters in the string <strong><i>input</i></strong>. For example <strong><code>(repl-eval "(+ 1 2)\n")</code></strong>.

<li><strong><code>(wiki)</code></strong><br/>
Shows the Wiki view.

<li><strong><code>(help)</code></strong><br/>
Shows the Help view. The <code>help</code> procedure can also be called with a <i>subject</i> argument to open the appropriate section of the HTML documentation, for example <code>(help help)</code> gives the documentation of the <code>help</code> procedure.

<li><strong><code>(edit)</code></strong><br/>
Shows the Edit view.

<li><strong><code>(open-URL</code> <i>string</i><code>)</code></strong><br/>
Opens the URL <strong><i>string</i></strong> in the web browser. For example, <code>(open-URL "http://www.apple.com")</code>.

<li><strong><code>(reset-scripts)</code></strong><br/>
Resets the scripts in the Edit view to the factory default. It does not remove any files in the Documents folder. <strong>This operation cannot be undone, so please make sure you have saved any scripts you want to preserve, for example, by saving them to the Documents folder.</strong>

<li><strong><code>(repl-server</code> <i>password</i><code>)</code></strong><br/>
Starts the REPL server, which accepts password protected telnet connections on port 7000. This allows interacting with Gambit REPL from a remote computer, for example a desktop computer. It will be necessary to enter the <strong><i>password</i></strong> to authenticate the telnet connection. Assuming the device's address is 192.168.0.100, the following shell command on the remote computer (on the same LAN) will start a new REPL:<br/><br/>
<center><code>telnet 192.168.0.100 7000</code></center>

<li><strong><code>(emacs</code> <i>[filename]</i><code>)</code></strong><br/>
Starts an emacs-like editor. If file <strong><i>filename</i></strong> is specified (a string) it will be visited, otherwise a REPL is automatically started inside the editor. Exiting the editor with the command <code>C-x C-c</code> returns to the normal REPL view. The use of an external Bluetooth keyboard is recommended as it simplifies typing editing commands. More documentation on the editor is available in its help menu.

</ul>

<h2>File System</h2>

<p>
The Scheme file I/O procedures and the emacs-like editor can read and write files in a variety of locations. Paths not starting with "~" refer to files in the iCloud Documents folder which is kept in sync across devices. The path "~/" refers to the local Documents folder of the Gambit REPL app. This folder's content is preserved when Gambit REPL is updated to a newer version. The path "~~/" refers to the Gambit REPL app bundle (note that files in the app bundle are read-only).
</p>

<h2>Reporting Problems</h2>

<p>
If you encounter problems with Gambit REPL, please submit
a new issue on the
<a href="event:browse:https://github.com/feeley/gambit/issues">Gambit issue tracker</a>.
</p>

</body>

</html>