There are some efforts towards making error messages better, not a the keyboard now, but I will try to fetch the links
@cgrand that's awesome. I think I missed this, how does the data form of the exception look?
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.
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).
Awesome unravel error display.
itβs unrepl.el
actually
I don't believe it's all mine haha, but I'll take the compliment π
Oh really, oops π
@dominicm what do you mean by cider's stacktrace excavator? it'd be cool to take a look at it
I went through cider's stacktrace source code and I don't remember seeing that term, but maybe you're referring to something else
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
ah cool π
yeah I went through the cider emacs mode stacktrace sourcecode, and I noticed they had differentiation for things we don't have
like?
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
maybe embedding the context is the more sensible way
what kind of context are you thinking of? like size of the elided seq?
The clojure frames are analyzed by looking at the class, and demunging it using the clojure.repl method.
got it
I think this is a good idea π
Guys, what about another unrepl hacktogether day in Berlin on Friday 23/2? (the day before :clojureD)
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
?
sure
My talk will be about repls...
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?
scrap Throwable->map altogether?
In eval context (appearing as data), printing as #error
seems sensible
but in exception context where the client is going to fo a lot of custom rendering?
you still have *e
for that
yes, I agree
Throwable->map serves as a good entry point for extension, and a good default
And in eval context we may add :unrepl/error
at the root of the #error
map
as usual, use elisions liberally π
according to the changelog Throwable->map's behavior has changed 1.8->1.9 - we'd need to cover both
the commit https://github.com/clojure/clojure/commit/cd64b71ddb297c10e459537f818cf2cba9a743ec
btw, I'm going to briefly show unrepl.el today at the berlin emacs meetup, wish me luck π
I want to get some feedback on "emacs ergonomics" for the repl.. make it feel comfortable
super!
actually it occurs to me my office is next door - when is the meetup tonight?
yes, 7-7:30 .. it'd be cool if you stop by π
cool will try (depending on how long my standup call goes)
alright! talks always start like 7.45, it's not so rigid, so don't worry
I'll make time haha
Ok v0.3.0 of packed-printer on npm and clojars
Itβs good enough to use IMO (no more SO, no more surprise quadratic runtime)
Oh and I have a 1-sentence description of its behaviour: > This printer likes rectangular shapes (the wider the better) and despises staircases.
Does someone has a gnarly datastructure to print?
@cgrand A colleagues favourite is (clojure.java.reflect/reflect java.io.File)
or is it clojure.reflect?
yikes
@dominicm nice one!
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
of course it could be made to emit ansi codes
I haven't followed parfix much, but is it essentially parinfer?
it just some quick paren helpers
https://www.youtube.com/watch?v=q4LmSC6xdsI planck has this
I'm sure there's a demo with more goodies somewhere
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.
@dominicm I havenβt spent enough time with parinfer
It's very good. π http://shaunlebron.github.io/parinfer/ you can play with it in-browser.
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.
Question: how to add a maven dep to unravel?
@volrath how was the meetup?
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.
also, someone asked again about the possibility of using the client (and protocol) for something other than clojure
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
"the idea" is my vague/lazy term to define unrepl and the emacs client haha
and Paulus and I talked about how to make unrepl more public, but didn't get to anything concrete..