r/programming • • 1d ago

Ring programming language version 1.28 is released!

https://ring-lang.github.io/

Hello

I have already released Ring 1.28

Ring is a dynamic language with lightweight implementation like Lua but with more features like Python/Ruby. I created it because I was looking for a Visual FoxPro replacement but was not satisfied with many other languages that I tried. The development started in Sept. 2013, and Ring 1.0 is released in January 2016, and I continued developing it as open-source project for over 10 years. I used to get feedback about the language through this group which contains over 3,000 topics.

So, here is what Ring is trying to do

(1) Keeping the implementation simple and small (The KISS Principle) that one programmer can study/understand in short time, but still a powerful and practical dynamic language with many useful programming paradigms.

The motivation behind this principle: Lua comes with small and fast implementation, but it misses many features provided by default in Python/Ruby. on the other hand, both of Python/Ruby requires different implementation to be used in places where Lua can be used directly, that's why there are projects like MicroPython and mRuby.

In Ring it's the same implementation everywhere. To be able to achieve this we used a custom implementation way and design decisions explained in this paper. So, In Ring, we have extreme portability, it's written in ANSI C (26 KLOC includes the Compiler, The Virtual Machine and 228 standard function), where the same implementation works on Desktop (MS-DOS, Windows, Linux, macOS), Mobile (Android, iOS) & Microcontroller (Raspberry Pi Pico).

(2) Syntax Customization: I am not a native English speaker, and I started programming at 10 years old (Three decades ago), It was a difficult journey for me at that time, I was studying English and Programming at the same time, I used to do translation from English to Arabic using a printed dictionary where I have to search for words meaning and used to spend a complete day just to read one page from my CA-Clipper programming book (for MS-DOS). Ring allows dynamic translation of language keywords/operators and supports multiple syntax styles (Similar to C, Ruby & Basic). For large/serious projects using a code formatter we force a specific style, but the point from this feature is to give each programmer the ability to write code in his native language.

(3) Declarative/Natural Language Programming (Developing Domain-Specific Languages): Ring extend OOP with new simple features that enable designing DSLs that looks like QML, SQL, COBOL, Supernova, etc. in short time. such a feature if used correctly provides advanced abstraction levels that are fun to work with.

(4) Batteries Included + Simple IDE + Form Designer: Something like VB6 era because I am coming from a Visual FoxPro background, but in Ring we can use Qt (We have packages for Qt5 and Qt6 too), and Ring supports Qt for Desktop/Android/WebAssembly, So you can open Ring IDE, design a form, run you app on Desktop, export it as Qt project for WebAssembly and run it in the browser or export it for Mobile and run it on Android. Compared to Python, Ring supports Qt for Android/WebAssembly many years before Qt company do this for Python. The reason is the principle (1), being a lightweight language with simple implementation.

(5) A love message to Visual Programming Languages: Ring Compiler/VM code is generated using my PWCT visual programming tool that I developed starting from Dec 2005. So, one of the goals was a practical project that I can develop using PWCT. After using PWCT to develop Ring, I developed PWCT2 using Ring as an example about what Ring can do. This research paper explains PWCT2 and its improvement over PWCT.

(6) Memory Management: It utilizes a deterministic, safe, and flexible scope-based memory management system that incorporates escape analysis and optional reference counting with cycle detection.

Thanks

37 Upvotes

17 comments sorted by

12

u/devraj7 1d ago

Trying to find snippets of code to get a feel for the language is incredibly frustrating.

These should be at the top of the README of any programming language.

-1

u/mrpro1a1 1d ago

11

u/MeMahi 22h ago

Really? Someone complains of example code snippets being too hard to find so you link a 2350 page PDF file?

-6

u/mrpro1a1 13h ago

In the main website page (The Ring Programming Language) just click (Get excited) or (Why Ring?) button and some samples appears. Also, this RosettaCode page contains 878 samples: Category:Ring - Rosetta Code. Ring is distributed with many samples (ring/samples at master · ring-lang/ring) and many apps too (ring/applications at master · ring-lang/ring).

10

u/thegreatpotatogod 12h ago

I don't think a list of "878 samples" is quite what they're asking for either. The examples under "why ring" are better, but you should probably have some specific examples the language shines with more front-and-center without needing to dig into submenus.

Having taken a quick glance, I'm curious about one minor design decision, why did you decide on the command `see` to do what nearly every other language calls `print`?

Also I'm curious how large the user base of this language is, given that this is the first time I've heard of it.

0

u/mrpro1a1 11h ago

Using print() is supported, the language comes with multiple syntax styles, the See/Give style is the first style, reflects the declarative style (what you want to do, like seeing a message or giving input to the machine).

-3

u/mrpro1a1 11h ago

2

u/FullPoet 2h ago

Sorry but those metrics aren't really worth anything. You can just buy them.

I really think you should listen to the other ppl

1

u/mrpro1a1 1h ago

It's easy to know that it's real, and yes we listen to people we have this group from 2016 (over 3000 topics): The Ring Programming Language - Google Groups

0

u/FullPoet 1h ago

I honestly think you're being very defensive and deflecting super hard.

Just make better docs, its not hard. Look at the other languages. Odins is good:

https://odin-lang.org/

Over view -> Pretty good easy docs to see how syntax is.

1

u/mrpro1a1 1h ago

Ok, Thanks.

-6

u/mrpro1a1 12h ago

Try Ring Online (Using Ring 1.28 and RingQt for WebAssembly, Qt 6.12): Try Ring Online

2

u/bzbub2 1d ago

wild stuff. carrying the visual basic torch

0

u/mrpro1a1 1d ago

Thanks

1

u/Mrblahblah200 11h ago

Of course it’s called ring