r/Compilers • u/mrpro1a1 • May 30 '26
A simple, lightweight, flexible, embeddable, portable and multi-paradigm dynamic programming language for developing applications, tools, and domain-specific languages (over 10 years of continuous development - The Compiler/VM is 25,000 lines of ANSI C)
https://github.com/ring-lang/ring
44
Upvotes
View all comments
Show parent comment
2
u/mrpro1a1 Jun 03 '26
Thanks for the feedback.
"for example, Ring doesn't view the source code as a 2-D canvas, but still sees it as an array of 1-D strings"
This layer could be done by the DSL creator. remember that NaturalLib is a Ring library (written in Ring). The point is Ring provide a group of features (Explained in this chapter: Natural Language Programming — Ring 1.27.0 documentation) That we used to create the Natural Library (Source Code: ring/libraries/naturallib at master · ring-lang/ring). i.e. The NaturalLib is an example of a library that we could develop to create DSLs using Ring. what is different between Ring and other languages with respect to creating DSLs is that embedded DSLs could looks like external DSLs (i.e. uses custom syntax while have access to Ring features (optional) ).
"Ring doesn't even allow me to make new operators"
You can create anything you want, Ring enable us to disable keywords/operators and define anything we want in our DSL (i.e. we have control on what will happens when Ring get any token, and these tokens could be any character/word/operator)
"Neither does Ring support tuples, another arbitrary limitation that is an anti-pattern to DSLs"
Ring supports OOP so we can create classes and uses operator overloading to have custom types (stack/queue/tree/etc.) This could be done for tuples too. And with respect to the syntax of using these tuples, as stated before in our DSL we can control the syntax. It's a layer between (Custom syntax) and (Ring libraries)
"however, i am extremely impressed at how you respond to constructive criticism, you have a most wonderful attitude, a demonstrated humbleness that is exceedingly rare."
Thank you very much