JavaScript Clojure HTML CSS
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
resources/public Merge pull request #29 from montogeek/patch-1 May 8, 2015
src Update to ClojureScript 0.0-3211 Apr 28, 2015
test/himera/test License update Mar 5, 2012
.gitignore Ignoration Aug 7, 2014
epl-v10.html Added EPL license May 30, 2013
heroku.policy heroku bits Feb 22, 2012



ClojureScript compiler as service with a simple in-browser REPL.

Try it on Heroku


lein deps
lein cljsbuild once


To start Himera locally using Leiningen, type the following from the project directory.

lein run 8080

Then visit http://localhost:8080/ and never stop typing. For example, common ClojureScript functions and macros work as expected:

    (map (fn [n] (* n n n)) [1 2 3 4])
	;=> (1 8 27 64)
	(for [[k v] {:a 1 :b 2}] [v k])
	;=> ([1 :a] [2 :b])
	(if (< x 10) :less :more)
	;=> :less
	(defn sqr [n] (* n n))
	(map sqr [1 2 3])
	;=> (1 4 9)
	(deftype Cons [h t])
	(.-t (Cons. 1 108))
	;=> 108
	(defmulti classify-age :age)
	(defmethod classify-age 36 [_] :ancient)
	(classify-age {:age 36})
	;=> :ancient

To use jQuery from the Himera REPL, try the following:

    (def anchor (js/jQuery "a"))
	(.text anchor)
	;=> "Source..."
	(.text anchor "Github repo...")

To exercise the compilation service from the command line, try the following:

    $ curl -X POST -H "Content-Type: application/clojure" \
	    -d '{:expr ((fn foo [x] (js/alert x)) 42)}' \
	#=> {:js "(function foo(x){\nreturn,x);\n}).call(null,42)"}

Current limitations

  • No way to override functions defined in cljs.core
  • defrecord access is not working
  • Creating namespaces does not work
  • Other problems not yet discovered
  • ClojureScript's / function is not munged properly


  • Fix the limitations above
  • Stateless service
  • More clients
  • Dynamic JS library loading
  • Other plans not yet devised


Thanks to Tim McCormack, Paul Michael Bauer, and Anthony Grimes for the hard work in blazing the trail for online Clojure and ClojureScript REPLage and compilationation. Also thanks to Craig Andera and Chris Redinger for moral support and letting me bounce insane ideas off of them.


Copyright (C) 2012-2015 Fogus and Cognitect, Inc.

Distributed under the Eclipse Public License, the same as Clojure.