Fork me on GitHub
#clojure-survey
<
2020-01-06
>
Alex Miller (Clojure team)14:01:49

Clojurescripters.... feedback on these two questions?

Alex Miller (Clojure team)14:01:59

* Q: Which ClojureScript tools do you use for interactive development?
** ClojureScript's built-in REPLs
** Figwheel Classic
** Figwheel Main
** lein-cljsbuild's command-line REPL
** shadow-cljs
** Dirac
** Devcards
** cljs-devtools
** Other [open response]

* Q: How are you running your ClojureScript tests?
** Headless browser (or actual browser)
** Node.js
** Nashorn
** Devcards
** Phantom
** doo
** Karma
** shadow-cljs
** Kaocha
** nubank/workspaces
** Figwheel
** I don't have any tests!
** Other [no response]

Alex Miller (Clojure team)15:01:35

the first is in replacement for the prior "CLJS REPL" question, both have updated answer sets. what's missing?

thheller15:01:20

@alexmiller cljs-devtools is a library that is usually used during development with any other tool. doesn't seem to fit into the question?

Alex Miller (Clojure team)15:01:03

(these are multi-select questions btw)

Alex Miller (Clojure team)15:01:30

I think you're suggesting you would not use cljs-devtools during interactive dev and it should be removed?

thheller15:01:02

no you would absolutely use cljs-devtools but you can't just use cljs-devtools. you still need something to compile the code. it is just a library.

thheller15:01:22

so you would still use cljs.main + cljs-devtools or shadow-cljs + cljs-devtools etc

thheller15:01:01

I guess its fine if you multi select it

Alex Miller (Clojure team)15:01:20

yeah, that was the idea

thheller15:01:28

maybe a separate question like "what libraries do you use frequently?" or so makes sense

Alex Miller (Clojure team)15:01:41

not going down that path (see other threads in this channel)

thheller15:01:49

also the first answer should probably be cljs.main (as that covers the REPLs and more)

Alex Miller (Clojure team)15:01:32

first answer for which question? and do you mean replacing the existing one or inserting?

thheller15:01:20

* Q: Which ClojureScript tools do you use for interactive development?
** ClojureScript's built-in REPLs

thheller15:01:02

cljs.main covers those REPLs but also more generic compilation stuff

thheller15:01:59

cljs.main should at least be part of that answer IMHO

thheller15:01:50

devcards also seems to fit better into the second category, not the first

Alex Miller (Clojure team)15:01:16

would you still say this based on prior thread?

thheller15:01:08

kind of ... you have it in both right now. if you want both than libraries in the same category (eg. workspaces) should also be in both

Alex Miller (Clojure team)15:01:01

does it make sense for these two to be separate questions?

thheller15:01:08

hmm might be best to just have one

Alex Miller (Clojure team)15:01:04

"Which ClojureScript tools do you use for interactive development and testing?"

thheller15:01:09

there is a lot of overlap after all. you could be using devcards with shadow-cljs or figwheel after all.

thheller15:01:31

or you make a separate question focusing on the build tools

thheller15:01:39

and the other for more generic development "tools"

Alex Miller (Clojure team)15:01:44

I have separate questions for those

Alex Miller (Clojure team)15:01:21

specifically for "deps definition and download" and one for "creating project artifacts"

Alex Miller (Clojure team)15:01:30

I will probably post those later, getting some feedback internally on those first

thheller15:01:28

yeah I would probably combine those 2 questions then. otherwise you just keep repeating tools that cover those aspects and more (eg. shadow-cljs or figwheel)

folcon15:01:47

I’m curious (no idea if anyone else is or if it’s relevant) how many people are coding or would like to code more cljc based code. I personally aim to do most of my development in that space and I think knowing whether it’s a niche area or not would be useful? Not sure what’s currently in the survey, so no idea if it’s already addressed…

Alex Miller (Clojure team)15:01:35

it's not currently mentioned anywhere. certainly not niche - many people doing this. I'll think about where and whether to add it.

folcon15:01:47

It’s an area that still feels like it has a lot of sharp edges, I’m ok dealing with it if it’s not a priority, but otherwise would be good to know that I should be highlighting issues or picking things to work on =)…

Alex Miller (Clojure team)15:01:27

I've tweaked the portability answer in the "What has been most frustrating or has prevented you from using ClojureScript more than you do now?" to include it explicitly

4
Alex Miller (Clojure team)15:01:28

or combined variant:

* Q: Which ClojureScript tools do you use for interactive development and testing?
** cljs.main
** ClojureScript's built-in REPLs
** Headless browser (or actual browser)
** Node.js
** Nashorn
** Phantom
** Figwheel Classic
** Figwheel Main
** lein-cljsbuild's command-line REPL
** shadow-cljs
** doo
** Karma
** Kaocha
** Dirac
** Devcards
** nubank/workspaces
** cljs-devtools
** Other [open response]

Alex Miller (Clojure team)15:01:48

(multi-select question)

thheller15:01:52

> Q: Which ClojureScript tools/libraries do you use for interactive development and testing?

thheller15:01:30

dunno if it makes sense to separate but in my view some of these don't qualify as "tools", rather something you use with those tools.

Alex Miller (Clojure team)15:01:03

kind of taking a big tent approach here

thheller15:01:24

yeah, just meant the wording of the question

thheller15:01:53

its fine really ... nevermind me 😛

Alex Miller (Clojure team)15:01:20

both of the original questions (about CLJS repls and CLJS testing) were specifically added to assess the status quo wrt how people were doing these things (and pre-dated things like Figwheel)

