Jump to content

Ring (programming language)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Charmk (talk | contribs) at 01:59, 8 June 2020 (Creating Draft:Ring (programming language)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Ring
ParadigmMulti-paradigm: object-oriented, imperative, functional, procedural, reflective, declarative, natural language programming
Designed byMahmoud Samir Fayed
DeveloperThe Ring Development Team
First appearedJanuary 25, 2016; 9 years ago (2016-01-25)
Stable release
1.12 / January 25, 2020; 5 years ago (2020-01-25)
Typing disciplineDynamic
Implementation languageC
OSWindows, Linux and macOS
LicenseMIT License
Filename extensions.ring, .rh, .rform
Websitehttp://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

  • Customizing the language for using the favorite style

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

[16][17][18][19][20][21]

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.

[32][33][34][35]

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.

[36][37][38]

Applications

Ring is distributed with over 50 applications written in the language.

Some of these applications are

[39][40][41]

Tools

Ring is distributed with a Standard IDE that contains the next tools (written in Ring itself)

[42][43][44][45][46][47] Also Ring is distributed with extensions for the next code editors.

[48][49]

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

  1. ^ Ring Team (20 March 2020). "The Ring programming language and other languages". ring-lang.net. ring-lang.
  2. ^ Omar Selim (January 2018). "The Ring programming language Review" (PDF). BIMArabia Magazine.
  3. ^ Hany Salah (11 January 2016). "Ring: A New programming language". youm7.com. youm7.
  4. ^ RosettaCode (12 June 2019). "Ring Samples (RosettaCode)". rosettacode.org. Rosetta_Code.
  5. ^ Wikibooks (12 June 2019). "Ring Book (Wikibooks)". en.wikibooks.org. Wikibooks.
  6. ^ Ahmed Tartour (January 2020). "Your way to programming (Arabic Book, Pages 56-57) talk about Ring" (PDF). Kotobna.
  7. ^ Ring Team (January 2020). "Ring Language - Frequently Asked Questions (FAQ)". Ring Team.
  8. ^ Fayed (April 2010). "Supernova programming language". Code_Project.
  9. ^ Omnia (December 2011). "Supernova language by Egyptian programmer". Youm7.
  10. ^ Softpedia Team (20 May 2020). "Ring 1.12 review". Softpedia.
  11. ^ 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.
  12. ^ Ring Team (25 January 2020). "Ring 1.12 Reference" (PDF). ring-lang.net.
  13. ^ 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)
  14. ^ Naveen Verma (14 Aug 2018). "Ring Programming Language: What Do You Need To Know?". Medium (website).
  15. ^ Mones Hawas (29 May 2018). "Progress in developing PWCT 2.0 using Ring". youm7.com. youm7.
  16. ^ Rubin Liu (28 December 2017). "Different styles for writing Hello World program in the Ring programming language". codeproject.com. Code_Project.
  17. ^ Roshan Ali (4 June 2018). "Ring programming tutorial". YouTube.
  18. ^ Amr Essam (12 December 2017). "Amr Essam Tutorials". ribdev.
  19. ^ Sara Hamdy (12 December 2017). "Sara Hamdy Tutorials". ringprogramming4arab.
  20. ^ Fayed (9 October 2016). "Syntax Flexibility in the Ring Programming Language". codeproject.
  21. ^ Ring Team (25 January 2016). "Syntax Flexibility Ring". Ring Team.
  22. ^ Ring Team (14 June 2019). "Ring Features". GitHub.
  23. ^ Ring Team (14 June 2019). "Ring Reference - Command Line Options". GitHub.
  24. ^ Fayed (14 June 2019). "Ring Compiler and Virtual Machine source code (MIT License)". GitHub.
  25. ^ Open Source Developers (13 June 2019). "Ring source code (MIT License)". GitHub.
  26. ^ Fayed (15 March 2018). "General-Purpose Visual Language and Information System with Case-Studies in Developing Business Applications". arXiv:1712.10281v2 [cs.SE].
  27. ^ Hend Al-Khalifa (29 February 2008). "Free Open Source Visual Programming Language". Al Riyadh.
  28. ^ Fayed (11 May 2017). "using visual programming to implement the Ring compiler and virtual machine". arXiv:1712.10281 [cs.SE].
  29. ^ "PWCT download statistics from Sourceforge". Sourceforge. 14 June 2019.
  30. ^ Khaled Almesahuge (17 June 2010). "Useful open source projects - Programming Without Coding Technology". Al Riyadh.
  31. ^ FOP (23 May 2018). "Introducing Programming Without Coding Technology". YouTube.
  32. ^ Open Source Developers (14 June 2019). "Ring Extensions". GitHub.
  33. ^ Open Source Developers (14 June 2019). "libcurl - Bindings". cURL.
  34. ^ Majdi Sobain (2 May 2017). "Squares Puzzle using RingAllegro". codeproject.com. Code_Project.
  35. ^ RingWinCReg Team (2017). "RingWinCReg Extension Documentation". RingWinCReg.
  36. ^ Open Source Developers (15 June 2019). "Ring Libraries written in Ring itself". GitHub.
  37. ^ Fayed (11 August 2017). "Using the Natural Language Programming Library (NLPL) in the Ring Programming Language". codeproject.com. Code_Project.
  38. ^ Fayed (12 October 2016). "Natural Language Programming in the Ring Programming Language". codeproject.com. Code_Project.
  39. ^ Open Source Developers (15 June 2019). "Ring Applications written in Ring itself". GitHub.
  40. ^ Etqan Company (25 September 2018). "Gold Magic 800 Game by Etqan Company". Steam (software).
  41. ^ Etqan Company (25 September 2018). "Developing the Gold Magic 800 Game using Ring". Etqan Company.
  42. ^ Ring Team (16 June 2019). "Using Ring Notepad". Ring Team.
  43. ^ Ring Team (16 June 2019). "Using Ring Form Designer". Ring Team.
  44. ^ Ring Team (16 June 2019). "Distributing Ring applications using Ring2EXE". Ring Team.
  45. ^ Ring Team (16 June 2019). "Using the Ring Package Manager". Ring Team.
  46. ^ Open Source Developers (15 June 2019). "Ring2EXE written in Ring itself". GitHub.
  47. ^ Open Source Developers (15 June 2019). "Ring Package Manager (RingPM) written in Ring itself". GitHub.
  48. ^ Open Source Developers (16 June 2019). "Extensions for Code Editors to support Ring". Ring Team.
  49. ^ Open Source Developers (15 June 2019). "Editor extensions for the Ring language". GitHub.
  50. ^ Sphinix Team (25 January 2019). "Ring documentation uses Sphinix". Sphinx (documentation generator).
  51. ^ Ring Team (15 September 2019). "Download Ring documentation (PDF File), 2259 pages". Ring Team.
  52. ^ OSDN (15 September 2019). "Unofficial Japanse translation for Ring documentation". OSDN.

Further reading

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