clojuredesign-podcast

Discussions around the Functional Design in Clojure podcast - https://clojuredesign.club/
Cora (she/her) 2019-07-16T00:00:41.009600Z

weird how lein opens in the non-user namespace, too

nate 2019-07-16T00:00:57.010Z

@corasaurus-hex we usually put them under the dev/ directory

Cora (she/her) 2019-07-16T00:00:59.010100Z

I suppose that can be configured, too

Cora (she/her) 2019-07-16T00:01:15.010400Z

and just navigate to them and load them into the repl?

Cora (she/her) 2019-07-16T00:01:39.010700Z

this is a really hard thing to get without being shown, I think

nate 2019-07-16T00:03:29.012100Z

We include the dev path when running lein repl and then yeah load them in via the editor or tools.namespace refresh.

nate 2019-07-16T00:06:07.012800Z

An example project would be very useful. I totally agree.

neumann 2019-07-16T00:11:24.014100Z

@corasaurus-hex Definitely somewhere in a development path so they don't get compiled into the app or uberjar. Like @nate mentioned, our default choice is dev/fiddle.

neumann 2019-07-16T00:11:46.014900Z

Thanks for the feedback. I like the idea of doing a demo video.

Cora (she/her) 2019-07-16T00:12:01.015200Z

"We include the dev path when running lein repl" ?

Cora (she/her) 2019-07-16T00:12:07.015400Z

what does that mean exactly?

Cora (she/her) 2019-07-16T00:12:16.015700Z

the possibilities here are uh a lot https://github.com/technomancy/leiningen/blob/stable/sample.project.clj

neumann 2019-07-16T00:13:34.016700Z

Ah yes. lein has tons of options. What I mean by "dev path" is a path that is only included when you run the repl. In lein, that would be the :dev profile. Let me get an example....

neumann 2019-07-16T00:14:33.017200Z

So I have this inside my project.clj file:

:profiles
  {:uberjar
   {:aot :all}

   :dev
   {:resource-paths ^:replace
    ["dev" "resources"]

    :plugins
    [[lein-ancient "0.6.15"]
     [jonase/eastwood "0.2.6"]]

    :dependencies
    [[org.clojure/tools.namespace "0.2.11"]
     [com.stuartsierra/component.repl "0.2.0"]]

    :eastwood
    {:add-linters [:keyword-typos :unused-namespaces :unused-private-vars]}
    }})

neumann 2019-07-16T00:14:49.017600Z

Note the :dev profile with the "dev" path.

neumann 2019-07-16T00:15:08.018100Z

When you run lein repl, it automatically includes any settings in the :dev profile.

Cora (she/her) 2019-07-16T00:15:38.018600Z

I see org.clojure/tools.namespace too

neumann 2019-07-16T00:16:17.019500Z

I'm pretty sure component.repl pulls it in, but just in case. 🙂

Cora (she/her) 2019-07-16T00:16:21.019600Z

I'm using cider refresh stuff

Cora (she/her) 2019-07-16T00:17:17.020600Z

cool, so, this is very helpful. thanks!

neumann 2019-07-16T00:18:00.020900Z

This is the closest we have to a "demo" right now: https://github.com/app-sauce/fiddle-driven-development-2018-talk

neumann 2019-07-16T00:18:17.021400Z

@nate Did that for the LA meetup.

Cora (she/her) 2019-07-16T00:18:24.021600Z

awesome

Cora (she/her) 2019-07-16T00:18:25.021800Z

thanks

Cora (she/her) 2019-07-16T00:18:43.022100Z

ah, you make it mirror the other file structure

neumann 2019-07-16T00:19:14.022700Z

Ah yes. It's "just another" source path. Same structure as "src".

neumann 2019-07-16T00:19:36.023100Z

It's incredibly useful that Clojure can take more than one source path and merge the all together.

neumann 2019-07-16T00:19:43.023400Z

I didn't realize that for a long time myself.