swapforth
gforth
Our great sponsors
swapforth | gforth | |
---|---|---|
5 | 8 | |
270 | 141 | |
- | - | |
4.6 | 9.8 | |
4 months ago | 7 days ago | |
Forth | Forth | |
BSD 3-clause "New" or "Revised" License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
swapforth
- Making my own forth implementation
- FPGAs for interpreted programming languages?
-
How many LUT for an 8 bit CPU?
Thanks! Found the port of this to the board I want :) https://github.com/jamesbowman/swapforth/tree/master/j1a
-
The RISC Deprogrammer
It's a standard thing to do in EE curricula; you normally do it in a one-semester class, and there are literally thousands of open-source synthesizable CPU cores on GitHub now.
To take two examples to show that designing a CPU is less work than writing a novel:
- Chuck Thacker's "A Tiny Computer", fairly similar to the Nova, is a page and a half of synthesizable Verilog; it runs at 66 MHz in 200 LUTs of a Virtex-5: https://www.cl.cam.ac.uk/~swm11/examples/bluespec/Tiny3/Thac...
- James Bowman's J1A is more like Chuck Moore's MuP21 and is about three pages of synthesizable Verilog: https://github.com/jamesbowman/swapforth/blob/master/j1a/ver... and https://github.com/jamesbowman/swapforth/blob/master/j1a/ver.... You can build it with Claire Wolf's iCEStorm (yosys, etc.) and run it on any but Lattice's tiniest FPGAs; it takes up 1162 4-input LUTs.
I haven't quite done it myself. Last time I played https://nandgame.com/ it took me a couple of hours to play through the hardware design levels. But that's not really "design" in the sense of defining the instruction set (which is also kind of Nova-like), thinking through state machine design, and trying different pipeline depths; you're mostly just doing the kind of logic minimization exercises you'd normally delegate to yosys.
In https://github.com/kragen/calculusvaporis I designed a CPU instruction set, wrote a simulator for it, wrote and tested some simple programs, designed a CPU at the RTL level, and sketched out gate-level logic designs to get an estimate of how big it would be. But I haven't simulated the RTL to verify it, written it down in an HDL, or breadboarded the circuit, so I'm reluctant to say that this qualifies as "designing a single CPU" either.
-
The J1 Forth CPU
Also worth checking is the Swapforth Github repository.
gforth
-
A few questions regarding the language
Not that I've ever seen personally. They mostly exist as extensions in various places. Gforth has one, for example.
-
What forth implementation could be a good pick for writing a texteditor?
I don't know the status of gforth's 'minos2' offering but I see a mention of X11 which is a promising sight for Linux GUI work.
-
Trying to use Forth Foundation Library (FFL) with GForth installed via GNU Guix
See also INSTALL
-
Starting Forth [pdf]
\ sh-get is from script.fs: https://github.com/forthy42/gforth/blob/master/script.fs
- Why is the Forth community so split?
-
Aro: A C compiler written in Zig
For contrast, gforth (a prominent Forth interpreter, by Forth standards) generates+compiles+links binding code in C, at runtime, using the ordinary C toolchain. [0][1][2]
A bit 'out there' you may say, but on the plus side this approach enables handling header files and tidily expressing bindings without the need to implement their own C parser. [2]
[0] GitHub mirror: https://github.com/forthy42/gforth/blob/dda77d851ddeb80ca849...
[1] The official host: https://git.savannah.gnu.org/cgit/gforth.git/tree/libcc.fs
[2] https://rosettacode.org/wiki/Call_a_foreign-language_functio...
-
which forth do you guys use for normal day to day scripting and programming
I use SP-Forth (production), Gforth (testing).
-
A Forth Indirectthreaded Pcode Vms Performance On
Gforth has to take special steps to ensure the OS doesn't prevent the transfer of control over to the dynamically generation instruction sequence.
What are some alternatives?
arkam - A Simple Stack VM and Forth
elfort - A Forth metacompiler that directly emits an executable binary for x86-64 Linux written in Arkam
lbForth - Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
zeptoforth - A not-so-small Forth for Cortex-M
subleq - 16-bit SUBLEQ CPU running eForth - just for fun
miniforth - A bootsector FORTH
durexforth - Modern C64 Forth
arocc - A C compiler written in Zig.
gforth-raylib - Raylib 3.5 bindings for Gforth. The name is backwards for obvious reasons.
r3 - r3 programing language - ColorForth inspired
r3d4 - r3 programing language for 64 bits Windows/Linux/Mac/Rasberry Pi 4