unrepl

discussing specification of an edn-based repl and its implementations.
cgrand 2017-05-03T10:41:21.790700Z

@pesterhazy did you get some hammock time to think about completion and friends?

pesterhazy 2017-05-03T15:10:05.573150Z

my rough plan was to implement the whole thing for clojurescript, then abstract out the commonalities

cgrand 2017-05-03T15:39:58.332372Z

@pesterhazy what are you current commands set? Autocomplete? Doc?

pesterhazy 2017-05-03T16:40:54.794387Z

those two, plus interrupt

pesterhazy 2017-05-03T16:41:24.805129Z

still a very small interface. It needs refactoring, it's totally hacky

cgrand 2017-05-03T16:41:39.809985Z

Well interrupt in js...

pesterhazy 2017-05-03T16:42:04.819783Z

haha, true

pesterhazy 2017-05-03T16:42:16.824468Z

how do people do autocomplete in cljs?

pesterhazy 2017-05-03T16:42:30.829339Z

look at the global js mangled names?

pesterhazy 2017-05-03T16:43:44.857275Z

if I type freak-sh<TAB>, look at js/window.current.ns.freak_sh*?

thheller 2017-05-03T16:54:20.097947Z

@pesterhazy I imagine that you'd look at the compiler env. CLJS doesn't have the same runtime capabilities CLJ has so you can't just find-ns and iterate the vars

pesterhazy 2017-05-03T16:55:06.115174Z

right, hmm...

thheller 2017-05-03T16:55:47.130552Z

should have pretty much everything you'd need

pesterhazy 2017-05-03T16:56:05.137979Z

I'm wondering what the limits of the simple-minded approach I mentioned would be

pesterhazy 2017-05-03T17:06:59.394583Z

@thheller, what you're saying is that I'll need to access the compiler state, which works very differently in JVM cljs, lumo and planck

cgrand 2017-05-03T17:24:34.790872Z

Well I think it's best to consider JVM cljs and selfhosted cljs as two similar but distinct targets

jfntn 2017-05-03T17:34:29.024651Z

RE cljs completion, iirc there’s a “fork” of compliment that works for cljs in the replique repo https://github.com/EwenG/replique/tree/master/src/replique/compliment

jfntn 2017-05-03T17:34:50.032201Z

Don’t remember why it never made it upstream though

anmonteiro 2017-05-03T17:39:37.141130Z

FWIW Lumo already provides a hook for you to get completions

pesterhazy 2017-05-04T12:28:42.079878Z

anmonteiro: ah nice!

dominicm 2017-05-03T17:56:18.533679Z

@thheller Do you think that tools like unravel should be lsp clients for their completion support?

richiardiandrea 2017-05-03T18:35:49.463384Z

@jfntn I have been thinking of creating one using Tern (or even just porting)

richiardiandrea 2017-05-03T18:36:18.475469Z

there was an issue in compliment for that

richiardiandrea 2017-05-03T18:36:32.481055Z

but unfortunately I haven't had time yet

jfntn 2017-05-03T18:36:35.482135Z

Ah that could be useful, cider’s completion works for cljs but I’d love to have js completion in there as well

richiardiandrea 2017-05-03T18:38:35.529434Z

yeah, in particular object completion now it is done in lumo by piggiebacking on the node.js repl

thheller 2017-05-03T19:36:08.855292Z

@dominicm yes, probably. but lsp is just another protocol so as long as upgrading is supported you can use whatever really

dominicm 2017-05-03T19:37:35.886341Z

@thheller as unrepl has no support for multiplexing, that means multiple connections though correct?

thheller 2017-05-03T19:38:20.902742Z

I would think so yes.

dominicm 2017-05-03T19:45:44.061493Z

@cgrand I've never fully grasped what a constrained environment looks like?

cgrand 2017-05-03T19:52:09.202440Z

An env in which you can't create a second connection. Far from being the norm. You can imagine starting the process using exec and just talking to it over good old stdin stdout. No socket involved.

cgrand 2017-05-03T19:53:09.224804Z

Or in a browser repl where it's the browser connecting to the server (even if there are other solutions)

dominicm 2017-05-03T19:55:34.278709Z

stdin/stdout is a good one. inf-clojure would love that one.

👍 1