Fork me on GitHub
#beginners
<
2018-07-04
>
fmn02:07:19

So, when yo dou want to use clj instead of boot or leiningen

seancorfield02:07:21

@funyako.funyao156 I think using clj and deps.edn is a simpler experience -- but most tutorials talk about lein because it's been around longer.

seancorfield02:07:54

Over time, I think more and more people starting out with Clojure will use clj and may rarely need to use lein or boot...

seancorfield02:07:29

...at work we've got a lot of build/test infrastructure based on boot but I've started looking at what we can move to clj and deps.edn... for new projects, I'd use clj and deps.edn at this point.

_rj_r_03:07:25

so is clj built into the Clojure install? Was trying to figure out what clj and deps.edn are.. and not finding a whole lot written about them? Any good links? (I've always used lein)

seancorfield03:07:24

This is new core tooling that Cognitect have produced recently to support changes introduced in Clojure 1.9.0 (splitting Clojure into core + specs + core.specs).

tamszagot06:07:17

Good morning. Created an app with >lein new app, and inported it to IntelliJ IDEA 2018.1.2 (Community Edition) with Cursive installed.

tamszagot07:07:16

Added [org.clojure/tools.cli "0.3.7"] in project.clj and made a (:require [clojure.tools.cli :refer [parse-opts]]) in the core.clj file following the examle.

tamszagot07:07:50

IntelliJ (Cursive?) gives a warning [Incorrect arity 2 for clojure.core/parse-opts] underlining parse-opts with red. But the project can be built and run on the command line with >lein uberjar, >java -jar ....

tamszagot07:07:20

Though when I try to run the progem from within IntelliJ the following error are reported:

tamszagot07:07:34

Does anyone know how to fix? /Sincerely, Tamas

andre.stylianos09:07:57

Hey @tamszagot, I don't use Cursive, but just wanted to mention that there's also a #cursive channel. Might be worth asking there directly.

naijeru09:07:13

I encountered a similar problem in Cursive. I solved it by using Atom.😝 I do miss the refactoring and save everything features of IntelliJ, but overall it has been a pleasant experience for me.

fmn14:07:16

@seancorfield Nice, right now I can only think of clj being used for managing dependency. I'm waiting when it can be use to run task like boot.

delaguardo14:07:02

nobody stops you from writing you custom tasks in special namespaces with a -main function)

noisesmith14:07:54

I don't think anyone plans on making clj a build tool

_rj_r_14:07:07

so... can using lein be considered a crutch? I'm now contemplating if I should move away from it in lieu of something like boot or just clj... I get that lein does some cool stuff, but it does seem heavily opinionated ... meh.. anyway... just curious as to the thoughts of those here.

pez14:07:30

Check this repository for one way to give yourself tasks in a clj deps project. https://github.com/PEZ/deps-edn-figwheel

seancorfield16:07:29

@funyako.funyao156 Take a look at my .clojure/deps.edn file for examples of "tasks" run via aliases.

seancorfield16:07:20

@ryan.russell011 If you're happy using lein, continue doing so. But I would certainly recommend learning about clj as well. As for boot, it lives in the same space as lein -- a full build system -- but takes a very different approach. We started out with lein at work but switched to boot in late 2015 because we needed something more "programmable". You can read about our switch to Boot and some of the stuff we've done with it since http://corfield.org/blog/categories/boot/

seancorfield16:07:08

If we were starting out fresh today, we would probably try to stick with clj and the tooling that is building up around that, at least for the core of our dev/test/build/run workflow.

_rj_r_16:07:02

my goal is to learn as much as I can... I will admit that since using lein, I never really think about what it is doing since it is automagical... the hard part at the moment is when walking through tutorial projects, every single one of them uses lein. I will definitely look into clj as I grow into Clojure (which is super slow going at the moment 😕 ) and start developing my own projects.

felbit16:07:39

Somebody available with knowledge in garden (css)? Please ping me.

seancorfield16:07:41

For the most part, if you have simple projects with project.cljfiles, you can create deps.edn files for those from the :dependencies vector. Leiningen profiles become clj aliases. And you can always ask questions if you're not sure @ryan.russell011

4
_rj_r_17:07:54

would also probably be good practice in understanding the inner workings.