Halite Home

Clojure starter package?


Anyone already working on a Clojure starter package - or have reason to believe it wouldn't work?
I'd be interested to contribute it myself, otherwise.


I am interested, but to lazy to make one myself :slight_smile:


@adereth has sent a PR.


Oh, brilliant - saves me a good bit of work. :slight_smile: Clojurians, keep an eye on https://github.com/HaliteChallenge/Halite/pull/166. Thanks @adareth.


Yea, the code looks good at a first look. But I struggle getting it running.
For now its missing an example runGame, but thats just for completeness.
Also I am not sure if it works with the namespace. I copied the source files directly to the source folder, removed the namespaces and used what is shown in the compiler.py file: https://github.com/HaliteChallenge/Halite/blob/c56bb0621b4794ccea5272d28533dc3ad898eaf5/worker/compiler.py#L311

Unluckily, when starting it with halite it just times out with:
--- Init ---

No response received.

This is how I start it:
halite -d "25 25" "java -cp ../clojure-1.8.0.jar:. clojure.main MyBot.clj" "java -cp ../clojure-1.8.0.jar:. clojure.main MyBot.clj"

Also I renamed the bot.clj to MyBot.clj, as this is what the compiler is looking for.

Any ideas? Did someone get a clojure version working?


i put my private version online, i was gonna clean it up a bit before publishing but it might be useful

to run just do something like

$ lein uberjar
$ ./halite -d "30 30" "java -jar $PATH/TO/CODE/target/uberjar/halite-0.1.0-SNAPSHOT-standalone.jar" "java RandomBot"


@yawnt why not start it with "lein run" instead of compiling an uberjar before?


because there's an open issue (https://github.com/HaliteChallenge/Halite/issues/215) that should result in adding support for JARs. I'm assuming that will land earlier than lein support :slight_smile:

(plus lein has overhead, etc etc ..)


JARs are now supported. Just include your MyBot.jar in your zip submission, and it will be run with java -jar MyBot.jar.


If I want to test my bot locally, can I still use the "old" halite and just replace the java call by "java -jar MyBot.jar" for my own bots?

EDIT: I just tried it and it just works, very nice :slight_smile:


Full Clojure support with lein is now up!