2021-12-22 15:20:14 +01:00
|
|
|
d8888b. d88888b d888888b d8888b. .d88b.
|
|
|
|
88 `8D 88' `~~88~~' 88 `8D .8P Y8.
|
|
|
|
88oobY' 88ooooo 88 88oobY' 88 88
|
|
|
|
88`8b 88~~~~~ 88 88`8b 88 88
|
|
|
|
88 `88. 88. 88 88 `88. `8b d8'
|
|
|
|
88 YD Y88888P YP 88 YD `Y88P'
|
2017-10-16 18:09:39 +02:00
|
|
|
|
2021-12-22 15:20:14 +01:00
|
|
|
--------------------------------------------------------------
|
|
|
|
|
|
|
|
Retro is a modern, pragmatic Forth drawing influences from
|
|
|
|
many sources. It's clean, elegant, tiny, easy to grasp, and
|
|
|
|
adaptable to many tasks.
|
|
|
|
|
|
|
|
--------------------------------------------------------------
|
|
|
|
|
|
|
|
## Features
|
2017-10-16 18:09:39 +02:00
|
|
|
|
2017-10-20 03:54:31 +02:00
|
|
|
- Open Source (ISC License)
|
|
|
|
- Portable (runs on a MISC-style virtual machine)
|
|
|
|
- Small source & binaries
|
2021-12-22 15:20:14 +01:00
|
|
|
- Builds into a single, self contained binary
|
2017-10-20 03:54:31 +02:00
|
|
|
- Sources in literate format, using a Markdown variant
|
|
|
|
|
2021-12-22 15:20:14 +01:00
|
|
|
--------------------------------------------------------------
|
|
|
|
|
2017-10-16 18:09:39 +02:00
|
|
|
## Quick Start
|
|
|
|
|
2019-01-03 15:06:15 +01:00
|
|
|
For most systems (FreeBSD, NetBSD, OpenBSD, macOS, Linux):
|
2017-10-16 18:09:39 +02:00
|
|
|
|
2018-04-18 17:42:23 +02:00
|
|
|
make
|
2017-10-20 03:54:31 +02:00
|
|
|
|
2019-05-01 16:02:34 +02:00
|
|
|
You will need a standard C compiler and `make`.
|
2018-10-08 19:29:51 +02:00
|
|
|
|
2021-12-22 15:20:14 +01:00
|
|
|
--------------------------------------------------------------
|
|
|
|
|
2018-05-10 02:54:05 +02:00
|
|
|
## Executables
|
|
|
|
|
|
|
|
Binaries will be placed in the `bin` directory.
|
|
|
|
|
2018-11-04 22:34:56 +01:00
|
|
|
The primary executable is `retro`. This is used for running the
|
|
|
|
examples and the Atua (gopher) & Casket (http) servers that
|
2021-12-02 17:51:13 +01:00
|
|
|
power retroforth.org.
|
2018-05-10 02:54:05 +02:00
|
|
|
|
2018-11-09 04:11:58 +01:00
|
|
|
The `retro` executable embeds the image into the binary, making
|
|
|
|
it trivial to copy and deploy.
|
2018-05-10 02:54:05 +02:00
|
|
|
|
2018-11-09 04:11:58 +01:00
|
|
|
This interface layer also extends the language with many new
|
2021-12-02 17:51:13 +01:00
|
|
|
words and vocabularies, adds scripting, files, floating point,
|
2021-04-22 21:38:36 +02:00
|
|
|
and more.
|
2018-05-10 02:54:05 +02:00
|
|
|
|
2018-11-09 04:11:58 +01:00
|
|
|
The `retro` executable can handle a variety of command line
|
2021-04-22 21:38:36 +02:00
|
|
|
arguments which are covered in the manpage, but the most common
|
|
|
|
ones are:
|
2018-11-09 04:11:58 +01:00
|
|
|
|
2021-04-22 21:38:36 +02:00
|
|
|
retro
|
2018-11-09 04:11:58 +01:00
|
|
|
|
|
|
|
Starts the *listener*, a basic REPL for interactive use.
|
|
|
|
|
|
|
|
retro filename
|
|
|
|
|
|
|
|
This will run the code in the specified file, then exit. This
|
|
|
|
is also used to run programs as shell-type scripts using a
|
|
|
|
header line like `#!/usr/bin/env retro`.
|
|
|
|
|
|
|
|
retro -i -f filename
|
|
|
|
|
|
|
|
This will run the code in the specified file, then start the
|
|
|
|
listener.
|
|
|
|
|
2021-12-22 15:20:14 +01:00
|
|
|
--------------------------------------------------------------
|
|
|
|
|
2021-04-22 21:38:36 +02:00
|
|
|
## Literate Sources
|
2018-11-09 04:11:58 +01:00
|
|
|
|
|
|
|
Source files for use with `retro` are written with code in
|
|
|
|
fenced blocks:
|
|
|
|
|
|
|
|
commentary here
|
2021-04-22 21:38:36 +02:00
|
|
|
|
2018-11-09 04:11:58 +01:00
|
|
|
~~~
|
|
|
|
code here
|
|
|
|
~~~
|
|
|
|
|
|
|
|
Anything outside the fenced blocks will be ignored.
|
2018-11-04 22:34:56 +01:00
|
|
|
|
2021-12-22 15:20:14 +01:00
|
|
|
--------------------------------------------------------------
|
|
|
|
|
2019-05-01 16:02:34 +02:00
|
|
|
## Documentation
|
|
|
|
|
|
|
|
The primary documentation is in RETRO-Book.md (and the formatted
|
2021-04-22 21:38:36 +02:00
|
|
|
epub.) Additional notes can be found in the `doc` directory.
|
2019-05-01 16:02:34 +02:00
|
|
|
|
2021-12-22 15:20:14 +01:00
|
|
|
--------------------------------------------------------------
|
|
|
|
|
2018-05-10 02:54:05 +02:00
|
|
|
## Alternative Implementations
|
2017-10-20 03:54:31 +02:00
|
|
|
|
2021-01-06 20:47:24 +01:00
|
|
|
In addition to the C and Python implementations, this source
|
2021-04-22 21:38:36 +02:00
|
|
|
tree includes additional implementations in C#, Nim, JavaScript,
|
2021-01-06 20:47:24 +01:00
|
|
|
and Pascal. These are not as well tested or as feature complete
|
|
|
|
as the main implementations, but are provided for your use if
|
|
|
|
the standard implementations will not suffice.
|
2020-09-03 21:00:41 +02:00
|
|
|
|
2021-12-22 15:20:14 +01:00
|
|
|
--------------------------------------------------------------
|
|
|
|
|
2021-12-02 17:51:13 +01:00
|
|
|
## Learn More
|
|
|
|
|
|
|
|
Visit http(s)://retroforth.org to learn more and follow along
|
|
|
|
with development.
|
|
|
|
|
2021-12-22 15:20:14 +01:00
|
|
|
--------------------------------------------------------------
|
|
|
|
|
2020-09-03 21:00:41 +02:00
|
|
|
## Patreon
|
|
|
|
|
|
|
|
I have a Patreon at https://www.patreon.com/_crc for those that
|
|
|
|
want to financially support development. All funds raised via
|
2021-12-02 17:51:13 +01:00
|
|
|
Pateron are put into development related expenses (server
|
|
|
|
expenses, app store fees, hardware).
|
2020-09-03 21:00:41 +02:00
|
|
|
|
|
|
|
Thanks go out to my current and past patrons:
|
|
|
|
|
|
|
|
- Kiyoshi YONEDA
|
|
|
|
- Krinkleneck
|
2020-10-13 21:47:02 +02:00
|
|
|
- Rick Carlino
|
|
|
|
- Scott McCallum
|
2021-04-22 21:38:36 +02:00
|
|
|
- Bartels Jon Randy
|
2021-12-02 17:51:13 +01:00
|
|
|
- Nuno
|
|
|
|
- Eli
|
|
|
|
- Brad S
|
2022-08-10 19:48:20 +02:00
|
|
|
- Tobias Ammann
|
2023-03-20 18:48:11 +01:00
|
|
|
- oneearedrabbit
|
|
|
|
- Octavio Turra
|
2022-08-10 19:48:20 +02:00
|
|
|
|