Fork me on GitHub
#beginners
<
2019-04-02
>
evocatus07:04:05

hi 🙂 What is the difference between -> and ->> ?

Alex07:04:34

-> is thread first macro”

Alex07:04:39

->> is thread last macro

Alex07:04:54

Which doesn’t help, probably, because you can read that in the docs

Alex07:04:01

So if you have function

Alex07:04:16

(assoc {} :name “@gr.evocatus”}

Alex07:04:18

You can do

Alex07:04:45

(-> {} (assoc :name @gr.evocatus”))

Alex07:04:53

and it will put {} into the FIRST argument

Alex07:04:57

Which is what thread first does

Alex07:04:01

And you can chain those together

Alex07:04:37

So, for thread last, if I have a vector

Alex07:04:53

[@a.pittendrigh, @gr.evocatus] I can do something like

Alex07:04:49

Does that help?

evocatus07:04:07

Oh, I see now, thank you. Those paragraphs in the docs looked identical to me - I missed that one says "second" and the other says "last"

Markus Åkerlund Larsson13:04:56

I don't know what I've managed to do to my project.clj file, but my produced uberjar no longer contains compiled clojurescript. Any idea what to look for?

dangercoder20:04:52

@c09mld pm me your project.clj and i'll have a look 🙂

chepprey23:04:26

question on cljs + shadow-cljs + cider-nrepl tooling setup...

chepprey23:04:27

I've previously gotten Emacs + Cider + regular Clojure (not cljs) all up and running for my 1st ever Clojure project. I went with Emacs since I had some experience with it 25 years ago. Anyhow, I got the jist of REPL development.

chepprey23:04:27

Now I'm trying Clojurescript, to implement the client-side of my little learning project. FWIW I'm trying the "Learn Reagent Free" course at https://www.jacekschae.com (free plug). WELL...

chepprey23:04:02

I'm having trouble getting the REPL going in this setup. The online course supplies the basic config files, so most of what I have was provided. Here's my shadow-cljs.edn:

chepprey23:04:23

the only modification here from the file provided by the online course is the addition of the cider-nrepl dependency

noisesmith23:04:18

your best bet here is #cider - it's a package with a lot of features and complexity, and the things that go wrong with it don't generalize to other stuff

chepprey23:04:43

Using the npm run dev command, it spins up shadow-cljs and starts up nREPL on port 3333.

chepprey23:04:31

I run cider-connect and give localhost / 3333, and emacs/Cider connects to the REPL. GREAT. The problem (or my confusion) starts here:

chepprey23:04:05

doing any sort of "eval" of any forms, buffers, or anything in Emacs seems to just... do... nothing.

chepprey23:04:42

I can enter expresions in the REPL buffer (+ 3 4) yields 7, so the REPL is there. But it doesn't seem "connected" to any of my .cljs files or anything.

chepprey23:04:39

So i'm just kinda lost.

chepprey23:04:32

Another point: when I was just doing Clojure, I used cider-jack-in to start the REPL. With this shadow-cljs it seemed I had to use cider-connect; perhaps this line of thinking is wrong & is the problem?

chepprey23:04:26

When I try to do cider-jack-in, Emacs gives the error The npx shadow-cljs executable isn't on your 'exec-path'

chepprey23:04:15

Thanks @U051SS2EU I'll try that channel.