added list len, front, and back

This commit is contained in:
Ava Hahn 2023-03-07 14:29:31 -08:00
parent 06d30ac263
commit 7fd47c1812
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
5 changed files with 215 additions and 12 deletions

View file

@ -1,19 +1,23 @@
#+Title: Relish: Rusty Expressive LIsp SHell
#+Author: Ava Hahn
Note: this document is best read within a dedicated ORG mode interpreter
Note: this document is best read using a dedicated ORG mode editor
* Purpose statement
The purpose of Relish is to create a highly expressive POSIX shell using a lisp interpreter.
The purpose of Relish is to create a highly portable, easy to integrate language that can be used in many environments.
* Goals
- Iterate on the ideas and designs that were tested with SHS
https://gitlab.com/whom/shs
- Act as both a high level scripting language and as a system shell
- To be as portable as possible
- To provide code and framework that can be embedded in other applications needing a user facing interpreter
- To be well tested code
- No unsafe code without extreme consideration and rigorous containment
- Create a usable POSIX shell
- Create usable applications/scripts
- To have quality code coverage
- No unsafe code
** Stretch Goals
- Create an interpreter that can be booted on one or more SOCs
- Create an interpreter that can be embedded in another application
- Create UI bindings
* Contact
- Matrix chat: #vomitorium:matrix.sunnypup.io
@ -156,9 +160,9 @@ Will need a concatenate function for tables
**** DONE mul
**** TODO exp
**** TODO mod
***** TODO Test for Let Destructuring
**** TODO inc
**** TODO dec
**** TODO int (float to int)
**** TODO gt?
**** TODO lt?
**** TODO snippets for gte and lte
@ -181,12 +185,21 @@ Will need a concatenate function for tables
*** TODO list operations
**** DONE append
**** TODO head (returns (head rest))
***** TODO let destructuring test
**** TODO tail (returns (rest tail))
***** TODO let destructuring test
**** TODO queue (append to front)
**** TODO snippet for dequeue
**** TODO snippet for pop
**** TODO front (returns copy of first elem)
***** TODO normal positive test
***** TODO test for err case on empty list
**** TODO back (returns copy of last elem)
***** TODO normal positive test
***** TODO test for err case on empty list
**** TODO list len
*** TODO lambda
*** TODO bool cast
*** TODO file operations
**** TODO read-to-string
**** TODO write-to-file