htm-community / comportex

Hierarchical Temporal Memory in Clojure
154 stars 27 forks source link

Truncate large collections when printing #6

Closed mrcslws closed 9 years ago

mrcslws commented 9 years ago

Addresses #2 .

At first I applied *print-length* to the entire record, but that was bad because the truncation also applied to the record itself, hiding entire fields. So here's what I came up with.

floybix commented 9 years ago

I just tried it, it works well. REPLing will be less scary now!

mrcslws commented 9 years ago

:) I updated the wiki page. No more exploring via keys. https://github.com/nupic-community/comportex/wiki/A-sample-workflow-with-the-REPL

On Sun, Nov 30, 2014 at 5:07 PM, Felix Andrews notifications@github.com wrote:

I just tried it, it works well. REPLing will be less scary now!

— Reply to this email directly or view it on GitHub https://github.com/nupic-community/comportex/pull/6#issuecomment-65009860 .

mrcslws commented 9 years ago

Oops, the (apply min 3 *print-length*) is wrong. Invalid use of apply, fails when *print-length* is set. Fix coming soon.

mrcslws commented 9 years ago

...also need to limit the clojure.pprint import to #+clj (not cljs)