Ring (programming language): Difference between revisions

Content deleted Content added
m top: remove arbitrary fixed sizes
 
(22 intermediate revisions by 8 users not shown)
Line 12:
| typing = [[dynamic typing|Dynamic]]
| influenced_by = [[Lua (programming language)|Lua]], [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], [[C (programming language)|C]], [[C Sharp (programming language)|C#]], [[BASIC]], [[QML]], [[xBase]], Supernova
| influenced = SimpleLang,<ref>{{cite web |url=https://web.archive.org/web/20241222002813/https://simple-lang.sourceforge.io/home/ |title=The Simple programming language |author=Azeez Adewale}}</ref> DragonLang <ref>{{cite web |url=https://www.dragon-lang.org/ |title=The Dragon programming language |author= Aavesh Jilani}}</ref>
| programming language = [[C (programming language)|C]]
| operating_system = [[Microsoft Windows|Windows]], [[Linux]] and [[macOS]]
| license = [[MIT License]]
| website = http{{URL|https://ring-lang.net}}
| file_ext = .ring, .rh, .rform
| wikibooks = Ring
}}
'''Ring''' is a [[dynamic programming language|dynamically typed]], [[general-purpose programming language]]. It can be embedded in C/C++ projects, extended using C/C++ code or used as a standalone language.<ref name="rangakrish">{{cite web |url=https://www.rangakrish.com/index.php/2021/08/07/first-encounter-with-the-ring-programming-language/ |title=First Encounter with the Ring Programming Language |author= Dr. Rangarajan Krishnamoorthy |date=7 August 2021 |publisher=rangakrish.com|archive-url=https://web.archive.org/web/20210809074142/https://www.rangakrish.com/index.php/2021/08/07/first-encounter-with-the-ring-programming-language/ |archive-date=2021-08-09 }}</ref> The supported [[programming paradigm]]s are [[Imperative programming|imperative]], [[Procedural programming|procedural]], [[Object-oriented programming|object-oriented]], [[Functional programming|functional]], [[Metaprogramming|meta]], [[Declarative programming|declarative]] using nested structures, and [[Natural-language programming|natural programming]].<ref name="BIMArabiaMagazine">{{cite web |url=https://bimarabia.com/download/BIMarabia_Arabic/BIMarabia27.pdf |title=The Ring programming language Review |author=Omar Selim |date=January 2018 |publisher=BIMArabia Magazine |access-date=2024-03-24 |archive-date=2023-11-17 |archive-url=https://web.archive.org/web/20231117130807/https://bimarabia.com/download/BIMarabia_Arabic/BIMarabia27.pdf |url-status=bot: unknown }}</ref><ref name="YourWayToProgramming">{{cite web |url=https://ring-lang.github.io/ref/ArabicBook_YourWayToProgramming_TalkAboutRing.pdf |title=Your way to programming (Arabic Book, Pages 56-57) talk about Ring |author=Ahmed Tartour |date=January 2020 |publisher=[[:ar::كتبنا (موقع ويب)|Kotobna]]}}</ref> The language is portable ([[Windows]], [[Linux]], [[macOS]], [[Android (operating system)|Android]],<ref name="dotnetpro">{{cite web |url=https://web.archive.org/web/20230404171941/https://www.dotnetpro.de/diverses/sprachen/ring-flexibel-einfach-schnell-1571947.html |title=Ring: flexible, simple, fast |author= Bernhard Lauer |date=14 August 2018 |publisher=[[:de::Dotnetpro|Dotnetpro]]}}</ref> [[WebAssembly]],<ref name="InfoWorld">{{cite web |url=https://www.infoworld.com/article/3572395/ring-language-upgrade-focuses-on-webassembly.html |title=Ring language upgrade focuses on WebAssembly |author= Paul Krill|date=24 August 2020 |publisher=[[InfoWorld]]}}</ref> etc.)<ref>{{cite book |last=Ghanem |first=Mohamed |title=Developing Poet Software using Ring language |url= https://ring-lang.github.io/ref/GhanemBookAboutRing.pdf |publisher=MetaBook (Egypt - Mansoura)|date=2021|isbn=978-977-6928-38-1 }}</ref> and can be used to create [[Console application|console]], [[Graphical user interface|GUI]], [[Web application|web]], [[PC game|game]] and [[mobile app]]lications.<ref>{{Cite book|url=https://www.apress.com/gp/book/9781484258323|title=Beginning Ring Programming - From Novice to Professional {{!}} Mansour Ayouni {{!}} Apress|language=en}}</ref><ref name="Youm7 (Egyptian daily newspaper)">{{cite news |url=https://www.youm7.com/story/2016/1/11/%D9%81%D9%89-25-%D9%8A%D9%86%D8%A7%D9%8A%D8%B1-%D8%A7%D9%84%D9%85%D9%82%D8%A8%D9%84-%D9%84%D8%BA%D8%A9-%D8%A8%D8%B1%D9%85%D8%AC%D8%A9-%D8%AC%D8%AF%D9%8A%D8%AF%D8%A9-%D8%A8%D9%85%D9%88%D8%A7%D8%B5%D9%81%D8%A7%D8%AA-%D8%B9%D8%A7%D9%84%D9%85%D9%8A%D8%A9-%D9%85%D9%86/2532713 |title= Ring: A New programming language |author=Hany Salah |date=11 January 2016 |work=youm7.com |publisher=[[youm7]]}}</ref><ref>{{Cite news|title=Ring: A programming language developed by Arab|url=https://muslims-res.com/%D9%84%D8%BA%D8%A9-%D8%A8%D8%B1%D9%85%D8%AC%D9%8A%D8%A9-%D8%AC%D8%AF%D9%8A%D8%AF%D8%A9-%D8%A8%D8%A3%D9%8A%D8%AF%D9%8D-%D8%B9%D8%B1%D8%A8%D9%8A%D8%A9-%D9%88%D9%84%D9%82%D8%A7%D8%A1-%D8%AD%D8%B5%D8%B1/|access-date=2020-09-28|newspaper=الباحثون المسلمون|author=Ahmed Mohammed Hassan|date=12 December 2015 }}</ref><ref>{{Cite news|title=A book about the Ring programming language|url=https://muslims-res.com/%D9%84%D8%BA%D8%A9-%D8%B1%D9%8A%D9%86%D8%AC-%D8%A7%D9%84%D8%A8%D8%B1%D9%85%D8%AC%D9%8A%D8%A9-ring-programming/|access-date=2020-09-28|newspaper=الباحثون المسلمون|author=Abedallah Salehani|date=18 March 2020 }}</ref>
 
==History==
[[File:Ringlang shot1.png|thumb|300px|Ring IDE (Ring Notepad - Form Designer)]]
In 2009, [[Mahmoud Samir Fayed]] created a minor [[___domain-specific language]] called Supernova that focuses on [[User interface|User interface (UI)]] creation and uses some ideas related to [[Natural-language programming|Natural Language Programming]], then he realized the need for a new language that is [[General-purpose language|general-purpose]] and can increase the [[productivity]] of natural language creation. Ring aims to offer a language focused on helping the developer with building natural interfaces and declarative DSLs.<ref name="Supernova1">{{cite web |url=https://ring-lang.github.io/doc1.1623/faq.html |title=Ring Language - Frequently Asked Questions (FAQ) |author=Ring Team|date=September 2021 |publisher=Ring Team}}</ref><ref name="Supernova2">{{cite web |url=https://www.codeproject.com/Articles/66996/Supernova-Programming-Language |title=Supernova programming language |author=Fayed|date=April 2010 |publisher=[[Code Project]]}}</ref><ref name="Supernova3">{{cite web |url=https://www.youm7.com/story/2011/12/24/%D8%B4%D8%A7%D8%A8-%D9%85%D8%B5%D8%B1%D9%89-%D9%8A%D8%A8%D8%AA%D9%83%D8%B1-%D8%B3%D9%88%D8%A8%D8%B1-%D9%86%D9%88%D9%81%D8%A7-%D9%88%D8%AA%D9%82%D9%86%D9%8A%D8%A9-%D8%A8%D8%B1%D9%85%D8%AC%D8%A9-%D8%A8%D8%AF%D9%88%D9%86-%D9%83%D9%88%D8%AF/562415 |title=Supernova language by Egyptian programmer|author=Omnia|date=December 2011 |publisher=[[Youm7]]}}</ref><ref name="Softpedia">{{cite web |url=https://www.softpedia.com/get/Programming/Coding-languages-Compilers/Fayed-Ring.shtml |title=Ring 1.16 review |author= Softpedia Team|date=23 October 2021 |publisher=[[Softpedia]]}}</ref>
 
==Goals==
Line 123:
</syntaxhighlight>
 
<ref name="helloworldstyles">{{cite web |url=https://www.codeproject.com/Tips/1222859/Different-styles-for-writing-Hello-World-program-i |title=Different styles for writing Hello World program in the Ring programming language |author=Rubin Liu |date=28 December 2017 |work=codeproject.com |publisher=[[Code Project]]}}</ref><ref name="Ring Programming Tutorial">{{cite web |url=https://www.youtube.com/watch?v=7BqoQldx0Pk&list=PL8SruvH85P0uA8ggijCQUR9tXAXF4bmtu&index=2 |title=Ring programming tutorial |author=Roshan Ali |date=4 June 2018 |publisher=[[YouTube]]}}</ref><ref>{{cite web | url=https://ring-lang.github.io/doc1.1923/getting_started3.html | title=Getting Started - Third Style — Ring 1.1923 documentation }}</ref>
 
===Loop command===
Line 145:
===Object-oriented programming===
 
Ring supports object-oriented programming (classes, objects, composition, inheritance, encapsulation, etc.)<ref>{{Cite web|url=https://ring-lang.github.io/doc1.1623/oop.html|title = Object Oriented Programming (OOP) — Ring 1.16 documentation}}</ref>
 
<pre>
new point { # Create new object from the Point class thethen access the objectit using braces
x=10 y=20 z=30 # Set the object attributes
print() # Call the print() method
} # end of object access using braces
class point # Define the class
x y z # Define the attributes (x,y,z)
func print # Define the print() method
? x + nl + y + nl + z # Print the attributes values (nl means printing a new line)
</pre>
 
Line 319:
====Implicit type conversions====
 
The language can automatically convert between numbers and strings.<ref>{{Cite web|url=https://ring-lang.github.io/doc1.1623/variables.html#implicit-conversion|title = Variables — Ring 1.1623 documentation}}</ref>
 
<pre>
Line 343:
*[[Gambas]]
*[[Julia (programming language)|Julia]]
*[[Mojo (programming language)|Mojo]]
 
== References ==
Line 348 ⟶ 349:
 
== Further reading ==
* Fayed (2025) ''[https://github.com/ring-lang/ring/releases/download/v1.23/RingDoc_1.23.pdf The Ring programming language - The complete reference]''
* Fayed, Alohali. (2025) ''[https://www.mdpi.com/2076-3417/15/3/1521 PWCT2: A Self-Hosting Visual Programming Language Based on Ring with Interactive Textual-to-Visual Code Conversion]'', [[Applied Sciences (journal)|Applied Sciences]]
* Fayed, Alohali. (2024) ''[https://www.mdpi.com/2079-9292/13/23/4627 Ring: A Lightweight and Versatile Cross-Platform Dynamic Programming Language Developed Using Visual Programming]'', [[Electronics (journal)|Electronics]]
* Ghanem (2021) ''[https://ring-lang.github.io/ref/GhanemBookAboutRing.pdf Developing Poet Software using Ring language (Arabic Book)]'', MetaBook (Egypt - Mansoura)
* Ayouni (2020) ''[https://www.apress.com/gp/book/9781484258323 Beginning Ring Programming]'', [[Springer Nature|Apress (part of Springer Nature)]]
Line 356 ⟶ 360:
==External links==
{{Wikibooks|Ring}}
* [https://www.youtube.com/playlist?list=PLHIfW1KZRIfl6KzfLziFl650MmThnQ0jT Arabic videos]
* [http://www.ring-lang.net/ Ring home page]
* [https://rosettacodeidrassi.orggithub.io/wikiMonoRing/Category:Ring RosettaCode samplesMonoRing]
* {{Official website|https://www.ring-lang.net/}}
* [http://ring-lang-081.osdn.jp/docs-1.16/index.html Ring Documentation (Japanese)] {{Webarchive|url=https://web.archive.org/web/20211030103530/http://ring-lang-081.osdn.jp/docs-1.16/index.html |date=2021-10-30 }}
* [https://ring-lang.github.io/web/formdesigner/project.html Online Form Designer (WebAssembly)]
* [https://store.steampowered.com/app/1953110/Programming_Without_Coding_Technology_20/ PWCT2 (Developed using Ring)]
* [https://rosettacode.org/wiki/Category:Ring RosettaCode samples]
* [https://ring-lang.github.io/web/tryringonline/project.html Try Ring Online (WebAssembly)]
{{FOSS}}
{{Programming languages}}