Fork me on GitHub
#beginners
<
2018-07-29
>
kenj02:07:48

is there a way to make Cursive reindex dependencies (preferably automatically) when new deps are added to a project.clj file, and lein deps (or some other command which causes the deps to be downloaded) is run?

kenj03:07:50

it seems "File -> Invalidate Caches / Restart" does the trick, but that's kind of annoying when adding new libraries

seancorfield03:07:16

@risinglight Colin Fleming isn't in this channel but he's very responsive in #cursive if you have questions like that...

kenj06:07:46

I will check out #cursive, thanks!

Chase20:07:06

i was told not to use one letter variable (parameter?) names before but it seems like it might be ok to do so in clojure as long as you do so idiomatically? like 's' for strings and such. where would i find those? is there an official style guide for that kind of thing?

dpsutton20:07:46

honestly that's a rule best learned by reading and writing lots of code. learn where it gets confusing to the consumer

dpsutton20:07:04

a good rule of thumb i've heard is the more general the function the shorter the variable name

metal 2
seancorfield21:07:27

@chase-lambert https://github.com/bbatsov/clojure-style-guide#naming <-- this will be a good read for you I think.

Chase22:07:09

ahh, good stuff. that's what i was thinking. thanks folks

dirk22:07:23

Hi, I've been playing with Luminus and would like to add reagent-forms to my project. I added [reagent-forms "0.5.42"] to the project.clj, however when I try to add [ :refer [bind-fields init-field value-of] to the :require section in either core.cljs or core.clj I the error

java.io.FileNotFoundException: Could not locate reagent_forms/core/com__init.class or reagent_forms/core/com.clj on classpath
... I must be missing something simple. I did restart the nrepl / figwheel and the http server

dirk22:07:10

Lein did download reagent-forms when I had first restarted it after adding the line to project.clj

dpsutton23:07:02

the .com looks out of place to me

dirk23:07:15

ok yeah it works turns out copy and paste is a challenge for this one today. Thanks!

Chase23:07:49

so if I am learning clojure am i basically also learning clojurescript? will the main difference be that instead of learning java methods and libraries to call when needed i would just be calling javascript instead? but writing the same ole clojure at the same time?

dpsutton23:07:27

yes. the interop syntax is the same as well. for the most part the languages are the same just with different native libraries

dpsutton23:07:57

this is the idea behind .cljc files which can target any platform and have reader conditionals for the parts that need to specialize

Chase23:07:54

very cool. so is clojure(script) still gaining in popularity or is it kind of in a plateau? even if it's "plateau'ed" the user base is large enough that it seems like a robust, active community right? it's not going anywhere? i know i have rose colored beginner glasses on because i'm so new but it just seems like this could be such a good language to grow with.