Skip to content

Commit

Permalink
Update Atom ProtoREPL and Proton development tools
Browse files Browse the repository at this point in the history
Updated to use the simple tabs plugin to provide a simple way to separate the
unique install steps for each operating system.

Added installation instructions for all operating systems.

Added details on how to run and test the installation.
  • Loading branch information
practicalli-johnny committed Oct 11, 2018
1 parent a8a861f commit b29e3f5
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 32 deletions.
32 changes: 18 additions & 14 deletions development-environment/index.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
# Clojure development environment guides

If you wish to continue discovering Clojure after the ClojureBridge London event, we can help you set up development tools on your laptop.
Coaches can help you set up development tools on your laptop if you wish to continue discovering Clojure after the ClojureBridge London event.

You will need:
## Common tools required

* **Java standard edition (SE)** - Clojure runs on top of Java. The Java Runtime Enviromment (JRE) is needed to run Clojure .
* **Leiningen** - a tool for running Clojure programs, also creating & managing Clojure projects
* **Git** - versioning your Clojure code (so you can go back to earlier versions if you make a mistake)
* **A Clojure aware Editor** - one of several editor choices that support the Clojure programming language
| Tool | Is it installed? | Install guide |
|-----------------|------------------|-------------------|
| Java 8 or above | `java -version` | Java install |
| Leiningen | `lein version` | Leiningen install |
| Git | `git --version` | Git install |

