Install Guide
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 'print("hi")' # run the code given
rocket-lang # start the REPL
Exit codes​
👉 Before
0.24everything exited0, including a crash
| Exit code | |
|---|---|
| the program ran | 0 |
| an error nothing handled | 1 |
| the program did not parse | 1 |
| the file could not be read | 1 |
OS.exit(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
print("handled")
end
# exits 0
Diagnostics — a parse error, an unreadable file, an uncaught error — go to standard error. Only the program's own output goes to standard output: a script does not print the value it ends on, unlike the REPL, which echoes it.