This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-02
Channels
- # announcements (21)
- # bangalore-clj (1)
- # beginners (122)
- # calva (29)
- # cider (9)
- # cljdoc (1)
- # cljs-dev (7)
- # cljsrn (1)
- # clojure (84)
- # clojure-dev (11)
- # clojure-europe (2)
- # clojure-houston (2)
- # clojure-italy (31)
- # clojure-nl (5)
- # clojure-uk (37)
- # clojuredesign-podcast (3)
- # clojurescript (14)
- # cursive (66)
- # data-science (5)
- # datavis (1)
- # datomic (6)
- # fulcro (16)
- # graphql (4)
- # jobs (2)
- # music (1)
- # off-topic (20)
- # pedestal (1)
- # re-frame (2)
- # reagent (2)
- # shadow-cljs (155)
- # spacemacs (5)
- # tools-deps (5)
- # vim (8)
- # yada (1)
måningyåls
and the only way I qualify as a cycling giant is my hight... nothing else about my cycling is gigantic, that is for sure.
morning
Speaking of the REPL, someone suggested the other day that the reloaded workflow discourages repl use. As you're more likely to just hit reset and reload your browser, rather than tweak and re-eval.
@dominicm uh, does reloaded work for cljs too ?
@mccraigmccraig Depends what you're doing
well, i've to c.t.n.r/refresh
stuff in clj, and websocket/browser stuff for cljs - but the workflows are kinda different
although maybe there's a c.t.n.r/refresh
equivalent for self-hosted cljs ? never used it, so not sure...
Stu Halloway mentioned something to the effect of "if you need something like that, you have to ask yourself why?" I think the implication is that if you can't keep in your head everything that you're changing, then your software is possibly complected.
@dominicm as a relative newcomer to the scene, I do both. I normally tweak tweak, but when I want to have a tabula rasa, I reset 🙂
we do live in a somewhat complected world... jvm class files compiled from clojure protocol definitions, refs to stale classes left lying around etc - clean-slate is quite useful in such situations
but yeah, doing c.t.n.r/refresh
all the time is quite smelly
I'm curious to know if anyone thinks they have some strategy or approach that helps or harms how much they use the repl and data as opposed to integration testing their code
(Especially as you both acknowledge that refresh is smelly, you're good candidates for sharing how your application has achieved this)
I've worked on projects where a lot of logic is in the web handler, so you can either attempt to create a ring request at the repl, or you reload your browser / use curl.
we have refresh... i only tend to use it occasionally though, and i'm ok with that
our domain logic got moved (is getting moved) down to the model layer - the api layer only does api stuff - http handling, schema checking, coercion, and configurable mapping of any (pure-data) responses to http responses
'course then there is still the client to test against the api...
I use both REPL-based and reloaded workflows. I see them as providing different levels of feedback loop. Even within REPL-based development, there are different levels of feedback loop. Shameless plug: I wrote a fair bit about this stuff a while ago at http://blogish.nomistech.com/repl-based-development-and-feedback-loops/ and, in more detail, at another article that’s linked to from there.
I like thin web layers, with domain logic in a separate layer. My mental model is that it should be easy to attach a different kind of interface (eg a command line interface) if I ever wanted to (even if I would never want to). I think it makes things clearer and easier to test.
My current conclusion is that you need to split into a domain layer for target by the repl. You have a chance of writing a coherent spec for your own domain model.
I see beginners picking up that reloaded/refresh-based workflow all the time -- seems to be the "default" recommendation in a lot of tutorials?
I never use the reload/refresh approach. I always eval forms as I write them, occasionally recompiling a whole file. It was interesting to do Eric Norman's RDD course and find he also avoids the reload/refresh approach.
We use Component heavily but I've still never felt the need for "reloaded". I just remembered that both ProtoREPL and Chlorine sort of assume you'll go the full auto-refresh route -- Jason's "opinionated" setup for ProtoREPL and (until recently) the default in Chlorine was to do namespace refreshes at startup and on save etc. Which I just find... kind of ridiculous as it gets beginners off on the wrong foot in my opinion.