Indeed, that was (& still is to some point) a weak point. I am working on a new C-Interface for a while now which works on a standard layer and supports Gforth, SwiftForth & VFX Forth. If uses a callback mechanism which will hopefully fix this once and for all ;)
I vaguely recall that Gforth uses GCC internally to implement FFI, do I have that right? It struck me as awfully heavyweight compared to something like libffi.
I think we tried FFI in the beginning, but there were to many caveats. Currently it works by using swig to parse c-headers into a platform agnostic description for Gforth. My SWIG Module also creates -fsi.c (forth script independent C) files which can be used for that.
Our thinking was/is "if you have a forth-compiler and want to call C, you shall also have a C-compiler", at least for Gforth, which uses C as a base layer. So while I don't love that train of thought 100%, it does work nicely for portability.
For VFX on the other hand, the -fsi.c will give you the Extern: notation, which is a lot closer to a libffi-style interface. The SwiftForth output is even simpler, as it expects the programmer to lay out the arguments on the stack properly.
However, I did not want to postpone Gforth 1.0 any longer, and we all had some pet projects which we wanted in there, but we'd rather have 1.0 out now and follow up soon again ;)
Loading DLL's dynamically is a must if you want to ship turnkey applications. In my much simpler Forth (ciforth) that is possible.
Once you decided to run a DLL besides for implementing standard words, you are writing an application that can hardly be portable over linux and MS-window. Only killer applications in gforth on linux, will entice users to run it under WSL.
Well I was about to provide a more detailed post, but OP's title boils it down ;) We released GForth 1.0 last sunday and are working on getting it into multiple distros. Bernd is already in debian testing, should be in the next stable. Anton wrote a nice summary of the changes in the news-file, which OP linked above.
We also extended the installation instructions for more systems on our website. Let us know if we missed something, or if you encounter any bugs.
It is the first stable release in nearly 18 years, so this is quite a big event. We hope to get the old and dusty 0.7.3 replaced everywhere soon.
Good question, on Android the User Interface is different from the normal Terminal, as Bernd has written a custom one in OpenGL (might be Vulcan now). I think Gforth for android is okay for Forthing needs on the go, but if I want to try something more complicated involving files and other tools, i use termux and install Gforth in there ;)
Did you file your KEY? problems in one of the bugtrackers? If not, please do so and reply here. I will make sure we take a look at it. Please also include a bit of code to reproduce.
KEY? is actually quite problematic. For example XON XOFF keys didn't adhere to the primitive model of having a keyboard directly connected to a CPU. A system is supposed to define the characters it recognizes, but control characters is a bit of a gray area. Is H a printing character because it backspaces? What about T that have no effect on a screen.
I implemented a screen editor in MSDOS directly accessing memory mapped video at 0xB0000 . Worked with QSD byt these keys present problems with a multilayered system like MS-Windows or a LINUX-Weyland system.
Interpreting what KEY? is supposed to mean on a touch screen is also difficult.
On November the 2nd it would have been 18 years. We intend to not let the next version's interval to almost get to voting rights age again 😉 Thanks, I will relay your and the others commenters thanks to the team and especially Anton & Bernd who really did most of the work. Bernd on the implementation side, Anton on architecture and documentation. 🥳
Yay! That’s crazy, I’m glad you guys came along, I’m quite grateful to you, I wish I could help, but C makes next to no sense to my brain, unfortunately. My well wishes to you all! :)
7
u/Wootery Oct 28 '26 edited Oct 28 '26
My favourite of the announced additions: improved C callbacks. That's been a weak point for a long time.
Hopefully Windows support gets an upgrade soon, as it looks like that hasn't yet been addressed.
edit Also very cool that they apparently greatly improved performance. "Performance comparable to SwiftForth".
20
u/4ther Oct 28 '26
Well I was about to provide a more detailed post, but OP's title boils it down ;)
We released GForth 1.0 last sunday and are working on getting it into multiple distros. Bernd is already in debian testing, should be in the next stable. Anton wrote a nice summary of the changes in the news-file, which OP linked above.
We also extended the installation instructions for more systems on our website. Let us know if we missed something, or if you encounter any bugs.
It is the first stable release in nearly 18 years, so this is quite a big event.
We hope to get the old and dusty 0.7.3 replaced everywhere soon.
2
u/ripter Oct 28 '26
This is awesome! I can’t wait to try it out.
2
u/alberthemagician Oct 28 '26
At last!
2
u/Imaginary-Deer4185 Oct 28 '26
Congratulations!
1
u/SaileRCapnap Oct 28 '26
Wow, this is the first release in a while, right? That’s dope! I can’t wait to use it! Thx team!
1
u/tabemann Oct 28 '26
Finally!
1
u/KnightOfTribulus 28d ago
Congratulations!