Rory was writing mobile games when Nokia Snake was the height of technology, long before it was cool.
He was doing novel research on dynamic network protocols to replace TCP/IP, which was when a cluster was more likely to refer to a collection of peanuts than a collection of server computers.
He shows people around an old windmill in southern England at the weekends.
And he is a black belt in a martial art that I cannot pronounce, with the superpower of sword fighting.
So believe me, you really don’t want to be waiting on your compiler with Rory around!
netlib-javaunderpinning Apache Spark
FreeHighSchoolScienceTexts No Evidence he ever got back from the Mun
End with ‘Demo Time!’
(set-frame-font “Inconsolata-24”) (required ’command-log-mode t) (global-command-log-mode) (setq guide-key/guide-key-sequence nil)
sleep 2 ; recordmydesktop –no-sound –on-the-fly-encoding –no-frame -o ensime.ogv
Rough script, for a walkthrough:
scala-modeand show regex syntax highlighting.
ensimeand comment on the
This is an architectural overview of the internals of the ensime-server, which is bounded here by the dotted lines.
The text editor communicates with the server via SWANK, which is a bidirectional TCP/IP sockets protocol using S-Expressions as the language. This is really convenient for emacs. We’ll talk about protocols later because we really don’t see ENSIME as being an emacs only library.
The server runs locally, so it also has direct access to the files on the disc and can watch for changes without needing to be told about them. This is typically used for detecting changes in the compiled files rather than looking for changes in source code.
And when the server is started, it needs to be given a
.ensime file which defines the project layout. This is typically generated by the build tool.
Inside the server, everything goes via the central Project class which effectively just delegates to the relevant sub-component. The two big parts are the Search Service and the Analyzer:
We’ve had various discussions about where the “in/out” line should be and we decided that compilation is definitely on the other side of the line because that’s what build tools are designed to do. But with the possibility of closer integration with the new sbt server, we will see the coupling with sbt, in particular, becoming stronger. But we’re not limiting ourselves to one build tool because the reality is that a large number of corporate development environments are using legacy build systems and we want to support that.
ENSIME isn’t just one project. The server is a Scala project with separate branches to support the three active stable release versions of Scala. (Yes, people are still using Scala 2.9 in production systems).
The compiler API has been quite volatile across versions, so we are not able to offer a single source build. The server jars are published as snapshots to Sonatype, more about that in a few slides.
The emacs client is a completely separate project to the server. It has its own github repository and is published using the emacs package management system MELPA.
Build tool plugins also live in their own repositories. The functionality offered here is typically the ability to generate the
.ensime file, although we might see more functionality in the future, for example, integration with the sbt server or automating the debugging launch process with build tool commands. The plugins are rarely updated, so they are published to Maven Central.
And we have a separate repository for creating our docker images, which is used by the build system. We have an official docker image that is used for each release branch and that has all our hard dependencies pre-loaded (i.e. JDK and sbt), this is published to Docker Hub.
c.f. Benjamin Mako Hill’s talk at LibrePlanet 2013
Benjamin Mako Hill gave a talk at LibrePlanet 2013 did an analysis of projects on github. He showed that the vast majority of projects have one contributor.
ENSIME is a really nice project to work on because it doesn’t have a single owner. Aemon started the project way back in 2010, but many people have been helping out over the last few years.
We don’t have a financial backer, so realistic the only way for ENSIME to survive and grow is to have a strong community.
Fundamentally, a good community has to be inclusive, share a common goal, and be fun. As admins we try to encourage that vibe with anyone who comes across us and we have a formal code of conduct, as we are members of Typelevel.
Typically when we get a bug report, or a feature request, we’ll offer to help the reporter. If you raise a ticket, you can expect to get pointed at the general area in the code that needs improvement and any changes you make will be quickly reviewed. Often with an avalanche of additional suggestions! :-)
This approach obviously doesn’t always work out, and some tickets might never get closed, but clearly it’s working out pretty well because we get a *lot* of contributors sending one or two PRs and make an improvement.
We take a pragmatic approach to feature and bugfix prioritisation. It’s not like we’re developing a mass consumer website, or a specialist system with business users — everybody who uses ENSIME is a scala developer and should know how to interpret an exception in the logs. That’s why we prefer simple solutions and clear error messages to handling corner case failures that can be fixed by the user.
We try to maintain a presence at the Hack the Tower hackday events in London. Free burgers for anybody who comes along and hacks on ENSIME, and please join us remotely and we’ll find you something to do.
Key to survival of ENSIME is ease of contribution, and the only way to manage that is by automating as much of the development process as possible.
We have a strong emphasis on testing (unit, integration, client tests), coverage, shippable docker images (soon to be replaced by drone).
We can do this because of the suite of tests.
master builds are automatically deployed to sonatype snapshots repository, and we use
sbt in the emacs client to do the deployment on the client machine and obtain the classpath. Every time the client updates, or the user types
ensime-update the server deployment will be refreshed.
We now have a new website which will become the focus for all documentation over the coming months.
A lot of pages have TODO notes on them at the moment, and that’s not a typo. Every page has an edit button on it and in the community spirit, we hope that the TODOs will be replaced by real content by users and developers of ENSIME shortly.
Come to the hacking session this afternoon!