NOTE: You should follow this page even if you took the Functional Programming course last semester, the workflow you’ll follow is similar but not identical to it!
Go to gitlab.epfl.ch and log in with your EPFL account, do this as soon as possible because it will take some time between the account creation and the assignment submission system working for your account.
sudo apt-get install openjdk-8-jdk
sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64
sudo dnf install java-1.8.0-openjdk-devel
macOS either comes with a pre-installed JDK, or installs it automatically. To verify your JDK installation, open the Terminal and type java -version
. If the JDK is not yet installed, the system will ask you if you would like to download and install it. Make sure you install Java 1.8.
Download and run the JDK 8 installer for Windows from Oracle’s website.
In a terminal, run:
java -version
The version number displayed on the first line should start with 1.8
. If this is not the case, then the wrong version of Java is on your $PATH
.
See https://www.java.com/en/download/help/path.xml for information on how to change this.
sbt
is the build tool we use to compile and run Scala programs.
See https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html.
First, install Homebrew from https://brew.sh Then run:
brew install sbt@1
Download and run https://piccolo.link/sbt-1.2.7.msi
git is a version control system.
See https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Once git is installed, please run:
git config --global core.autocrlf false
VSCode is the IDE we strongly recommend using for this class (you are free to use any editor you want, but we won’t don’t have the resources to help you configure it for Scala).
See https://code.visualstudio.com/docs/setup/linux
See https://code.visualstudio.com/docs/setup/mac. Make sure to follow both the “Installation” and “Launching from the Command Line” parts of the setup!
See https://code.visualstudio.com/docs/setup/windows. Make sure that the checkbox “Add to PATH (available after restart)” in the installer is checked.
Run:
code
VSCode is correctly installed if this opens a window, you can then close this window.
To submit assignments, you will need an SSH key. If you don’t already have one, here’s how to generate it:
sudo apt-get install openssh-client
Nothing to do, OpenSSH is pre-installed
The simplest solution is to have an up-to-date Windows 10 and follow https://www.howtogeek.com/336775/how-to-enable-and-use-windows-10s-built-in-ssh-commands/.
ssh-keygen -t rsa -b 4096 -C "youremail@example.com"
The command will then ask for a location, which you can leave as the default. It will then also ask for a passphrase to encrypt your private key, which you may leave empty. If you don’t, make sure to remember your passphrase!
To be able to push your code, you’ll need to add the public part of your key on Gitlab:
id_rsa.pub
file created by the ssh-keygen
command you just ran (when the command was ran it printed the location where this file was saved).Add key
The description of the example assignment contains critical information to properly use the tools you just installed, don’t miss it!