牛: a preface

(Ox or oxlang) is an experiment, a dream, a thought which I can't seem to get out of my head. After working primarily in Rich Hicky's excelent language Clojure for over two years now and spending a summer hacking on Oxcart, an optimizing compiler for Clojure, it is my considered oppinion that Clojure is a language which Rich invented for his own productivity at great personal effort. As such, Clojure is a highly oppinionated Lisp, which makes some design decisions and has priorities which seem to be starkly at odds with mine.

Ultimately I think that the Clojure language is underspecified. There is no formal parse grammar for Clojure's tokens. There is no spec for the Clojure standard library. Due to underspecification Clojure as a language is bound to the Rich's implementation for Java as due to leaking implementation details and lack of a spec no other implemetation can ensure compatability. Even ClojureScript, the official effort to implement Clojure atop Javascript is at best a dialect due to the huge implementation differences between the two languages.

These are not to say that Clojure is a bad language. I think that Clojure is an excellent language. If there is an Ox prototype, it will likely be built in Clojure. It's just that my priorities and Rich's are at a mismatch. Rich is it seems happy with the existing JVM implementation of Clojure, and I see that there's a lot of really interesting work that could be done to optimize, type and statically link Clojure or a very Clojure like language and that such work is very unlikely to become part of the Clojure core.

Clojure's lack of specification makes it futile for me to invest in providing an imperfect implementation so the only thing that makes sense to do is specify my own lang. The result is the Ox language. The joke in the name is twofold: the compiler for Clojure I was working on when I originally had the idea for Ox was Oxcart, named after the A-12/SR-71 program. The rest of it is in the name. Oxen are slow, quiet, tractable beasts of burden used by many cultures. This ultimately characterizes the language which I'm after in the Ox project. There's also some snarking to be found about the tractability of the Ox compared to that of other languages mascots like the gopher, the camel and the gnu which are much less willing.

The hope of the Ox project is to produce a mostly typed, mostly pure language which is sufficiently well specified that it can support both static and dynamic implementations on a variety of platforms. Ox draws heavily on my experience with Clojure's various pitfalls, as well as my exposure to Haskell, Shen, Kiss and Ocaml to produce a much more static much more sound Lisp dialect language which specifies a concrete standard library and host interoperation mechanics in a platform abstract way amenable to both static and dynamic implementations on a variety of platforms.

In the forthcomming posts I will attempt to illustrate the model and flavor of the Ox programming language, as well as sketch at some implementation details that differentiate Ox from Clojure and I think make it a compelling project. Note however that as of now Ox is and will remain vaporware. As with the Kernel lisp project, while I may choose to implement it eventually the exercise of writing these posts is really one of exploring the Lisp design space and trying to determine for myself what merit this project has over the existing languages from which it draws inspiration.

^d