Preparing for the Clojure Workshop

Available languages: English, Português

Please install the following software on your laptop computer prior to the workshop. We want to avoid spending our time downloading and installing software. We’d much rather spend our time using Clojure instead!

Prerequisites and Assumptions

The follow steps assume you are familiar with using the command line on either Mac or Windows. If you have not used the command line before, watch one of these videos to learn the basics:

Mac: Absolute BEGINNER Guide to the Mac OS Terminal

Windows: Mastering Command Prompt Basics

Overview

To work with Clojure, you will need to install:

  1. Java. Clojure is built on top of the Java, so it must be installed to run Clojure.
  2. The Clojure compiler and command-line tooling
  3. A programming editor along with Clojure specific plugins. For the workshop, we will use VS Code with the Calva plugin (for Clojure support)

Installation

Mac install for the Java and Clojure

  1. Install the Homebrew package manager:
    1. Visit https://brew.sh/
    2. Run the shell command under “Install Homebrew” and follow the instructions
  2. Use Homebrew to install the JVM.
    1. Run: brew install --cask temurin
    2. Verify it installed correctly by running: java -version
  3. Use Homebrew to install Clojure
    1. Run: brew install clojure/tools/clojure
    2. Verify it installed correctly by running: clojure -version

For additional help and information, see:

Windows install for Java and Clojure

  1. Download and install the latest Temurin version of Java.
    1. Go to https://adoptium.net/
    2. Download the installer and run it.
  2. Download and install the latest version of Clojure
    1. Go to https://github.com/casselc/clj-msi/releases
    2. Download the MSI installer and run it (eg. “clojure-1.12.3.1577.msi”)
  3. Open the windows command line and verify Java and Clojure installed correctly
    1. Run: java -version
    2. Run: clojure -version

For additional help and information, see:

Install VS Code and the Calva Plugin

  1. Download and install VS Code from https://code.visualstudio.com/
  2. Launch VS Code
  3. Install Calva from within VS Code from the extensions panel
    1. Menu at the top: View > Extensions
    2. Search for “Calva”
    3. Install the main plugin
      1. “Calva: Clojure & ClojureScript Interactive Programming”
      2. Be sure to choose “Trust Publisher & Install”
    4. Install “Calva Power Tools”
  4. Make sure Calva is working
    1. Make sure the extensions show up in the “Installed” section in the Extensions panel.
    2. Open the Command Palette (View > Command Palette) and type “Calva” in the box. Verify Calva commands are in the search results

For additional help and information, see:

If you have not used VS Code before, we recommend you watch the video that discusses the basics of using VS Code: https://code.visualstudio.com/docs/introvideos/basics