Installing unravel is now as easy as
sudo npm install -g lumo-cljs unravel-repl
and unravel localhost 50505
hey, I've been occupied with a bunch of other stuff lately
that involved doing a bunch of CLJ and little CLJS, what I really miss the most is this kind of stuff
no idea how that would work in a terminal but I got so used to having this it really felt bad working without it
so the elision system has me the most excited at the moment, normal print is so terrible in comparison 😛
I wonder though if that might not be better as a general sort of thing
ie. you use tools.logging
as normal but attach a special custom appender in development
that enables this
same thing really in JS, it's just console.log
but with a few custom hooks in dev
not everything I do is a REPL print after all
Released version 0.1.3 with persistent readline history
@thheller you mean the ability to collapse/expand nested data structures interactively?
yes
there are two challenges there
and have them formatted in a structured manner, pprint
doesn't cut it
1. the elision system
2. presentation
for 1, what is already there is pretty good. We need to restrict print-length and print-depth
yeah, just saying that what we have might be better as a general thing
allowing you to request more data (continuation)
not a REPL thing
how do you mean?
for 2, I agree that squeezing this interactivity into an xterm is not ideal
you can do a lot (ascii tables etc.)
as I said above, something like tools.logging
. the issue I have with elision only on REPL print
is that it doesn't cover any kind of debug statement I put in my code
but a browser in undoubtedly better suited for interactive printing
so (prn wtf-value)
will use the normal print
basically you want to use (log/warn "Got request" (eliding-pr-str request))
?
(log/warn "Got request" request)
😉
with a custom handler in dev mode that handles the elide part
but does the default in production
btw I've encountered the logging problem in the past as well
its everything I encounter I feel, messed with a bunch of shadow-build
the past few days and that has to work with the entire CLJS env
print that once and the REPL is toast
I worked on a react-native project where the entire app state was in an atom
yet sometimes that is exactly want I want to do
printing that on every swap! is very useful for debugging
but it gets unwieldy quickly
so I built a half-baked eliding-prn that just cut off after n keys
a general solution to that would be handy
yeah exactly. it really feels terrible in CLJ when you are used to CLJS and the console
granted that is a browser which has way more capabilities in presentation
but its still in the browser, if we could move that to something like cursive that would be killer
well I did have the idea of hooking up unravel
to the browser
basically start a tiny web server and launch a chrome web browser on localhost:12345
yeah exactly, something that gets it out of the terminal and into a real GUI
just need to device a proper network protocol for that
unrepl
is a start but I feel not generic enough since its only for repl-print
but if designed properly this could just be a (hook-into-log)
which then upgrades the REPL
with a dedicated connection
Logging! What an oversight!
[:log [:level obj1 … objN] id?]
?
A special object for logging?! That would be cool.
Object probably wrong term. Op?
No objX is the unrepl representation of à logged object.