Presentation is loading. Please wait.

Presentation is loading. Please wait.

Clojure: Why is it interesting?

Similar presentations


Presentation on theme: "Clojure: Why is it interesting?"— Presentation transcript:

1 Clojure: Why is it interesting?
C. Loomis (CNRS/LAL) Lancement du réseau LoOPS (LAL) 31 mai 2012

2 Contents Facts Interesting Features Use Cases Conclusions
Pan language compiler StratusLab cloud client Conclusions 31 May 2012 Clojure (C. Loomis)

3 Clojure Facts It is LISP! And… More info: http://clojure.org/
Functional: but not overly strict about it Dynamic: supports macros & dynamic compilation Syntax: (func arg1 arg2) but also with [] and {} And… Very active community in US and Europe Exposes underlying hosting platform! More info: 31 May 2012 Clojure (C. Loomis)

4 Simple Example (defn cfg-file
"Find the user configuration file to use. The method first looks in the current working directory, then in the .stratuslab directory within the user's home directory. The filename is expected to be stratuslab-user.cfg." [] (first (filter #(.exists %) [(io/file (System/getProperty "user.dir") "stratuslab-user.cfg") (io/file (System/getProperty "user.home") ".stratuslab" "stratuslab-user.cfg")]))) 31 May 2012 Clojure (C. Loomis)

5 Hosting Environments Java Virtual Machine (JVM)
Excellent interoperability with Java Uses JVM capabilities and optimizations ClojureScript  JavaScript (src to src) Lose dynamic compilation Gain browser programming Common Language Runtime (CLR) Seems to be least used of the three 31 May 2012 Clojure (C. Loomis)

6 Interesting Features Software Transactional Memory
“ACI” but not “D” for databases Persistent Data Structures Everything immutable (list, vector, map, set) Lock-free Concurrency Atoms, refs, agents, futures, promises Interoperability with Java Provides strong set of libraries 31 May 2012 Clojure (C. Loomis)

7 Pan Language Compiler Part of the Quattor Toolkit (quattor.org) that transforms a site configuration to machine profiles (usually in XML) Persistent data structures to minimize memory footprint Concurrency mechanisms for eliminating manual lock management from code base Memoization for transparent caching Dynamic compilation to allow user extensions 31 May 2012 Clojure (C. Loomis)

8 StratusLab Cloud Client
All services are REST or XMLRPC services that can easily be accessed from any client Try external http, xmlrpc, and “ini” file libraries REPL to provide simple cloud interactive shell Simple federation of multiple sites Possible integration with “clojure-control” to act on multiple machine instances simultaneously Use of “watchers” to simplify interactions with machines 31 May 2012 Clojure (C. Loomis)

9 Conclusions Simple syntax and powerful abstractions allow for concise implementations Many promising features for simplifying multithreaded programming Large and active community working on language and on libraries Possibility to have a “road show” in Paris region and/or clojure users’ group if there is enough interest 31 May 2012 Clojure (C. Loomis)


Download ppt "Clojure: Why is it interesting?"

Similar presentations


Ads by Google