thheller15:01:04

yeah there is lots of overlap in the answers so I guess its kinda difficult to have "generic" answers

thheller15:01:16

eg. when using karma you are likely using a headless browser

thheller15:01:39

or when using kaocha I think you that wraps doo ... which wraps a headless browser

thheller15:01:12

but its good to list stuff that people may also be using separately with handmade tools

Alex Miller (Clojure team)15:01:05

I'm looking at changing them because I no longer felt like the REPL question was actually reflecting how people work. yes, they use REPLs, but in the context of larger environments or in combination with other things (and maybe not even just on ekind of RPEL). Maybe similarly for testing where something like Devcards seems to be equally as useful, but very different in some ways than traditional "test runners".

Alex Miller (Clojure team)15:01:57

so my meta question is: what questions are useful to ask to assess how people work with developing ClojureScript apps?

folcon15:01:22

Part of this is also tooling I think, I didn’t realise the value of a clojure repl vs say a python interpreter until I could get inline send form to repl working, it’s still really not great in clojurescript in my experience… IE, people with different workflows will have wildly varying perspectives…

Alex Miller (Clojure team)15:01:19

I would like the results of this question or questions to answer "how do people usually work with ClojureScript?"

Alex Miller (Clojure team)15:01:42

are there families of toolsets that would make sense to combine?

thheller15:01:49

assuming you already have a separate question regarding build tools it might make sense to not repeat them in that question

thheller15:01:24

and instead focus on the feature they provide, eg. "Hot-Reload" provided by the build tool (figwheel or shadow-cljs)

thheller15:01:40

same for REPL

thheller15:01:17

hot-reload is a big part of my workflow ... I barely use the REPL for CLJS yet the REPL is my primary tool for CLJ

dpsutton15:01:17

npm usage versus cljsjs?

thheller15:01:53

yeah that would be interesting too. I would be curious to see how many actually use the recommended webpack+cljs.main combination vs cljs.main+cljsjs

folcon15:01:20

Is webpack+cljs.main recommended? I don’t think I’ve ever seen this…

folcon16:01:42

Ah, I was under the impression that was more of a, for those who wish to use it this way, rather than, this is how you should do it

thheller16:01:03

well "should do it" is dependent on what you are doing 😛

folcon16:01:36

well most of my work development is clojurescript in browser…

thheller16:01:32

yeah I meant more in the direction of which kind of JS you are consuming

thheller16:01:08

it you are just using react via CLJSJS that is fine. but if you use 20 different packages from npm you'd probably not use CLJSJS but rather shadow-cljs or webpack+cljs.main

folcon16:01:04

That makes sense.

Alex Miller (Clojure team)16:01:53

is this a dep mgmt question?

Alex Miller (Clojure team)16:01:11

where are the deps defined in any of these cases?

thheller16:01:39

package.json with npm or yarn. when using shadow-cljs or cljs.main + webpack

Alex Miller (Clojure team)16:01:34

so as additional options to "What tools do you use to define and download your dependencies?"

** npm (package.json)
** shadow-cljs and yarn
** webpack and cljs.main

Alex Miller (Clojure team)16:01:16

(other options are more java focused - clj, lein, boot, maven, etc)

thheller16:01:50

sorry. JS deps are always managed by either npm or yarn (which both define the dependencies in package.json)

thheller16:01:21

you typically use one of those and then consume the packages with either shadow-cljs OR cljs.main+webpack

Alex Miller (Clojure team)16:01:32

can you help me rewrite those answers?

thheller16:01:23

define/download is only npm or yarn

Alex Miller (Clojure team)16:01:34

I guess for the purposes of that question, probably only npm or yarn (package.json)

Alex Miller (Clojure team)16:01:38

I have another question "What tools do you use to create project artifacts for release/deployment?" and I will have both shadow-cljs and cljs.main in there

thheller16:01:34

do you have shadow-cljs in the "define and download dependencies"? it can do that as well 🙂

Alex Miller (Clojure team)16:01:13

where are they defined in that case?

thheller16:01:37

shadow-cljs.edn :dependencies. same format as lein :dependencies (same library in fact, pomegranate)

thheller16:01:15

lots of people use shadow-cljs either standalone or with deps.edn/project.clj. would be interesting for me to see some numbers behind that 🙂

dazld16:01:07

@alexmiller we use cypress as well for testing UI flows in the browser - i’m not sure if that’s helpful for this survey though

dazld16:01:07

i guess that’d be in the open response bit

Alex Miller (Clojure team)16:01:58

a few people mentioned that in last year's open responses but not enough that I had added it

Alex Miller (Clojure team)16:01:15

by "a few" I mean like 3

dazld16:01:30

np, it’s a generic browser testing tool

dazld16:01:44

i’d love to know more about how people handle errors / failed computations

dazld16:01:00

nil punning? bail on false? exceptions? failjure?

dazld16:01:01

nested ifs? 😄

Alex Miller (Clojure team)16:01:08

sorry, not going to expand to things like that

dazld16:01:14

fair enough.

Alex Miller (Clojure team)16:01:34

nil punning and exceptions are both idiomatic in clj / cljs

Alex Miller (Clojure team)16:01:37

condition systems and monadic failures are not idiomatic, but feasible and some people do those

dazld16:01:48

i guess it’s another discussion

dazld16:01:53

interesting one though

dazld16:01:31

doing it cross platform too..

Filipe Silva17:01:25

phantom falls under the category of Headless browser (or actual browser) , doesn't it?