rewrite-clj

steveb8n 2022-07-24T00:47:17.916829Z

Q: I would like to express a navigation using zipper steps as data. Is there a way (or an example) of how to do this?

lread 2022-07-28T14:04:11.989059Z

Neat! Thanks for sharing and also for the kind words!

steveb8n 2022-07-24T08:53:54.683179Z

It was indeed easy and simple. Data driven navigation ftw

lread 2022-07-25T02:53:19.692889Z

Coolio, whatcha building, anything that you can talk about?

steveb8n 2022-07-25T04:41:13.798649Z

this is for Hotplate which is a tool I use to generate/create applications. it’s not yet OSS but I will open it up once I have the resources to manage it. when I do, touch base and I’ll show you where this little DSL is used

steveb8n 2022-07-25T04:41:55.811519Z

it reminds me a lot of Specter navigators. I bet there’s quite a diaspora of navigation DSLs in the clojure world

steveb8n 2022-07-25T04:43:32.635819Z

this is the UI for it

steveb8n 2022-07-25T04:44:13.931999Z

btw clj-rewrite is one of the most valuable libs in Hotplate so thank you heaps for your efforts

steveb8n 2022-07-24T00:47:42.073339Z

i.e. instead of this code… (-> zloc (z/find-value z/next ’foo) (z/down)) I’d like to use something like… [{:op :find-next :target ’foo} {:op :down}]

steveb8n 2022-07-24T00:52:49.029279Z

I could create a multimethod DSL for something like this or a macro but I’m wondering if this already exists?

lread 2022-07-24T01:51:40.510739Z

Not that I know of @steveb8n!

steveb8n 2022-07-24T04:46:11.706799Z

Ok. Should be easy to build myself