chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
mauricio.szabo 2020-03-25T01:02:56.001400Z

@jlmr after some debugging, I found out that datahike.db.DB re-writes seq so it returns something that's not the "key-value" as UNREPL expects. I'm seeing if there's any way to fix this for now 🙂

jlmr 2020-03-25T06:14:52.002600Z

@mauricio.szabo awesome. Does it rewrite “a seq” or the entire seq protocol?

mauricio.szabo 2020-03-25T12:21:28.003100Z

The entire Seqable protocol: https://github.com/replikativ/datahike/blob/master/src/datahike/db.cljc#L210

mauricio.szabo 2020-03-25T12:22:30.004300Z

I'm really thinking of a workaround: even thinking that this could change in future implementations on datahike side, I can't have an "unparseable EDN" breaking the entire plug-in....

jlmr 2020-03-25T12:31:03.004900Z

Agreed, even a message saying something like “Couldn’t parse edn” but just continuing to function would be nice.

jamieorc 2020-03-25T17:35:27.005700Z

In Chlorine, advantages/disadvantages of “Should we refresh namespaces when we save a file?”

mauricio.szabo 2020-03-25T17:37:08.005900Z

The advantage is that you can be sure that when you save a file, Chlorine will try to refresh that namespace using (require '[<namespace> :reload :all]) or clojure.tools.namespace

mauricio.szabo 2020-03-25T17:37:40.006100Z

The disadvantage is that it's kinda fragile: you have to be sure that when you save a file, you don't break anything. Otherwise, not even autocomplete will work 😞

jamieorc 2020-03-25T17:37:59.006300Z

d’oh

mauricio.szabo 2020-03-25T17:38:41.006500Z

When I started to work with Clojure I always left it on. Nowadays, I left it off all the time, because when you make a mistake its really hard to fix when you leave it on...

mauricio.szabo 2020-03-25T17:39:08.007200Z

BTW, autocomplete will not work if you're using the "clojure.tools.namespace" approach, because it destroys namespaces and re-loads then 🙂

jamieorc 2020-03-25T17:41:05.009500Z

One thing I’m wrangling with is tabs/spacing. I use parinfer with experimental on (nice!) and paredit so I can slurp, barf, etc (also nice!) but I often see weird tabbing and indenting. Often it will indent 1 space, even though set up for two. Tabbing usually goes 2 spaces, but sometimes goes 0 spaces (!) then jumps four. Sometimes one. I have no idea what is going on. I expect this isn’t Chlorine, but asking here. Just redirect me to another forum if needed

jamieorc 2020-03-25T17:41:40.009600Z

Yeah, using simple. Been playing with turning off the refresh

mauricio.szabo 2020-03-25T17:46:52.009800Z

It isn't Chlorine, but no worries. Clojure indentation sometimes use only one space, other two. It depends: there's some configuration on lisp-paredit where you can change which forms will indent 2 spaces

mauricio.szabo 2020-03-25T17:47:16.010Z

Also, Atom sometimes does strange things too, unfortunately 😞

seancorfield 2020-03-25T18:59:25.010200Z

I am fairly vocal against all of these auto-refresh/reloaded approaches. It can sometimes make things seem "magically" easy but when it goes wrong it can really confuse people -- and it is certainly not simple (in the Clojure sense).

seancorfield 2020-03-25T19:00:39.010400Z

Stu Halloway kind of speaks against these approaches too in his REPL talks, and Eric Normand isn't in favor of them either (re: his REPL course online).

seancorfield 2020-03-25T19:01:33.010600Z

ProtoREPL also had similar options that Jason Gilman's "opinionated" guide said should be "on" but which caused users all sorts of weird problems (and, again, I advised ProtoREPL users to turn them "off"!).

seancorfield 2020-03-25T19:05:16.010800Z

Also, I think Parinfer and Paredit can compete/conflict sometimes, which doesn't help. Parinfer's "smart" mode isn't always very smart. I often find myself selecting a block of code and using smart reindent explicitly to fix this -- and I've had Parinfer break code by adjusting parens to match the (incorrect) indentation. It can be quite frustrating. But, overall, its benefits outweigh its downsides so I still keep using it... 😐

mauricio.szabo 2020-03-25T19:24:15.011Z

Yes, for example, I'm used to use CTRL+ALT+9 to change parinfer mode from "smart" to "paren" before pasting any code. This wil not change the structure of pasted code, so I can indent manually after and then change back to "smart"

mauricio.szabo 2020-03-25T19:30:30.011200Z

Yes, even while working on ClojureScript, sometimes if there's an error on the code, it'll not reload in the browser / node.js environments. This means that ClojureScript REPL will not work (and sometimes, autocomplete/etc will also fail).

seancorfield 2020-03-25T20:03:05.011400Z

I forget to do that a lot of the time. I probably ought to set up a command that pastes code with Parinfer mode set to paren (and then changes it back) -- and get used to whatever hot key I bind to that.

mauricio.szabo 2020-03-25T21:11:45.011600Z

I was thinking about a plug-in for Atom that would evaluate multiple commands, one after another, exactly because of that 😄. But in the end, for the cases that I had to use it, I ended up using a custom command on init.coffee