This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-01
Channels
- # beginners (41)
- # boot (25)
- # cider (34)
- # cljs-dev (221)
- # cljsrn (1)
- # clojure (191)
- # clojure-dusseldorf (4)
- # clojure-hamburg (1)
- # clojure-italy (8)
- # clojure-poland (1)
- # clojure-russia (22)
- # clojure-spec (27)
- # clojure-uk (91)
- # clojurescript (101)
- # core-async (11)
- # cursive (33)
- # data-science (9)
- # datascript (3)
- # datomic (30)
- # emacs (4)
- # events (4)
- # garden (6)
- # jobs (3)
- # leiningen (8)
- # luminus (39)
- # lumo (2)
- # off-topic (158)
- # om (13)
- # onyx (1)
- # parinfer (22)
- # planck (2)
- # protorepl (5)
- # re-frame (7)
- # reagent (10)
- # remote-jobs (1)
- # ring (1)
- # ring-swagger (20)
- # unrepl (92)
- # vim (11)
Pondering: 1/ should we worry about concurrent server implementations extension interop for the same platform? (forks) 2/ should we worry about extension interop between server impl for different platforms? (cljs, cljs, cljsjs, cljr...)
Imho we need to start from somewhere, so I'd start from 1, still keeping 2 in the back of our head
put it this way, 1 seems to be a subcase of 2 (if done correctly)
(if I understand correctly of course)
in cloiure it’s easy to start an extended repl by calling clojure.main/repl
, why not follow this lead?
I like the idea, yes, but also you don't want to call a function for everything you want to add to it...
the big cons to the clojure approach is that you don’t have access to the current extensions (eg if you just want to modifiy prompt), so it calls for some dynamic env
so for completion you should not need a compliment.core/repl
function
But I think there is going to be a clojure.cljs/repl
yes, so nRepl has descriptors, that would resemble it
I declare which actions the repl would understand
yep I like the idea, I think that part of nRepl was actually good, I guess you are more than familiar with it 😄
lol: https://github.com/clojure/tools.nrepl#middleware-descriptors-and-nrepl-server-configuration
the latter is more dynamic, why not an atom?
yeah the problem of namespace munging comes back
lol yes, pods in boot
are superslow
(to bootstrap I mean)
well if Clojure is slow than Clojure in Clojure (pods) what is it 🙂 ?
@cgrand https://docs.google.com/document/d/1dnb1ONTpK9ttO5W4thxiXkU5Ki89gK62anRqKEK4YZI/edit?authkey=CMuszuMI you've been named as involved. It's too late now.
and I would rather blame clojure for making namespaces a mutability hell (Zach Tellmann has some name for that “clojure nasty mutability closet” or something)
so in the above, what is the content of the :complete
key? a simbol that points to the completion function?
munging: let’s assume we live in a hickeyic world where libs only ever accrete features?
yes I liked the merkle tree for namespaces 😉
maybe obvious here, I assume the client will not know about that
oh ok cool
so it doesn’t say a thing about how namespaces are loaded. (the dreaded namespace talk)
yeah well, at some point the munged namespace needs to go back to the client
or a mapping is done server side
say the munged compliment.core
server and client need to sync, either they speak unmunged or they speak munged (no?)
(sorry corrections)
it is super, also against tampering (if we wanted to)
is it a question? if so, not yet
(what’s the limit on classname length? well Spring existence proves we have ample room)
so you munged it statically and certainly also unrepl.complete
which uses it while exposing a smaller api
at the moment forms are sent over the wire in unravel
: https://github.com/Unrepl/unravel/blob/compliment-blob/src/unravel/loop.cljs#L76
https://github.com/Unrepl/unravel/blob/compliment-blob/src/unravel/loop.cljs#L200
[unrepl blob, with actions referring to unrepl.complete$sha1$.../xxx][munged compliment and complete]
`
if we had a :complete
command action it would be different yep
in that case the action would call the munged ns and send back stuff
should work, I don't see big obstacles (right now)
actions make (I hope) lazy loading easier and interop between client and server easier. (edit: plus in case of doubt let’s have another level of indirection 😉)
even better, clients can choose what to lazy load
the action can be protected behind a delay
now the template could be (unrepl.repl/dyncall 'unrepl.complete$sha1$.... ..)
with dyncall
ensuring the namespace is loaded beforehand
it improves a lot of what nRepl at the moment does (but cider-nrepl
folks will soon start adding delay
s)
also, in this case the whole current nRepl middleware could be blobified and transformed in actions
which is very appealing
but wait...maybe I am missing something about munging
if it is content based...would all the clients end up with the same sha1
?
so cavalier extensions of protocols or multimethods or usage of atoms may be problematic. (more than now?)
atoms in the blob you mean? why?
uhm right, I had in the back of my head to have a session-based munging actually...
you could put the atom in a session-based munged ns and that is only yours
at some point per-connection ns (with automatic removal) was considered for socket repl if memory serves me
if we munged all the namespaces involving session, all those vars would effectively be available to the session only (even libs right?)...just throwing it there, haven't thought about implications
what are we trying to achieve? maximal protection against badly written code used by extensions?
if we are already protected from conflicting with application code, it’s a good enough protection for me
no well, but your concern is valid, if a library is stateful, the state will be reflected to all the clients
an example would be tools.namespace
not saying we cannot solve this, just putting it there...this is a pretty common thing that a user would want to do in a repl
@richiardiandrea true but it's not a class of problems that is made worse by unrepl.