Fork me on GitHub
#meander
<
2020-10-12
>
JAtkins03:10:48

I must say, this is perhaps the coolest thing I've done with meander 😉

(m/match '(let [b 2
                  c b
                  a (+ b 4)]
              (a)
              b)
    (let [!var (m/cata !val) ...]
      .
      !outs ...)
    (concat
      `(let ~(vec (interleave
                   !var
                   (map (fn [val-statement]
                          `(capture ~(uuid) ~val-statement))
                     !val))))
      !outs)
    
    (?function-or-macro . (m/cata !args) ...)
    (concat `(~?function-or-macro)
      !args)

    (m/pred symbol? ?x)
    `(capture ~(uuid) ~?x)
    
    ?x ?x)
I'm playing around to see how hard it would be to get debux like info from macros with rewriting provided by meander. Looks promising so far 🙂

Lucy Wang03:10:22

@jatkin Interesting! Debux is already pretty good for me, which part of it doesn't satisfy you?

JAtkins12:10:35

I’m experimenting with some ui front ends for debux/data exploring. I’m sure I can use the backend of debux, but it occurred to me that I could use meander so I had to try it at least :)

Lucy Wang06:10:33

sorry, wrong @ ... Your ID is "James Tolton", which sorts close to "Jarrett Atkinson" ...

👍 3