Ry is a stupid vibe coded over engineered register based and direct threaded vm in c++ which offers you a lazy gc
- Intelligent Error Reporting: Beautiful, color-coded error messages with caret pointers (
^~~) and tracebacks to show you exactly where things went wrong. - Smart REPL: A dynamic interactive shell with auto-indentation tracking and colorized prompts.
- Not even built for Stability: A nonmemory-conscious C++ core that doesn't respect your hardware limits.
- Overengineered version of Ry1: An optimized core interpreter using bytecode and registers with direct threading support.
Ry is not built to be efficient. With an unoptimized custom c++ core that uses custom bytecode without external tools like flex, bison, antlr or llvm.
Ry comes with a built-in installer for Linux and Windows systems.
Note: To install the Ry language you need the following tools:
- GCC: A compatible g++ compiler(should be above c++20)
- CMAKE: The CMAKE build system generator for generating make or any build system files
- BUILD SYSTEM: A build system like make (I prefer using
ninjasince it's fast and it's the default I use)
- Clone the repository:
$ git clone https://github.com/johnryzon123/Ry2.git $ cd Ry2 - Build and Install:
$ chmod +x scripts/install.sh
$ ./scripts/build.sh
$ ./scripts/install.shThe REPL
Simply type ry to enter the Read Evaluate Print Loop (REPL).
$ ry
Ry (Ry's for you) REPL - Bytecode Edition
ry> out(0 to 10)
0..10
ry>Running a Script
$ ry run script.ry# Error reporting example
{
print("Hello World") # Ry uses out() instead of print()
# Missing brackets or typos will be caught with helpful red pointers!ry> _3()
Traceback (most recent calls)
- in file <main script>
-> at line 2 in "_1"
-> at line 2 in "_2"
-> at line 2 in "_3"
-> at line 1 in "main"
Error: NameError: Undefined variable 'dwad'.
2 | return _2()
| ^~~This project is licensed under the MIT License - see the LICENSE file for details.
