When copying output to the clipboard, it is only copying the currently untruncated visible text, minus the ...
. So, if the actual value is "foo bar baz"
, but "foo bar..."
is displayed, then "foo bar"
is what is copied. That may be by design, since I can see cases where that would be useful. Is there a way to copy the full expression without manually expanding all of the ellipses?
Unfortunately, no. There's no way (today, at least) to automatically expand, and there are some edge cases too (like infinite ranges)
Right.
There may be a way to, let's say, limit for 100 expansions or something, but this needs to be implemented.
There's also recursive code that needs to be expanded (for example, (map range (range))
, and lots of other edge cases 😞
Yeah, probably not worth the effort in the general case. I would guess there is no way to reliably distinguish between fully-realized data like strings or vectors vs lazy results.
Hey was wondering what refresh mode does in Chlorine?
The config, you say?
On Chlorine, you can refresh the current code using clojure.tools.namespace
or with (require [<namespace> :reload :all])
.
The first is called "full refresh" and the second, "simple refresh". The config toggle between both.
Or, you can use the command Chlorine: Load File
to load the current file on the REPL
oh I see I seem to get a crash on the clojure.tools.namespace, Could not locate clojure/tools/namespace/repl sorry for the naive question but how do I include that?
the simple mode works, it's pretty cool to play with but figure the namespace/repl one is worth trying to get working too
You can add [org.clojure/tools.namespace "0.2.11"]
on your dependencies, or on the file ~/.lein/profiles.clj
under :dependencies
If you use clj
, you can add it on ~/.clojure/deps.edn
, with the key org.clojure/tools.namespace {:mvn/version "0.2.11"}
The "full mode" is a bit complicated to get it right (lots of libraries / apps don't support it right) but when you use multimethods, protocols, or libraries like clara-rules
sometimes it pays of.
There are ways to make it work with "simple refresh" and "load file" too, if you prefer to go that path 😄
nice got it working with deps thank you