Overview

Using Rye*

Rye binary tries to not be just a language runtime, but a useful tool. The console also tries to be more than just REPL, but also place where you can explore and introspect tha language and your ideas.

Rye Executable

Using the Rye binary as a command-line tool.

More on flags

Rye Command Line Flags

Rye is a versatile programming language with a rich set of command line flags that can be combined in various ways to enhance your development experience. This guide explores the many flags available in Rye and demonstrates how they can be used together to solve different problems.

Basic Command Line Flags

Flag Description
-do <code> Evaluates Rye code after loading a file or last save
-sdo <code> Same as -do but in silent mode (doesn’t display return values)
-lang <dialect> Select a dialect/language (rye, eyr, math)
-ctx <context> Enter a specific context or context chain
-silent Console doesn’t display return values
-stin <mode> Inject first value from stdin (modes: no, all, a)
-console Enters console after a file is evaluated
-dual Starts REPL in dual-mode with two parallel panels
-template Process file as a template, evaluating Rye code in {{ }} blocks
-help Displays help message
Flag Description
-seccomp-profile <profile> Seccomp profile to use: strict, readonly
-seccomp-action <action> Action on restricted syscalls: errno, kill, trap, log

Command Patterns

Rye supports several command patterns:

Console

The Rye console is an interactive environment for evaluating Rye code and exploring the language. It provides specialized functions for navigating contexts, discovering available functions, and understanding the structure of your program’s environment.

Entering the Rye console

When you start Rye with the rye command, you enter the interactive console. A new context is created with the builtin functions available as the parent context.

$ rye
Welcome to Rye console
x> ; your cursor will be here

Exploring contexts

The Rye environment is organized around contexts - containers for words (variables and functions). You can navigate and explore these contexts using console-specific functions.