unrepl

discussing specification of an edn-based repl and its implementations.
dominicm 2017-11-15T08:57:21.000258Z

@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)

cgrand 2017-11-15T09:21:39.000347Z

@dominicm so CIDER minus middleware is as useful as unrepl 😕

cgrand 2017-11-15T09:27:01.000293Z

I have been thinking of stacktraces recently: what about display the most nested cause first and bottom to top?

dominicm 2017-11-15T09:45:37.000006Z

@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.

cgrand 2017-11-15T09:49:44.000315Z

Time for a state of unicorn_face repl

cgrand 2017-11-15T09:50:19.000089Z

The last big open question has been extensions.

cgrand 2017-11-15T09:54:05.000210Z

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.

cgrand 2017-11-15T09:55:14.000209Z

Clients should support BYOB (bring your own blob), it allows: • quick experimentation/dev/user mods • no blob by --blob /dev/null (thanks @pesterhazy)

cgrand 2017-11-15T09:57:43.000494Z

Extensions (or at least their declarations) should be part of the blob.

cgrand 2017-11-15T10:06:13.000447Z

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.

volrath 2017-11-15T10:54:58.000078Z

this is not related to above, but I was playing with unrepl and I noticed something that might be weird behavior when printing strings

volrath 2017-11-15T10:57:15.000074Z

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

volrath 2017-11-15T10:57:51.000156Z

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

volrath 2017-11-15T10:58:05.000212Z

is this a known bug?

cgrand 2017-11-15T10:59:44.000182Z

no

cgrand 2017-11-15T10:59:57.000410Z

but I’m pondering whether it’s a bug

volrath 2017-11-15T11:01:08.000309Z

alright

volrath 2017-11-15T11:01:17.000186Z

does not happen on a regular repl though

cgrand 2017-11-15T11:01:47.000103Z

I know when I introduced this: it’s when I started buffering output

volrath 2017-11-15T11:02:13.000209Z

oh ok

cgrand 2017-11-15T11:31:20.000270Z

@volrath ok it’s a bug: introducing non-determinism where there was none is bad

cgrand 2017-11-15T11:31:36.000409Z

fixed in unrepl master and unravel sideloader

👍 1
cgrand 2017-11-15T13:44:02.000276Z

@dominicm a fork (hopefully temporary) of cider-nrepl to make some features shared may be an option

dominicm 2017-11-15T14:03:06.000252Z

I feel like like we're talking at different levels.

dominicm 2017-11-15T14:03:17.000131Z

Fundamentally, cider-nrepl is just a clojure tooling library.

dominicm 2017-11-15T14:03:33.000450Z

the nrepl part is incidental to integration. But it's largely separate.

cgrand 2017-11-15T14:05:58.000199Z

not so incidental

cgrand 2017-11-15T14:08:51.000066Z

the usage of a pprint-fn and the serialization of things in strings

cgrand 2017-11-15T14:09:31.000139Z

the handliing of ex-data-blacklist

cgrand 2017-11-15T14:10:19.000095Z

that’s at least two places where things would have to be done differently to leverage unrepl

cgrand 2017-11-15T14:11:19.000274Z

black-list -> elision instead of suppression pprint to string -> nothing, put the value

cgrand 2017-11-15T14:13:05.000511Z

@dominicm if I’m still not on the same level as you, explain harder 🙂

dominicm 2017-11-15T14:14:00.000052Z

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)

cgrand 2017-11-15T14:14:28.000223Z

:thumbsup: :thumbsup: :thumbsup:

dominicm 2017-11-15T14:14:53.000573Z

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.

cgrand 2017-11-15T14:16:34.000044Z

ok and me I’m at “nrepl limitations has crept in all kinds of nooks and crannies”

dominicm 2017-11-15T14:35:54.000172Z

Okay, you started talking about unrepl extensions, and I wasn't certain about your intent.

dominicm 2017-11-15T14:36:10.000695Z

I was interested in having cider.el load the cider-nrepl.jar via the class side loader.

cgrand 2017-11-15T16:47:07.000099Z

@dominicm what’s the first milestone you want to achieve? And could you remind us of your overall plan?

dominicm 2017-11-15T18:04:25.000181Z

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.

dominicm 2017-11-15T18:41:12.000171Z

It wasn't specific to cider really.

richiardiandrea 2017-11-15T18:41:20.000457Z

I have neglected it, but I basically have somewhere the code that fetches dependencies and puts them in a blob

richiardiandrea 2017-11-15T18:41:26.000083Z

dunno if it can be helpful

dominicm 2017-11-15T18:42:42.000216Z

I was thinking of clients, not of blobs. But maybe that's wrong?

richiardiandrea 2017-11-15T18:43:34.000002Z

well maybe I am not up to date myself with new developments 😄

cgrand 2017-11-15T19:25:35.000619Z

@richiardiandrea blobs are so yesterday

dominicm 2017-11-15T19:25:51.000323Z

Yeah 😳. Not necessarily full detail. I just didn't understand the gap between jar and base64 encoded class.

richiardiandrea 2017-11-15T19:25:53.000506Z

yeah I was afraid of that 😄

cgrand 2017-11-15T19:27:03.000771Z

Assuming your blob supports side loading then you don’t need to package much in the blob.

cgrand 2017-11-15T19:29:32.000172Z

Have you seen how unravel does sideloading from a directory of classes? JAR won’t be much different

dominicm 2017-11-15T19:32:08.000716Z

It does that? I had no idea!

cgrand 2017-11-15T19:33:44.000696Z

Not yet in master, on the sideloader branch.

cgrand 2017-11-15T19:34:43.000143Z

Use the -cp option to pass a list of colon-separated dirs

dominicm 2017-11-15T19:55:05.000579Z

I'll take a look.

cgrand 2017-11-15T21:56:34.000194Z

These 15 lines are the client-side of the sideloader