Ring is a
dynamically typed
In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer program ...
,
general-purpose programming language
In computer software, a general-purpose programming language (GPL) is a programming language for building software in a wide variety of application domains. Conversely, a domain-specific programming language is used within a specific area. For ex ...
. It can be embedded in C/C++ projects, extended using C/C++ code and/or used as a standalone language.
The supported
programming paradigm
Programming paradigms are a way to classify programming languages based on their features. Languages can be classified into multiple paradigms.
Some paradigms are concerned mainly with implications for the execution model of the language, s ...
s are
imperative,
procedural
Procedural may refer to:
* Procedural generation, a term used in computer graphics applications
*Procedural knowledge, the knowledge exercised in the performance of some task
* Procedural law, a legal concept
*Procedural memory, a cognitive scienc ...
,
object-oriented
Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
,
functional
Functional may refer to:
* Movements in architecture:
** Functionalism (architecture)
** Form follows function
* Functional group, combination of atoms within molecules
* Medical conditions without currently visible organic basis:
** Functional s ...
,
meta
Meta (from the Greek μετά, '' meta'', meaning "after" or "beyond") is a prefix meaning "more comprehensive" or "transcending".
In modern nomenclature, ''meta''- can also serve as a prefix meaning self-referential, as a field of study or ende ...
,
declarative using nested structures, and
natural programming.
The language is portable (
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
,
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
,
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
,
Android
Android may refer to:
Science and technology
* Android (robot), a humanoid robot or synthetic organism designed to imitate a human
* Android (operating system), Google's mobile operating system
** Bugdroid, a Google mascot sometimes referred to ...
,
WebAssembly
WebAssembly (sometimes abbreviated Wasm) defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating interactions between such programs and their host environmen ...
,
etc.) and can be used to create
console,
GUI,
web
Web most often refers to:
* Spider web, a silken structure created by the animal
* World Wide Web or the Web, an Internet-based hypertext system
Web, WEB, or the Web may also refer to:
Computing
* WEB, a literate programming system created b ...
,
game
A game is a structured form of play, usually undertaken for entertainment or fun, and sometimes used as an educational tool. Many games are also considered to be work (such as professional players of spectator sports or games) or art (su ...
and
mobile app
A mobile application or app is a computer program or software application designed to run on a mobile device such as a phone, tablet, or watch. Mobile applications often stand in contrast to desktop applications which are designed to run on ...
lications.
History

In 2009,
Mahmoud Samir Fayed created a minor
domain-specific language called Supernova that focuses on
User interface (UI) creation and uses some ideas related to
Natural Language Programming
Natural-language programming (NLP) is an ontology-assisted way of programming in terms of natural-language sentences, e.g. English. A structured document with Content, sections and subsections for explanations of sentences forms a NLP documen ...
, then he realized the need for a new language that is
general-purpose and can increase the
productivity
Productivity is the efficiency of production of goods or services expressed by some measure. Measurements of productivity are often expressed as a ratio of an aggregate output to a single input or an aggregate input used in a production proce ...
of natural language creation. Ring aims to offer a language focused on helping the developer with building natural interfaces and declarative DSLs.
Goals

The general goals behind Ring:
* Applications programming language.
* Productivity and developing high quality solutions that can scale.
* Small and flexible 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
A clipper was a type of mid-19th-century merchant sailing vessel, designed for speed. Clippers were generally narrow for their length, small by later 19th century standards, could carry limited bulk freight, and had a large total sail area. "Cl ...
and
Visual FoxPro
? "Hello, World!"
Change the Keywords and Operators
Ring supports changing the language
keywords
Keyword may refer to:
Computing
* Keyword (Internet search), a word or phrase typically used by bloggers or online content creator to rank a web page on a particular topic
* Index term, a term used as a keyword to documents in an information syste ...
and
operators
Operator may refer to:
Mathematics
* A symbol indicating a mathematical operation
* Logical operator or logical connective in mathematical logic
* Operator (mathematics), mapping that acts on elements of a space to produce elements of another sp ...
.
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 use of a favorite style
* Porting
Legacy code written in other languages
Translate Ring keywords to
Japanese
Japanese may refer to:
* Something from or related to Japan, an island country in East Asia
* Japanese language, spoken mainly in Japan
* Japanese people, the ethnic group that identifies with Japan through ancestry or culture
** Japanese diaspor ...
ChangeRingKeyword See 手紙を出す
ChangeRingOperator + そして
改行 = nl
します。 = :します。
手紙を出す "こんにちは、世界" そして 改行 します。
ChangeRingKeyword 手紙を出す See // キーワードの復旧
ChangeRingOperator そして + // 演算子の復旧
Translate Ring keywords to
Arabic
Arabic (, ' ; , ' or ) is a Semitic language spoken primarily across the Arab world.Semitic languages: an international handbook / edited by Stefan Weninger; in collaboration with Geoffrey Khan, Michael P. Streck, Janet C. E.Watson; Walte ...
ChangeRingKeyword See إطبع
إطبع "Hello, World!"
ChangeRingKeyword إطبع See
Use style similar to the
Pascal programming language
Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named in honour of t ...
ChangeRingKeyword func function
ChangeRingKeyword see write
begin = :begin
function main
begin
write("Hello, World!");
return 0;
end
ChangeRingKeyword function func
ChangeRingKeyword write see
Loop Command
The Loop command can take an integer to apply the continue semantics to enclosing outer loops
changeRingKeyword loop continue
count = 2
for x in 1:5
for y = 1 to 2
if x = 3
? "About to execute 'loop', count = " + count
continue count
ok
? "x: " + x + ", y: " + y
next
next
Object Oriented Programming
Ring supports Object Oriented Programming (Classes, Objects, Composition, Inheritance, Encapsulation, etc.)
new point # 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)
In Ring classes can be defined at runtime using the Eval() function
? "Creating a new class dynamically..."
eval("class DynamicClass a b")
? "Printing the instance..."
? new DynamicClass
Implementation
Compiler and Virtual Machine

Ring programs are not
interpreted directly from the textual Ring file, but are
compiled into
bytecode
Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (norma ...
, which is then run on the Ring
virtual machine
In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized har ...
. The compilation process is typically invisible to the user and is performed at
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.
The
Compiler
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
and the
Virtual Machine
In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized har ...
are designed using
Visual Programming through the
Programming Without Coding Technology software then the
C code is generated.
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
FreeGLUT is an open-source alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT (and hence FreeGLUT) allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard ...
)
* RingInternet (Internet related library)
* RingLibUV (
LibUV-asynchronous I / O library)
* RingMurMurHash (
Hash Function Library)
* RingMySQL (
MySQL
MySQL () is an open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A relational database ...
)
* RingODBC (
Open Database Connectivity
In computing, Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems (DBMS). The designers of ODBC aimed to make it independent of database systems and operating systems. A ...
)
* RingOpenGL (
OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve ha ...
1.1-4.6)
* RingOpenSSL (
OpenSSL
OpenSSL is a software library for applications that provide secure communications over computer networks against eavesdropping or need to identify the party at the other end. It is widely used by Internet servers, including the majority of HT ...
)
* RingPostgreSQL (
PostgreSQL
PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the In ...
)
* RingQt (
Qt framework)
* RingRayLib (
raylib
raylib (officially named all lowercase) is a cross-platform open-source software development library. The library was made to create graphical applications and games.
The library was inspired by the Borland BGI graphics library and by the X ...
)
* RingSDL (
SDL-Simple DirectMedia Layer Library)
* RingSQLite (
SQLite
SQLite (, ) is a database engine written in the C programming language. It is not a standalone app; rather, it is a library that software developers embed in their apps. As such, it belongs to the family of embedded databases. It is the mo ...
)
* RingWinAPI (
Windows API
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations ...
)
* RingWinCREG (
Windows Registry
The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and u ...
)
* RingZIP (
zip file processing library)
Libraries
Ring comes with libraries written in Ring itself, some of these libraries are related to web and game development.
Applications

Ring is distributed with over 60 applications written in the language.
Some of these applications are
*
Analog Clock
A clock or a timepiece is a device used to measure and indicate time. The clock is one of the oldest human inventions, meeting the need to measure intervals of time shorter than the natural units such as the day, the lunar month and the ...
application
*
Calculator application
*
The Checkers
Checkers, or draughts, is a board game.
Checkers or chequers may also refer to:
Arts, entertainment, and media
* ''Checkers'' (1913 film), a 1913 lost American silent film with Gertrude Shipman
* ''Checkers'' (1919 film), a 1919 lost America ...
Game
*
The Chess Game
*
Fifteen Puzzle
The 15 puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle having 15 square tiles numbered 1–15 in a frame that is 4 tiles high and 4 tiles wide, leaving one unoccupied tile positio ...
3D Game
*
Game 2048
*
Knight Tour Game
*
Minesweeper
A minesweeper is a small warship designed to remove or detonate naval mines. Using various mechanisms intended to counter the threat posed by naval mines, minesweepers keep waterways clear for safe shipping.
History
The earliest known usage of ...
Game
*
Othello
''Othello'' (full title: ''The Tragedy of Othello, the Moor of Venice'') is a tragedy written by William Shakespeare, probably in 1603, set in the contemporary Ottoman–Venetian War (1570–1573) fought for the control of the Island of Cyp ...
Game
*
Sokoban
is a puzzle video game in which the player pushes boxes around in a warehouse, trying to get them to storage locations. The game was designed in 1981 by Hiroyuki Imabayashi, and first published in December 1982.
Gameplay
The game is played on a ...
Game
*
Sudoku
Sudoku (; ja, 数独, sūdoku, digit-single; originally called Number Place) is a logic-based, combinatorics, combinatorial number-placement puzzle. In classic Sudoku, the objective is to fill a 9 × 9 grid with digits so that each co ...
Game
*
Tic-tac-toe
Tic-tac-toe (American English), noughts and crosses (Commonwealth English), or Xs and Os (Canadian or Irish English) is a paper-and-pencil game for two players who take turns marking the spaces in a three-by-three grid with ''X'' or ''O''. ...
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
A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written ...
)
* Ring2EXE (
Distributing executable applications)
* RingPM (The Ring
Package manager
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.
A package manager deals w ...
)
* Ring Notepad (
Source-code editor)
* Form Designer (
WYSIWYG GUI designer)
Also Ring is distributed with extensions for many code editors (
Emacs
Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
,
Notepad++
Notepad++ is a text and source code editor for use with Microsoft Windows. It supports tabbed editing, which allows working with multiple open files in a single window. The product's name comes from the C postfix increment operator.
Notepad ...
,
Geany,
Atom
Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons.
Every solid, liquid, gas ...
,
Sublime Text 2
Sublime may refer to:
Entertainment
* SuBLime, a comic imprint of Viz Media for BL manga
* Sublime (band), an American ska punk band
** ''Sublime'' (album), 1996
* ''Sublime'' (film), a 2007 horror film
* SubLime FM, a Dutch radio station dedic ...
,
Visual Studio Code
Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code compl ...
).
SpaceVim (A community-driven vim distribution) support the Ring programming language.
Documentation
Ring is distributed with documentation written using
Sphinix.
Also there is Japanese translation.
Reception
Popularity
Ring had a rapid rise and fall in popularity as measured by the
TIOBE Programming Community Index. In February 2018, Ring broke into the top 50 for the first time (position 45). As of October 2020, Ring holds position 93 on the TIOBE index. Ring is listed by GitHub in the list of programming languages that are actively developed.
Criticism
Ring critics pointed to some features in Ring that are not common in widely used programming languages.
* The list index starts from 1 instead of 0 (See:
Zero-based numbering
Zero-based numbering is a way of numbering in which the initial element of a sequence is assigned the index 0, rather than the index 1 as is typical in everyday ''non-mathematical'' or ''non-programming'' circumstances. Under zero-base ...
)
* Implicit type conversions (See:
Implicit type conversions and "type punning")
The list index starts from 1 instead of 0
In Ring, the index of the first item in lists and the first character in strings is 1.
cName = "Ring"
? cName # print R
aList = One","Two","Three"? aList # print One
Implicit type conversions
The language can automatically convert between numbers and strings.
/*
** Rules:
** + -->
** + -->
*/
x = 10 # x is a number
y = "20" # y is a string
nSum = x + y # nSum is a number (y will be converted to a number)
cMsg = "Sum = " + nSum # cMsg is a string (nSum will be converted to a string)
See also
*
Tcl
*
Lua
Lua or LUA may refer to:
Science and technology
* Lua (programming language)
* Latvia University of Agriculture
* Last universal ancestor, in evolution
Ethnicity and language
* Lua people, of Laos
* Lawa people, of Thailand sometimes referred t ...
*
Python
*
Ruby
A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum (aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapp ...
*
Squirrel
*
Gambas
References
Further reading
* Ghanem (2021)
Developing Poet Software using Ring language (Arabic Book)', MetaBook (Egypt - Mansoura)
* Ayouni (2020)
Beginning Ring Programming',
Apress (part of Springer Nature)
* Hassouna (2019)
Ring Basics (Arabic Book)'
Hassouna Academy* Sobain (2017)
RingWinCReg Extension Documentation',
SourceForge
SourceForge is a web service that offers software consumers a centralized online location to control and manage open-source software projects and research business software. It provides source code repository hosting, bug tracking, mirrori ...
* Fayed (2016)
The Ring Programming Language',
CodeProject
External links
Ring home pageRosettaCode samples
{{Programming languages
Programming languages
Cross-platform free software
Programming languages created in 2016
High-level programming languages
2016 software
Dynamically typed programming languages
Egyptian inventions
Free software projects
Software using the MIT license
Free software programmed in C
Multi-paradigm programming languages
Extensible syntax programming languages