r/Compilers • • 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
45 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/Constant_Plantain_32 Jun 02 '26

actually, i did take this particular stated goal of Ring, i.e. to be a convenient platform for building new DSLs, into consideration.
in this feature it also fails, because the range of possible DSLs it can support is so limited.
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, a severe limitation it shares with all the other PLs that came before it.
a DSL will typically have new kinds of operators and syntax — but Ring doesn't even allow me to make new operators.
neither does Ring support tuples, another arbitrary limitation that is an anti-pattern to DSLs.

saying that tuples can be done with "lists" is an ugly kludge, not the same thing at all; since tuples are actually a syntactic entity — a PL either has tuples, or doesn't, Ring doesn't.
many PLs suffer from tuple envy, so will falsely claim to support tuples when they really don't.

even Python, famous for having tuples, doesn't have tuples as first class citizens, since it doesn't have tuple variables, i.e. named tuples that actually act as bonafide tuples.

i was hoping for much more, but see so many missed opportunities in all PLs, and Ring is no exception.

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.
me thinks you and i could be very close friends; i anticipate it would be a mutual privilege for us to collaboratively work on a PL project together, since you and i have complimentary skills and strengths.

you are welcome to DM me, so that we can meet each other on Discord.

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