SlideShare a Scribd company logo
1 of 10
Download to read offline
Ring Documentation, Release 1.5.4
Build RingOpenSSL
cd ../extensions/ringopenssl
./buildgcc.sh
Build RingInternet
cd ../extensions/ringinternet
./buildgcc.sh
Generate RingAllegro Source Code and Build
cd ../extensions/ringallegro
./gencode.sh
./buildgcc.sh
Generate RingLibCurl Source Code and Build
cd ../extensions/ringcurl
./gencode.sh
./buildgcc.sh
Generate RingZip Source Code and Build
cd ../extensions/ringzip
./gencode.sh
./buildgcc.sh
Generate RingFreeGLUT Source Code and Build
cd ../extensions/ringfreeglut
./gencode.sh
./buildgcc.sh
Generate RingOpenGL Source Code and Build
The ringopengl folder contains many sub folders for different OpenGL versions
Starting from OpenGL 1.1 to OpenGL 4.6
cd ../extensions/ringopengl/opengl21
gencode.sh
buildgcc.sh
Generate RingQt Source Code and Build
cd ../extensions/ringqt
./gencode.sh
./buildgccfedora.sh
To be able to call ring from any folder
cd ../../bin
sudo ./install.sh
Run Ring Notepad
cd applications/rnote
ring rnote.ring
9.3. Building using Fedora Linux 125
Ring Documentation, Release 1.5.4
9.4 Building using MacOS X
Get the source code
git clone http://github.com/ring-lang/ring.git
Install homebrew (follow the directions on homebrew’s homepage). Install Libraries
cd ring/src
./installdepmac.sh
Build Ring (Compiler/VM)
./buildclang.sh
Build RingODBC
cd ../extensions/ringodbc
./buildclang.sh
Build RingMySQL
cd ../extensions/ringmysql
./buildclang.sh
Build RingSQLite
cd ../extensions/ringsqlite
./buildclang.sh
Build RingOpenSSL
cd ../extensions/ringopenssl
./buildclang.sh
Build RingInternet
cd ../extensions/ringinternet
./buildclang.sh
Generate RingAllegro Source Code and Build
cd ../extensions/ringallegro
./gencode.sh
./buildclang.sh
Generate RingLibCurl Source Code and Build
cd ../extensions/ringcurl
./gencode.sh
./buildclang.sh
Generate RingZip Source Code and Build
cd ../extensions/ringzip
./gencode.sh
./buildclang.sh
Generate RingFreeGLUT Source Code and Build
9.4. Building using MacOS X 126
Ring Documentation, Release 1.5.4
cd ../extensions/ringfreeglut
./gencode.sh
./buildclang.sh
Generate RingOpenGL Source Code and Build
The ringopengl folder contains many sub folders for different OpenGL versions Starting from OpenGL 1.1 to OpenGL
4.6
cd ../extensions/ringopengl/opengl21
./gencode.sh
./buildclang.sh
Generate RingQt Source Code and Build
cd ../extensions/ringqt
./gencode.sh
./buildclang.sh
To be able to call ring from any folder
cd ../../bin
sudo ./install.sh
Run Ring Notepad
cd applications/rnote
sudo ring rnote.ring
9.5 Building using CMake
Install libraries (MySQL Client, OpenSSL, LibCurl, Allegro 5 and Qt 5.5)
cmake .
make
9.5. Building using CMake 127
CHAPTER
TEN
HOW TO CONTRIBUTE?
Ring is a free-open source project, Everyone is welcome to contribute to Ring.
Project Home : https://github.com/ring-lang/ring
You can help in many parts in the project
• Documentation
• Testing
• Samples
• Applications
• Editors Support
• Libraries in Ring
• Extensions in C/C++
• Compiler and Virtual Machine (VM)
• Ideas and suggestions
10.1 Special thanks to contributors
Throughout the creation of this project, Ring relied heavily on contributions from experts along with college students.
Their input was invaluable, and we want to take a moment to thank them and recognize them for all of their hard work.
Ring Team: http://ring-lang.sf.net/team.html
10.2 Documentation
You can modify anything in the documentation, by updating the text files (*.txt) in this folder : https://github.com/ring-
lang/ring/tree/master/docs/source
The documentation is created using Sphinx : http://www.sphinx-doc.org/en/stable/
10.3 Testing
You can write new tests in this folder
https://github.com/ring-lang/ring/tree/master/tests/scripts
128
Ring Documentation, Release 1.5.4
10.4 Samples
You can add new samples to this folder
https://github.com/ring-lang/ring/tree/master/samples/other
10.5 Applications
You can add new applications to this folder
https://github.com/ring-lang/ring/tree/master/applications
10.6 Editors Support
You can help in supporting Ring in different code editors
Check the next folder
https://github.com/ring-lang/ring/tree/master/editor
10.7 Libraries in Ring
You can update and add libraries to this folder
https://github.com/ring-lang/ring/tree/master/ringlibs
10.8 Extensions in C/C++
You can add and update extensions in this folder
https://github.com/ring-lang/ring/tree/master/extensions
10.9 Compiler and Virtual Machine (VM)
• Source Code (C Language) : https://github.com/ring-lang/ring/tree/master/src
• Visual Source (PWCT) : https://github.com/ring-lang/ring/tree/master/visualsrc
10.10 Ideas and suggestions
You can share your ideas, suggestions and questions in this group
https://groups.google.com/forum/#!forum/ring-lang
10.4. Samples 129
CHAPTER
ELEVEN
GETTING STARTED - FIRST STYLE
11.1 Hello World
The next program prints the Hello World message on the screen (std-out).
see "Hello World"
11.2 Run the program
to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it
using the ring interpreter
ring hello.ring
11.3 Not Case-Sensitive
Since the Ring language is not case-sensitive, the same program can be written in different styles
Tip: It’s better to select one style and use it in all of the program source code
SEE "Hello World"
See "Hello World"
11.4 Multi-Line literals
Using Ring we can write multi-line literal, see the next example
See "
Hello
Welcome to the Ring programming language
How are you?
"
Also you can use the nl constant to insert new line and you can use the + operator to concatenate strings
130
Ring Documentation, Release 1.5.4
Note: nl value means a new line and the actual codes that represent a newline is different between operating systems
See "Hello" + nl + "Welcome to the Ring programming language" +
nl + "How are you?"
11.5 Getting Input
You can get the input from the user using the give command
See "What is your name? "
Give cName
See "Hello " + cName
11.6 No Explicit End For Statements
You don’t need to use ‘;’ or press ENTER to separate statements. The previous program can be written in one line.
See "What is your name? " give cName see "Hello " + cName
11.7 Writing Comments
We can write one line comments and multi-line comments
The comment starts with # or //
Multi-lines comments are written between /* and */
/*
Program Name : My first program using Ring
Date : 2016.09.09
Author : Mahmoud Fayed
*/
See "What is your name? " # print message on screen
give cName # get input from the user
see "Hello " + cName # say hello!
// See "Bye!"
Note: Using // to comment a lines of code is just a code style.
11.5. Getting Input 131
CHAPTER
TWELVE
GETTING STARTED - SECOND STYLE
12.1 Hello World
The next program prints the Hello World message on the screen (std-out).
put "Hello World"
12.2 Run the program
to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it
using the ring interpreter
ring hello.ring
12.3 Not Case-Sensitive
Since the Ring language is not case-sensitive, the same program can be written in different styles
Tip: It’s better to select one style and use it in all of the program source code
PUT "Hello World"
Put "Hello World"
12.4 Multi-Line literals
Using Ring we can write multi-line literal, see the next example
Put "
Hello
Welcome to the Ring programming language
How are you?
"
Also you can use the nl constant to insert new line and you can use the + operator to concatenate strings
132
Ring Documentation, Release 1.5.4
Note: nl value means a new line and the actual codes that represent a newline is different between operating systems
Put "Hello" + nl + "Welcome to the Ring programming language" +
nl + "How are you?"
12.5 Getting Input
You can get the input from the user using the get command
Put "What is your name? "
Get cName
Put "Hello " + cName
12.6 No Explicit End For Statements
You don’t need to use ‘;’ or press ENTER to separate statements. The previous program can be written in one line.
Put "What is your name? " get cName put "Hello " + cName
12.7 Writing Comments
We can write one line comments and multi-line comments
The comment starts with # or //
Multi-lines comments are written between /* and */
/*
Program Name : My first program using Ring
Date : 2016.09.09
Author : Mahmoud Fayed
*/
Put "What is your name? " # print message on screen
get cName # get input from the user
put "Hello " + cName # say hello!
// Put "Bye!"
Note: Using // to comment a lines of code is just a code style.
12.5. Getting Input 133
CHAPTER
THIRTEEN
GETTING STARTED - THIRD STYLE
13.1 Hello World
The next program prints the Hello World message on the screen (std-out).
load "stdlib.ring"
print("Hello World")
13.2 Run the program
to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it
using the ring interpreter
ring hello.ring
13.3 Not Case-Sensitive
Since the Ring language is not case-sensitive, the same program can be written in different styles
Tip: It’s better to select one style and use it in all of the program source code
LOAD "stdlib.ring"
PRINT("Hello World")
Load "stdlib.ring"
Print("Hello World")
13.4 Multi-Line literals
Using Ring we can write multi-line literal, see the next example
Load "stdlib.ring"
Print("
Hello
Welcome to the Ring programming language
How are you?
134

More Related Content

What's hot

His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
Getachew Ganfur
 
53_6_25416_1477917821_Developer Certificate
53_6_25416_1477917821_Developer Certificate53_6_25416_1477917821_Developer Certificate
53_6_25416_1477917821_Developer Certificate
Angel Ivanov
 
Zero to Zend Framework in 10 minutes
Zero to Zend Framework in 10 minutesZero to Zend Framework in 10 minutes
Zero to Zend Framework in 10 minutes
Jeremy Kendall
 
Entwicker camp2007 calling-the-c-api-from-lotusscript
Entwicker camp2007 calling-the-c-api-from-lotusscriptEntwicker camp2007 calling-the-c-api-from-lotusscript
Entwicker camp2007 calling-the-c-api-from-lotusscript
Bill Buchan
 

What's hot (11)

The Ring programming language version 1.6 book - Part 5 of 189
The Ring programming language version 1.6 book - Part 5 of 189The Ring programming language version 1.6 book - Part 5 of 189
The Ring programming language version 1.6 book - Part 5 of 189
 
C plus plus for hackers it security
C plus plus for hackers it securityC plus plus for hackers it security
C plus plus for hackers it security
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
 
53_6_25416_1477917821_Developer Certificate
53_6_25416_1477917821_Developer Certificate53_6_25416_1477917821_Developer Certificate
53_6_25416_1477917821_Developer Certificate
 
Erich Gamma at SpringOne Platform 2017
Erich Gamma at SpringOne Platform 2017Erich Gamma at SpringOne Platform 2017
Erich Gamma at SpringOne Platform 2017
 
Zero to Zend Framework in 10 minutes
Zero to Zend Framework in 10 minutesZero to Zend Framework in 10 minutes
Zero to Zend Framework in 10 minutes
 
Internationalizing Ubuntu apps
Internationalizing Ubuntu appsInternationalizing Ubuntu apps
Internationalizing Ubuntu apps
 
Session 1 - c++ intro
Session   1 - c++ introSession   1 - c++ intro
Session 1 - c++ intro
 
Entwicker camp2007 calling-the-c-api-from-lotusscript
Entwicker camp2007 calling-the-c-api-from-lotusscriptEntwicker camp2007 calling-the-c-api-from-lotusscript
Entwicker camp2007 calling-the-c-api-from-lotusscript
 
Programming in c_in_7_days
Programming in c_in_7_daysProgramming in c_in_7_days
Programming in c_in_7_days
 
Introduction to Programming Lesson 01
Introduction to Programming Lesson 01Introduction to Programming Lesson 01
Introduction to Programming Lesson 01
 

Similar to The Ring programming language version 1.5.4 book - Part 16 of 185

Similar to The Ring programming language version 1.5.4 book - Part 16 of 185 (20)

The Ring programming language version 1.4.1 book - Part 4 of 31
The Ring programming language version 1.4.1 book - Part 4 of 31The Ring programming language version 1.4.1 book - Part 4 of 31
The Ring programming language version 1.4.1 book - Part 4 of 31
 
The Ring programming language version 1.5.1 book - Part 15 of 180
The Ring programming language version 1.5.1 book - Part 15 of 180The Ring programming language version 1.5.1 book - Part 15 of 180
The Ring programming language version 1.5.1 book - Part 15 of 180
 
The Ring programming language version 1.6 book - Part 18 of 189
The Ring programming language version 1.6 book - Part 18 of 189The Ring programming language version 1.6 book - Part 18 of 189
The Ring programming language version 1.6 book - Part 18 of 189
 
The Ring programming language version 1.5.2 book - Part 15 of 181
The Ring programming language version 1.5.2 book - Part 15 of 181The Ring programming language version 1.5.2 book - Part 15 of 181
The Ring programming language version 1.5.2 book - Part 15 of 181
 
The Ring programming language version 1.3 book - Part 9 of 88
The Ring programming language version 1.3 book - Part 9 of 88The Ring programming language version 1.3 book - Part 9 of 88
The Ring programming language version 1.3 book - Part 9 of 88
 
The Ring programming language version 1.8 book - Part 21 of 202
The Ring programming language version 1.8 book - Part 21 of 202The Ring programming language version 1.8 book - Part 21 of 202
The Ring programming language version 1.8 book - Part 21 of 202
 
The Ring programming language version 1.5.2 book - Part 16 of 181
The Ring programming language version 1.5.2 book - Part 16 of 181The Ring programming language version 1.5.2 book - Part 16 of 181
The Ring programming language version 1.5.2 book - Part 16 of 181
 
The Ring programming language version 1.10 book - Part 24 of 212
The Ring programming language version 1.10 book - Part 24 of 212The Ring programming language version 1.10 book - Part 24 of 212
The Ring programming language version 1.10 book - Part 24 of 212
 
The Ring programming language version 1.9 book - Part 22 of 210
The Ring programming language version 1.9 book - Part 22 of 210The Ring programming language version 1.9 book - Part 22 of 210
The Ring programming language version 1.9 book - Part 22 of 210
 
The Ring programming language version 1.9 book - Part 23 of 210
The Ring programming language version 1.9 book - Part 23 of 210The Ring programming language version 1.9 book - Part 23 of 210
The Ring programming language version 1.9 book - Part 23 of 210
 
The Ring programming language version 1.5.4 book - Part 17 of 185
The Ring programming language version 1.5.4 book - Part 17 of 185The Ring programming language version 1.5.4 book - Part 17 of 185
The Ring programming language version 1.5.4 book - Part 17 of 185
 
The Ring programming language version 1.5.3 book - Part 17 of 184
The Ring programming language version 1.5.3 book - Part 17 of 184The Ring programming language version 1.5.3 book - Part 17 of 184
The Ring programming language version 1.5.3 book - Part 17 of 184
 
The Ring programming language version 1.5.1 book - Part 14 of 180
The Ring programming language version 1.5.1 book - Part 14 of 180The Ring programming language version 1.5.1 book - Part 14 of 180
The Ring programming language version 1.5.1 book - Part 14 of 180
 
The Ring programming language version 1.5.1 book - Part 16 of 180
The Ring programming language version 1.5.1 book - Part 16 of 180The Ring programming language version 1.5.1 book - Part 16 of 180
The Ring programming language version 1.5.1 book - Part 16 of 180
 
C++ for hackers
C++ for hackersC++ for hackers
C++ for hackers
 
The Ring programming language version 1.10 book - Part 23 of 212
The Ring programming language version 1.10 book - Part 23 of 212The Ring programming language version 1.10 book - Part 23 of 212
The Ring programming language version 1.10 book - Part 23 of 212
 
The Ring programming language version 1.6 book - Part 17 of 189
The Ring programming language version 1.6 book - Part 17 of 189The Ring programming language version 1.6 book - Part 17 of 189
The Ring programming language version 1.6 book - Part 17 of 189
 
The Ring programming language version 1.7 book - Part 20 of 196
The Ring programming language version 1.7 book - Part 20 of 196The Ring programming language version 1.7 book - Part 20 of 196
The Ring programming language version 1.7 book - Part 20 of 196
 
The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.3 book - Part 10 of 88
 
The Ring programming language version 1.2 book - Part 8 of 84
The Ring programming language version 1.2 book - Part 8 of 84The Ring programming language version 1.2 book - Part 8 of 84
The Ring programming language version 1.2 book - Part 8 of 84
 

More from Mahmoud Samir Fayed

More from Mahmoud Samir Fayed (20)

The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 212 of 212The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 212 of 212
 
The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 211 of 212The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 211 of 212
 
The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 210 of 212The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 210 of 212
 
The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 208 of 212The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 208 of 212
 
The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 207 of 212The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 207 of 212
 
The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 205 of 212The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 205 of 212
 
The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 206 of 212The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 206 of 212
 
The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 204 of 212The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 204 of 212
 
The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 203 of 212The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 203 of 212
 
The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 202 of 212The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 202 of 212
 
The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 201 of 212The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 201 of 212
 
The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 200 of 212The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 200 of 212
 
The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 199 of 212The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 199 of 212
 
The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 198 of 212The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 198 of 212
 
The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 197 of 212The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 197 of 212
 
The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 196 of 212The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 196 of 212
 
The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 195 of 212The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 195 of 212
 
The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 194 of 212The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 194 of 212
 
The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 193 of 212The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 193 of 212
 
The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 192 of 212The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 192 of 212
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

The Ring programming language version 1.5.4 book - Part 16 of 185

  • 1. Ring Documentation, Release 1.5.4 Build RingOpenSSL cd ../extensions/ringopenssl ./buildgcc.sh Build RingInternet cd ../extensions/ringinternet ./buildgcc.sh Generate RingAllegro Source Code and Build cd ../extensions/ringallegro ./gencode.sh ./buildgcc.sh Generate RingLibCurl Source Code and Build cd ../extensions/ringcurl ./gencode.sh ./buildgcc.sh Generate RingZip Source Code and Build cd ../extensions/ringzip ./gencode.sh ./buildgcc.sh Generate RingFreeGLUT Source Code and Build cd ../extensions/ringfreeglut ./gencode.sh ./buildgcc.sh Generate RingOpenGL Source Code and Build The ringopengl folder contains many sub folders for different OpenGL versions Starting from OpenGL 1.1 to OpenGL 4.6 cd ../extensions/ringopengl/opengl21 gencode.sh buildgcc.sh Generate RingQt Source Code and Build cd ../extensions/ringqt ./gencode.sh ./buildgccfedora.sh To be able to call ring from any folder cd ../../bin sudo ./install.sh Run Ring Notepad cd applications/rnote ring rnote.ring 9.3. Building using Fedora Linux 125
  • 2. Ring Documentation, Release 1.5.4 9.4 Building using MacOS X Get the source code git clone http://github.com/ring-lang/ring.git Install homebrew (follow the directions on homebrew’s homepage). Install Libraries cd ring/src ./installdepmac.sh Build Ring (Compiler/VM) ./buildclang.sh Build RingODBC cd ../extensions/ringodbc ./buildclang.sh Build RingMySQL cd ../extensions/ringmysql ./buildclang.sh Build RingSQLite cd ../extensions/ringsqlite ./buildclang.sh Build RingOpenSSL cd ../extensions/ringopenssl ./buildclang.sh Build RingInternet cd ../extensions/ringinternet ./buildclang.sh Generate RingAllegro Source Code and Build cd ../extensions/ringallegro ./gencode.sh ./buildclang.sh Generate RingLibCurl Source Code and Build cd ../extensions/ringcurl ./gencode.sh ./buildclang.sh Generate RingZip Source Code and Build cd ../extensions/ringzip ./gencode.sh ./buildclang.sh Generate RingFreeGLUT Source Code and Build 9.4. Building using MacOS X 126
  • 3. Ring Documentation, Release 1.5.4 cd ../extensions/ringfreeglut ./gencode.sh ./buildclang.sh Generate RingOpenGL Source Code and Build The ringopengl folder contains many sub folders for different OpenGL versions Starting from OpenGL 1.1 to OpenGL 4.6 cd ../extensions/ringopengl/opengl21 ./gencode.sh ./buildclang.sh Generate RingQt Source Code and Build cd ../extensions/ringqt ./gencode.sh ./buildclang.sh To be able to call ring from any folder cd ../../bin sudo ./install.sh Run Ring Notepad cd applications/rnote sudo ring rnote.ring 9.5 Building using CMake Install libraries (MySQL Client, OpenSSL, LibCurl, Allegro 5 and Qt 5.5) cmake . make 9.5. Building using CMake 127
  • 4. CHAPTER TEN HOW TO CONTRIBUTE? Ring is a free-open source project, Everyone is welcome to contribute to Ring. Project Home : https://github.com/ring-lang/ring You can help in many parts in the project • Documentation • Testing • Samples • Applications • Editors Support • Libraries in Ring • Extensions in C/C++ • Compiler and Virtual Machine (VM) • Ideas and suggestions 10.1 Special thanks to contributors Throughout the creation of this project, Ring relied heavily on contributions from experts along with college students. Their input was invaluable, and we want to take a moment to thank them and recognize them for all of their hard work. Ring Team: http://ring-lang.sf.net/team.html 10.2 Documentation You can modify anything in the documentation, by updating the text files (*.txt) in this folder : https://github.com/ring- lang/ring/tree/master/docs/source The documentation is created using Sphinx : http://www.sphinx-doc.org/en/stable/ 10.3 Testing You can write new tests in this folder https://github.com/ring-lang/ring/tree/master/tests/scripts 128
  • 5. Ring Documentation, Release 1.5.4 10.4 Samples You can add new samples to this folder https://github.com/ring-lang/ring/tree/master/samples/other 10.5 Applications You can add new applications to this folder https://github.com/ring-lang/ring/tree/master/applications 10.6 Editors Support You can help in supporting Ring in different code editors Check the next folder https://github.com/ring-lang/ring/tree/master/editor 10.7 Libraries in Ring You can update and add libraries to this folder https://github.com/ring-lang/ring/tree/master/ringlibs 10.8 Extensions in C/C++ You can add and update extensions in this folder https://github.com/ring-lang/ring/tree/master/extensions 10.9 Compiler and Virtual Machine (VM) • Source Code (C Language) : https://github.com/ring-lang/ring/tree/master/src • Visual Source (PWCT) : https://github.com/ring-lang/ring/tree/master/visualsrc 10.10 Ideas and suggestions You can share your ideas, suggestions and questions in this group https://groups.google.com/forum/#!forum/ring-lang 10.4. Samples 129
  • 6. CHAPTER ELEVEN GETTING STARTED - FIRST STYLE 11.1 Hello World The next program prints the Hello World message on the screen (std-out). see "Hello World" 11.2 Run the program to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it using the ring interpreter ring hello.ring 11.3 Not Case-Sensitive Since the Ring language is not case-sensitive, the same program can be written in different styles Tip: It’s better to select one style and use it in all of the program source code SEE "Hello World" See "Hello World" 11.4 Multi-Line literals Using Ring we can write multi-line literal, see the next example See " Hello Welcome to the Ring programming language How are you? " Also you can use the nl constant to insert new line and you can use the + operator to concatenate strings 130
  • 7. Ring Documentation, Release 1.5.4 Note: nl value means a new line and the actual codes that represent a newline is different between operating systems See "Hello" + nl + "Welcome to the Ring programming language" + nl + "How are you?" 11.5 Getting Input You can get the input from the user using the give command See "What is your name? " Give cName See "Hello " + cName 11.6 No Explicit End For Statements You don’t need to use ‘;’ or press ENTER to separate statements. The previous program can be written in one line. See "What is your name? " give cName see "Hello " + cName 11.7 Writing Comments We can write one line comments and multi-line comments The comment starts with # or // Multi-lines comments are written between /* and */ /* Program Name : My first program using Ring Date : 2016.09.09 Author : Mahmoud Fayed */ See "What is your name? " # print message on screen give cName # get input from the user see "Hello " + cName # say hello! // See "Bye!" Note: Using // to comment a lines of code is just a code style. 11.5. Getting Input 131
  • 8. CHAPTER TWELVE GETTING STARTED - SECOND STYLE 12.1 Hello World The next program prints the Hello World message on the screen (std-out). put "Hello World" 12.2 Run the program to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it using the ring interpreter ring hello.ring 12.3 Not Case-Sensitive Since the Ring language is not case-sensitive, the same program can be written in different styles Tip: It’s better to select one style and use it in all of the program source code PUT "Hello World" Put "Hello World" 12.4 Multi-Line literals Using Ring we can write multi-line literal, see the next example Put " Hello Welcome to the Ring programming language How are you? " Also you can use the nl constant to insert new line and you can use the + operator to concatenate strings 132
  • 9. Ring Documentation, Release 1.5.4 Note: nl value means a new line and the actual codes that represent a newline is different between operating systems Put "Hello" + nl + "Welcome to the Ring programming language" + nl + "How are you?" 12.5 Getting Input You can get the input from the user using the get command Put "What is your name? " Get cName Put "Hello " + cName 12.6 No Explicit End For Statements You don’t need to use ‘;’ or press ENTER to separate statements. The previous program can be written in one line. Put "What is your name? " get cName put "Hello " + cName 12.7 Writing Comments We can write one line comments and multi-line comments The comment starts with # or // Multi-lines comments are written between /* and */ /* Program Name : My first program using Ring Date : 2016.09.09 Author : Mahmoud Fayed */ Put "What is your name? " # print message on screen get cName # get input from the user put "Hello " + cName # say hello! // Put "Bye!" Note: Using // to comment a lines of code is just a code style. 12.5. Getting Input 133
  • 10. CHAPTER THIRTEEN GETTING STARTED - THIRD STYLE 13.1 Hello World The next program prints the Hello World message on the screen (std-out). load "stdlib.ring" print("Hello World") 13.2 Run the program to run the program, save the code in a file, for example : hello.ring then from the command line or terminal, run it using the ring interpreter ring hello.ring 13.3 Not Case-Sensitive Since the Ring language is not case-sensitive, the same program can be written in different styles Tip: It’s better to select one style and use it in all of the program source code LOAD "stdlib.ring" PRINT("Hello World") Load "stdlib.ring" Print("Hello World") 13.4 Multi-Line literals Using Ring we can write multi-line literal, see the next example Load "stdlib.ring" Print(" Hello Welcome to the Ring programming language How are you? 134