Add userlib tests

Document userlib in readme
extend example configuration to include userlib
This commit is contained in:
Ava Apples Affine 2023-03-17 13:24:31 -07:00
parent 1ee9ba55fb
commit 34e77903a6
Signed by: affine
GPG key ID: 3A4645B8CF806069
5 changed files with 64 additions and 11 deletions

View file

@ -174,11 +174,13 @@ To be specific, typing ~(a)~ usually results in a symbol lookup for ~a~, and the
#+BEGIN_SRC lisp
(quote a) ;; returns the symbol a
(quote (add 1 2)) ;; returns the following tree: (add 1 2)
(q a) ;; returns the symbol a
#+END_SRC
(note that ~quote~ may be shortened to ~q~)
We can use this to build structures that evaluate into new data:
#+BEGIN_SRC lisp
(let ((mylist (quote (add))) ;; store a list starting with the add function
(let ((mylist (q (add))) ;; store a list starting with the add function
(myiter 0)) ;; store an iterator starting at 0
(while (lt? myiter 4) ;; loop until the iterator >= 4
(inc myiter) ;; increment the iterator
@ -316,6 +318,10 @@ Within it are several examples that the authors and maintainers wanted to keep a
It is sort of like a lint roller.
It also contains considerably subpar implementations of Relish's internals that are kept around for historical reasons.
*** Userlib
The *Userlib* was added as a script containing many valuable functions such as ~set~ and ~prepend~.
You can use it by loading it in your shell config (See file:snippets/basic_minimal_configuration.rls for more info).
** Easy patterns
This section contains examples of common composites of control flow that can be used to build more complex or effective applications
More ideas may be explored in the file:snippets directory of this project.
@ -470,14 +476,15 @@ This contains any executable target of this project. Notably the main shell file
Note: this section will not show the status of each item unless you are viewing it with a proper orgmode viewer.
Note: this section only tracks the state of incomplete TODO items. Having everything on here would be cluttered.
*** TODO Shell prompt is fully configurable (L, R, and Delim)
*** TODO Shell prompt is fully configurable (History, L, R, and Delim)
*** TODO Load (load a script) function
Pull/Refactor the logic out of the configure functions.
Optionally return a list of new variables and/or functions?
Will need a concatenate function for tables
*** TODO not-builtin set function
*** TODO not-builtin list contains
*** TODO userlib list contains
*** TODO Extend userlib tests
*** TODO Main shell calls Load function on arg and exits
*** TODO Add userlib tests to CI
*** TODO Input function
*** TODO Lex function
*** TODO Read function (Input + Lex)
@ -501,11 +508,12 @@ Overload Load function to call a binary too
*** TODO Custom ast pretty print
*** TODO Implement Compose for lambdas
DOCUMENT AS WELL
*** TODO non built in Map function
*** TODO non built in Reduce function
*** TODO userlib Map function
*** TODO userlib Reduce function
*** TODO file operations
**** TODO read-to-string
**** TODO write-to-file
*** TODO color control library
*** TODO Network library
**** TODO HTTP Client
**** TODO TCP Stream client