logiqub's comments

logiqub | 4 months ago | on: Forth – Is it still relevant?

Popularity is a poor judge of quality. But if you meant that the author used more C/C++ than Forth itself, you do have a point. I wouldn't respect a system programming language that can not be used to implement itself (bootstrap). That's exactly the reason why I didn't start to publicize my own. But if you want to know, there is a language named 8th that you can use to make multi-platform applications. In my book, that would be proof enough that it can be done.

Now, can it be done productively ? Is the 10x claim verifiable ? That depends on your skill. Maybe it's not for everyone's taste. If you prefer to let the compiler do the compiling for you, maybe not. But that being said, Forth makes you more productive because it allows you to change the problem. Modern environments are bloated and waste so many resources. Libraries are huge, software is huge.

One user only require 10% of the functionality, yet you pay for all this fat. When you do real Forth, you do away with the unnecessary... to the extreme. You also change the compiler and the syntax, when it doesn't map to the problem you are solving. With Forth, you can change the problem. Other programming languages can't do that.

logiqub | 4 months ago | on: Forth – Is it still relevant?

I realized I forgot to explain why I needed a new language in the first place. So, imagine you work with Python, but you want to work with graphics, and make a game. Python is slow (even with Cython). You find LuaJIT, and it's a blast. Then LuaJIT is no longer maintained, and the official Lua goes in another direction (fractured ecosystem). You lament and despair, you search for a C interpreter. You find Tiny C compiler from Fabrice Bellard, but you don't have his skills. Only hope ? Make your own Python-like language that runs as fast as LuaJIT. That's what a custom Forth implementation can do for you. Honestly if Charles Moore didn't invent Forth, and I hadn't found it about it when I did... I don't know what I would do today. The freedom to express your thoughts exactly the way you want, and not how the compiler tells you to, is liberating.

My website has been down for a while, but there are still some snapshots of my previous work. I didn't want to upload to GitHub and be pressured by users, when my design isn't polished yet.

https://web.archive.org/web/20220818170224/http://logiqub.co... https://web.archive.org/web/20240226001954/http://logiqub.co...

logiqub | 4 months ago | on: Forth – Is it still relevant?

I have been working on Forth for a long time, way before it got popular again as can be attested by the linked GitHub repository (I started in 2014, and published my compiler in 2018). To be honest, for me, it's the best programming language, especially for working solo, or a very small team.

But the problem with Forth is that it's an evolving language. You design the language to describe your problem. As a result you need to be a good enough programmer to design a programming language, and make use of Forth's strengths. The other problem is the lack of object oriented features, if they are needed for your project. Because you invent the features as you go, and because you are free to redefine keywords, the final language might be anything. The lack of standardization hurts when it comes down to working on a large team.

The biggest problem however, is that you need to discard everything you thought you knew about programming to really do Forth. Real Forth does away with the abstractions common in mainstream languages. Forth is small, fast, portable.

I am now working on building my own game engine to prove that Forth is the "ultimate" language (for my needs). Imagine not having to read "The dragon book" to make your own compiler, that's a game changer. And let's not forget we are in the age of "IOT". Changing the syntax on the fly, not having to deal with a compiler that insults (looking at you C++), it's a pleasure.

I rewrote my compiler at least 20 times, and I took no shortcut. C was never used, it's just assembly code, and then adding features, based on a solid core. My own innovation is dot notation because I need objects, hooks in the compiler, so you can compiler alter the parser, error handler, etc. if needed.

In the future I will release the new virtual machine, with a few applications, and build a game library over time. If lucky, I may fund my retirement. We will see how it goes.

page 1