For MacOS users only
Because, for various reasons, I often have long breaks between roc programming sessions. Often I forget how to install the latest version of roc and where I put the dam update script. To prevent this from happening again, I have ported my little script to a MacOS Shortcut. Nothing fancy, but it helps me to spend the little time I have coding in roc instead of trying to get the latest version.
Normally you can share Shortcuts, but it is currently broken for me, so I took a screenshot for anyone who wants to build it for themselves.
image.png
I did something similar for my Mac M2 Max running Sonoma 14.2 - I'm using bash, so I put this in my ~/.bashrc
file:
# Roc programming language: https://www.roc-lang.org/
alias getroc='pushd ~/Downloads && curl -OL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz'
installroc() {
pushd /usr/local
sudo rm roc
sudo tar xf ~/Downloads/roc_nightly-macos_apple_silicon-latest.tar.gz
sudo ln -s $(ls -1 | grep roc | tail -1) roc
popd
roc version
}
export PATH=${PATH}:/usr/local/roc
Then to use it, I type "getroc" followed by "installroc".
See this thread for some one liners to install Roc: https://roc.zulipchat.com/#narrow/stream/231634-beginners/topic/roc.20nightly.20install.20script/near/372762807
Now that the lsp is included in the tar file, I'll see how to modify it to also extract the lsp
Last updated: Jul 06 2025 at 12:14 UTC