Euroclojure 2017
Introduction
Clojure enthusiasts from all over the world gathered lately at the biggest European conference regarding this theme again. As every year bevuta was there with three developers, as well. For the second time Berlin was the host. The big cinema hall at the Kulturbrauerei in the beautiful and pulsating Prenzlauer Berg set the stage for talks about the programming language. This is our report for everyone who didn’t get the chance to attend.
This year, two themes appeared repeatedly in talks and conversations: data science and AI/machine learning. Therefore we summarized the talks on these topics and placed them at the front.
Data Science
Although there are programming languages that are more efficient in processing larger amounts of data than clojure, it is fancied by many people working in that area for its data friendliness.
In her talk The Return of Clojure Data Science Elise Huard showed useful tools for the Clojure developer working with larger amounts of data and how to reason about them. She gave an overview of different notebooks and their visualisation capabilities as well as libraries which facilitate data processing.
Also related to data science was Nils Blum-Oeste’s Intro to Probabilistic Programming and Clojure's Anglican, where he showed how data could be evaluated using probabilistic methods. He demonstrated basics of the embedded DSL Anglican and how it can be used for applying Bayesian statistics to your data.
AI/Machine Learning
Artificial intelligence and machine learning was the second big themes that frequently recurred.
Fergal Byrne explained in his talk The Feynman Machine: AI architecture in Clojure/Neanderthal that he wrote with Louise Klodt the architecture of his neuro science based self learning system OgmaNeo. It’s capable of learning how to drive a model car autonomously using a Raspberry Pi 3 only.
With Clojure Tools for Symbolic Artificial Intelligence Saul Johnson presented how he implemented a system in Clojure which can derive conclusions from a set of given rules. Paper and presentation can be read online.
Simon Belak who has spoken at the last EuroClojure, too, trained his evolving neural net to save the princess.
Other interesting talks at EuroClojure 2017
otplike – Erlang/OTP processes and behaviours for Clojure by Alexey Aristov
The otplike project is about
porting some functionalities from Erlang/OTP to Clojure. It allows
creating chains of interdependent asynchronous processes which can
monitor whether their neighbors are still alive and can also restart
them again when needed. This library is based on core.async
and
abstracts away some patterns which one would often manually implement
anyway.
Moving People with Clojure by Abhinav Sarkar and Kartik Gupta
Abhinav and Kartik gave an experience report on how they rebuilt the backend of a motorcycle transport app with 300.000 users in Clojure which was originally written in Go. They showed how they used live data for testing, how they gradually switched over to the Clojure backend while running the system and told about the resulting benefits like easier development and much faster releases of new features.
Building a collaborative web app with ClojureScript by Gijs Stuurman
Based on the idea of Google Docs where a single document can be edited by multiple users at the same time Gijs Stuurman built a collaborative REPL, the CREPL with ClojureScript. With the CREPL you can edit and evaluate clojure code simultaneously in your browser. This tool could be very useful in teaching situations or even when you want to pair program remotely.
Most interesting was his explanations of the operational transformations, a technique for synchronizing the edits of different users. The document basically is just a log in which all the changes are accumulated. However, the logs of each user may diverge. This is where the Operational Transforms algorithm comes into play: it derives operations which can be applied to each diverging history until all of them converge to a common final state.
Dependency Heaven by Alex Miller
Cognitect’s Alex Miller, who was shining at this EuroClojure not only
as master of ceremonies but also as microphone assistant, announced in
his talk as well the new lib
tools.deps
as a new
clojure installer that builds upon that. At that tools.deps
steps up
to rethink the problem of library dependencies which means in context
of the JVM the construction of a classpath. The difference to existing
solutions like Leiningen and Boot is on one hand that tools.deps
-
for the purpose of simplicity - solves this one problem only. On the
other hand it shouldn't be limited to maven dependencies but should
allow to e.g. integrate simple directories with Clojure files. Since
with Clojure 1.9 for the first time there will be a Clojure version
with external dependencies (namely
clojure.spec
), this new
installer in question will use tools.deps
to model
these. Additionally it will install a new Clojure launcher - a script
called clj
. This processes deps.edn
files which describe
dependencies in tools.deps
format to construct a classpath -
comparable to how lein
treats project.clj
and profiles.clj
. Both
tools.deps
as the installer are still under development and it will
take some time until they are ready for production.
spec loves data structures by Michał Marczyk
Michał continued his streak of talks on data structures with a kind of recap of his work so far. In that, he mainly focussed on how generative testing helped uncover bugs in his own and also Clojure’s core data structure implementations over the years. Now he’s a big proponent of clojure.spec’s generative testing capabilities and demonstrated how he’s used it to great effect both to do black-box testing to verify his data structures’ API contracts as well as white-box testing to verify their performance guarantees and internal invariants. Once again, if you are into the nitty-gritty of data structure internals, Michał’s talks are highly recommended.
Simple AND Secure by Joy Clark
Joy talked about the dos and don’ts for implementing a simple and secure web app. She pointed out potential pitfalls and demonstrated some recent attack scenarios.
A example web app by her which will be developed further can be found here.
Tear down this wall - rethink distributed systems by Christian Betz
The speaker propagated to loosen up borders like the one between frontend and backend and develop systems more as a whole keeping the connected modules in mind.
To illustrate this point he showed how at his company big projects
were hosted in just one git repo but then split up into multiple
projects. They implemented shared code as libraries that the
individual projects then depend on. To run multiple projects at the
same they used
lein-monolith
.
Using Clojurescript to launch iOS/Android apps to 1M users by Emin Hasanov
Emin’s talk was based on the question whether React Native is mature enough so that a company which doesn’t have the resources of a company like Facebook could successfully create a cross-platform mobile app with it. To make it even more interesting, he threw ClojureScript into the technology mix, too. This was particularly compelling for us because we recently found ourselves in a similar situation. However, we decided to go with vanilla React Native so as not to risk running into even more obscure bugs. Emin went on to give a very impressive and detailed presentation on the app they built and it seems like they were rewarded for their daring decision.
Unravel your REPL by Paulus Esterhazy
The REPL is a centerpiece of Clojure’s toolbox (or any Lisp’s, really). It has a defining influence on how we interact with our code and thus, Paulus argues, we should care more about improving it. To that effect he started the Unravel project, a featureful and user friendly command line REPL client written in ClojureScript. It uses the unrepl protocol for communication with the host process which enables nice features such as automatic and continuable elision of deeply nested or very long collections. Also, it provides context sensitive documentation similar to e.g. CIDER for Emacs does. If REPLing from the command line is your cup of tea, definitely check it out!
Microservices with Vase and Linkerd by Peter Brachwitz
An often overlooked or underestimated aspect of Microservice architecture is its operational complexity. While Vase claims to be a data-driven, declarative, production quality foundation for Microservices, Peter showed that this is only partially true: In order to actually run Vase-backed Microservices in production, you need a whole lot more than what Vase itself offers, e.g. service discovery, reliable failure detection / recovery and monitoring. He went on to demonstrate that it’s not a lost cause, though. Applying the old adage that there is no software engineering problem that cannot be solved by adding another level of indirection, he introduced the audience to linkerd. This service sits in front of your Microservices as a transparent proxy and handles many of the aforementioned concerns for you. While this sounds great at first, Peter thankfully doesn’t fail to mention that this solution comes with its own set of drawbacks which can be summarized by the addendum to the aforementioned adage: “except for the problem of too many levels of indirection.” In other words: now you have yet another service in your system which can fail in various ways and needs to be maintained. A very considerate and well reasoned talk!
Generative Programming and Verification by Nada Amin
This talk was probably the most mind challenging of all. It was about boosting the performance of programs by means of generative code rewriting with mechanisms like loop unrolling while keeping the original code easy to read and maintain. The hand written code would be first interpreted and transformed into another code document where constructs like loops were resolved to single lines of code. Then this much longer code would be compiled to much more performant machine code.
Nada used examples written in Scala where one can determine which parts of code would be interpreted now and which later through type definitions.
She also showed how verification of data could be implemented alongside this.
Although she did use Scala she hoped to share some concepts that then could be used in Clojure, too.
EuroClojure 2017 - Résumé
Once again we had a great time: Interesting talks on topics that we do encounter ourselves using Clojure on a daily basis and which did provide us with different solutions as well as talks about aspects on Clojure that we were unfamiliar with yet.
All that took place in a a hip and inspiring environment that offered a lot of input apart from the conference.
And, of course, it was awesome to meet all those nice Clojurians!