> #### Hint::
> If you just wish to save your code, you can use any editor you prefer or paste it into [Github gists](https://gist.github.com/)
Clojure is a hosted language and runs on top of Java or JavaScript (and other platforms). The Java Runtime Enviromment (JRE) is needed to run Clojure.

Leiningen is a build tool for running Clojure code, creating and managing projects.

Git can be used to version your Clojure code, so you can go back to earlier versions if you make a mistake.


## Clojure aware editors

There are several editors that support Clojure development:
Use one of the following editors

* [LightTable](https://github.com/ClojureBridgeLondon/curriculum/blob/gh-pages/outline/setup.md) - great for those new to Clojure (default choice)
* [Atom & Protorepl](https://atom.io/packages/proto-repl#installation) - typically used by web & Javascript developers
* [Atom.io](https://atom.io/) and the [protoREPL](https://atom.io/packages/proto-repl#installation) package - typically used by web & Javascript developers
* [Emacs](https://cider.readthedocs.io/) - for developers that love Emacs
* [Microsoft VS Code](https://code.visualstudio.com/) with [Calva](https://marketplace.visualstudio.com/items?itemName=cospaia.clojure4vscode) extension.
* [Spacemacs](http://spacemacs.org/) - for developers that love Emacs & Vim ([Spacemacs & Clojure book](https://practicalli.github.io/spacemacs/install-spacemacs/) - work in progress)
* [IntelliJ & Cursive](https://cursive-ide.com/userguide/) - typically used by Java developers
* [Microsoft Code](https://code.visualstudio.com/) with [clojureVScode](https://marketplace.visualstudio.com/items?itemName=avli.clojure) or [Clojure Code](https://marketplace.visualstudio.com/items?itemName=jamesnorton.continuum) plugins
* [LightTable](https://github.com/ClojureBridgeLondon/curriculum/blob/gh-pages/outline/setup.md) - great for those new to Clojure (default choice)


> #### Hint::
> If you are new to development of any kind, then we suggest [LightTable](https://github.com/ClojureBridgeLondon/curriculum/blob/gh-pages/outline/setup.md)
> #### Hint:: Just saving your code
> If you just wish to save your code, you can use any editor you prefer or paste it into [Github gists](https://gist.github.com/)
4 changes: 4 additions & 0 deletions development-environment/install-atom-protorepl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Install Atom.io and ProtoREPL


[![Atom ProtoREPL in action](/images/protrepl-animated.gif)](/images/protrepl-animated.gif)
66 changes: 48 additions & 18 deletions development-environment/install-guides/proton.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Atom Proton

> #### TODO:: work in progress, corrections and pull requests welcome

[Proton-mode](https://github.com/dvcrn/proton) gives a Spacemacs-like experience to the Atom editor

Expand All @@ -12,31 +11,57 @@ Proton-mode provides a mnemonic menu and set of keybindings that offer an effect

Follow the instructions for your operating system

{% tabs first="Debian/Ubuntu", second="MacOSX", third="RedHat", forth="Windows" %}

<!--sec data-title="Ubuntu Linux" data-id="ubuntulinux" data-collapse=true ces-->
Download the latest `.deb` file from Atom.io
{% content "first" %}
The standalone install is the simplest option. However, using the package manager approach will simplify updating Atom.io to new versions.

### Standalone Install
Download the latest `.deb` file from [Atom.io](https://atom.io)

Once downloaded, double-click the `.deb` file to install.


### Via Package Manager
Add the official Atom package repository to your system by running the following commands in a terminal window:

```bash
curl -sL https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
sudo apt-get update
sudo apt-get install atom
```

### Running Atom
To run atom, press the `Super` key and type `atom`, or open a terminal and type the command `atom`.
<!--endsec-->

<!--sec data-title="RedHat Linux" data-id="redhatlinux" data-collapse=true ces-->

{% content "second" %}

Download the [`atom-mac.zip`](https://github.com/atom/atom/releases/latest) file.

Open the `atom-mac.zip` file (double click) and drag the Atom application into your "Applications" folder.

See [Installing Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/#platform-mac) for troubleshooting and further details.

{% content "third" %}
Download the latest `.rpm` file from Atom.io

Once downloaded, double-click the `.rpm` file to install.

To run atom, press the `Super` key and type `atom`, or open a terminal and type the command `atom`.
<!--endsec-->

<!--sec data-title="MacOSX" data-id="macosx" data-collapse=true ces-->
Pull request welcome
<!--endsec-->
See the [Atom guide for Fedora](https://flight-manual.atom.io/getting-started/sections/installing-atom/#red-hat-and-centos-yum-or-fedora-dnf) if you wish to use the package manager instead.


{% content "forth" %}
Downloaded [`AtomSetup.exe`](https://github.com/atom/atom/releases/latest) Windows Installer.

<!--sec data-title="Windows" data-id="windows" data-collapse=true ces-->
Pull request welcome
<!--endsec-->
Open the `AtomSetup.exe` installer and follow the instructions.

This will install Atom, add the `atom` and `apm` commands to your PATH and create a shortcut in the start menu.

{% endtabs %}

## Install Proton

Expand All @@ -58,22 +83,27 @@ Recommended packages

We have created an example Clojure project called "Welcome To ClojureBridge" to test your development tools.

<!--sec data-title="Download project as a zip file" data-id="gitzip" data-collapse=true ces-->
{% tabs fifth="Download project as zip file", sixth="Clone project from Github" %}

{% content "fifth" %}
[Download the "Welcome To ClojureBridge" zip file](https://github.com/ClojureBridgeLondon/welcometoclojurebridge/archive/master.zip) and extract all the files.
<!--endsec-->

<!--sec data-title="Clone the project from Github" data-id="gitclone" data-collapse=true ces-->

{% content "sixth" %}
If you are comfortable using the git version control tool and the command line, then you can clone the project using git

```bash
git clone https://github.com/ClojureBridge/welcometoclojurebridge
```
<!--endsec-->

{% endtabs %}

## Test your editor with a clojure project

`SPC f f` and navigate to the `core.clj` file in the `welcometoclojurebridge` project.
Add the project called `welcometoclojurebridge`.

Open the `src/welcometoclojurebridge/core.clj` file.

`Ctrl-Alt-, s` to start a Clojure REPL and display the REPL in a new window.

`, s i` to start a Clojure REPL and display the REPL in a new window.
You should see a friendly message from the ClojureBridge team.
108 changes: 108 additions & 0 deletions development-environment/install-guides/protorepl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Atom.io and ProtoREPL

Proto REPL is a Clojure development environment and REPL for Atom.io.

[![Atom and ProtoREPL](/images/atom-protorepl-demo.gif)](/images/atom-protorepl-demo.gif)


## Install Atom.io

Follow the instructions for your operating system

{% tabs first="Debian/Ubuntu", second="MacOSX", third="RedHat", forth="Windows" %}

{% content "first" %}
The standalone install is the simplest option. However, using the package manager approach will simplify updating Atom.io to new versions.

### Standalone Install
Download the latest `.deb` file from [Atom.io](https://atom.io)

Once downloaded, double-click the `.deb` file to install.


### Via Package Manager
Add the official Atom package repository to your system by running the following commands in a terminal window:

```bash
curl -sL https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
sudo apt-get update
sudo apt-get install atom
```

### Running Atom
To run atom, press the `Super` key and type `atom`, or open a terminal and type the command `atom`.


{% content "second" %}

Download the [`atom-mac.zip`](https://github.com/atom/atom/releases/latest) file.

Open the `atom-mac.zip` file (double click) and drag the Atom application into your "Applications" folder.

See [Installing Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/#platform-mac) for troubleshooting and further details.

{% content "third" %}
Download the latest `.rpm` file from Atom.io

Once downloaded, double-click the `.rpm` file to install.

To run atom, press the `Super` key and type `atom`, or open a terminal and type the command `atom`.

See the [Atom guide for Fedora](https://flight-manual.atom.io/getting-started/sections/installing-atom/#red-hat-and-centos-yum-or-fedora-dnf) if you wish to use the package manager instead.


{% content "forth" %}
Downloaded [`AtomSetup.exe`](https://github.com/atom/atom/releases/latest) Windows Installer.

Open the `AtomSetup.exe` installer and follow the instructions.

This will install Atom, add the `atom` and `apm` commands to your PATH and create a shortcut in the start menu.

{% endtabs %}

## Install Proto REPL package

Open the Atom Settings. In the install section, search for each of the required packages and install them. If you have time, also install the recommended packages.

Required packages

* [ink](https://atom.io/packages/ink) - Proto REPL dependency used for inline display and the REPL output.
* [proto-repl](https://github.com/jasongilman/proto-repl) - Clojure REPL, autocompletion, etc.

Recommended packages

* [lisp-paredit](https://atom.io/packages/lisp-paredit) - to manage your `()`
* [proto-repl-charts](https://github.com/jasongilman/proto-repl-charts) - graphs and charts
* tool-bar - displays a REPL tool bar
* highlight-selected - highlights selected keywords throughout an editor


## Download the sample project

We have created an example Clojure project called "Welcome To ClojureBridge" to test your development tools.

{% tabs fifth="Download project as zip file", sixth="Clone project from Github" %}

{% content "fifth" %}
[Download the "Welcome To ClojureBridge" zip file](https://github.com/ClojureBridgeLondon/welcometoclojurebridge/archive/master.zip) and extract all the files.


{% content "sixth" %}
If you are comfortable using the git version control tool and the command line, then you can clone the project using git

```bash
git clone https://github.com/ClojureBridge/welcometoclojurebridge
```

{% endtabs %}

## Test your editor with a clojure project

Add the project called `welcometoclojurebridge`.

Open the `src/welcometoclojurebridge/core.clj` file.

`Ctrl-Alt-, s` to start a Clojure REPL and display the REPL in a new window.

You should see a friendly message from the ClojureBridge team.
Binary file added images/atom-clojure-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/atom-protorepl-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b29e3f5

Please sign in to comment.