Skip to content

alexandrst88/clojure-hacking-day

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Clojure Hacking Day

Repository of related materials

Table of contents

Why Lisp?

  • Ex­pres­sive­ness — when a language allows you to put more meaning with less code. It is not just about con­ci­sion, but also pre­ci­sion, read­abil­ity, flex­i­bil­ity and po­ten­tial for abstraction.
  • Everything is an expression. Most languages has both statements and expressions, which you can not really combine together, but in Lisp everything is an expression. A single uniform interface allows to compose everything naturally. Take for example Lego blocks: you can build whatever you want easily because those blocks are following the same rule of composition.
  • An ex­pres­sion is ei­ther a sin­gle value or a list. There are single values like strings and numbers. But function calls and list data structure are all lists. So basically the whole point of writing a Lisp program is to combine together lists of lists and single values. This gives the same power of composition similar to expressions.
  • Func­tional pro­gram­ming. Lisps are considered to be functional languages (there are also OOP capabilities). It means they are focused on avoiding data mutation and state. This allows developers to build truly reusable components and structure programs in a clean way. You can see that all new programming languages are mostly functional, so we can say that functional programming style has proved to be a good tool when building software.

The list above is inspired by an article “Why Racket? Why Lisp?”.

What are we going to do?

We are going to build a chat web application in ClojureScript using Rum library.

If you are not familiar with Lisps and Clojure, make sure to go through previous workshop exercises and watch a screencast:

Also take a look at Rum library to get the general idea of it.

Requirements

It's nice to know the following...

Preparation

You have to be prepared for the workshop, so we don't have to waste time for this.

Java

Make sure you have Java 1.6 or greater.

Leiningen

Install via Homebrew: brew install leiningen or other package managers.

Or using shell script:

  1. Download the lein script (or on Windows lein.bat)
  2. Place it on your $PATH where your shell can find it (eg. ~/bin)
  3. Set it to be executable (chmod a+x ~/bin/lein)
  4. Run it (lein) and it will download the self-install package

Or with Windows installer.

Readline wrapper

brew install rlwrap

or

  1. Clone the repo: https://github.com/hanslub42/rlwrap
  2. Execute
./configure
make
make install

Configure your editor

Atom

Follow this manual. You don't have to install and configure everything, the important parts are: Parinfer plugin, language-clojure settings, lisp-paredit settings and Atom Settings sections.

Sublime Text

Vim

Links

Books

Job Boards

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 44.0%
  • HTML 31.1%
  • CSS 24.9%