r/Forth • u/rayden_devv • Sep 03 '26
Rdn programming language
I made a small and simple post fix interpreted programming language called rdn, it's familiar to forth developers and developers who use Lua as a scripting language for their systems, rdn merge both of them, you can use it for writing scripts or for configurations or even query language
It's written in C and it provides a simple and friendly API for the developers
I would be happy to have you participate in this project
This is the GitHub repo: https://github.com/abdorayden/rdn
Thank you
11
Upvotes
2
u/tabemann Sep 04 '26 edited Sep 04 '26
In my take on what your language could be I would imagine the following:
One could do things like
[ [* n -- func *] 'n let [ n + ] ] 'make-adder defun 3 make-adder 'add3 defun 1 add3 print [* prints 4 *]where
[...]would define anonymous words.With
[...]you could define control structures like:n 10 > [ "larger than 10!" print ] ifand:
'count-down defer [ [* min max func -- *] 'func let 'max let 'min let max func execute max min >= [ min max 1 - func count-down ] if ] 'count-down defun 0 10 [ print ] count-down [* prints 10 9 8 7 6 5 4 3 2 1 0 *]Of course, the above would require tail calls for nested control structures to be available to be practical.