Update README

This commit is contained in:
Přemysl Eric Janouch 2017-05-25 14:38:43 +02:00
parent 1de758b6d6
commit a621de2d50
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 28 additions and 4 deletions

View File

@ -10,7 +10,9 @@ reasonably comfortable to use.
This package is an implementation of said language, meant to be self-contained, This package is an implementation of said language, meant to be self-contained,
portable and reusable. Performance is specifically not an intent. portable and reusable. Performance is specifically not an intent.
The project is currently in a "working proof of concept" stage. The project is currently in a "proof of concept" stage with many useful data
operations missing but I believe it won't be a problem to implement them as
needed for anyone interested.
Syntax Syntax
------ ------
@ -45,6 +47,8 @@ which gets expanded to the following:
Observe that the whole program is enclosed in an implicit pair of `{}` and that Observe that the whole program is enclosed in an implicit pair of `{}` and that
`quote` is a very powerful special form which can replace many others if needed. `quote` is a very powerful special form which can replace many others if needed.
For a slightly more realistic example have a look at 'greet.ell'.
Runtime Runtime
------- -------
All variables are put in a single global namespace with no further scoping. All variables are put in a single global namespace with no further scoping.
@ -59,13 +63,14 @@ The last expression in a block is the return value.
Special Forms Special Forms
------------- -------------
`quote <arg>` `quote [<arg>]...`
Returns the first argument. Returns the arguments without any evaluation.
`arg <name>...` `arg [<name>]...`
Assigns arguments to the current call in order to given names. Assigns arguments to the current call in order to given names.
Names for which there are no values left are set to `[]`.
Standard library Standard library
---------------- ----------------
@ -112,6 +117,18 @@ Print all items in sequence--strings directly, lists as source code.
Run a system command and return its return value. Run a system command and return its return value.
`parse <program>`
Parse a program into a list of lists.
`try <body> <handler>`
Execute the body and pass any error to the handler instead of propagating it.
`throw <message>`
Throw an error. Messages starting on an underscore don't generate backtraces.
`+`, `-`, `*`, `/` `+`, `-`, `*`, `/`
Arithmetic operations on floating point numbers. Arithmetic operations on floating point numbers.
@ -136,6 +153,13 @@ Install development packages for GNU Readline to get a REPL for toying around:
$ make repl $ make repl
$ ./repl $ ./repl
Possible Ways of Complicating
-----------------------------
* variable scoping: the simplest is to set values in the nearest scope they
can be found in but make `arg` an exception to that, just like in AWK
* reference counting: currently all values are always copied as needed, which
is good enough for all imaginable use cases, simpler and less error-prone
Contributing and Support Contributing and Support
------------------------ ------------------------
Use this project's GitHub to report any bugs, request features, or submit pull Use this project's GitHub to report any bugs, request features, or submit pull