eggsyntax / datawalk

Interactively explore complex data structures at the REPL with minimum keystrokes
Eclipse Public License 1.0
277 stars 2 forks source link

Consider automatic deref #3

Closed christianromney closed 6 years ago

christianromney commented 6 years ago

Sometimes a complex data structure has something deref-able inside of it. This data is opaque to datawalk. It would be useful to automatically deref any node for which the predicate (partial satisfies? IDeref) is true when navigating to it with (w).

Also happy to contribute a PR if you feel this is something you'd accept.

eggsyntax commented 6 years ago

Terrific idea. I'll give that one a bit of thought to see if I see downsides, but unless something comes up, totally happy to make this change. It'll maybe take some consideration on how this ought to interact with backward, forward, and up.

Thanks!

eggsyntax commented 6 years ago

A few notes on this -- I'm experimenting with these options to try to see what feels like the cleanest solution.

I may start with a minimal solution so that users have at least some way of handling derefables.

eggsyntax commented 6 years ago

It also occurs to me that drill may ultimately be better as a protocol so that users can define for any type what it means to drill into it.

eggsyntax commented 6 years ago

Fixed in 0.1.11, now on clojars. Deref is an ordinary drill step. LMK how that works out for you :)

christianromney commented 6 years ago

Awesome, can't wait to try it out. Thanks!

eggsyntax commented 6 years ago

Bah. Crashes on cljs because there's no timeout version of deref there. Fixing.

eggsyntax commented 6 years ago

Fixed in 0.1.12.