commit dc5d514a85dde27c2079cc7940fd8aa29f42f92e
parent b485e81192b26cab9bbe62fa358b3ac9312a2244
Author: Ed van Bruggen <edvb@uw.edu>
Date: Tue, 7 Jan 2020 23:40:43 -0800
Update documentation to latest tisp version
Diffstat:
doc/tisp.1 | | | 112 | ++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------- |
doc/tisp.1.md | | | 202 | ++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------- |
main.c | | | 2 | +- |
3 files changed, 201 insertions(+), 115 deletions(-)
diff --git a/doc/tisp.1 b/doc/tisp.1
@@ -1,19 +1,23 @@
-.TH TISP 1 "January 2019" "0.0.0"
+.TH TISP 1 "January 2020" "0.0.0"
.PP
.SH NAME
tisp \- tiny lisp
.PP
.SH SYNOPSIS
-tisp [-hv] [FILE ...]
+tisp [-hv] [-c COMMAND] [-] [FILE ...]
.PP
.SH DESCRIPTION
.PP
.PP
-tisp is a tiny lisp library designed to to be lightweight and easy to embedded in other programs. Simply drop the 'tisp.c' and 'tisp.h' files into your project and include the header file in order to use the necessary functions for your program. An example command line interpreter is provided in 'main.c'.
+Tisp is a tiny, terse, and transparent lisp library designed to be lightweight and easy to embedded in other programs. Simply drop the 'tisp.c' and 'tisp.h' files into your project in order to use the necessary functions for your program. An example command line interpreter is provided in 'main.c'. Tisp is a single value name language (lisp-1) which tries to be unambiguous and focus on simplicity. Much of the language is defined with Tisp itself leaving the C code as short as possible.
.PP
.SH OPTIONS
.TP
+\fB-c COMMAND\fP
+Read \fICOMMAND\fP as a line of Tisp code and print result
+.PP
+.TP
\fB-h\fP
Print help and exit
.PP
@@ -23,16 +27,14 @@ Print version info and exit
.PP
.SH USAGE
.PP
-Run the program from the command line to launch the REPL, type a command and press enter to see the result.
+Run the program from the command line to type a single command and press enter to see the result.
.PP
.RS 4
.EX
$ tisp
-> (+ (+ 1 2) 3)
-6
-> (+ 1 2 3)
-6
+(cons 1 2)
+(1 . 2)
.EE
.RE
@@ -41,13 +43,13 @@ Alternatively you can pass a file name which will be opened and run, outputting
.RS 4
.EX
-$ echo '((lambda (x) (+ x 1)) 10)' > inc.lisp
-$ tisp inc.lisp
+$ echo '((lambda (x) (+ x 1)) 10)' > inc.tsp
+$ tisp inc.tsp
11
.EE
.RE
-Commands can also be piped directing into tisp through the command line.
+Commands can also be piped directing into Tisp through the command line.
.PP
.RS 4
.EX
@@ -57,9 +59,19 @@ t
.EE
.RE
+Or given directly to Tisp as an argument:
+.PP
+.RS 4
+.EX
+
+$ tisp -c "(reverse '(1/2 1/4 1/8 1/16))"
+(1/16 1/8 1/4 1/2)
+
+.EE
+.RE
.SH LANGUAGE
.PP
-tisp is mainly based off of scheme, with minor features borrowed from other lisps.
+Tisp is mainly based off of scheme, with minor features borrowed from other lisps and scripting languages.
.PP
.SS GENERAL
.TP
@@ -69,43 +81,47 @@ Single line comments with a semicolon, \fBeg\fP '(cons 1 2) ; ingnored by tisp u
.SS TYPES
.TP
\fBNil\fP
-Nil, null, empty, or false, represented as an empty list, \fBeg\fP '()'.
+Nil, null, empty, or false, represented as an empty list, \fBeg\fP '()', 'nil' 'false'.
.PP
.TP
\fBIntegers\fP
-Whole real numbers, positive or negative with optional '+' or '-' prefixes repressively. Also supports scientific notation with a capital or lowercase 'e'. The exponent also needs to be integer which can be positive or negative. \fBeg\fP '1', '-48', '+837e4', '3E-2'.
+Whole real numbers, positive or negative with optional '+' or '-' prefixes repressively. Also supports scientific notation with a capital or lowercase 'e'. The exponent needs to be an positive integer, it can also be negative but that would just round to zero. \fBeg\fP '1', '-48', '+837e4', '3E-2'.
.PP
.TP
-\fBFloating Pointing\fP
-Floating point numbers, as know as decimals, are integers followed by a period and an optional integer with leading integers. Like integers can be positive or negative with scientific notation, but still need an integer as an exponent. \fBeg\fP '1.', '+3.14', '-43.00', '800.001e-3'.
+\fBDecimals\fP
+Floating point numbers, also know as decimals, are numbers followed by a period and an optional mantissa. Like integers they can be positive or negative with scientific notation, but still need an integer as an exponent. \fBeg\fP '1.', '+3.14', '-43.00', '800.001e-3'.
.PP
.TP
\fBRationals\fP
-Fraction type, a ratio of two integers. Similar rules apply for numerator and dominator as integers (real positive or negative), expect for scientific notation. Will try to simplify fraction where possible, and will through error on division by zero. \fBeg\fP '1/2', '4/3' '-1/2', '01/-30', '-6/-3'.
+Fraction type, a ratio of two integers. Similar rules apply for numerator and dominator as integers (real positive or negative), except for scientific notation. Will simplify fraction where possible, and will through error on division by zero. \fBeg\fP '1/2', '4/3' '-1/2', '01/-30', '-6/-3'.
.PP
.TP
\fBStrings\fP
-String of characters contained inside two double quotes. \fBeg\fP '"foo"', '"foo bar"'.
+String of characters contained inside two double quotes. Any character is valid, including actual newlines, execpt for double quotes and backspace which need to be escaped as '\"' and '\\' respectively. Newlines and tabs can also be escaped with '\n' and '\t' \fBeg\fP '"foo"', '"foo bar"', '"string \"quoted\""', '"C:\\windows\\path"' '\twhite\n\tspace'.
.PP
.TP
\fBSymbols\fP
-Case sensitive symbols which can be used as variable names. Supports lower and upper case letters, numbers, as well as the characters '_+-*/=<>?'. First character can not be a number, if the first character is a '+' or '-' then the second digit cannot be a number either. Unlike all the previously listed types, symbols are not self evaluating, but instead return the value they are defined to. Throws an error if a symbol is evaluated without it being previously assigned a value. \fBeg\fP 'foo', 'foo-bar', 'cat9', '+', '>=', 'nil?'.
+Case sensitive symbols which are evaluated as variable names. Supports lower and upper case letters, numbers, as well as the characters '_+-*/\\^=<>!?@#$%&~'. First character can not be a number, if the first character is a '+' or '-' then the second digit cannot be a number either. Unlike all the previously listed types, symbols are not self evaluating, but instead return the value they are defined to. Throws an error if a symbol is evaluated without it being previously assigned a value. \fBeg\fP 'foo', 'foo-bar', 'cat9', '+', '>=', 'nil?'.
.PP
.TP
\fBLists\fP
-Lists composed of one or more element of any other types, including lists them selves. Expressed with surrounding parentheses and each element is separated by white space. When evaluated runs the first element as function with the rest of the elements as arguments. Technically list is not a type, but simply a nil-terminating chain of nested pairs. A pair is a group of two and only two elements, normally represented as '(a . b)', with 'a' being the first element (car) and 'b' being the second element (cdr). for example '(a b c)' is actually '(a . (b . (c . ())))'. But it is often easier just to think of them as lists.
+Lists composed of one or more elements of any type, including lists themselves. Expressed with surrounding parentheses and each element is separated by whitespace. When evaluated the procedure found at the first element is run with the rest of the elements as arguments. Technically list is not a type, but simply a nil-terminated chain of nested pairs. A pair is a group of two and only two elements, normally represented as '(a . b)', with 'a' being the first element (car/first) and 'b' being the second element (cdr/rest). For example '(a b c)' is equivilent to '(a . (b . (c . ())))', but it is often easier to express them the first way syntactically. To create an improper list (not nil-terminated list) the dot notation can be used, '(1 2 3 . 4)'.
.PP
.TP
\fBFunctions\fP
-Lambda functions created within tisp itself. Called using list syntax where the first element is the function name and any proceeding elements are the arguments. For example '(cadr '(1 2 3))' is a list of elements 'cadr' and ''(1 2 3)'. It calls the function 'cadr' which returns the 2nd element of the first argument given, here a list of size 3. In this case it return a '2'.
+Lambda functions created within Tisp itself. Called using list syntax where the first element is the function name and any proceeding elements are the arguments to be evaluated. For example '(cadr '(1 2 3))' is a list of elements 'cadr' and ''(1 2 3)'. It calls the function 'cadr' which returns the 2nd element of the argument given, in this case a list of size 3, which returns '2'. \fBeg\fP 'list', 'not', 'apply', 'map', 'root', 'sqrt', 'print'
.PP
.TP
\fBPrimitives\fP
-Functions built in to the language written in C. Called like regular functions, see primitives section for more details.
+Procedures built in to the language written in C. Called like regular functions, see primitives section for more details. \fBeg\fP 'car', 'cond', 'define', 'write', '+'
+.PP
+.TP
+\fBMacros\fP
+Like lambda functions macros are defined within Tisp and are called in a similar fashion. However unlike functions and primitives the arguments are not evaluated before being given to the macro, and the output of a macro is only evaluated at the end. This means instead of taking in values and returning values, macros take in code and return code, allowing you to extend the language at compile time. \fBeg\fP 'if', 'and', 'or', 'let', 'assert'
.PP
-.SS PRIMITIVES
+.SS BUILT-INS
.PP
-Built in primitives included by default.
+Built in primitives written in C included by default.
.PP
.TP
\fBcar\fP
@@ -113,11 +129,11 @@ Returns first element of given list
.PP
.TP
\fBcdr\fP
-Return rest of the given list, either just the second element if it is of size 2 or a pair, or a new list with the first element removed.
+Return rest of the given list, either just the second element if it is a pair, or another list with the first element removed.
.PP
.TP
\fBcons\fP
-Creates a new pair with the two given arguments, first one as the car, second as the cdr.
+Creates a new pair with the two given arguments, first one as the car, second as the cdr. Can be chained together to create a list if ending with 'nil'.
.PP
.TP
\fBquote\fP
@@ -128,48 +144,62 @@ Returns the given argument unevaluated.
Returns nothing. Used to insert a void type in a list or force a function not to return anything.
.PP
.TP
-\fBbegin\fP
-Executes all of its arguments and returns the value of the last expression.
-.PP
-.TP
\fBeval\fP
-Evaluates the expression given.
+Evaluates the expression given, can be dangerous to use in practice. In general 'apply' should be used instead.
.PP
.TP
\fB=\fP
-Tests if multiple values equal. Returns nil if any are not, and 't' otherwise.
+Tests if multiple values are all equal. Returns 'nil' if any are not, and 't' otherwise.
.PP
.TP
\fBcond\fP
-Evaluates each expression if the given condition corresponding to it is true. Runs through any arguments, each is a list with the first element as the condition which needs to be 't' after evaluated, and the second element is the expression to be run if and only if the condition is met.
+Evaluates each expression if the given condition corresponding to it is true. Runs through all arguments, each is a list with the first element as the condition which needs to be 't' after evaluated, and the rest of the list is the body to be run if and only if the condition is met. Used for if/elseif/else statements found in C-like languages and 'if','when','unless','switch' macros in Tisp.
.PP
.TP
\fBtype\fP
-Returns a string stating the given argument's type.
+Returns a string stating the given argument's type. Used to create 'type?' individual functions.
.PP
.TP
\fBlambda\fP
-Creates function, first argument is a list of elements representing the symbol name for any arguments for the new function. Next argument is code to be run with the supplied arguments.
+Creates function, first argument is a list of elements representing the symbol name for any arguments of the new function. Rest of the arguments are code to be run with the supplied arguments.
+.PP
+.TP
+\fBmacro\fP
+Similar to lambda, creates anonymous macro with first argument as macro's argument list and rest as macro's body.
.PP
.TP
\fBdefine\fP
-Create variable with the name of the first argument, with the value of the second.
+Create variable with the name of the first argument, with the value of the second. If name given is a list use the first element of this list as a new functions name and rest of list as its arguments.
+.PP
+.TP
+\fBset!\fP
+Change the value of the of the variable given by the first argument to the second argument. Errors if variable is not defined before.
.PP
.TP
\fBload\fP
-Loads the library, given as a string.
+Loads the library given as a string.
+.PP
+.TP
+\fBerror\fP
+Throw error, print message given by second argument string with the first argument being a symbol of the function throwing the error.
+.PP
+.TP
+\fBversion\fP
+Return string of Tisp's version number.
.PP
.SS DIFFERENCES FROM OTHER LISPS
.PP
-In tisp there are no boolean types, much like common lisp, true is represented by the self evaluating symbol 't' and false is nil, represented as '()', an empty list.
+In Tisp there are no boolean types, much like common lisp, true is represented by the self evaluating symbol 't' and false is nil, represented as '()', an empty list. 'nil' and 'false' are also mapped to '()'.
+.PP
+Tisp also only has one builtin equality primitive, '=', which tests integers, symbols, strings, and objects which occupy the same space in memory, such as primitives.
.PP
-tisp also only has one equality primitive, '=', which tests integers, symbols, strings, and objects which occupy the same space in memory, such as primitives. It also accepts any number of arguments to compare.
+Symbols are case sensitive, unlike many other older lisps, in order to better interface with modern languages.
.PP
-Symbols are also case sensitive following the Unix way, unlike many other lisps.
+Tisp is single value named, so procedures share the same namespace as variables, removing the need for common lisp's 'defunc' vs 'defvar', 'let' vs 'flet', and redundant syntax for getting the function from a symbol.
.PP
.SH AUTHOR
.PP
-Ed van Bruggen <edvb@uw.edu>
+Ed van Bruggen <ed@edryd.org>
.PP
.SH SEE ALSO
.PP
diff --git a/doc/tisp.1.md b/doc/tisp.1.md
@@ -2,13 +2,20 @@
[![Build Status](https://travis-ci.org/edvb/tisp.svg)](https://travis-ci.org/edvb/tisp)
-tisp is a tiny lisp library designed to to be lightweight and easy to embedded
-in other programs. Simply drop the `tisp.c` and `tisp.h` files into your
-project and include the header file in order to use the necessary functions for
-your program. An example command line interpreter is provided in `main.c`.
+Tisp is a tiny, terse, and transparent lisp library designed to be lightweight
+and easy to embedded in other programs. Simply drop the `tisp.c` and `tisp.h`
+files into your project in order to use the necessary functions for your
+program. An example command line interpreter is provided in `main.c`. Tisp is a
+single value name language (lisp-1) which tries to be unambiguous and focus
+on simplicity. Much of the language is defined with Tisp itself leaving the C
+code as short as possible.
## Options
+#### -c COMMAND
+
+Read *COMMAND* as a line of Tisp code and print result
+
#### -h
Print help and exit
@@ -19,37 +26,42 @@ Print version info and exit
## Usage
-Run the program from the command line to launch the REPL, type a command and
-press enter to see the result.
+Run the program from the command line to type a single command and press enter
+to see the result.
```
$ tisp
-> (+ (+ 1 2) 3)
-6
-> (+ 1 2 3)
-6
+(cons 1 2)
+(1 . 2)
```
Alternatively you can pass a file name which will be opened and run, outputting
the result before exiting.
```
-$ echo '((lambda (x) (+ x 1)) 10)' > inc.lisp
-$ tisp inc.lisp
+$ echo '((lambda (x) (+ x 1)) 10)' > inc.tsp
+$ tisp inc.tsp
11
```
-Commands can also be piped directing into tisp through the command line.
+Commands can also be piped directing into Tisp through the command line.
```
$ echo '(= "foo" "foo")' | tisp
t
```
+Or given directly to Tisp as an argument:
+
+```
+$ tisp -c "(reverse '(1/2 1/4 1/8 1/16))"
+(1/16 1/8 1/4 1/2)
+```
+
## Language
-tisp is mainly based off of scheme, with minor features borrowed from other
-lisps.
+Tisp is mainly based off of scheme, with minor features borrowed from other
+lisps and scripting languages.
### General
@@ -61,70 +73,88 @@ Single line comments with a semicolon, **eg** `(cons 1 2) ; ingnored by tisp unt
#### Nil
-Nil, null, empty, or false, represented as an empty list, **eg** `()`.
+Nil, null, empty, or false, represented as an empty list, **eg** `()`, `nil` `false`.
#### Integers
Whole real numbers, positive or negative with optional `+` or `-` prefixes
repressively. Also supports scientific notation with a capital or lowercase
-`e`. The exponent also needs to be integer which can be positive or negative.
-**eg** `1`, `-48`, `+837e4`, `3E-2`.
+`e`. The exponent needs to be an positive integer, it can also be negative but
+that would just round to zero. **eg** `1`, `-48`, `+837e4`, `3E-2`.
-#### Floating Pointing
+#### Decimals
-Floating point numbers, as know as decimals, are integers followed by a period
-and an optional integer with leading integers. Like integers can be positive or
-negative with scientific notation, but still need an integer as an exponent. **eg**
-`1.`, `+3.14`, `-43.00`, `800.001e-3`.
+Floating point numbers, also know as decimals, are numbers followed by a period
+and an optional mantissa. Like integers they can be positive or negative with
+scientific notation, but still need an integer as an exponent. **eg** `1.`,
+`+3.14`, `-43.00`, `800.001e-3`.
#### Rationals
Fraction type, a ratio of two integers. Similar rules apply for numerator and
-dominator as integers (real positive or negative), expect for scientific
-notation. Will try to simplify fraction where possible, and will through error
+dominator as integers (real positive or negative), except for scientific
+notation. Will simplify fraction where possible, and will through error
on division by zero. **eg** `1/2`, `4/3` `-1/2`, `01/-30`, `-6/-3`.
#### Strings
-String of characters contained inside two double quotes. **eg** `"foo"`, `"foo bar"`.
+String of characters contained inside two double quotes. Any character is
+valid, including actual newlines, execpt for double quotes and backspace which
+need to be escaped as `\"` and `\\` respectively. Newlines and tabs can also be
+escaped with `\n` and `\t` **eg** `"foo"`, `"foo bar"`, `"string \"quoted\""`,
+`"C:\\windows\\path"` `\twhite\n\tspace`.
#### Symbols
-Case sensitive symbols which can be used as variable names. Supports lower and
-upper case letters, numbers, as well as the characters `_+-*/=<>?`. First
-character can not be a number, if the first character is a `+` or `-` then the
-second digit cannot be a number either. Unlike all the previously listed types,
-symbols are not self evaluating, but instead return the value they are defined
-to. Throws an error if a symbol is evaluated without it being previously
-assigned a value. **eg** `foo`, `foo-bar`, `cat9`, `+`, `>=`, `nil?`.
+Case sensitive symbols which are evaluated as variable names. Supports lower and
+upper case letters, numbers, as well as the characters `_+-*/\\^=<>!?@#$%&~`.
+First character can not be a number, if the first character is a `+` or `-`
+then the second digit cannot be a number either. Unlike all the previously
+listed types, symbols are not self evaluating, but instead return the value
+they are defined to. Throws an error if a symbol is evaluated without it being
+previously assigned a value. **eg** `foo`, `foo-bar`, `cat9`, `+`, `>=`,
+`nil?`.
#### Lists
-Lists composed of one or more element of any other types, including lists them
-selves. Expressed with surrounding parentheses and each element is separated by
-white space. When evaluated runs the first element as function with the rest of
-the elements as arguments. Technically list is not a type, but simply a
-nil-terminating chain of nested pairs. A pair is a group of two and only two
-elements, normally represented as `(a . b)`, with `a` being the first element
-(car) and `b` being the second element (cdr). for example `(a b c)` is actually
-`(a . (b . (c . ())))`. But it is often easier just to think of them as lists.
+Lists composed of one or more elements of any type, including lists themselves.
+Expressed with surrounding parentheses and each element is separated by
+whitespace. When evaluated the procedure found at the first element is run with
+the rest of the elements as arguments. Technically list is not a type, but
+simply a nil-terminated chain of nested pairs. A pair is a group of two and
+only two elements, normally represented as `(a . b)`, with `a` being the first
+element (car/first) and `b` being the second element (cdr/rest). For example
+`(a b c)` is equivilent to `(a . (b . (c . ())))`, but it is often easier to
+express them the first way syntactically. To create an improper list (not
+nil-terminated list) the dot notation can be used, `(1 2 3 . 4)`.
#### Functions
-Lambda functions created within tisp itself. Called using list syntax where the
+Lambda functions created within Tisp itself. Called using list syntax where the
first element is the function name and any proceeding elements are the
-arguments. For example `(cadr '(1 2 3))` is a list of elements `cadr` and `'(1
-2 3)`. It calls the function `cadr` which returns the 2nd element of the first
-argument given, here a list of size 3. In this case it return a `2`.
+arguments to be evaluated. For example `(cadr '(1 2 3))` is a list of elements
+`cadr` and `'(1 2 3)`. It calls the function `cadr` which returns the 2nd
+element of the argument given, in this case a list of size 3, which returns
+`2`. **eg** `list`, `not`, `apply`, `map`, `root`, `sqrt`, `print`
#### Primitives
-Functions built in to the language written in C. Called like regular functions,
-see primitives section for more details.
+Procedures built in to the language written in C. Called like regular
+functions, see primitives section for more details. **eg** `car`, `cond`,
+`define`, `write`, `+`
+
+#### Macros
+
+Like lambda functions macros are defined within Tisp and are called in a
+similar fashion. However unlike functions and primitives the arguments are not
+evaluated before being given to the macro, and the output of a macro is
+only evaluated at the end. This means instead of taking in values and returning
+values, macros take in code and return code, allowing you to extend the
+language at compile time. **eg** `if`, `and`, `or`, `let`, `assert`
-### Primitives
+### Built-ins
-Built in primitives included by default.
+Built in primitives written in C included by default.
#### car
@@ -132,13 +162,13 @@ Returns first element of given list
#### cdr
-Return rest of the given list, either just the second element if it is of size
-2 or a pair, or a new list with the first element removed.
+Return rest of the given list, either just the second element if it is a pair,
+or another list with the first element removed.
#### cons
Creates a new pair with the two given arguments, first one as the car, second
-as the cdr.
+as the cdr. Can be chained together to create a list if ending with `nil`.
#### quote
@@ -149,59 +179,85 @@ Returns the given argument unevaluated.
Returns nothing. Used to insert a void type in a list or force a function not
to return anything.
-#### begin
-
-Executes all of its arguments and returns the value of the last expression.
-
#### eval
-Evaluates the expression given.
+Evaluates the expression given, can be dangerous to use in practice. In general
+`apply` should be used instead.
#### =
-Tests if multiple values equal. Returns nil if any are not, and `t` otherwise.
+Tests if multiple values are all equal. Returns `nil` if any are not, and `t`
+otherwise.
#### cond
Evaluates each expression if the given condition corresponding to it is true.
-Runs through any arguments, each is a list with the first element as the
-condition which needs to be `t` after evaluated, and the second element is the
-expression to be run if and only if the condition is met.
+Runs through all arguments, each is a list with the first element as the
+condition which needs to be `t` after evaluated, and the rest of the list is
+the body to be run if and only if the condition is met. Used for if/elseif/else
+statements found in C-like languages and `if`,`when`,`unless`,`switch` macros
+in Tisp.
#### type
-Returns a string stating the given argument's type.
+Returns a string stating the given argument's type. Used to create `type?`
+individual functions.
#### lambda
Creates function, first argument is a list of elements representing the symbol
-name for any arguments for the new function. Next argument is code to be run
-with the supplied arguments.
+name for any arguments of the new function. Rest of the arguments are code to
+be run with the supplied arguments.
+
+#### macro
+
+Similar to lambda, creates anonymous macro with first argument as macro's
+argument list and rest as macro's body.
#### define
Create variable with the name of the first argument, with the value of the
-second.
+second. If name given is a list use the first element of this list as a new
+functions name and rest of list as its arguments.
+
+#### set!
+
+Change the value of the of the variable given by the first argument to the
+second argument. Errors if variable is not defined before.
#### load
-Loads the library, given as a string.
+Loads the library given as a string.
+
+#### error
+
+Throw error, print message given by second argument string with the first
+argument being a symbol of the function throwing the error.
+
+#### version
+
+Return string of Tisp's version number.
### Differences From Other Lisps
-In tisp there are no boolean types, much like common lisp, true is represented
+In Tisp there are no boolean types, much like common lisp, true is represented
by the self evaluating symbol `t` and false is nil, represented as `()`, an
-empty list.
+empty list. `nil` and `false` are also mapped to `()`.
+
+Tisp also only has one builtin equality primitive, `=`, which tests integers,
+symbols, strings, and objects which occupy the same space in memory, such as
+primitives.
-tisp also only has one equality primitive, `=`, which tests integers, symbols,
-strings, and objects which occupy the same space in memory, such as primitives.
-It also accepts any number of arguments to compare.
+Symbols are case sensitive, unlike many other older lisps, in order to better
+interface with modern languages.
-Symbols are also case sensitive following the Unix way, unlike many other lisps.
+Tisp is single value named, so procedures share the same namespace as
+variables, removing the need for common lisp's `defunc` vs `defvar`, `let` vs
+`flet`, and redundant syntax for getting the function from a symbol.
## Author
-Ed van Bruggen <edvb@uw.edu>
+Ed van Bruggen <ed@edryd.org>
## See Also
diff --git a/main.c b/main.c
@@ -47,7 +47,7 @@ main(int argc, char *argv[])
fprintf(stderr, "tisp v%s (c) 2017-2020 Ed van Bruggen\n", VERSION);
exit(0);
} else if (argv[i][1]) { /* unsupported argument or help */
- fputs("usage: tisp [-hv] [FILE ...]\n", stderr);
+ fputs("usage: tisp [-hv] [-c COMMAND] [-] [FILE ...]\n", stderr);
exit(argv[i][1] == 'h' ? 0 : 1);
} else { /* single hypen read from stdin */
v = tisp_eval_seq(st, st->global, tisp_parse_file(st, NULL));