@cgrand missed your reply the other day about CIDER. Largely, yes, don't need middleware. However there's lots of useful functions in CIDER, e.g. A stacktrace tagger which gives you a data form of a stack, which certain lines marked (e.g it could tag unrepl frames, for hiding/fading)
@dominicm so CIDER minus middleware is as useful as unrepl 😕
I have been thinking of stacktraces recently: what about display the most nested cause first and bottom to top?
@cgrand hmm, depends what unrepl provides. My understanding is that cider had a big bag of functions. The other useful thing is the Mr Anderson'd version of tns, for refreshing code. Also things like the spec explorer, the enhanced metadata. Mostly little things, but I think they've got a lot of edge cases covered.
Time for a state of unicorn_face repl
The last big open question has been extensions.
I’d like to first make a detour by the blob. I’ve been ambiguous on to blob or not to blob in the past. Here is my current thinking: blob is the default, no blob should be the exception.
Clients should support BYOB (bring your own blob), it allows:
• quick experimentation/dev/user mods
• no blob by --blob /dev/null
(thanks @pesterhazy)
Extensions (or at least their declarations) should be part of the blob.
Clients should prefer declaring and using actions templates over directly emitting code to aux
. For three reasons:
• better byob support
• in the future support CLJS, CLJSJS and CLJ with the same client and several blobs
• it fosters code sharing across clients.
this is not related to above, but I was playing with unrepl and I noticed something that might be weird behavior when printing strings
when using println or prn, things work as expected, you get a :read, a :started-eval, an :out, an :eval and a :prompt. but if you use print or pr, you get :read :started-eval :eval :prompt and then :out
I tried it in unrepl and unravel, same behavior in both.. which ends up putting the printed str at the beginning of the next prompt
is this a known bug?
no
but I’m pondering whether it’s a bug
alright
does not happen on a regular repl though
I know when I introduced this: it’s when I started buffering output
oh ok
@volrath ok it’s a bug: introducing non-determinism where there was none is bad
fixed in unrepl master and unravel sideloader
@dominicm a fork (hopefully temporary) of cider-nrepl to make some features shared may be an option
I feel like like we're talking at different levels.
Fundamentally, cider-nrepl is just a clojure tooling library.
the nrepl part is incidental to integration. But it's largely separate.
not so incidental
Have a look at https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/stacktrace.clj for example
the usage of a pprint-fn
and the serialization of things in strings
the handliing of ex-data-blacklist
that’s at least two places where things would have to be done differently to leverage unrepl
black-list -> elision instead of suppression pprint to string -> nothing, put the value
@dominicm if I’m still not on the same level as you, explain harder 🙂
Yeah. Those definitely are things I'd like to see improve in cider-nrepl. And I'd actually be happy to make the changes (they're quite trivial)
:thumbsup: :thumbsup: :thumbsup:
My brain is at "Well, just use it as a library" currently. And I'm ignoring the trivial pprint and blacklisting that nrepl has caused.
ok and me I’m at “nrepl limitations has crept in all kinds of nooks and crannies”
Okay, you started talking about unrepl extensions, and I wasn't certain about your intent.
I was interested in having cider.el load the cider-nrepl.jar via the class side loader.
@dominicm what’s the first milestone you want to achieve? And could you remind us of your overall plan?
Not sure of my overall plan. My milestone was to be able to have a client bring a tooling jar of some kind, with various namespaces in. How do I get from that jar to a format that is easy to sideload.
It wasn't specific to cider really.
I have neglected it, but I basically have somewhere the code that fetches dependencies and puts them in a blob
dunno if it can be helpful
I was thinking of clients, not of blobs. But maybe that's wrong?
well maybe I am not up to date myself with new developments 😄
@richiardiandrea blobs are so yesterday
Yeah 😳. Not necessarily full detail. I just didn't understand the gap between jar and base64 encoded class.
yeah I was afraid of that 😄
Assuming your blob supports side loading then you don’t need to package much in the blob.
Have you seen how unravel does sideloading from a directory of classes? JAR won’t be much different
It does that? I had no idea!
Not yet in master, on the sideloader branch.
Use the -cp option to pass a list of colon-separated dirs
I'll take a look.
These 15 lines are the client-side of the sideloader