About Swearjure

Swearjure is a turing complete subset of Clojure that only uses non-alphanumerics.

History

Gary Fredericks and Tim McCormack were the first to question and discuss how expressive Clojure would be without alphanumerics, in the #clojure channel on Freenode. The name Swearjure was coined in IRC as well, and became a way of referring to using Clojure without alphanumerics around November 2012.

Since then, there has been ongoing work on improving the usability of Swearjure. Turing completeness was in fact proven late January 2015, by Alex Engelberg and Jean Niklas L’orange independently of each other. The turing completeness capabilities was accidentally brought in by Gary Fredericks through CLJ-1121.

Implementation

The Swearjure implementation was designed to explore the functionality of the Clojure reader, which has curious edge cases. Some of them can be abused in Swearjure to gain additional power. For instance, the syntax quote reader can be abused to create hash maps of arbitrary length:

(defn my-hash-map [& values]
  `{~@values ~@()})

And quoted arguments to function literals yield gensyms:

user=> (#(identity '%) :foo)
p1__771#

After long waiting times to verify correctness, the author decided to make a fully functional Swearjure REPL to lower feedback time. From there on, the project quickly grew out of control, and is now a more or less fully usable Clojure implementation1.

  1. Without alphanumeric characters in input expressions.

Updated on Swearjure