This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-03
Channels
- # adventofcode (6)
- # bangalore-clj (1)
- # beginners (15)
- # boot (4)
- # cider (14)
- # clara (1)
- # cljs-dev (1)
- # clojure (115)
- # clojure-art (1)
- # clojure-france (1)
- # clojure-greece (1)
- # clojure-korea (9)
- # clojure-russia (1)
- # clojure-spec (62)
- # clojure-taiwan (1)
- # clojure-uk (18)
- # clojurescript (5)
- # component (1)
- # cursive (3)
- # datascript (2)
- # datomic (17)
- # devcards (2)
- # editors (4)
- # emacs (65)
- # events (2)
- # funcool (4)
- # hoplon (92)
- # jobs (6)
- # london-clojurians (1)
- # luminus (1)
- # midje (2)
- # mount (1)
- # off-topic (1)
- # onyx (51)
- # protorepl (6)
- # re-frame (116)
- # reagent (7)
- # ring (2)
- # spacemacs (2)
- # specter (4)
- # untangled (1)
- # yada (1)
Wow replique is fast! I just tried to (println (range 10000))
: in Cider it takes 10 seconds and the repl stalls updating only a couple of times, inf-clojure doesn’t choke but takes almost 15 seconds, finally replique completes in about 4 seconds with a dozen repl updates
the difference between inf-clojure and and replique is probably because the raw cljs repl tries to reorder messages sent by the browser
@doglooksgood I would like to add less, sass and stylus support
@doglooksgood cljs autocompletion for js interop things
@jfntn oh, you mean at the clojure REPL? then I don't know where the difference between inf-cojure and replique comes from
@ewen curious to hear 1) why you started replique rather than build upon cider or one of the existing projects? and 2) what are your thoughts in terms of roadmap and things you want to add?
I think there's a feature should be added, whenever I save the file, it reload the relative namespaces. so that the browser can reload.
And I wonder if it is possible to have es5 syntax for output js file. maybe some additional shim for react native. currently react native did not have a perfect solution.
@jfntn 1) because I did not want to use nrepl and because adding replique style clojurescript support to cider would be a lot of change to cider, so 1) it would be harder to implement than starting from scratch, 2) it would probably not have been accepted into cider anyway
2) there is a lot of things I want to add to replique, css preprocessors support, spec based completion and documentation, classpath reloading
@doglooksgood if you mean reloading a file on file save, that's not something i am going to add, I want to keep control when files are reloaded, although you can easily hook into emacs buffer saving to implement something like that
@ewen totally agree on 1), I think it’s time to move away from nrepl but unfortunately cider is so dependent on it that it seems to make more sense for them to try and retrofit socket repl into nrepl rather than build on the native stuff directly
@doglooksgood if you mean automatically reloading dependent namespaces, I think it could be useful but I'm not going to add it because 1) that's hard to implement, it requires some amount of global static analysis and because 2) I don't think that's needed in a repl driven workflow where files are often reloaded right after beeing edited
@doglooksgood the es5 output configuration would definitively be useful
@doglooksgood concerning react native, I have no idea what's needed to support react native, but i'm definitively interested in adding that
@ewen are there any large chucks of cider functionality you’d like to implement/port? I can see myself missing the stacktrace popup/navigation and most definitely the debugger
@jfntn you can't retrofit a stream oriented REPL into nrepl. a stream oriented REPL (or socket REPL) is more fundamental than a message oriented REPL. you can build a message oriented REPL on top of a stream oriented REPL but the opposite is not true
actually replique have both, the REPL is stream oriented, and the tooling stuff uses a message oriented REPL
Hmm couldn’t you have an adapter that wraps the socket and parses the stream into messages to restore compatibility? Not saying I’d wanna do that, just doesn’t seem impossible...
Don’t wanna bikeshed here since we’re both not interested in a socket-based nrepl, but I don’t understand why you couldn’t do it 2way. Have a proxy take messages in nrepl format and write them to the socket…? Not familiar with nrepl internals at all, so disregard if I’m totally wrong!
you can do that but the second socket is still message oriented then, ie the reader still has to parse messages
there is a good discussion about that on the mailing list https://groups.google.com/forum/#!topic/clojure-dev/Dl3Stw5iRVA
@ewen What are your thoughts on emacs/clojure interop? I’ve seen mostly the clj code as strings sent over the wire, as well as the nrepl request payloads with lists of strings. Both of which seem like a maintenance nightmare esp on the client side
It seems like the clojure code should have a clear api for exposing methods to the client, and possibly use macros/templating/code-generation to spit a emacs-lisp library that clients can use?
well the emacs client of replique prints EDN data and reads elisp data, the server read EDN and prints elisp. Implementing a printer is much easier than implementing a reader. On the server side, tooling message handling is done by a multimethod so adding a new tooling message means adding a new method
At first I implemented an EDN reader on emacs side. That worked but was MUCH slower that reading elisp
If I ever need it to be extensible, I would probably have to implement something like transit
Do you have any thoughts on debuggers? I’ve been wondering how feasible it’d be to write one as a library to work with socket repl.
The one in Cider is pretty decent, but still pales in comparison to what people use in CL or even scheme and at a glance it seems like this could be a symptom of the implementation being too much of a emacs hack as opposed to a clojure-first effort with an emacs ui on top
but the cursive debugger looks very good, i think that's just a matter of spending a lot of time to make it good
Certainly not a CL or scheme expert but what they have is basically a debugging mode right in the repl. When an error occurs, the repl switches to the debugger right at that frame, and you have a bunch of commands to inspect the environment, step through the code etc
building upon a separate platform (the jvm) definitively makes a good integration harder, although not impossible
+ the jvm debugger has good support for multithreading debugging, I'm not sure that's the same story in CL or scheme
There’s probably a lot to be learned from it, though the codebase is huge at this point
a downside of the jvm debugger is that it only keeps track of line numbers, which is not sufficient for lisp languages
Actually this is a lot better in CL because of the restart system that’s more powerful than exceptions. Any error in any thread will yield a debugger prompt, you can inspect and redefine the code while execution is paused, and once it looks like the bug is fixed you exit the debugger and execution resumes from the last restart point (think the last try block) as if the bug never happened. Really cool
Was referring to multi-threaded support, interesting point about line numbers, wasn’t aware of that, not sure how this’d work...
I'd like to follow along with this clojure setup tutorial (http://www.braveclojure.com/basic-emacs/) but I have an existing Spacemacs config I'd like to keep. What's the preferred way to manage multiple configurations?