REPL really is such a misused concept in the clojure world
and tools.nrepl
is totally mislabeled, it should be tools.remote
or so 😉
@cgrand just noticed that fipp
is doing something similar to the custom formatters https://github.com/brandonbloom/fipp/blob/master/doc/primitives.md
@thheller I drew inspiration from fipp but this part of it (or custom formatters) is too much layout focused (hey it’s a pretty printer) while I’m concerned about “machine” printing. Layout is a concern for the client.
yeah its too focused on clojure as well
but I was looking for prior art for describing objects and it seems fairly common to create some kind of limited markup
but as you said its not about pretty printing
@dominicm all tooling is not repl indeed. However it doesn’t imply that you can’t devise an adhoc protocol by subsetting unrepl
@cgrand you made that comment before, it only now makes sense. It might be interesting to see if a shared protocol can come out of subsets.
@dominicm it’s the old age that makes me to ramble
It's good, for me. Helps me learn. Hopefully it doesn't waste too much of your time with my bombardment of questions!
not at all
IMO many of these questions are not at all clear yet, so any discussion is useful.
(this is the output of (repeat (range))
)
(or rather the rendering of the represetation of the value of (repeat (range))
)
rendered where? as html? can you click the ...
?
as html in an electron unrepl client (it has been years since I’ve done frontend)
not yet clickable (I haven’t set up the second socket)
I’m cheating on the rendering:
ol, ul, dl {display: inline-block; margin: 0; padding: 0;}
li, dt, dd {display: inline; margin 0; padding: 0;}
dd + dt::before {content:", "}
li + li::before {content:" "}
.list::before {content: "("}
.list::after {content: ")"}
.vector::before {content: "["}
.vector::after {content: "]"}
.set::before {content: "#{"}
.set::after {content: "}"}
the browser takes care of the parens, spacing and commas
neato
nice!
I'm still figuring out a nice terminal UI for elisions
it could print elisions as #unrepl/... 1
, #unrepl/... 2
etc
then a special command like expand 1
could be used to expand successively
$ try --debug
Unravel 0.1.4 connected to localhost:50505
Type ^O for docs of symbol under cursor, ^D to quit
[:receive [:unrepl/hello {:session :session559, :actions {:exit (unrepl.repl/exit! :session559)}}]]
[:receive [:prompt {}]]
>
@cgrand, :prompt
doesn't pass the current *ns*
anymore. Is that an oversight?
If so I'll do a PR
@pesterhazy I added it back one or two days ago
sweet
@pesterhazy #unrepl/... 1
, #unrepl/... 2
are a bit long for display to the user. &1
, &2
?
Good idea
I can use a different color too
Is unravel
already exposing a completion function, a source function, a doc function (for the last two, I guess I can just evaluate forms directly maybe?). I am thinking of adding it to inf-clojure
hmm... I think it may make more sense to use the unrepl code directly from emacs
unravel is intended to be used interactively, mostly
well, I have already added the concept of repl types in inf-clojure
, and lumo
and planck
now are supported
so I think doc
and complete
should be added to unrepl proper
eventually I mean
lumo and planck have dumb modes (`-d`) so I'll have to add that to unravel
yeah I think the same, actually let me link what inf-clojure
does now
yep that is useful
so here for instance https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L255
we just send a string for evaluation to the process
different for any repl
I see
well eventually I think that code should be added to unrepl
the supported commands that you can do from emacs are a bit above: https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L103
so we have a single codebase that handles tooling functionality
they are the classic doc
, source
, macroexpand
....
that's useful
I like this new trend of minimal setup
I wish I could contribute more but now I am super busy, hopefully soon things will improve on my side
lots of things are still in flux with unrepl, but tons of opportunities at the moment
I think it's important to get a lot of input from tooling authors to get things right this time
(after learning from experiences with nREPL)
it could really be a big plus for clojure compared to other languages
to have a good tooling story
yeah I agree
the above ellipsis on long output is wonderful btw
my idea with unravel is to showcase the capabilities that unrepl unlocks, to get other tooling authors on board 🙂
that's awesome, keep it up and you'll be rewarded 😄
you are already exposing a complete function actually (https://github.com/pesterhazy/unravel/blob/master/src/unravel/core.cljs#L202)
yeah feel free to use that if it helps
it's triggered by tab
yes that's perfect, also very nice that you have an explicit cmd-doc
, I can just call that passing the symbol that I get from emacs
and probably the send!
function can actually be used for everything else
that's on the cljs side btw, so you can't call it by just sending text to stdin
now I'm thinking it'd be great to have the arglist printed out automatically as you're typing a symbol...
yeah I added get-arglists
in lumo for that
uhm, you are right
I could basically send you control codes to the process as well, maybe that can be a good workaround if the repl does not expose "system" namespace
New release 0.1.6 adds expansion of lazy seqs!
☝️ cool stuff!