You need to use Cygwin in order to run OCaml. Since those distributions are deprecated, trainings are not tested on those OS.
I highly recommend to use the linux distribution that the university provides you.
You are accountable to make your environment work if you choose to use it despite this warning.
You need to :
- Install Windows Subsystem for Linux a.k.a WSL
- Install your Linux distribution. If you're not accurate with linux you would install Ubuntu 20.
- Install vscode for WSL
- Install OCaml Platform plugin : https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
If you have space in your username, you're doomed ¯_(ツ)_/¯ ; use Linux or try WSL2 (require a Windows Insider Program account)
- Install terminator :
sudo apt-get install terminator
- Install Oh-My-Zsh :
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
If you encounter trouble about certificates when using
wget
you probably should installca-certificates
package :sudo apt-get install ca-certificates
- Install vscode : https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions
- Install OCaml Platform plugin : https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
You may lack some tooling :
sudo apt install build-essential
You will need a libc >= 2.7. Check the version with
ldd --version
. If you have a version below 2.7, it means your distribution is too old, upgrade it or rebuild libc (advanced).
- Install iTerm2 :
brew cask install iterm2
- Install Oh-My-Zsh :
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Install vscode :
brew cask install visual-studio-code
- Install OCaml Platform plugin : https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
Choose one of thoose
This solution should be the default while you using a computer with x86_64 architecture (so neither an Apple M1 nor other ARM processors)
- Install Docker: https://code.visualstudio.com/docs/remote/containers#_system-requirements
- On MacOS or Windows, start Docker Desktop.
- Install vscode remote development plugin https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack
- All projects come with
.devcontainer
folder. Reopen the project in container
That's it !
This solution is convenient if you work on old computer or from different computers
- Create a https://gitpod.io account
- Install gitpod browser extension https://www.gitpod.io/docs/browser-extension
- Create your workspace
- You may develop inside your browser or install vscode gitpod plugin https://www.gitpod.io/docs/develop/vscode-desktop-support
That's it !
This solution should be the default if you are using a MacOS with M1 processor. In other case you are accountable to make it works with Windows + WSL or Linux, there is to many Linux and setup to maintain this doc for alls
esy.sh is a rapid workflow for developing ReasonML or OCaml projects, inspired by npm.
- It provides an unique CLI to manage many tools
- It supports native packages hosted on opam and npm.
- It uses Dune build system.
- It eases the project settings with a main manifest
package.json
. - It sandboxes dependencies per project;
- It simplifies Dune's configuration with pesy
We first need to install esy with npm
-
Install NVM :
-
wget -O- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
OR
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
-
-
Install node LTS :
nvm install --lts
-
Update npm :
npm i -g npm
npm i -g esy
Congratulation you're ready to start the Kata