# Going High with Ryton: Keeping the Familiar, Getting the New

HelloRe Zig Community!
And I’m not empty-handed again!
in this article I will tell you more about Ryton and its integration and joint use with Zig :sunglasses:

Ryton offers a unique approach for developers who want to leverage high-level programming capabilities while maintaining a familiar syntax and ecosystem.

nice and similar syntax

module import {
   std.UpIO[echo]
   std.RunTimer:rt
}

func calculate_sum(x, y) !final { // final metamodifier
   return x + y
}

pack Calculator { // create a class /here it is called pack/
    init {
        this.value = 0
    }

    <rt.timeit> // decorator for measuring the execution time of a function
    func add(x) => this.value += x // one-line function

    func print(text) => echo(text, 10) // prints text 10 times
}

High-level features

Metaprogramming via macros and hyper functions:

hyperfunc DataProcessor :: StreamHandler {
    func process(data) {
        // High-level data processing
        result = transform(data)
        this.emit(result)
    }
}

macro macro_example {
    // Macro code
}

Built-in DSL support:

module import {
    std.DSL
}

color_dsl = DSL.create_dsl("ColorDSL")
color_dsl.add_command("RGB", rgb_to_hex)
color_dsl.add_command("BLEND", blend_colors)

Reactive programming and event system:

reactive.stream {
    filter(x > 0)
    transform(x * 2)
} -> handler

event a -> b {
    print('a = b')
}

Performance saving

When you need maximum performance, use the built-in Zig:

#ZigModule(
    pub fn fastCalc(x: i32) i32 {
        return x * 2;
    }
) -> fast_math // .so library is compiled and loaded for use in ryton

fast_math.fastCalc(5) // use in ryton

Benefits of the transition

  • Modern language features
  • Preservation of familiar syntax
  • Access to Python and JVM ecosystems
  • High performance via Zig
  • Built-in GUI support via RuVix

Ryton allows you to gradually master high-level concepts, while maintaining a comfortable development environment and the productivity of system programming.

you can support the project with a star - GitHub - CodeLibraty/RytonLang: RU: Ryton - современный, мульти-парадигменный и мульти-платформенный язык программирования высокого уровня, который делает правильное простым, а сложное - понятным. EN: Ryton is a modern, multi-paradigm, and multi-platform high-level PL that makes what's right simple and what's complex understandable.
I will be grateful for any support and feedback :3

other social networks networks:

project website:

  • (I was not allowed to insert the third link)
    PS: the site has not been updated yet and there is outdated information only in Russian. Since I am the only one in the team, I do not have time to update and translate the site and documentation :confused: