Tomorrow it will be 18 years since we released Gforth 0.7.0, so it's time for a new release. It's also 34 years since we started Gforth in the summer of 1992, so it's about time for Gforth 1.0. We have released Gforth 1.0.0 on October 25, and have released 1.0.1 with mainly portability fixes yesterday. # What is Gforth? Gforth is a fast and portable implementation of Forth-2012. It works nicely with the Emacs editor, offers some nice features such as input completion and history, backtraces, a decompiler and a powerful locals facility, and it has a comprehensive manual. Gforth combines traditional threaded-code implementation techniques with native code for performance similar to SwiftForth in the engine gforth-fast, better debugging in the engine gforth, and support for traditional indirect-threaded code in the engine gforth-itc for programs that require that. Gforth is distributed under the GNU General Public license (see COPYING). # User-visible differences between Gforth 0.7 and 1.0: You can find a more detailed version of this section with links to related documentation at <https://gforth.org/manual/1.0/NEWS.html>. ## Stability It is now documented which words are intended to be permanently supported, and which are not. ## Headline features * The text interpreter can recognize more things: * Additional ways to write literals in source code: scaled notation for FP numbers (6k5, 23%); strings ("string"), xts (`word), nts (``word), body addresses (<word>, <word+8>). * You can specify the vocabulary (or several) of a word, e.g., `forth:and` vs. `assembler:and`. * Nonparsing syntax for dealing with value-flavoured and defer-flavoured words (`v` and `d` in the following examples): `->v` for `to v`; `+>v` for `+to v`; `'v` for `addr v`; `@>d` for `action-of d`; `=>d` for `is d`. * Contents of environment variables: `${LANG}` * You can extend the text interpreter with more **recognizers** * IDE features: * Show source code of a word (`locate browse`). * show uses of a word (`where nw bw ww`). * backtraces show source locations and can be browsed (`nt bt tt`); * and use an editor if desired (`edit g gg whereg`) * "Smart `.s`: `...` guesses what stack items mean and displays them appropriately. `.s` itself stays dumb. * A status line at the bottom of the terminal shows `BASE`, stacks, and search order. * Multi-Tasking on multiple cores or hardware threads. Message queues (similar to the actor model) provide a way to combine communication with synchronization of the tasks. Cilk is useful for distributing work across tasks. * C interface enhancements, includig callbacks. * The dictionary can now have more than one section, each with its own dictionary pointer, which allows allocation without affecting other sections, used, e.g., for nested definitions. * Postpone multiple words with `]]`...`[[`. * Value-flavoured and defer-flavoured fields. * Per-task values and defers. * Closures: Execution tokens for code with data. * New word header layout, and based on that: * Modify the behaviour of words: `set-does> set-compsem set->int set->comp set-name>string set-name>link`; using a code address instead of an xt: `set-execute`; new code addresses for that: `dovalue: dodoes: doabicode:` * User-defined `to` etc.: `to-table: n/a to-class: >uvalue set-to` * Modify the implementation of words: `set-optimizer` * For fans of non-postfix syntax: `compsem: intsem: opt:` * Creating a word from a template: `create-from reveal reveal! noname-from` * Apply `set-does>` etc. to a word defined earlier: `make-latest` * Introspection: `.hm immediate?` * Performance comparable to SwiftForth * IP-update optimization speeds up loop-dominated programs by a factor of 2 * Literal stack allows constant folding and other optimizations ## No longer documented words Many of these words are still in Gforth 1.0, but they may be removed in the future. * `.name` (use `id.`); * `does-handler!` (implementation changed, use `set-does>`); * `/does-handler` (implementation changed); * …@local# …@local# laddr# lp+!#` (replaced by …@localn …@localn lp+n lp+!`); * `clear-libs` (interface changed, use `c-library` ... `end-c-library`) * `<interpretation interpretation> <compilation compilation> create-interpret/compile` (replaced by `set->int set-compsem`) * `naligned` (use `*aligned`) * `name>comp name>int` (use `name>compile name>interpret`) * `path-allot` (use `dup , 0 , allot`) * `sl@ sw@ ul@ uw@` (use `l@ l>s`; `w@ w>s`; `l@`; `w@`). * Internal and therefore no longer documented: `;s block-position cfalign cfaligned compile-lp+! empty-buffer name?int s>number? s>unumber? save-buffer` ## Other additional features We added many other words, see <https://gforth.org/manual/1.0/NEWS.html> # Where to get it and online resources You can download Gforth 1.0.1 from https://www.complang.tuwien.ac.at/forth/gforth/gforth-1.0.1.tar.xz and find other files and information at https://www.complang.tuwien.ac.at/forth/gforth/ You can also find information at https://gforth.org/ in particular the documentation: https://gforth.org/manual/1.0/ Eventually the tarball will also appear on https://ftp.gnu.org/gnu/gforth/ and its mirrors, and binary distributions for various systems (Debian, OpenSuse, Flatpak, Snap, Docker, brew). In particular, gforth-1.0.0 for AMD64 and ARM64 already exists on Docker, and you can run it with docker run -it --rm forthy42/gforth gforth (or use gforth-fast or gforth-itc instead of the last "gforth"). However, currently there is only the tag "latest" for gforth images on hub.docker.com, so when Bernd Paysan (forthy42) puts the next snapshot on hub.docker.com, you will get an upgrade to that. I hope he will add a tag for 1.0 or 1.0.1, and then the command above should look like docker run -it --rm forthy42/gforth:1.0 gforth Our recommendation for running Gforth 1.0 on Windows is to run it on WSL (use an appropriate Gforth package for Linux for that). Alternatively, you can use a Docker image of Gforth on Windows. For Android, Bernd Paysan releases Gforth as an app, but its usefulness is more and more limited by Android security policies, so it may be better to install the termux app and install gforth there (either from source or with the Debian package once it is available). ## Development version If you are interested in development versions, the tarballs of snapshots are published on https://www.complang.tuwien.ac.at/forth/gforth/Snapshots/ and the latest snapshot is always at https://www.complang.tuwien.ac.at/forth/gforth/Snapshots/current/gforth.tar.xz If you want to be even more bleeding edge, you can get the git from Savannah, see https://savannah.gnu.org/git/?group=gforth In particular you can get the latest version of the master branch without history with git clone --depth 1 https://git.savannah.gnu.org/git/gforth.git and if you want the commit history, too, you leave the "--depth 1" away. Savannah seems to be a bit overloaded lately, however. You can also get the latest git head by cloning from the mirrors on gitlab or github: git clone --depth 1 https://gitlab.com/forthy42/gforth.git git clone --depth 1 https://github.com/forthy42/gforth.git - anton