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 2019-10-29T20:54:46.112300Z

@sogaiu just for the record, the joker REPL breaks if I use in-ns. The reason is that on other REPLs, in-ns would allow some commands like ns to exist. If you're on joker REPL, using in-ns in a namespace that doesn't exist, it will not allow any other command - even the declaration of a new namespace...

mauricio.szabo 2019-10-29T20:55:16.112900Z

So, I think for convenience I'll stick with ns to change into a namespace.

2019-10-29T21:14:57.114900Z

ah, i didn't know that, thanks for mentioning it. if (ns my-ns) is used, doesn't that lead to bringing in clojure.core? if the "official" ns for a namespace (what's typically at the top of a file) is later executed that tries to exclude things from clojure.core, does unmapping of those things happen automatically? i guess i should go check this 🙂

2019-10-29T21:22:54.118100Z

i think what i described does happen -- i just did a little test using :refer-clojure :exclude [+] in an ns and i defined + in the file to be something else (e.g. *). if i use (ns my-ns) before loading or requiring, + is from clojure.core. if i load or require the file, + behaves based on the contained definition.

2019-10-29T21:23:05.118400Z

that sounds expected, right?

2019-10-29T21:33:36.120700Z

@mauricio.szabo fwiw, as expeced, a subsequent load-file does override the initial clojure.core/+ def with the custom one. i'm really not sure what a good approach would be -- i don't know if loading a ns before "switching" into it is a good option.

mauricio.szabo 2019-10-29T22:26:23.121700Z

Yes, I also don't know. I'm somehow used to the refresh workflow (both with require or with clojure.tools.namespace), and with ClojureScript by just saving files, so with alternative REPLs I have no idea what's to be expected.

mauricio.szabo 2019-10-29T22:35:37.122800Z

Okay, things are really a mess on these REPL worlds 😞 Plank creates a new namespace everytime you use (ns <something>), so I need to use in-ns 😞

mauricio.szabo 2019-10-29T22:39:04.123100Z

Lumo does the same

2019-10-29T22:48:06.123900Z

perhaps the various cljs implementations are mostly similar? have you had a look at what shadow-cljs does?

seancorfield 2019-10-29T22:51:53.125600Z

Could you do it conditionally, based on whether the ns already exists? Run find-ns and if it finds one, use in-ns, else use ns?

mauricio.szabo 2019-10-29T22:57:25.126300Z

That may be a good idea. I'll test it right now

mauricio.szabo 2019-10-29T23:24:13.127400Z

The sad part is that this code: (if (find-ns 'foo.bar) (in-ns 'foo.bar) (ns foo.bar)) Works on almost every REPL, the big except being ClojureScript...

seancorfield 2019-10-29T23:31:10.129800Z

groan