Ring Language Example: Hello World

Our first program will print the classic “hello world” message. Here’s the full source code.

package main
import {
    fmt;
}
@main
function main() {
    fmt::println_string("Hello, world!");
}

To run the program, put the code in hello-world.go and use go run.

$ ring run hello-world.ring
hello world