Fork me on GitHub
#unrepl
<
2017-11-15
>
dominicm08:11:21

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

cgrand09:11:39

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

cgrand09:11:01

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

dominicm09:11:37

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

cgrand09:11:44

Time for a state of unicorn_face repl

cgrand09:11:19

The last big open question has been extensions.

cgrand09:11:05

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.

cgrand09:11:14

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

cgrand09:11:43

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

cgrand10:11:13

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.

volrath10:11:58

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

volrath10:11:15

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

volrath10:11:51

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

volrath10:11:05

is this a known bug?

cgrand10:11:57

but I’m pondering whether it’s a bug

volrath11:11:17

does not happen on a regular repl though

cgrand11:11:47

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

cgrand11:11:20

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

cgrand11:11:36

fixed in unrepl master and unravel sideloader

cgrand13:11:02

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

dominicm14:11:06

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

dominicm14:11:17

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

dominicm14:11:33

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

cgrand14:11:58

not so incidental

cgrand14:11:51

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

cgrand14:11:31

the handliing of ex-data-blacklist

cgrand14:11:19

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

cgrand14:11:19

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

cgrand14:11:05

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

dominicm14:11:00

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)

cgrand14:11:28

:thumbsup: :thumbsup: :thumbsup:

dominicm14:11:53

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.

cgrand14:11:34

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

dominicm14:11:54

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

dominicm14:11:10

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

cgrand16:11:07

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

dominicm18:11:25

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.

cgrand19:11:07

That’s all you need an example of how to side load from a jar?

dominicm19:11:51

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

cgrand19:11:32

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

dominicm19:11:08

It does that? I had no idea!

cgrand19:11:44

Not yet in master, on the sideloader branch.

cgrand19:11:43

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

dominicm19:11:05

I'll take a look.

cgrand21:11:34

These 15 lines are the client-side of the sideloader

dominicm18:11:12

It wasn't specific to cider really.

richiardiandrea18:11:20

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

richiardiandrea18:11:26

dunno if it can be helpful

dominicm18:11:42

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

richiardiandrea18:11:34

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

cgrand19:11:35

@richiardiandrea blobs are so yesterday

richiardiandrea19:11:53

yeah I was afraid of that 😄

cgrand19:11:03

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