Leiningen allows you to:
- Create projects
- Manage dependencies (uses mvn local cache)
- Package projects into libraries
- Generate Maven POM files (if you must)
- Deploy your libraries on Clojars
- Run the REPL
Must have the Java JDK (not just the JRE)
- this is a requirement for any Clojure development
Time for some live hacking…
- Create a new project
lein new project-name
- Check dependencies and download any required
lein deps
- Run a REPL
lein repl
- Find out more
lein help
A basic Leiningen project definition
(defproject whats-my-salary "0.1.0-SNAPSHOT"
:description "Calculate salary after tax for perminant employees"
:url "http://blog.jr0cket.co.uk"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]]
:main whats-my-salary.core )
Colourful code
(defn show-me-the-colours [colour]
( str "The colour of money is" colour))
Emacs is a powerful tool for your developer life, its a nice editor too…
- development environments for lots of languages
- manage tasks, take effective notes and create presentations
- Ubuntu: Personal Package Archive for latest version
- MacOSX: EmacsForMacOSX.com or via Homebrew
- Windows: pre-compiled version available
Creates an amazing environment for Clojure development
- keeping () under control with ParEdit
- starting / connecting to a REPL
- evaluating code in-line (C-x C-e) or all the code (C-c C-k)
- syntax highlighting & auto-complete
- gloriously colourful themes
Add the following Emacs packages
clojure-mode clojure-test-mode rainbow-delimiters ac-slime
Look at my basic setup on clojuremadesimple.co.uk
Configuring Emacs is via a Lisp language called ELisp
- practice your core Clojure skills by tweaking Emacs
- lots of examples of Lisp code on Github
A project to create a great experience for Clojure Development
- instarepl
- start / connect to multiple REPL’s
- written in Clojurescript & a few lines of Clojure
- run browser & graphics in a window
- also supports Clojurescript, JavaScript & Python
- still beta, not officially release as yet
- join light-table-discussion Google group to keep up with changes
LightTable.com - binaries for Linux (32bit & 64bit), MacOSX & Windows
Built in documentation
Chris Granger’s blog - major announcements & a few guides
code.google.com/p/counterclockwise
A great combo if you are used to Eclipse
- uses Leiningen underneath
- provides a REPL window
- usual syntax highlighting and other IDE stuff
Sadly the Enclojure plugin for Netbeans is depreciated
The Enclojure code is available on Github, if you want to kickstart the project.
Getting started with La Clojure
- search for libraries
- gives you dependencie definitions
- Midje - TDD testing framework
- clj-time - date/time library, wrapper around joda time
- compojure - used to help build webapps with Ring
- drawbridge - connect to your REPL and your webapp
- brevis - artifical life generator
- Incanter - statistical programming & data visualization
(false? (afraid brackets))
- Join in the fun at London Clojurians
- Learn Clojure on the Internet
- Read some Clojure books
An increasingly difficult set of changenges to help you understand Clojure
- Clojure Made Simple (ebook) - £1.99 on Amazon.co.uk
- Joy of Clojure
- Clojure Programming
- Programming Clojure - 2nd edition
Planet Clojure - blog aggregator
blog.jr0cket.co.uk - Clojure, Emacs & Git articles
clojure.org - official documentation
clojuredocs.org - community docs & examples
Clojure Cheatsheet - quick syntax & function reference
Get Leiningen
Use Emacs, LightTable or your favourite IDE
Have fun in the REPL and love writing Clojure
ps. This presentation was brought to you via Emacs & Revealjs
Org-Reveal knows how to drill down into a subject.
Press the “Down” key on the page or the down arrow
- Create
- Fragment
- At Ease
#+ATTR_REVEAL: :frag
* Create
* Fragment
* At Ease
Change slide style to wake up the sleepy audience.
So do Org-Reveal.
** Reveal.js Can Alert
:PROPERTIES:
:reveal_data_state: alert
:END:
Write equations in Org. Present equations in HTML5.
$limx → ∞ exp(-x) = 0$
$\lim_{x \to \infty} \exp(-x) = 0$
Get Org source text for this presentation here.
- Reveal.js on GitHub:
https://github.com/hakimel/reveal.js - Org-reveal on GitHub:
https://github.com/yjwen/org-reveal