unrepl

discussing specification of an edn-based repl and its implementations.
richiardiandrea 2017-11-29T03:07:53.000019Z

There are some efforts towards making error messages better, not a the keyboard now, but I will try to fetch the links

dominicm 2017-11-29T07:14:56.000026Z

@cgrand that's awesome. I think I missed this, how does the data form of the exception look?

dominicm 2017-11-29T07:15:28.000131Z

I've been hacking on cider's stacktrace excavator recently, so I'd be curious to know if I can get the same thing to work on top of Unrepl's system.

dominicm 2017-11-29T07:16:19.000252Z

a big feature for me was being able to extract the java.net.URL for the stack frames by looking at file extensions & inferring the ns & symbol (and ergo the position in the classpath).

cgrand 2017-11-29T08:41:07.000131Z

@dominicm what’s awesome? error display? it’s all @volrath. The current structure is the one returned by clojure Throwable->Map

dominicm 2017-11-29T08:41:49.000208Z

Awesome unravel error display.

cgrand 2017-11-29T08:42:10.000135Z

it’s unrepl.el actually

volrath 2017-11-29T08:46:40.000244Z

I don't believe it's all mine haha, but I'll take the compliment πŸ™‚

dominicm 2017-11-29T08:46:42.000277Z

Oh really, oops πŸ˜„

volrath 2017-11-29T08:47:23.000040Z

@dominicm what do you mean by cider's stacktrace excavator? it'd be cool to take a look at it

volrath 2017-11-29T08:47:44.000283Z

I went through cider's stacktrace source code and I don't remember seeing that term, but maybe you're referring to something else

dominicm 2017-11-29T08:47:59.000265Z

I came up with the word "excavator" πŸ™‚ I'm mostly referring to https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/stacktrace.clj

volrath 2017-11-29T08:48:27.000458Z

ah cool πŸ™‚

volrath 2017-11-29T08:49:29.000180Z

yeah I went through the cider emacs mode stacktrace sourcecode, and I noticed they had differentiation for things we don't have

cgrand 2017-11-29T08:50:42.000062Z

like?

cgrand 2017-11-29T08:54:27.000061Z

re: print limits; initial rendering of an exception in an exception context width different limits ok (how to set them is still an open question) however when you ask for more you are just using an elision which has no context so either I make elision to embed some kind of context or the client set limits for aux before retrieving an elision

πŸ¦† 1
cgrand 2017-11-29T08:55:43.000193Z

maybe embedding the context is the more sensible way

volrath 2017-11-29T08:59:47.000075Z

what kind of context are you thinking of? like size of the elided seq?

dominicm 2017-11-29T09:07:42.000176Z

The clojure frames are analyzed by looking at the class, and demunging it using the clojure.repl method.

volrath 2017-11-29T09:49:08.000181Z

got it

volrath 2017-11-29T09:52:27.000399Z

I think this is a good idea πŸ‘

cgrand 2017-11-29T09:54:51.000086Z

Guys, what about another unrepl hacktogether day in Berlin on Friday 23/2? (the day before :clojureD)

βž• 2
cgrand 2017-11-29T09:56:36.000157Z

If it proves a good idea I’ll provide an extension point in unrepl-make-blob. In the meantime, can you experiment by patching unrepl.print?

volrath 2017-11-29T09:57:49.000183Z

sure

cgrand 2017-11-29T09:58:25.000379Z

My talk will be about repls...

volrath 2017-11-29T10:08:58.000338Z

one thing though.. this things we're talking about are frame specific, and frames are returned as vectors by Throwable->map, [class method file lineno].. not sure how would be the appropriate way to extend.. maybe add another key at the :trace level, that also has a vector of vectors but with the customized extended data? or do you think there might be a better way?

cgrand 2017-11-29T10:19:43.000291Z

scrap Throwable->map altogether?

cgrand 2017-11-29T10:21:43.000572Z

In eval context (appearing as data), printing as #error seems sensible

cgrand 2017-11-29T10:22:13.000343Z

but in exception context where the client is going to fo a lot of custom rendering?

volrath 2017-11-29T10:22:15.000177Z

you still have *e for that

volrath 2017-11-29T10:22:37.000011Z

yes, I agree

volrath 2017-11-29T10:23:11.000214Z

Throwable->map serves as a good entry point for extension, and a good default

cgrand 2017-11-29T10:23:33.000080Z

And in eval context we may add :unrepl/error at the root of the #error map

cgrand 2017-11-29T10:24:18.000279Z

