Hi lvh, Author of sayid here. Couple questions:
- would you want the debug traces to be available only during development? Or does this need to run in production too? - what editor are you using? or does the solution need to be editor-agnostic? Also, FWIW, Sayid does have features that allow you get to at the raw captured data, not just the printed output. These two commands are available from the sayid buffer. > d -- def value to $s/* > g -- generate instance expression and put in kill ring https://www.youtube.com/watch?v=ipDhvd1NsmE#t=13m (13:00) Bill On Saturday, June 3, 2017 at 11:11:09 AM UTC-4, Laurens Van Houtven wrote: > > And, immediately after I sent this, I remembered clojure.tools.trace; > which also looks pretty similar :) > > On Sat, Jun 3, 2017 at 9:57 AM, lvh <[email protected] <javascript:>> wrote: > >> Hi, >> >> >> I have a piece of code that takes a limited subset of Clojure as queries, >> e.g.: >> >> (not= (some gnarly expr) (some-other-gnarly-expr)) >> >> It also produces the result, which is interesting when the query is just >> (some gnarly expr) and the result itself is interesting, but less >> interesting when the top level is a =/not= call and the result is just >> "true" or "false". I would like to report intermediate values, because they >> tell you _why_ something failed. >> >> So far, I have a few ideas (thanks to clojure slack for adding a few): >> >> * coerce taoensso.timbre/spy, which roughly does what I want, into giving >> me results as data instead of capturing stdout; potentially just using >> with-out-str as a first pass. Problem: some of these expressions are quite >> meaty, and this doesn't give me the option of pretty-printing them. >> * manually instrument the expression with a macro like >> taoensso.timbre/spy, except one that stores values. >> * coerce sayid into doing the same thing (https://bpiel.github.io/sayid/). >> sayid looks like it mostly does what I want, except it's heavily focused on >> editor integration, and I really just want the data. >> * https://github.com/dgrnbrg/spyscope, which appears to do something >> generally similar to what sayid does, but is also really focused on >> editors/human fueled debugging (primarily using reader macros as an >> interface and stdout as output). Obviously reader macros are easy to work >> around :) >> >> Is there anything useful I'm missing, or am I better off just hacking it >> together myself? >> >> I'm already using specter, so instrumenting forms is not a big deal. It's >> always nice to get values as data instead of random strings, but the final >> target is humans, so eventually something is going to get printed. >> >> >> thanks in advance, >> lvh >> >> > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
