Skip to main content
Version: Next

Install Guide

GitHub release

Installation​

macOS​

brew install flipez/homebrew-tap/rocket-lang

APT​

echo "deb [trusted=yes] https://apt.rocket-lang.org/ /" > \
/etc/apt/sources.list.d/fury.list

RPM​

[fury]
name=RocketLang Repo
baseurl=https://rpm.rocket-lang.org
enabled=1
gpgcheck=0

Manual​

Download from releases.

There is also a Visual Studio Code Extension available. Just search for rocket-lang in the extension menu.

Running a program​

rocket-lang program.rl # run a file
rocket-lang -e 'puts("hi")' # run the code given
rocket-lang # start the REPL

Exit codes​

👉 Before 0.24 everything exited 0, including a crash

Exit code
the program ran0
an error nothing handled1
the program did not parse1
the file could not be read1
OS.exit(n) or OS.raise(n, …)n

So rocket-lang build.rl && deploy.sh no longer runs the deploy after a crash.

An error the program handles is not a failure — begin/rescue succeeding exits 0, and so does a conversion answering nil, which is what nil is for:

begin
1 / 0
rescue e
puts("handled")
end
// exits 0

Diagnostics — a parse error, an unreadable file — go to standard error. The program's own output, and the value it ends on, go to standard output.