Ring (programming language)
![]() | |
Paradigm | Multi-paradigm: object-oriented, imperative, functional, procedural, reflective, declarative, natural language programming |
---|---|
Designed by | Mahmoud Samir Fayed |
Developer | The Ring Development Team |
First appeared | January 25, 2016 |
Stable release | 1.12
/ January 25, 2020 |
Typing discipline | Dynamic |
Implementation language | C |
OS | Windows, Linux and macOS |
License | MIT License |
Filename extensions | .ring, .rh, .rform |
Website | http://ring-lang.net |
Influenced by | |
Lua, Python, Ruby, C, C#, BASIC, QML, xBase, Supernova [1] | |
|
Ring is a dynamically typed, general-purpose programming language. It can be embedded in C/C++ projects, extended using C/C++ code and/or used as a standalone language. The supported programming paradigms are imperative, procedural, object-oriented, functional, meta, declarative using nested structures, and natural programming. The language is portable (Windows, Linux, macOS, Android, etc.) and can be used to create console, GUI, web, game and mobile applications.[2][3][4][5][6]
History
In 2009, Fayed tried to implement some ideas related to Natural Language Programming, In 9 months he created a minor domain-specific language called Supernova that focus on User interface (UI) creation, then he realized the need for a new language that are general-purpose, practical and can increase the productivity of creating natural languages.[7][8][9]
Ring aims to offer a language focused on helping the developer with building natural interfaces and declarative DSLs [10]
- In November 2011, the idea of the new language was conceived.
- In Sept. 2013, the design and the implementation was started.
- In April 2015, the language name was selected.
- In May 2015, the compiler was implemented.
- In Sept. 2015, the documentation was done.
- In January 25, 2016 , Ring 1.0 was released.
- In October 6, 2016, Ring 1.1 was released.
- In January 25, 2017, Ring 1.2 was released.
- In May 15, 2017, Ring 1.3 was released.
- In June 29, 2017, Ring 1.4 was released.
- In August 21, 2017, Ring 1.5 was released.
- In November 30, 2017, Ring 1.6 was released.
- In January 25, 2018, Ring 1.7 was released.
- In June 25, 2018, Ring 1.8 was released.
- In October 6, 2018, Ring 1.9 was released.
- In January 25, 2019, Ring 1.10 was released.
- In September 15, 2019, Ring 1.11 was released.
- In January 25, 2020, Ring 1.12 was released.[11][12][13]
Goals
The general goals behind Ring:[14] [15]
- Applications programming language.
- Productivity and developing high quality solutions that can scale.
- Small and fast language that can be embedded in C/C++ projects.
- Simple language that can be used in education and introducing Compiler/VM concepts.
- General-Purpose language that can be used for creating domain-specific libraries, frameworks and tools.
- Practical language designed for creating the next version of the Programming Without Coding Technology software.
Examples
Hello World program
The same program can be written using different styles. Here is an example of the standard "Hello, World!" program using four different styles.
The first style:
see "Hello, World!"
The second style:
put "Hello, World!"
The third style:
load "stdlib.ring" print("Hello, World!")
Another style: similar to xBase languages like Clipper and Visual FoxPro
? "Hello, World!"
Change the Keywords and Operators
Ring support changing the language keywords and operators.
This could be done many times in the same source file, and is useful for
- Translating the keywords from English to other human languages (Non-English-based programming languages)
- Customizing the language for using the favorite style
- Porting Legacy code written in other languages
Translate Ring keywords to Japanese
ChangeRingKeyword See 手紙を出す ChangeRingOperator + そして 改行 = nl します。 = :します。 手紙を出す "こんにちは、世界" そして 改行 します。 ChangeRingKeyword 手紙を出す See // キーワードの復旧 ChangeRingOperator そして + // 演算子の復旧
Translate Ring keywords to Arabic
ChangeRingKeyword See إطبع إطبع "Hello, World!" ChangeRingKeyword إطبع See
Use style similar to the Pascal programming language
ChangeRingKeyword func function ChangeRingKeyword see write begin = :begin function main begin write("Hello, World!"); return 0; end ChangeRingKeyword function func ChangeRingKeyword write see
Implementation
Ring programs are not interpreted directly from the textual Ring file, but are compiled into bytecode, which is then run on the Ring virtual machine. The compilation process is typically invisible to the user and is performed during run-time, but it can be done offline in order to increase loading performance or reduce the memory footprint of the host environment by leaving out the compiler. Ring version 1.12 is implemented in approximately 20,000 lines of C code. [22] [23] [24]
The implementation code in C is not written directly using a Text editor. The Compiler and the Virtual Machine are designed using Visual Programming through the Programming Without Coding Technology software then the C code is generated. [25][26][27][28][29][30][31]
Extensions
The following are extensions that can be used immediately after the installation of the full installation version (with a file size of about 280 MB for Ring 1.12). Since these are officially provided and maintained on the Ring side, the users are not bothered by library dependencies that may cause problems in other languages, and there is a concern that they can not be used suddenly even if there are destructive language specification changes.
The extensions are implemented in approximately 500,000 lines of C and C++ code.
- RingAllegro (Allegro Game Library)
- RingConsoleColor (Text coloring library for command prompt or the terminal)
- RingCurl (CURL Library)
- RingFreeGLUT (FreeGLUT)
- RingInternet (Internet related library)
- RingLibUV (LibUV-asynchronous I / O library)
- RingMurMurHash (Hash Function Library)
- RingMySQL (MySQL)
- RingODBC (Open Database Connectivity)
- RingOpenGL (OpenGL 1.1-4.6)
- RingOpenSSL (OpenSSL)
- RingPostgreSQL (PostgreSQL)
- RingQt (Qt framework)
- RingRayLib (Game programming library)
- RingSDL (SDL-Simple DirectMedia Layer Library)
- RingSQLite (SQLite)
- RingWinAPI (Windows API)
- RingWinCREG (Windows Registry)
- RingZIP (zip file processing library)
Also Ring comes with libraries written in Ring itself, some of these libraries are related to web and game development.
Library Name | Description |
---|---|
Standard Library | General Classes and functions. |
Web Library | Simple framework for developing web applications using the MVC design pattern. |
Game Engine | Support developing 2D Games for Desktop and Mobile using Declarative Programming based on Allegro and LibSDL |
Natural Library | General-Purpose Natural Language Programming Library. |
Trace Library | A library for debugging applications. |
Type Hints | A library for adding type hints to functions. |
Big Number Library | Support arithmetic operations on huge numbers. |
Fox Ring Library | Contains functions similar to Visual FoxPro. |
ZeroLib Library | Contains classes where the Index starts from 0 instead of 1. |
Applications
Ring is distributed with over 50 applications written in the language.
Some of these applications are
- Analog Clock application
- Calculator application
- The Checkers Game
- The Chess Game
- Fifteen Puzzle 3D Game
- Game 2048
- Knight Tour Game
- Minesweeper Game
- Othello Game
- Sokoban Game
- Sudoku Game
- Tic-tac-toe 3D Game
- Video Music Player application
- Windows Startup Manager application
Tools
Ring is distributed with a Standard IDE that contains the next tools (written in Ring itself)
- Ring REPL (Read–eval–print loop)
- Ring2EXE (Distributing executable applications)
- RingPM (The Ring Package manager)
- Ring Notepad (Source-code editor)
- Form Designer (WYSIWYG GUI designer)
[42][43][44][45][46][47] Also Ring is distributed with extensions for the next code editors.
Documentation
Ring is distributed with documentation written using Sphinix (2302 pages for Ring 1.12).
Also there is Japanese translation (unofficial).[50][51][52]
See also
References
- ^ Ring Team (20 March 2020). "The Ring programming language and other languages". ring-lang.net. ring-lang.
- ^ Omar Selim (January 2018). "The Ring programming language Review" (PDF). BIMArabia Magazine.
- ^ Hany Salah (11 January 2016). "Ring: A New programming language". youm7.com. youm7.
- ^ RosettaCode (12 June 2019). "Ring Samples (RosettaCode)". rosettacode.org. Rosetta_Code.
- ^ Wikibooks (12 June 2019). "Ring Book (Wikibooks)". en.wikibooks.org. Wikibooks.
- ^ Ahmed Tartour (January 2020). "Your way to programming (Arabic Book, Pages 56-57) talk about Ring" (PDF). Kotobna.
- ^ Ring Team (January 2020). "Ring Language - Frequently Asked Questions (FAQ)". Ring Team.
- ^ Fayed (April 2010). "Supernova programming language". Code_Project.
- ^ Omnia (December 2011). "Supernova language by Egyptian programmer". Youm7.
- ^ Softpedia Team (20 May 2020). "Ring 1.12 review". Softpedia.
- ^ G link Solutions Team (28 January 2019). "The evolution of the Ring programming language". glinksolutions.vn. GlinkSolution. Archived from the original on 2019-04-21.
- ^ Ring Team (25 January 2020). "Ring 1.12 Reference" (PDF). ring-lang.net.
- ^ V2EX (3 October 2019). "Ring - a programming language from the Middle East, supporting GUI cross-platform, as easy to learn as PHP". v2ex.com.
{{cite web}}
: CS1 maint: numeric names: authors list (link) - ^ Naveen Verma (14 Aug 2018). "Ring Programming Language: What Do You Need To Know?". Medium (website).
- ^ Mones Hawas (29 May 2018). "Progress in developing PWCT 2.0 using Ring". youm7.com. youm7.
- ^ Rubin Liu (28 December 2017). "Different styles for writing Hello World program in the Ring programming language". codeproject.com. Code_Project.
- ^ Roshan Ali (4 June 2018). "Ring programming tutorial". YouTube.
- ^ Amr Essam (12 December 2017). "Amr Essam Tutorials". ribdev.
- ^ Sara Hamdy (12 December 2017). "Sara Hamdy Tutorials". ringprogramming4arab.
- ^ Fayed (9 October 2016). "Syntax Flexibility in the Ring Programming Language". codeproject.
- ^ Ring Team (25 January 2016). "Syntax Flexibility Ring". Ring Team.
- ^ Ring Team (14 June 2019). "Ring Features". GitHub.
- ^ Ring Team (14 June 2019). "Ring Reference - Command Line Options". GitHub.
- ^ Fayed (14 June 2019). "Ring Compiler and Virtual Machine source code (MIT License)". GitHub.
- ^ Open Source Developers (13 June 2019). "Ring source code (MIT License)". GitHub.
- ^ Fayed (15 March 2018). "General-Purpose Visual Language and Information System with Case-Studies in Developing Business Applications". arXiv:1712.10281v2 [cs.SE].
- ^ Hend Al-Khalifa (29 February 2008). "Free Open Source Visual Programming Language". Al Riyadh.
- ^ Fayed (11 May 2017). "using visual programming to implement the Ring compiler and virtual machine". arXiv:1712.10281 [cs.SE].
- ^ "PWCT download statistics from Sourceforge". Sourceforge. 14 June 2019.
- ^ Khaled Almesahuge (17 June 2010). "Useful open source projects - Programming Without Coding Technology". Al Riyadh.
- ^ FOP (23 May 2018). "Introducing Programming Without Coding Technology". YouTube.
- ^ Open Source Developers (14 June 2019). "Ring Extensions". GitHub.
- ^ Open Source Developers (14 June 2019). "libcurl - Bindings". cURL.
- ^ Majdi Sobain (2 May 2017). "Squares Puzzle using RingAllegro". codeproject.com. Code_Project.
- ^ RingWinCReg Team (2017). "RingWinCReg Extension Documentation". RingWinCReg.
- ^ Open Source Developers (15 June 2019). "Ring Libraries written in Ring itself". GitHub.
- ^ Fayed (11 August 2017). "Using the Natural Language Programming Library (NLPL) in the Ring Programming Language". codeproject.com. Code_Project.
- ^ Fayed (12 October 2016). "Natural Language Programming in the Ring Programming Language". codeproject.com. Code_Project.
- ^ Open Source Developers (15 June 2019). "Ring Applications written in Ring itself". GitHub.
- ^ Etqan Company (25 September 2018). "Gold Magic 800 Game by Etqan Company". Steam (software).
- ^ Etqan Company (25 September 2018). "Developing the Gold Magic 800 Game using Ring". Etqan Company.
- ^ Ring Team (16 June 2019). "Using Ring Notepad". Ring Team.
- ^ Ring Team (16 June 2019). "Using Ring Form Designer". Ring Team.
- ^ Ring Team (16 June 2019). "Distributing Ring applications using Ring2EXE". Ring Team.
- ^ Ring Team (16 June 2019). "Using the Ring Package Manager". Ring Team.
- ^ Open Source Developers (15 June 2019). "Ring2EXE written in Ring itself". GitHub.
- ^ Open Source Developers (15 June 2019). "Ring Package Manager (RingPM) written in Ring itself". GitHub.
- ^ Open Source Developers (16 June 2019). "Extensions for Code Editors to support Ring". Ring Team.
- ^ Open Source Developers (15 June 2019). "Editor extensions for the Ring language". GitHub.
- ^ Sphinix Team (25 January 2019). "Ring documentation uses Sphinix". Sphinx (documentation generator).
- ^ Ring Team (15 September 2019). "Download Ring documentation (PDF File), 2259 pages". Ring Team.
- ^ OSDN (15 September 2019). "Unofficial Japanse translation for Ring documentation". OSDN.
Further reading
- Ayouni (2020) Beginning Ring Programming, Apress (part of Springer Nature)
- Hassouna (2019) Ring Basics (Arabic Book), Hassouna Academy
- Fayed (2016) The Ring Programming Language, CodeProject
External links
Category:Programming languages Category:Cross-platform free software Category:Programming languages created in 2016 Category:High-level programming languages Category:2016 software Category:Dynamically typed programming languages Category:Egyptian inventions Category:Free software projects Category:Software using the MIT license Category:Free_software_programmed_in_C Category:Multi-paradigm programming languages Category:Extensible syntax programming languages