as usual, use elisions liberally πŸ™‚

pesterhazy 2017-11-29T10:39:09.000187Z

according to the changelog Throwable->map's behavior has changed 1.8->1.9 - we'd need to cover both

volrath 2017-11-29T12:30:46.000201Z

btw, I'm going to briefly show unrepl.el today at the berlin emacs meetup, wish me luck πŸ™‚

πŸ€ 1
volrath 2017-11-29T12:31:12.000205Z

I want to get some feedback on "emacs ergonomics" for the repl.. make it feel comfortable

pesterhazy 2017-11-29T12:53:06.000238Z

super!

pesterhazy 2017-11-29T12:53:39.000069Z

actually it occurs to me my office is next door - when is the meetup tonight?

volrath 2017-11-29T12:54:11.000020Z

yes, 7-7:30 .. it'd be cool if you stop by πŸ™‚

pesterhazy 2017-11-29T12:54:38.000009Z

cool will try (depending on how long my standup call goes)

volrath 2017-11-29T12:55:31.000031Z

alright! talks always start like 7.45, it's not so rigid, so don't worry

volrath 2017-11-29T12:55:37.000234Z

I'll make time haha

cgrand 2017-11-29T13:09:16.000062Z

Ok v0.3.0 of packed-printer on npm and clojars

cgrand 2017-11-29T13:10:12.000029Z

It’s good enough to use IMO (no more SO, no more surprise quadratic runtime)

cgrand 2017-11-29T13:11:50.000108Z

Oh and I have a 1-sentence description of its behaviour: > This printer likes rectangular shapes (the wider the better) and despises staircases.

cgrand 2017-11-29T13:14:53.000094Z

Does someone has a gnarly datastructure to print?

dominicm 2017-11-29T13:16:01.000339Z

@cgrand A colleagues favourite is (clojure.java.reflect/reflect java.io.File)

dominicm 2017-11-29T13:16:10.000167Z

or is it clojure.reflect?

cgrand 2017-11-29T13:17:24.000101Z

yikes

cgrand 2017-11-29T13:20:00.000459Z

@dominicm nice one!

cgrand 2017-11-29T13:28:24.000073Z

If one wants to pretty print machine-printed unrepl edn, then this is the file to use as a basis: https://github.com/cgrand/packed-printer/blob/master/src/net/cgrand/packed_printer/text/edn.cljc

cgrand 2017-11-29T13:28:49.000004Z

of course it could be made to emit ansi codes

dominicm 2017-11-29T14:30:04.000067Z

I haven't followed parfix much, but is it essentially parinfer?

cgrand 2017-11-29T14:31:05.000625Z

it just some quick paren helpers

dominicm 2017-11-29T14:37:53.000160Z

https://www.youtube.com/watch?v=q4LmSC6xdsI planck has this

dominicm 2017-11-29T14:38:06.000634Z

I'm sure there's a demo with more goodies somewhere

dominicm 2017-11-29T14:39:24.000578Z

https://www.youtube.com/watch?v=xdIwkPEnlFY this is what I was thinking of, not quite the terminal I guess. Still would be a nice thing to have.

cgrand 2017-11-29T16:36:55.000406Z

@dominicm I haven’t spent enough time with parinfer

dominicm 2017-11-29T16:38:49.000848Z

It's very good. πŸ™‚ http://shaunlebron.github.io/parinfer/ you can play with it in-browser.

dominicm 2017-11-29T16:39:07.000729Z

There's a new smart mode which gets rid of these mode changes, but I think you can ignore them for the purposes of unravel.

cgrand 2017-11-29T17:39:24.000332Z

Question: how to add a maven dep to unravel?

cgrand 2017-11-29T22:18:49.000374Z

@volrath how was the meetup?

volrath 2017-11-29T22:32:31.000572Z

it went quite well, I think people really dug the idea, got a chance to talk a bit more with pesterhazy about it, and about how to do some unrepl PR.

volrath 2017-11-29T22:33:24.000488Z

also, someone asked again about the possibility of using the client (and protocol) for something other than clojure

volrath 2017-11-29T22:36:31.000148Z

I'm going to stop now on working on "flashy features" and going to press more on reliability and usability, so we can plan for an actual release

volrath 2017-11-29T23:44:04.000002Z

"the idea" is my vague/lazy term to define unrepl and the emacs client haha

volrath 2017-11-29T23:45:51.000193Z

and Paulus and I talked about how to make unrepl more public, but didn't get to anything concrete..