New Clojure Project Quickstart
blog.michielborkent.nl
blog.michielborkent.nl
Meanwhile the newer and officially more blessed way of making projects, deps.edn, is simple but not easy; to do basic things you need to assemble the pieces yourself, but if you want to make your own custom build pipeline it’s probably more intuitive than Leiningen.
borkdude’s new project seems to be trying to bridge the gap by providing some pre-canned equivalents of popular Leiningen commands, but built on top of deps.edn. Instead of lein this is neil.
(I only use lein myself at the moment but curious about deps.edn)
Easy or simple- I could see arguments for either. But I can't understand why they'd just punt on something so important in this day and age
> Leiningen, the older and still quite popular way
> borkdude’s new project seems to be trying to bridge the gap by providing some pre-canned equivalents of popular Leiningen commands, but built on top of deps.edn. Instead of lein this is neil.
Maybe the story will be different for Clojure and people really will converge on the official solution eventually, who knows
I understand that as a beginner this is painful. You generally want to be told what to do with tooling, then ignore it for a while when you learn the language. As you mature as a developer in that ecosystem, the choices become a great benefit. It's true in Python as in C as in Common Lisp as in Clojure.
I am a professional Clojure developer, and despite using Leiningen for many years I would say right now that I barely even know how to create a project or how to read a non-trivial project.clj. tools.deps on the other hand I feel confident with and believe it's one of the better systems out there. There are people who feel the opposite (in all ways), and I think that's _awesome_.
I feel this trend started later on.
That said, it's also because Clojure is not its own runtime, so its actual tooling is the same as Java's.
This is how it started, just expecting you'd use Maven as was standard in Java back then.
Its the community that kind of decided they didn't like to use the Java tooling and on their own brought Clojars and Lein as replacement.
So I think that's why at first there wasn't any, and later the core team thought, okay, well, if people want Clojure tooling and don't want to just Maven as maybe it was first intended, then they'd rather take it over and do it how they think is best.
This is my interpretation of the history at least.
Also, Borkdude is a beast. He's the Shakespeare of Clojure in that five hundred years from now it will be common knowledge that "of course, he was actually a team of people". Or possibly the common knowledge will be "he was the first sentient AI". I'm not sure.
Cool to see stuff like this tool. I think one of the best getting started tools I’ve seen lately is Calva for VS Code.
Some people use those as well, you can find some set of tasks for each that add a bit more Clojure-awareness to them as well such as https://github.com/clojurephant/clojurephant for Gradle.
That said, tools.deps did add a feature which renders some projects who are built with tools.deps and use that feature no longer work with just Gradle/Ant/Maven/Lein/etc.
tools.deps allows you to depend on git repos directly, so if a library is published in that style, it can only be consumed with tools.deps (which is the now official dependency manager)
clojure-deps-edn is just a pre-configured deps.edn file to get you started.
`neil` is a command line that lets you edit your deps.edn using commands, instead of manually having to edit the config file by hand in an editor for example.
brew install openjdk
brew install leiningen
lein new project
cd project
lein run
Ditto for the linked article. brew install openjdk
brew install clojure/tools/clojure
brew install babashka/brew/neil
neil new app myapp
cd myapp
clojure -M:run-m
If you're interested in trying out what the article is about (which I would say is more likely to become the new standard way as things evolve). $ clojure some_code_you_wrote.clj
It's a shame that this is either missing or well-hidden in the official docs, common intro guides, etc. It's not how you make a "real" application or whatever, but if you're just trying to play with it, this way works great.I hate having to make a "project" just to even Hello World. I much prefer the bash/Python/Groovy/etc approach of "drop some code in a file and run it".
Fulcro maybe? https://fulcro.fulcrologic.com/ It’s a bit more than NextJS though. I’ve never used it but there’s some clever ideas in data management in there.
There’s luminus too but that’s again more than Nextjs, i’d compare it to something like blitz in nextjs world.
The folks that created luminus are working on something new too.
There’s reframe which is less than nextjs but is so refreshingly simple to write in. The domino model is so easy to grok and work with in my limited experience.
lein
babashka
uberjar
clojure
clj
nrepl
scratch.clj
bb.edn
Bit of a mess.