fully interactive shell

* Background task implementation
* Foreground an existing task implementation
* Documentation for both
* Refactors to signal handling, process pre-exec
This commit is contained in:
Ava Apples Affine 2023-05-18 06:53:23 +00:00
parent 69216db72a
commit c127118465
8 changed files with 535 additions and 107 deletions

View file

@ -12,7 +12,7 @@ The purpose of Relish is to create a highly portable, easy to integrate language
- Create a usable POSIX shell
- Create usable applications/scripts
- To have quality code coverage
- No unsafe code
- No unsafe code outside of the POSIX module
** Stretch Goals
- Create an interpreter that can be booted on one or more SOCs
@ -409,6 +409,10 @@ For a more complex example see file:snippets/avas-laptop-prompt.rls
Further configuration can be done by loading scripts that contain more functions and data to evaluate.
Variables and functions defined in an external script loaded by your interpreter will persist in the symbol table.
** Using Relish as your shell
As of version 0.3.0 Relish implements all the features of an interactive shell.
See further documentation in file:Shell.org.
#+BEGIN_SRC lisp
(call "my-extra-library-functions.rls")
#+END_SRC
@ -483,82 +487,44 @@ 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 Pre-alpha tasks
- Shell module (see branch: ~fully-interactive-shell~)
- be able to fg a bg process
- be able to list all background processes with j function
- Documentation!
- Dogfood this for quite some time
** TODO alpha tasks
- env prints without using columns
- lambdas shouldn't hit the env
- circuit should actually be ~(reduce (lambda (form state) (and state (bool form))) my-args)~
- error display must improve at all costs
- make presentation on relish
- lisp basics
- s expressions
- data structures
- control flow
- let, circuit, etc
- homoiconicity
- quote/eval
- lambda
- putting it all together
- CI tests
- repl configuration
- self documenting
- env
- help
- beyond lisp
- POSIX
- how to make a shell
- process groups
- tcgetpgrp/tcsetpgrp
- linemode
- getting things off of the path
- calls to exec system call
- signal management
- job control (and process groups)
- ergonomics of control flow as shell command
- circuit as progn
- circuit -> pipe
- let -> call-with
- putting it all together
- job control in shell
- shell scripts
- fancy prompts
- To infinity and beyond
- NGINX modules
- bootable?
- give a pretty pastel white, pink and blue theme
- store in repo after giving presentation
** TODO v1.0 tasks
- finish basic goals in file:snippets/interactive-devel.rls
- then write doc on interactive development
- lambdas shouldn't hit the env
- Write next_has member function for &Seg and simplify stdlib and probably also eval/sym
- Investigate has_next member function for &Seg and maybe simplify stdlib and probably also eval/sym
- Rename to Flesh
- Can pass args to relish scripts (via interpreter)
- Can pass args to relish scripts (via command line)
- History length configurable
- Search delim configurable
- Scripts can use shell
- History length configurable (env var?)
- Lex function
- Read function (Input + Lex)
- Make an icon if you feel like it
** TODO v1.1 tasks
** TODO v1.1 tasks (Stable 1)
- finish stretch goals in file:snippets/interactive-devel.rls
- execute configurable function on cd
- Post to relevant channels
- Custom ast pretty print
- Implement Compose for lambdas
- Document this in relevant readme sections
(add to readme)
- File operations
- read-to-string
- write-to-file
- file exists
- file exists?
- (add this all to the readme)
- color control library
- probably more escapes in the lexer
- just a snippet with a bunch of color constants
- Search delim configurable
** TODO v1.2 release tasks
- Emacs syntax highlighting and/or LSP implementation
- Bindings for the simplest possible UI library?
- Get on that bug tracke
- Network library
- HTTP Client
- TCP Stream client
@ -566,5 +532,3 @@ Note: this section only tracks the state of incomplete TODO items. Having everyt
- TCP Listener
- HTTP Listener
- UDP Listener
- Emacs syntax highlighting and/or LSP implementation
- Bindings for the simplest possible UI library?