Boot: Getting Started with Clojure
lionfacelemonface.wordpress.com
lionfacelemonface.wordpress.com
Is there any specific advantages to using another file extension rather than using `.clj`
Clojure's default namespace is 'user'; .boot files run in 'boot.user'. Clojure only automatically refers clojure.core; we refer clojure.core and also boot.core.
So, dependencies notwithstanding, Clojure wouldn't be able to make sense of a build.boot file, and we think the .clj extension would be disingenuous.
We differ in these ways from .clj because one of our goals was to make it easy to create Clojure applications as single scripts.
The downside is users must configure their editors to get syntax highlighting, but we think this is the lesser evil.
Just a suggestion. But the current solution seems reasonable until then.
When I've tried using clojure for really simple things, like a "Hello, World" program, and compiled this to a jar to run with something like "java -jar hello.jar," the time it takes to start up the program is pretty abysmal. I'd like to use clojure for something on the Raspberry Pi, but it can take about 30 seconds to run "Hello, World!"
Any secrets to getting it to start up faster, or am I just stuck?
I recommend naming it 'unicorn-slomp'. Or 'mustash-cash-stash' - but you can pick your own cartoons to make a reference to, you are totally empowered here.
Imperative builds are a different mindset - where lein projects feel like a different language which emulates Clojure syntax, boot feels more like a library, and context switching is a favourite HN bugbear. Being able to program a build can be a boon, where otherwise you might've had to rely on the creator of your build tool catering to your special case with an appropriate flag.
In practice, though, I've never created a project with very interesting builds in either tool, I only dabble in Clojure. The test will ultimately be whether the community finds it useful.
Ultimately there's more to being productive as a beginner than using the REPL.