Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arkaeriit/iseforth
A neat repl for SEForth
https://github.com/arkaeriit/iseforth
Last synced: 26 days ago
JSON representation
A neat repl for SEForth
- Host: GitHub
- URL: https://github.com/arkaeriit/iseforth
- Owner: Arkaeriit
- License: gpl-3.0
- Created: 2024-11-25T21:05:25.000Z (30 days ago)
- Default Branch: master
- Last Pushed: 2024-11-25T22:34:40.000Z (30 days ago)
- Last Synced: 2024-11-25T23:27:11.190Z (30 days ago)
- Language: C
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: history.c
- License: LICENSE
Awesome Lists containing this project
README
# iseforth
iseforth is a fancier REPL for [SEForth](https://github.com/Arkaeriit/SEForth).
![Usage illustration](https://github.com/Arkaeriit/iseforth/blob/master/iseforth.png?raw=true)
## Features
* Line editing with readline.
* Non volatile history.
* Configuration.## Installation
To compile iseforth, you need to have SEForth installed with the options `SEF_STORE_NAME` and `SEF_PROGRAMMING_TOOLS` enabled.
Then simply run `make && sudo make install`.
## Configuration
The configuration is done in Forth by reading a rc files.
Here are the available options:
|Option name |Type |Description |Default value |
|-------------------------|------------------------------------------------|-------------------------------------------------------|-----------------------|
|`isef_prompt` |null-terminated string |The prompt showed most time |` ok ` |
|`isef_compilation_prompt`|null-terminated string |The prompt showed whilst defining a word |`... ` |
|`isef_prompt_color` |ANSI escape sequence in a null-terminated string|The color of the prompt |`isef_blue` |
|`isef_code_color` |ANSI escape sequence in a null-terminated string|The color of what you write |`isef_yellow` |
|`isef_history_file` |null-terminated string |The path to the history file |`/tmp/iseforth-history`|
|`isef_history_file_size` |integer |The maximum allowed number of lines in the history file|`1000` |To help you define colors prompt, you can use the pre-defined colors:
* `isef_red`
* `isef_green`
* `isef_blue`
* `isef_yellow`
* `isef_magenta`
* `isef_cyan`
* `isef_black`
* `isef_white`But if you don't use them, remember than the prompt color configuration values must only contain ANSI escape sequence for color and style.
Note that string literals and strings made with `<# #>` are already terminated in SEForth, so the null-terminated sequences are easy to do.
Here is a configuration example:
```forth
: isef_prompt s" OK " drop ;
isef_green constant isef_prompt_color
150 constant isef_history_file_size
```The rc files are:
* `$XDG_CONFIG_HOME/iseforthrc.frt`
* `$HOME/.iseforthrc.frt`
* `$PWD/iseforthrc.frt`They are read in that order, the latest configuration defined taking priority.