
Boot: Getting Started with Clojure - wooby
https://lionfacelemonface.wordpress.com/2015/01/17/boot-getting-started-with-clojure-in-10-minutes/
======
hittaruki
One of the things that nags me about boot, is that it recommends using file
extension `.boot`. Is it just me?

Is there any specific advantages to using another file extension rather than
using `.clj`

~~~
wooby
The reason we use a different extension is because a build.boot file is not
semantically a Clojure file.

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.

~~~
hittaruki
The problems you mention seem generic issues others face when using clojure in
similar ways. So may be we can convince clojure core developers to add hooks
that provide these features without having to introduce new fileextensions
each time somebody needs to refer an extra namespace by default.

Just a suggestion. But the current solution seems reasonable until then.

------
BFay
There's some mention of clojure being used as a scripting language here that
can be invoked with a shebang - does anybody know if the way this is done is
any different (performance-wise) than compiling a leiningen project to an
uberjar?

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?

~~~
wooby
Unfortunately Clojure start time is about the same regardless of build tool,
and it's especially not good on the RPi.

~~~
BFay
Ah, I guess you're right. I'm considering buying an Odroid, maybe startup will
be a bit faster (hopefully it's not this bad for all ARM devices)

------
thomasloh
what's the difference between boot and leiningen?

~~~
wooby
This is a good comparison:
[https://groups.google.com/d/msg/clojurescript/yxpDGv6RrXQ/Fs...](https://groups.google.com/d/msg/clojurescript/yxpDGv6RrXQ/FsyxlK9pf44J)

------
fit2rule
I absolutely refuse to use this because of the inappropriate name of the tool.
It is far too general to be anywhere near what I would consider well-named,
and seems mostly just a lazy convenience. cloboot would work just as well, and
give a user some chance of associating the name of the tool with the purpose
of the tool. (I already have a boot.)

~~~
jjmojojjmojo
When you install the tool you can name it whatever you want. I have qualms
about "just download this binary and execute it, trust me" installation
methods, but the advantage is you can put it wherever, and name it whatever
suits your system.

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.

~~~
fit2rule
Better if the canonical name was just set in a sensible way by its
proprietors...

------
coding4all
Why in the world would you use Boot over Leiningen if you've never used
Clojure before? `lein repl` and you're on your way.

~~~
al-king
'boot repl' works just fine too.

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.

------
joshdick
I don't see myself ditching lein anytime soon, but I'm glad to see some
competition in this area.

