R.A.P.L. (Rapid Application Programming Language) is a developing programming language designed for simplicity and efficiency. It aims to make coding more intuitive by providing a clean syntax for logic, loops, and function handling.
Requirements to run the program:
-
Clone the repository:
git clone https://github.com/RAYANEPROGRAMMER/RAPL.git
-
Run the R.A.P.L. shell:
python shell.py
Here is a sample R.A.P.L. program that showcases function definitions, loops, and string manipulations:
# This is a very useful piece of software
def oopify(prefix) -> prefix + "oop"
def join(elements, separator)
let result = ""
let itm_len = len(elements)
for i = 0 to itm_len then
let result = result + elements/i
if i != itm_len - 1 then let result = result + separator
end
return result
end
def map(elements, func)
let new_elements = []
for i = 0 to len(elements) then
append(new_elements, func(elements/i))
end
return new_elements
end
print("Greetings universe!")
for i = 0 to 5 then
print(join(map(["l", "sp"], oopify), ", "))
end
This program:
- Adds
"oop"to each string element. - Joins a list of strings with a separator.
- Applies a function to each element of a list.
- Prints the modified list multiple times.
Basic Hello world program:
let message = "Hello World!"
print(message)
This program:
- Print 'Hello world' to the terminal.
This is a screenshot from inside VSCode of the example code:
The syntax highlighting is part of an extension that is still under development and not ready for release.
For a full list of commands, refer to the Commands file in the repository. Below are some key commands:
- let: Defines a non-constant variable.
- def: Declares a function.
- for/while: Loops through code blocks.
- if/elif/else: Conditional logic.
- return: Exits a function with an optional return value.
For the complete list and detailed descriptions, check the Commands.md file in the repository.
To run a R.A.P.L. program, follow these steps:
-
Write your R.A.P.L. code in a file with the
.raplextension (e.g.,program.rapl). -
Run the R.A.P.L. shell:
python shell.py
-
Inside the R.A.P.L. shell, run your program with:
run("program.rapl")
Note:
Paths such as C:\Users\pc\Desktop\example_HelloWorld.rapl won't work; instead, use C:/Users/pc/Desktop/example_HelloWorld.rapl.
This occurs because the program doesn't handle the \ character; instead use /.
This will execute your R.A.P.L. program within the custom shell.
R.A.P.L. is still in development. Contributions, bug reports, and suggestions are welcome! To contribute:
- Fork the repository.
- Make your changes.
- Submit a pull request.
- Rayan Berrabah - Github
This project is licensed under the MIT License - see the LICENSE file for details