Content from 2014-08

Clojure for the Emacs user
posted on 2014-08-17 13:46:28

One of the great things about Clojure is that it's a Lisp, and not just for the fact that this brings a lot of linguistic power over typical languages. Lisps have a very intertwined history with Emacs.

In this post I will show you what I think is the perfect environment for composing Clojure code.

First of all you will need Emacs version >=24, this ensures that you have the proper package.el support by default. If not; you will need to install package.el manually. This page is a great resource on package.el.

Now, we can install the basic clojure-mode, which will provide proper font-locking and basic code highlighting.

To install: M-x package-install RET clojure-mode RET.

Personally, I prefer a live editing environment over the archaic write/compile/test/repeat cycle that a lot of languages enforce. To this end, we need to install the exceptional CIDER mode. CIDER provides a SLIME-like environment for Clojure. CIDER is a mode which enables a powerful embedded REPL inside emacs. This embedded REPL can do code evaluation, code introspection, code-completion and much more. It's very difficult to return to languages which do not have this rich-editing experience.

To install: M-x package-install RET cider RET.

Finally, clj-refactor is a package which provides a few helpful code transformations. There are gems such as "introduce-let" which moves a form into an enclosing let form, or sort-namespace, which will alphabetically sort the namespace (great for keeping tidy code). There are many more so I suggest that you browse the repository.

To install: M-x package-install RET clj-refactor RET


Introducing: Lispkit
posted on 2014-08-15 23:47:08

Lispkit is a recent project I've started. It's a browser, based on WebKit, written and configured in Common Lisp.

The project is still very young, but in true Lisp fashion I was able to accomplish a sizeable portion of the basic functionality.

Why does this project need to exist?

Personally, I prefer keyboard-driven environments. I also prefer configuration formats which are code and not key/value pairs. My preferred version of editor brain-damage is of the emacs flavour. These requirments meant that I could use Conkeror or Luakit. There may be more out there, but that's all I found out when I was looking.

The problem with Conkeror I found is that, having the configuration format in Javascript meant that a lot of advanced scripting was out of the question because of the low-quality of the language. Similarly, Lua is an uninteresting language for me.

Luakit though, seems to be far more advanced and has a lot more users behind it than does Conkeror, so I may fire it up to pinch ideas.

The aim with Lispkit is to have a browser which defers to a well-known and well-tested implementation of the actual "browsery" portions of the application, rendering, javascript sandboxing, etc. and deal with the other fun stuff.

So, the aim really is to have an emacs-like browser. SLIME connections are a must, on-the-fly editing of configuration, M-x apropos command style searching, ido-style completion, packages, the works. That's the plan anyway. However, at this point, chromium is still my daily driver.

This blog covers amazon, browser, cider, clojure, common lisp, distributed computing, ec2, emacs, erlang, fresh, haproxy, kafka, kubernetes, lisp, new, storm, webkit, websockets, zookeeper

View content from 2017-03, 2016-02, 2015-02, 2014-08, 2014-07

Unless otherwise credited all material Creative Commons License by Aaron France