[ANN] Ultra v0.5.1 - a Leiningen plugin for a superior development environment

410 views
Skip to first unread message

David Jarvis

unread,
Jan 8, 2017, 5:32:51 PM1/8/17
to Clojure
Hey all - 

Happy to announce the latest release of Ultra, 0.5.1, with a few minor bugfixes and friendlier configuration changes. 

Ultra offers a colorized REPL, syntax-highlighted `source`, clearer test output, and better stacktraces.

Check out the latest on the project's page: https://github.com/venantius/ultra

Thanks,

 - V

Mars0i

unread,
Jan 11, 2017, 12:32:53 AM1/11/17
to Clojure
Very nice.  Thank you.

One question because my ignorance about how to configure plugins in general--I hope you don't mind.  Where would I put this:

{:ultra {:repl {:width 180
                :map-delimiter ""
                :extend-notation true
                :print-meta true
                 ...}}}

(I didn't find the Whidbey README to be helpful, but maybe I missed some
implication there.)

Mars0i

unread,
Jan 11, 2017, 12:38:00 AM1/11/17
to Clojure
One more question--should have included it before.  Is there a way to change the print width apart from in profile.clj or project.clj, e.g. with a function in the repl.  That way I resize the terminal to see more on each line, I wouldn't have to exit out and change the width.  Thanks-

W. David Jarvis

unread,
Jan 11, 2017, 12:48:06 AM1/11/17
to clo...@googlegroups.com
Hey there!

To answer your first question, I keep this sort of configuration in my ~/.lein/profiles.clj. That file looks like this right now:

{:user {:ultra {:repl true}
        :plugins [[venantius/ultra "0.5.1"]
                  [lein-pprint "1.1.2"]]}}

To answer your second question -- the printer configuration sits as a dynamic var over in whidbey.repl/printer. There's a convenience function you can access directly -- whidbey.repl/update-options! that will call `alter-var-root` on the configuration for you. So your standard usage would be something like [untested]:

 (whidbey.repl/update-options! (assoc whidbey.repl/printer :your-new-key your-new-val))

Personally, if I run into something like that I usually just restart my repl, but hopefully the above is helpful.

Cheers,

 ~ V

On Tue, Jan 10, 2017 at 9:37 PM, Mars0i <mars...@logical.net> wrote:
One more question--should have included it before.  Is there a way to change the print width apart from in profile.clj or project.clj, e.g. with a function in the repl.  That way I resize the terminal to see more on each line, I wouldn't have to exit out and change the width.  Thanks-

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/OjRe5WXaXBE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--


Mars0i

unread,
Jan 11, 2017, 11:12:56 AM1/11/17
to Clojure
David, thanks very much for the quick reply. (!)  OK, got it now. 

update-options! will be useful because sometimes I have a lot of state set up within the repl and then realize that I want to change the size of the terminal window to see more data at once (or to see more windows at once).

Mars0i

unread,
Jan 12, 2017, 10:58:03 AM1/12/17
to Clojure
Hi David (or anyone else)-   Is there a way to make sequences print all on one line, as in the default repl behavior, rather than with one element per line?  I haven't found anything about this in the documentation or in the whidbey config map.   Thanks.

W. David Jarvis

unread,
Jan 12, 2017, 1:25:38 PM1/12/17
to clo...@googlegroups.com
I'm not sure, though I have a hypothesis - is this an issue for all sequences, or just for maps?

On Thu, Jan 12, 2017 at 7:58 AM, Mars0i <mars...@logical.net> wrote:
Hi David (or anyone else)-   Is there a way to make sequences print all on one line, as in the default repl behavior, rather than with one element per line?  I haven't found anything about this in the documentation or in the whidbey config map.   Thanks.

--

Mars0i

unread,
Jan 12, 2017, 3:35:42 PM1/12/17
to Clojure
On Thursday, January 12, 2017 at 12:25:38 PM UTC-6, David Jarvis wrote:
I'm not sure, though I have a hypothesis - is this an issue for all sequences, or just for maps?

All sequences.  Well, not exactly--see below.  But I don't mind the one entry-per-line behavior for maps.  It bothers me for simple sequences--lists, vectors, etc. 

I just realized that the behavior depends on the :width setting and the size of the output.  For example if I enter (range 20), the entire sequence will be displayed on one line.  If I use range with an argument large enough to make the output longer than the :width setting, I get one element per line.  However, that's generally not what I want.  I'd rather see as many elements as possible, letting the terminal wrap the output (or maybe something a little nicer but similar, but terminal wrapping is good enough).  This actually led to me disabling ultra earlier today, so I wouldn't have to scroll up to peruse a sequence of 200 doubles.  I like its other features, though!

W. David Jarvis

unread,
Jan 13, 2017, 2:58:11 PM1/13/17
to clo...@googlegroups.com
Gotcha!

This behavior is controlled by the plugin Ultra uses for pretty-printing, Whidbey, and on its lower-level pretty-printing library Puget. As far as I can tell there isn't an option to control for this, though the project's author might be open to a PR. Sorry I can't be of more help :( -- but glad you like it anyways! :)

 - V

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/OjRe5WXaXBE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mars0i

unread,
Jan 13, 2017, 11:07:20 PM1/13/17
to Clojure
Got it. Thanks David.
Reply all
Reply to author
Forward
0 new messages