NewsCrawler.org

Gforth 1.0 brings multi-core multitasking, closures, and C callbacks

The Forth[1] implementation Gforth has reached version 1.0. The documentation now states, for the first time, which words are intended to be permanently supported and which are not. The text interpreter recognizes more kinds of literals, including strings, execution tokens[2] (xt), name tokens (nt), and body addresses, with new recognizer[3] words such as rec-name and rec-float handling how source is translated. Performance is described as comparable to SwiftForth.

IDE features include commands to locate, browse, and edit definitions, a smart .s that guesses what stack items mean, and an optional status line showing BASE, the stacks, and the search order. Multitasking now works across multiple cores or hardware threads, with words for tasks, mutexes, and atomic operations, message queues similar to the actor model, and work distribution via Cilk[4] (spawn, cilk-sync). The C interface gained callbacks, and the dictionary can now hold several sections, each with its own dictionary pointer, used for nested definitions. Further additions include closures, which are execution tokens for code with data, per-task values and defers, and postponing multiple words with ]]...[[.

Several old words are replaced by new ones; they still work in version 1.0 but may be removed in the future. The help word shows documentation for words or documentation nodes, while authors and license provide project information.

Read the original gforth.orgDiscussion

Discussion

The only commenter celebrates the release after 34 years, notes that the original authors are still the main contributors, and doubts that many such long-running projects will appear in today's fast-moving, AI-dominated era.

Sources

Published: First seen: Читать по-русски

Open as a page