This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-15
Channels
- # adventofcode (6)
- # beginners (63)
- # boot (39)
- # cider (25)
- # clara (9)
- # cljs-dev (27)
- # clojure (100)
- # clojure-dev (39)
- # clojure-dusseldorf (7)
- # clojure-italy (32)
- # clojure-russia (23)
- # clojure-spec (28)
- # clojure-uk (51)
- # clojurescript (197)
- # core-async (44)
- # cursive (3)
- # datomic (14)
- # emacs (4)
- # fulcro (27)
- # graphql (23)
- # hoplon (4)
- # jobs (9)
- # juxt (1)
- # leiningen (3)
- # nyc (1)
- # off-topic (6)
- # om (7)
- # onyx (6)
- # parinfer (11)
- # re-frame (23)
- # reagent (15)
- # ring-swagger (1)
- # rum (15)
- # shadow-cljs (37)
- # sql (24)
- # uncomplicate (4)
- # unrepl (17)
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.
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): https://clojure.org/guides/deps_and_cli
https://clojure.org/news/2017/12/08/clojure19 it was released with 1.9
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
After this I add to project.clj
>> :repositories {"local" "file:/Users/sb/Downloads/cljjep/maven_repository"}
or before this :repositories {"local" ~(str (.toURI (java.io.File. "maven_repository")))}
and lein deps
.. but nothing happens. any idea, what I did in wrong way?
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: https://dev.clojure.org/jira/browse/CLJ-2011
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]))))
Hi, is there somebody who would like to mentor me learning clojure? Give me some suggestions, review the code I write maybe.
@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?
@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.
Yeah, Clojure's web story is non-trivial and ClojureScript even more so.
Hi guys, I am having issues using the clojure.java.jdbc 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 [clojure.java.jdbc :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?
You need at least 1.7.0 for clojure.java.jdbc
.
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: https://github.com/clojure/clojure/blob/master/changes.md
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 https://funcool.github.io/clojurescript-unraveled/ 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)
@kara @teikfaiv @U8S5U905N https://www.youtube.com/channel/UCsgl7n_Zj35ODRZ_a_K5R-A/playlists the live coding and Quantum Tic Tac Toe playlists might be interesting
Thanks a lot @seancorfield!
Also @josmith2016 I'm the maintainer for clojure.java.jdbc
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
@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)
@kara this might also be useful https://github.com/Day8/re-frame