MediaLisp: iOS language reference
Media Export Pty Ltd · Engine 0.1.68 · af8e0b5f6d97ab379337d3539fd8dbe0d6337fd8
This page describes the iOS embedding profile. It does not promise full Common Lisp compatibility or the CLI's provisioned native stack.
Scope and identity
MediaLisp is the Media Export app powered by the RustLisp engine. RustLisp is a non-conforming subset of Common Lisp, not SBCL, Scheme or Clojure. This reference describes the standard prelude on engine commit af8e0b5f6d97ab379337d3539fd8dbe0d6337fd8 (Cargo 0.1.68). The combined 0.1.69 milestone was selected but is not a published engine release. Prefer documented names and tested examples; do not infer full ANSI compatibility.
Security and pasted code
Pasted or AI-generated Lisp is executable code, not trusted advice. This host denies guest file access, but a program may still change interpreter state, consume resources or cause a crash or hang through an undiscovered defect. Stop and Reset do not roll back completed effects or force termination of blocked native work. No iOS sandbox escape, arbitrary native execution or remote compromise is established by these tests. See https://deeplisp.com/medialisp/security/ for scope, versions and remaining device tests.
Core language
Supported areas include lexical closures and special variables; DEFUN, LAMBDA, FLET, LABELS, LET, LET*, SETQ, DEFPARAMETER, DEFVAR, IF, COND, WHEN, UNLESS, AND, OR, PROGN; DOLIST, DOTIMES, DO and LOOP; BLOCK/RETURN-FROM, CATCH/THROW, TAGBODY/GO and UNWIND-PROTECT. The extended LOOP subset is documented in the pinned manual; for ... and ... stepping is sequential, not parallel, and LOOP-FINISH is absent.
Functions and macros
FUNCALL, APPLY, optional/rest/key/aux lambda parameters, DEFMACRO, MACROLET, backquote/unquote, GENSYM and destructuring are supported subsets. VALUES returns zero or more values; MULTIPLE-VALUE-BIND and related facilities are available. SETF supports documented places, not arbitrary expressions. There is no user-callable COMPILE or COMPILE-FILE and no compiler-macro facility.
Data and numbers
Exact integers, bignums, ratios and finite double-precision floats; symbols, keywords, Unicode characters, immutable strings, cons lists, one-dimensional vectors, hash tables, structures and packages are supported. List and sequence facilities include MAPCAR, REDUCE, APPEND, REVERSE, ASSOC, MEMBER, FIND, POSITION and SORT. Complex numbers, multidimensional/specialised arrays and bit vectors are absent. Strings cannot be modified in place. SORT on a list returns a new list.
Conditions and objects
ERROR, HANDLER-CASE, HANDLER-BIND, SIGNAL, WARN, DEFINE-CONDITION and programmatic restarts are supported subsets. There is no interactive debugger. DEFSTRUCT and generic functions/methods exist, but DEFCLASS, MAKE-INSTANCE and full CLOS do not. Resource limits and cancellation are host errors, not catchable Lisp conditions; cleanup is not guaranteed after a resource limit.
Text, reader and printing
READ-LINE, READ, character input, READ-FROM-STRING, text/string streams, PRINT, PRINC, PRIN1 and FORMAT are available. Use straight quotes for strings; backslash quotes the next character literally, so backslash-n is the letter n, not a newline escape. FORMAT supports ~A, ~S, ~D, ~B, ~O, ~X, ~R, ~C, ~P, ~%, ~&, ~~, ~T, ~*, iteration ~{ ~} with ~^, conditionals ~[ ~], case conversion ~( ~) and the number directives ~F, ~E, ~G and ~$ (see Formatting numbers). Justification ~< ~>, ~?, ~/, ~W, ~I, ~_, ~| and ~:C are not supported. No user-defined readtables, general pretty printer or binary streams. The embedding completion renderer returns read-only printed values and does not invoke PRINT-OBJECT methods, even though explicit Lisp printing can. Reader-time execution is enabled in the programmable REPL: #. evaluates while reading and #S may call a constructor. Setting *READ-EVAL* to NIL can disable these features for a read, but a user-controlled REPL can change that setting. Do not use this REPL as a passive untrusted-data parser. Cut Notes uses a separate fresh compiler interpreter with *READ-EVAL* disabled before reading edit descriptions.
Formatting numbers
FORMAT prints numbers with ~F (fixed point), ~E (exponential), ~G (general) and ~$ (money), matching SBCL. Parameters come before modifiers: ~w,d,k,overflowchar,padcharF is field width, digits after the point, scale by 10^k, overflow character and padding character; ~E and ~G take ~w,d,e,k,overflowchar,padchar,exptchar (e is exponent digits, exptchar the exponent letter); ~d,n,w,padchar$ is digits after the point, minimum digits before it, width and padding. @ always prints the sign, as in ~,2@F. Examples: (format nil "~,2F" 3.14159) is "3.14"; (format nil "~8,3F" 3.14159) is " 3.142"; (format nil "~,3E" 12345.678) is "1.235e+4"; (format nil "~$" 2.5) is "2.50". Halves round up: (format nil "~,2F" 0.125) is "0.13". Integers and ratios are converted to floats. ~T tabulates: (format t "~A~10T~8,2F~%" "pears" 12.25) starts the number at column 10, which lines up a table. The pinned text-composition.md document wrongly lists ~F, ~E, ~G, ~$ and ~T as unsupported; this profile, the pinned manual and the semantics document are correct.
iOS app behavior
Eval evaluates the whole editor and returns only the final form's values, one per line; zero values prints no result lines and one NIL prints NIL. Printed output streams into the transcript. Definitions persist between evaluations. READ-LINE waits for input supplied through Input/Send (an empty line is allowed). The app displays waiting status and focuses Input. Reset Session creates a fresh standard interpreter, discards definitions and pending input, preserves editor text and transcript history, and does not delete files. Transcript history is trimmed when it exceeds 128 KiB; large transient copies are still possible. String-output streams are not the host transcript, have their own engine bound, and contribute to approximate heap accounting.
iOS budgets and permissions
Each interactive evaluation is limited to 100 million fuel, 128 MiB approximate Lisp heap and 30 seconds wall time including input waits. Heap budget is not total process memory. Queued input, pending output, total per-evaluation host output and completion rendering are separately bounded (64 KiB); draining output does not replenish its total allowance. Stop interrupts CPU work at safe points, queued reads and session SLEEP, but native blocking I/O and long builtins may not stop immediately. The worker uses an ordinary 2 MiB native stack: never assume the CLI's deep-entry stack or published CLI recursion depths. Logical depth guards can stop earlier. The 30-second deadline is cooperative, NOT a hard termination guarantee. Stop/reset can be delayed by long native operations; Reset waits for the old worker and does not forcibly kill threads. Persistent state and temporary/native allocations need process-level measurement, and symbol/metadata growth must not be assumed covered by the heap estimate.
Host capabilities
This learning-3 iOS host denies ALL guest host capabilities (unchanged from learning-1): files, process execution, environment access, LOAD and process exit. Lisp cannot read, create, overwrite, delete, list or publish files, including files in Documents. Host-managed app documents and probe reports remain outside guest access. Root policy is configured as defense in depth, not as permission to use files. No guest scratch/file mode is exposed in this build. The legacy file-enabled bridge constructor is for explicitly selected host use, is not used by this app, and has no disk quota.
Reference and uncertainty
The full pinned manual and selected language documents accompany this summary online. The manual describes the broader CLI too; this iOS profile overrides CLI startup, stack, capabilities, limits and completion rendering. The semantics document retains historical milestone notes; later sections may supersede earlier statements. If a feature is not documented or compatibility is uncertain, say so and offer a simpler supported alternative. Nothing in the copied prompt sends code or errors to an AI service automatically.
Tested examples
Arithmetic
(+ 20 22)Returned values:
42
Closures and lists
(let ((offset 10)) (mapcar (lambda (n) (+ offset n)) '(1 2 3)))Returned values:
(11 12 13)
Multiple values
(values 10 20)Returned values:
10 20
Recoverable error
(handler-case (error "Example") (error () :handled))Returned values:
:HANDLED
String newline syntax
"a\nb"Returned values:
"anb"
Number formatting
(format nil "~,2F | ~8,3F | ~,3E | ~$" 3.14159 2.5 12345.678 1/3)Returned values:
"3.14 | 2.500 | 1.235e+4 | 0.33"
Hash table
(let ((h (make-hash-table))) (setf (gethash :answer h) 42) (gethash :answer h))Returned values:
42 T
Unavailable CLOS class facility
(fboundp 'defclass)Returned values:
NIL
Denied environment capability
(handler-case (rustlisp-getenv "HOME") (error () :denied))Returned values:
:DENIED
Learning profile denies file writes
(handler-case (open "guest-write.txt" :direction :output :if-does-not-exist :create) (error () :denied))Returned values:
:DENIED
Reader-time code cannot bypass file policy
#.(handler-case (delete-file "guest-write.txt") (error () :denied))Returned values:
:DENIED
Read-time evaluation disabled for a data read
(let ((*read-eval* nil)) (handler-case (read-from-string "#.(+ 1 2)") (error () :blocked)))Returned values:
:BLOCKED
AI context and prompt skeleton
Copy the plain text into a chat app and fill in the placeholders. Nothing is sent automatically. Links may not be readable by every chat service.
Plain-text AI context · Machine-readable profile
I am using the MediaLisp iOS app, powered by the RustLisp engine, published by Media Export Pty Ltd. Host security revision: learning-3.
Scope and identity
MediaLisp is the Media Export app powered by the RustLisp engine. RustLisp is a non-conforming subset of Common Lisp, not SBCL, Scheme or Clojure. This reference describes the standard prelude on engine commit af8e0b5f6d97ab379337d3539fd8dbe0d6337fd8 (Cargo 0.1.68). The combined 0.1.69 milestone was selected but is not a published engine release. Prefer documented names and tested examples; do not infer full ANSI compatibility.
Security and pasted code
Pasted or AI-generated Lisp is executable code, not trusted advice. This host denies guest file access, but a program may still change interpreter state, consume resources or cause a crash or hang through an undiscovered defect. Stop and Reset do not roll back completed effects or force termination of blocked native work. No iOS sandbox escape, arbitrary native execution or remote compromise is established by these tests. See https://deeplisp.com/medialisp/security/ for scope, versions and remaining device tests.
Core language
Supported areas include lexical closures and special variables; DEFUN, LAMBDA, FLET, LABELS, LET, LET*, SETQ, DEFPARAMETER, DEFVAR, IF, COND, WHEN, UNLESS, AND, OR, PROGN; DOLIST, DOTIMES, DO and LOOP; BLOCK/RETURN-FROM, CATCH/THROW, TAGBODY/GO and UNWIND-PROTECT. The extended LOOP subset is documented in the pinned manual; for ... and ... stepping is sequential, not parallel, and LOOP-FINISH is absent.
Functions and macros
FUNCALL, APPLY, optional/rest/key/aux lambda parameters, DEFMACRO, MACROLET, backquote/unquote, GENSYM and destructuring are supported subsets. VALUES returns zero or more values; MULTIPLE-VALUE-BIND and related facilities are available. SETF supports documented places, not arbitrary expressions. There is no user-callable COMPILE or COMPILE-FILE and no compiler-macro facility.
Data and numbers
Exact integers, bignums, ratios and finite double-precision floats; symbols, keywords, Unicode characters, immutable strings, cons lists, one-dimensional vectors, hash tables, structures and packages are supported. List and sequence facilities include MAPCAR, REDUCE, APPEND, REVERSE, ASSOC, MEMBER, FIND, POSITION and SORT. Complex numbers, multidimensional/specialised arrays and bit vectors are absent. Strings cannot be modified in place. SORT on a list returns a new list.
Conditions and objects
ERROR, HANDLER-CASE, HANDLER-BIND, SIGNAL, WARN, DEFINE-CONDITION and programmatic restarts are supported subsets. There is no interactive debugger. DEFSTRUCT and generic functions/methods exist, but DEFCLASS, MAKE-INSTANCE and full CLOS do not. Resource limits and cancellation are host errors, not catchable Lisp conditions; cleanup is not guaranteed after a resource limit.
Text, reader and printing
READ-LINE, READ, character input, READ-FROM-STRING, text/string streams, PRINT, PRINC, PRIN1 and FORMAT are available. Use straight quotes for strings; backslash quotes the next character literally, so backslash-n is the letter n, not a newline escape. FORMAT supports ~A, ~S, ~D, ~B, ~O, ~X, ~R, ~C, ~P, ~%, ~&, ~~, ~T, ~*, iteration ~{ ~} with ~^, conditionals ~[ ~], case conversion ~( ~) and the number directives ~F, ~E, ~G and ~$ (see Formatting numbers). Justification ~< ~>, ~?, ~/, ~W, ~I, ~_, ~| and ~:C are not supported. No user-defined readtables, general pretty printer or binary streams. The embedding completion renderer returns read-only printed values and does not invoke PRINT-OBJECT methods, even though explicit Lisp printing can. Reader-time execution is enabled in the programmable REPL: #. evaluates while reading and #S may call a constructor. Setting *READ-EVAL* to NIL can disable these features for a read, but a user-controlled REPL can change that setting. Do not use this REPL as a passive untrusted-data parser. Cut Notes uses a separate fresh compiler interpreter with *READ-EVAL* disabled before reading edit descriptions.
Formatting numbers
FORMAT prints numbers with ~F (fixed point), ~E (exponential), ~G (general) and ~$ (money), matching SBCL. Parameters come before modifiers: ~w,d,k,overflowchar,padcharF is field width, digits after the point, scale by 10^k, overflow character and padding character; ~E and ~G take ~w,d,e,k,overflowchar,padchar,exptchar (e is exponent digits, exptchar the exponent letter); ~d,n,w,padchar$ is digits after the point, minimum digits before it, width and padding. @ always prints the sign, as in ~,2@F. Examples: (format nil "~,2F" 3.14159) is "3.14"; (format nil "~8,3F" 3.14159) is " 3.142"; (format nil "~,3E" 12345.678) is "1.235e+4"; (format nil "~$" 2.5) is "2.50". Halves round up: (format nil "~,2F" 0.125) is "0.13". Integers and ratios are converted to floats. ~T tabulates: (format t "~A~10T~8,2F~%" "pears" 12.25) starts the number at column 10, which lines up a table. The pinned text-composition.md document wrongly lists ~F, ~E, ~G, ~$ and ~T as unsupported; this profile, the pinned manual and the semantics document are correct.
iOS app behavior
Eval evaluates the whole editor and returns only the final form's values, one per line; zero values prints no result lines and one NIL prints NIL. Printed output streams into the transcript. Definitions persist between evaluations. READ-LINE waits for input supplied through Input/Send (an empty line is allowed). The app displays waiting status and focuses Input. Reset Session creates a fresh standard interpreter, discards definitions and pending input, preserves editor text and transcript history, and does not delete files. Transcript history is trimmed when it exceeds 128 KiB; large transient copies are still possible. String-output streams are not the host transcript, have their own engine bound, and contribute to approximate heap accounting.
iOS budgets and permissions
Each interactive evaluation is limited to 100 million fuel, 128 MiB approximate Lisp heap and 30 seconds wall time including input waits. Heap budget is not total process memory. Queued input, pending output, total per-evaluation host output and completion rendering are separately bounded (64 KiB); draining output does not replenish its total allowance. Stop interrupts CPU work at safe points, queued reads and session SLEEP, but native blocking I/O and long builtins may not stop immediately. The worker uses an ordinary 2 MiB native stack: never assume the CLI's deep-entry stack or published CLI recursion depths. Logical depth guards can stop earlier. The 30-second deadline is cooperative, NOT a hard termination guarantee. Stop/reset can be delayed by long native operations; Reset waits for the old worker and does not forcibly kill threads. Persistent state and temporary/native allocations need process-level measurement, and symbol/metadata growth must not be assumed covered by the heap estimate.
Host capabilities
This learning-3 iOS host denies ALL guest host capabilities (unchanged from learning-1): files, process execution, environment access, LOAD and process exit. Lisp cannot read, create, overwrite, delete, list or publish files, including files in Documents. Host-managed app documents and probe reports remain outside guest access. Root policy is configured as defense in depth, not as permission to use files. No guest scratch/file mode is exposed in this build. The legacy file-enabled bridge constructor is for explicitly selected host use, is not used by this app, and has no disk quota.
Reference and uncertainty
The full pinned manual and selected language documents accompany this summary online. The manual describes the broader CLI too; this iOS profile overrides CLI startup, stack, capabilities, limits and completion rendering. The semantics document retains historical milestone notes; later sections may supersede earlier statements. If a feature is not documented or compatibility is uncertain, say so and offer a simpler supported alternative. Nothing in the copied prompt sends code or errors to an AI service automatically.
Versioned reference (browse if available; this summary is usable offline): https://deeplisp.com/medialisp/af8e0b5-learning-3/
My task:
[Describe the goal]
Existing code:
[Paste code, if any]
Observed result or error:
[Paste result, if any]
Please provide a complete example to paste into the editor, expected values/output, and any compatibility doubts. Do not silently substitute Scheme, Clojure or SBCL-only features.
Beginner tutor prompt
For someone with no Lisp experience. Copy the plain text into a chat app: it teaches one idea at a time, and you paste each example into MediaLisp, tap Eval and paste the result back. The app offers the same prompt under Help → Ask an AI → Beginner tutor. Nothing is sent automatically.
I am using the MediaLisp iOS app, powered by the RustLisp engine, published by Media Export Pty Ltd. Host security revision: learning-3.
Scope and identity
MediaLisp is the Media Export app powered by the RustLisp engine. RustLisp is a non-conforming subset of Common Lisp, not SBCL, Scheme or Clojure. This reference describes the standard prelude on engine commit af8e0b5f6d97ab379337d3539fd8dbe0d6337fd8 (Cargo 0.1.68). The combined 0.1.69 milestone was selected but is not a published engine release. Prefer documented names and tested examples; do not infer full ANSI compatibility.
Security and pasted code
Pasted or AI-generated Lisp is executable code, not trusted advice. This host denies guest file access, but a program may still change interpreter state, consume resources or cause a crash or hang through an undiscovered defect. Stop and Reset do not roll back completed effects or force termination of blocked native work. No iOS sandbox escape, arbitrary native execution or remote compromise is established by these tests. See https://deeplisp.com/medialisp/security/ for scope, versions and remaining device tests.
Core language
Supported areas include lexical closures and special variables; DEFUN, LAMBDA, FLET, LABELS, LET, LET*, SETQ, DEFPARAMETER, DEFVAR, IF, COND, WHEN, UNLESS, AND, OR, PROGN; DOLIST, DOTIMES, DO and LOOP; BLOCK/RETURN-FROM, CATCH/THROW, TAGBODY/GO and UNWIND-PROTECT. The extended LOOP subset is documented in the pinned manual; for ... and ... stepping is sequential, not parallel, and LOOP-FINISH is absent.
Functions and macros
FUNCALL, APPLY, optional/rest/key/aux lambda parameters, DEFMACRO, MACROLET, backquote/unquote, GENSYM and destructuring are supported subsets. VALUES returns zero or more values; MULTIPLE-VALUE-BIND and related facilities are available. SETF supports documented places, not arbitrary expressions. There is no user-callable COMPILE or COMPILE-FILE and no compiler-macro facility.
Data and numbers
Exact integers, bignums, ratios and finite double-precision floats; symbols, keywords, Unicode characters, immutable strings, cons lists, one-dimensional vectors, hash tables, structures and packages are supported. List and sequence facilities include MAPCAR, REDUCE, APPEND, REVERSE, ASSOC, MEMBER, FIND, POSITION and SORT. Complex numbers, multidimensional/specialised arrays and bit vectors are absent. Strings cannot be modified in place. SORT on a list returns a new list.
Conditions and objects
ERROR, HANDLER-CASE, HANDLER-BIND, SIGNAL, WARN, DEFINE-CONDITION and programmatic restarts are supported subsets. There is no interactive debugger. DEFSTRUCT and generic functions/methods exist, but DEFCLASS, MAKE-INSTANCE and full CLOS do not. Resource limits and cancellation are host errors, not catchable Lisp conditions; cleanup is not guaranteed after a resource limit.
Text, reader and printing
READ-LINE, READ, character input, READ-FROM-STRING, text/string streams, PRINT, PRINC, PRIN1 and FORMAT are available. Use straight quotes for strings; backslash quotes the next character literally, so backslash-n is the letter n, not a newline escape. FORMAT supports ~A, ~S, ~D, ~B, ~O, ~X, ~R, ~C, ~P, ~%, ~&, ~~, ~T, ~*, iteration ~{ ~} with ~^, conditionals ~[ ~], case conversion ~( ~) and the number directives ~F, ~E, ~G and ~$ (see Formatting numbers). Justification ~< ~>, ~?, ~/, ~W, ~I, ~_, ~| and ~:C are not supported. No user-defined readtables, general pretty printer or binary streams. The embedding completion renderer returns read-only printed values and does not invoke PRINT-OBJECT methods, even though explicit Lisp printing can. Reader-time execution is enabled in the programmable REPL: #. evaluates while reading and #S may call a constructor. Setting *READ-EVAL* to NIL can disable these features for a read, but a user-controlled REPL can change that setting. Do not use this REPL as a passive untrusted-data parser. Cut Notes uses a separate fresh compiler interpreter with *READ-EVAL* disabled before reading edit descriptions.
Formatting numbers
FORMAT prints numbers with ~F (fixed point), ~E (exponential), ~G (general) and ~$ (money), matching SBCL. Parameters come before modifiers: ~w,d,k,overflowchar,padcharF is field width, digits after the point, scale by 10^k, overflow character and padding character; ~E and ~G take ~w,d,e,k,overflowchar,padchar,exptchar (e is exponent digits, exptchar the exponent letter); ~d,n,w,padchar$ is digits after the point, minimum digits before it, width and padding. @ always prints the sign, as in ~,2@F. Examples: (format nil "~,2F" 3.14159) is "3.14"; (format nil "~8,3F" 3.14159) is " 3.142"; (format nil "~,3E" 12345.678) is "1.235e+4"; (format nil "~$" 2.5) is "2.50". Halves round up: (format nil "~,2F" 0.125) is "0.13". Integers and ratios are converted to floats. ~T tabulates: (format t "~A~10T~8,2F~%" "pears" 12.25) starts the number at column 10, which lines up a table. The pinned text-composition.md document wrongly lists ~F, ~E, ~G, ~$ and ~T as unsupported; this profile, the pinned manual and the semantics document are correct.
iOS app behavior
Eval evaluates the whole editor and returns only the final form's values, one per line; zero values prints no result lines and one NIL prints NIL. Printed output streams into the transcript. Definitions persist between evaluations. READ-LINE waits for input supplied through Input/Send (an empty line is allowed). The app displays waiting status and focuses Input. Reset Session creates a fresh standard interpreter, discards definitions and pending input, preserves editor text and transcript history, and does not delete files. Transcript history is trimmed when it exceeds 128 KiB; large transient copies are still possible. String-output streams are not the host transcript, have their own engine bound, and contribute to approximate heap accounting.
iOS budgets and permissions
Each interactive evaluation is limited to 100 million fuel, 128 MiB approximate Lisp heap and 30 seconds wall time including input waits. Heap budget is not total process memory. Queued input, pending output, total per-evaluation host output and completion rendering are separately bounded (64 KiB); draining output does not replenish its total allowance. Stop interrupts CPU work at safe points, queued reads and session SLEEP, but native blocking I/O and long builtins may not stop immediately. The worker uses an ordinary 2 MiB native stack: never assume the CLI's deep-entry stack or published CLI recursion depths. Logical depth guards can stop earlier. The 30-second deadline is cooperative, NOT a hard termination guarantee. Stop/reset can be delayed by long native operations; Reset waits for the old worker and does not forcibly kill threads. Persistent state and temporary/native allocations need process-level measurement, and symbol/metadata growth must not be assumed covered by the heap estimate.
Host capabilities
This learning-3 iOS host denies ALL guest host capabilities (unchanged from learning-1): files, process execution, environment access, LOAD and process exit. Lisp cannot read, create, overwrite, delete, list or publish files, including files in Documents. Host-managed app documents and probe reports remain outside guest access. Root policy is configured as defense in depth, not as permission to use files. No guest scratch/file mode is exposed in this build. The legacy file-enabled bridge constructor is for explicitly selected host use, is not used by this app, and has no disk quota.
Reference and uncertainty
The full pinned manual and selected language documents accompany this summary online. The manual describes the broader CLI too; this iOS profile overrides CLI startup, stack, capabilities, limits and completion rendering. The semantics document retains historical milestone notes; later sections may supersede earlier statements. If a feature is not documented or compatibility is uncertain, say so and offer a simpler supported alternative. Nothing in the copied prompt sends code or errors to an AI service automatically.
Versioned reference (browse if available; this summary is usable offline): https://deeplisp.com/medialisp/af8e0b5-learning-3/
Please be my patient Lisp tutor. I have no Lisp experience, so assume nothing beyond basic arithmetic unless I tell you otherwise. Teach me interactively in MediaLisp, using only what the summary above supports.
How each step works:
1. Teach one idea in a few short sentences, in plain words, defining every new term.
2. Give one short code example (at most about 8 lines) in a code block, ready to paste into the MediaLisp editor.
3. Ask me to predict the result before I tap Eval.
4. Wait for me to paste back what MediaLisp showed: the result lines, any printed output and any error message.
5. Compare it with what you expected. If it differs, explain why; never pretend a result is right. If you are unsure whether MediaLisp supports something, say so and use a simpler supported form.
6. Every two or three steps, give me a small exercise to write myself. Offer a hint before the answer, and check my code when I paste it back.
What I see in MediaLisp:
- Eval runs everything in the editor but shows only the last form's values. Output from PRINT and FORMAT T appears in the transcript as it runs. To see several results at once, wrap them in LIST.
- Definitions stay until I tap Reset Session. When a step uses an earlier definition, name it so I can paste it again after a reset.
- READ-LINE waits for me to type into Input and tap Send.
- The keyboard bar has ( ) ' " and ; keys. Code needs straight quotes, not curly quotes.
- A documentation string is read with (documentation 'name 'function); MediaLisp does not accept a function object such as #'name there.
Suggested path (adjust it to my pace, and recap before moving on):
1. Expressions: numbers, prefix notation such as (+ 1 2), nesting, exact fractions such as (/ 1 3), and decimals.
2. Symbols, QUOTE and lists: code and data look alike.
3. Naming values: DEFPARAMETER, LET and SETF.
4. Your own functions: DEFUN, parameters, return values and documentation strings.
5. Decisions: T and NIL, comparisons and predicates, IF, WHEN and COND.
6. Lists: LIST, CONS, FIRST, REST, APPEND, LENGTH and NTH.
7. Repetition: DOLIST, DOTIMES, a simple LOOP, then recursion.
8. Functions as values: LAMBDA, #', FUNCALL, MAPCAR, REMOVE-IF-NOT, REDUCE and SORT.
9. Text: strings, FORMAT with ~A, ~D, ~% and ~,2F, and the difference between printing a value and returning it.
10. Mistakes: reading error messages, and HANDLER-CASE.
11. A small project of my choice, for example a quiz that uses READ-LINE, a shopping-list total or a word counter.
Use lowercase code with balanced parentheses, in the Common Lisp subset described above. Never use Scheme or Clojure forms (such as define, defn or square brackets) or SBCL-only features. Keep explanations short; I will ask when I want more.
Start with a two-sentence welcome, then step 1.
Pinned engine documentation
These are unmodified source snapshots from the exact engine commit. The iOS profile above overrides CLI-specific startup, stack, permissions, limits and completion printing. The manual covers the current teaching subset; semantics retains historical milestone notes, with later sections superseding earlier statements. Documentation is provided under the accompanying MIT or Apache-2.0 licenses. Private repository access is not needed.
- docs/manual.md · download source
- docs/semantics.md · download source
- docs/text-io.md · download source
- docs/text-data.md · download source
- docs/text-composition.md · download source
- docs/data-structures.md · download source
- docs/filesystem-policy.md · download source
- LICENSE-MIT · download source
- LICENSE-APACHE · download source
MediaLisp