Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Bert implementation in Clojure
branch: master

This branch is even with trotter:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
scripts
src
.gitignore
README.textile
license
pom.xml

README.textile

bert-clj is an implementation of mojombo’s bert in clojure. It is currently ready for use, but not tested in a real environment. Please try it out and file bug reports. I’m happy to fix anything that’s wrong with it.

Usage

There are two ways to use bert-clj. One, you can just add bert-clj/src/main/clojure to your classpath. If you take that route, you can then do the following:

>  (require '[com.trottercashion.bert-clj.bert :as bert])
>  (bert/encode 72)                           ;; => (-125 97 72)
>  (bert/decode '(-125 97 72))                ;; => 72
>  (bert/decode-seq '(-125 97 72 -125 97 53)) ;; => (72 53)

Alternatively, you can use maven to assemble a jar that can then be added to your classpath. On the command line, do the following:

$ mvn assembly:assembly
$ java -cp target/bert-clj-1.0-jar-with-dependencies.jar clojure.lang.Repl
>  (require '[com.trottercashion.bert-clj.bert :as bert])
>  (bert/encode 72)                           ;; => (-125 97 72)
>  (bert/decode '(-125 97 72))                ;; => 72
>  (bert/decode-seq '(-125 97 72 -125 97 53)) ;; => (72 53)

Author

Trotter Cashion (cashion@gmail.com)

Something went wrong with that request. Please try again.