Fork me on GitHub

Hi guys, Clojure noob here, coming over from the Node.js land. I am about to kick-start a new Reagent website shortly. Just wondering what the consensus in the community are around Leiningen vs Boot, and figwheel vs boot-reload.


Lein is the default option, but Boot has plenty of users as well


Iโ€™d say start with Lein until you run into things that annoy you and at that point take a look at Boot or other options and see if they solve said annoyances ๐Ÿ™‚


It reminds me of Grunt vs Gulp in the JS world, until Webpack walks in and clear the floor. ๐Ÿ™‚


if it helps, you can think of Lein as like npm, and Boot as like Grunt/Gulp/Rollup (except with dependency management as well)


also note that there's an official dependency manager now (though it's still in its early stages):


but that does not do any build stuff, so you do still need Lein/Boot


This official one is interesting. Not a lot of people talk about it on the internet.


it's very new, so that would be why


Thanks schmee, that's good advice. I'll give that a go


I would like to use local repo.

mvn install:install-file -Dfile=jep-2.24.jar -DgroupId=jep \
       -DartifactId=jep -Dversion=2.24 -Dpackaging=jar -DlocalRepositoryPath=maven_repository -DcreateChecksum=true


I tried with deploy/deploy-install too


I would like to add jep jar to local repo.


After this I add to project.clj >> :repositories {"local" "file:/Users/sb/Downloads/cljjep/maven_repository"} or before this :repositories {"local" ~(str (.toURI ( "maven_repository")))} and lein deps .. but nothing happens. any idea, what I did in wrong way?


I tried via maven add [jep/jep "2.24"] too, but nothing happens


Hi all, I'm receiving a strange error. I'm hoping someone here could provide some advice: > Unable to resolve symbol: vec__11682 in this context There's no mention of vec in the function; however the error is reported on a line that starts a clojure.core.async/go-loop. I'm thinking there might be something going wrong in the macro processing?


Unfortunately, seems like I'm running into this issue when trying to macroexpand the go-loop:


@joe041 are you using macroexpand-all?


I've tried that and macroexpand-1. This seems to be the smallest code sample that reproduces it:

(defn f []
  (go-loop [[command channel] nil]
    (recur (alts! [channel]))))


but this compiles:

(defn f []
 (go-loop [[command channel] [nil nil]
   (recur (alts! [channel]))))


no i mean, how are you getting that exception?


if I evaluate that function I get it


looks like a bug


can you open a ticket? I can take a look at it later this evening


cool, thanks for another set of eyes


will do. under clojure.core.async?


Hi, is there somebody who would like to mentor me learning clojure? Give me some suggestions, review the code I write maybe.


Mainly I want to make sure I'm writing idiomatic code

Charles Fourdrignier15:01:41

@teikfaiv I'm a beginner too. One way to learn is to write some training code (Advent of Code, katas, ...) and compare with experts' solutions.


@teikfaiv We have a #code-reviews channel that might help.


Is there any type of "guided" getting started course or track for learning clojure/clojurescript? I done a few scattered tutorials and walk through, but I find once I've completed something I'm not sure where to go next. Would going through something like Clojure for the Brave and True be a good way to start? or some other video guide?


Sorry if this has been asked ad nauseam. ๐Ÿ˜


@kara I think Brave and True is a solid recommendation. Carin Meier's Living Clojure is also said to be very good.


@kara Clojure for the brave and true is a great comprehensive resource and certainly could be worth working through, but don't feel like you have to go start-to-end. If there are specific aspects of clojure, or specific things you'd like to implement with it I'm sure that many people here can give some great recommendations on where to look! ๐Ÿ™‚


Thanks. ๐Ÿ™‚ Yes, I have a background in JavaScript so I tried to get started jumping in with ClojureScript... but the syntax is still kind of making it feel like I'm reading foreign language... I think getting some fundamentals down would be helpful... then hopefully I can start ramping up as my past JS knowledge kicks in


I was particularly interested in the patterns from Re-Frame/Reagent vs. trying to cobble together a React + ?? stack in JavaScript.


but it was a bit much to start with ๐Ÿ™ƒ


Yeah, Clojure's web story is non-trivial and ClojureScript even more so.


Hi guys, I am having issues using the library to connect to a database. I have a gradle java project with some clojure code up and running. I have the library in my build.gradle and its pulling the dependency, but when I put the library in the require statement in my clojure namespace like this: (:require [ :as jdbc] [clojure.string :as str]) I get this error: Caused by: java.lang.RuntimeException: Unable to resolve symbol: volatile! in this context


@josmith2016 What version of Clojure are you trying to use?


clojure 1.6.0


You need at least 1.7.0 for


Any reason for using such an ancient version of Clojure? 1.9.0 is the current version.


I'm new to clojure and just adding it to an existing java project, i assumed that was the latest version.


Pretty much everyone is on Clojure 1.8 or 1.9 now. I think a year ago there was still a sizable percentage on 1.7 but even then only about 5% were on early versions. Lots of stuff has changed / been added since 1.6:


Thank you


And "Welcome to Clojure!" by the way.


One thing to watch out for -- since it sounds like you ran across an example online that showed using Clojure 1.6 -- a lot of old tutorials and blog posts are still out there and refer to outdated versions of libraries so you may run into API changes etc. If you have any doubts about versions, feel free to ask here @josmith2016


(in particular, anything that refers to clojure.contrib.* dates back to Clojure 1.2 and should be considered extremely outdated -- that monolithic "contrib" library was dropped for Clojure 1.3 and many old examples based on those old namespaces no longer work!)


Most of those namespaces live on in new libraries (but with new namespaces and, often, different APIs).


@kara I liked working through to get a grasp of the language. It is example heavy and you can crank through it top-to-bottom pretty quickly. If you want to get started on frontend work and youโ€™re already familiar with react, this is just my opinion: skip the larger frameworks for now, because they add a lot of clojure magic and complexity. It is easier to get something going if you just manager your own state with vanilla clojurescript and use a react wrapper (I prefer rum because it is more โ€œreactโ€ like but reagent seems more popular)


Nice. ๐Ÿ™‚ Thanks for the advice I'll check that out.


@kara @teikfaiv @U8S5U905N the live coding and Quantum Tic Tac Toe playlists might be interesting


Also @josmith2016 I'm the maintainer for so I'm happy to answer any questions about it -- but probably best to ask those in the #sql channel since it's much lower traffic than #beginners (and that's better than cross-posting a question to multiple channels).


I am new to Ring/Compojure and I dont know why it is loading my tests files, hence making my service fail because the ring profile cant find Midje.sweet


And no, Im not requiring my tests files by mistake


@pablore Perhaps you could share your project.clj file so we can check your paths and dependencies?


(also, there's a #ring channel if we get too far in the weeds and this looks to be very specific to Ring or Ring tooling)