Fork me on GitHub
#meander
<
2023-07-29
>
geoff06:07:41

Once term rewriting clicks it’s so incredibly good

geoff06:07:53

Been adding hiccup like tags to little dsl ast’s and you can just keep rewriting again and again and again until it lowers back into clojure

geoff06:07:02

Love this library

geoff06:07:17

Dsl -> parse into hiccup like structure -> rewrite until back into clojure -> wrap the whole thing in a macro -> done

Dane Filipczak20:08:26

what do you mean by 'back into clojure' here? How is the final clojure representation different from the 'parse into hiccup' step?

geoff10:08:24

I was parsing the clojure dsl forms into hiccup like tags to pick out information and add some loose typing to know what the form is, then rewriting the hiccup into other hiccup forms closer to normal clojure syntax, then finally rewriting it back into valid clojure syntax which I could execute.

👍 2
Dane Filipczak12:08:06

thanks! I had misunderstood your final intent as producing some data structure rather than executing clojure syntax.

geoff06:07:25

Can’t believe this isn’t more well known

❤️ 8
noprompt18:07:42

@gcoumessos I'm glad you're enjoying it!