Fork me on GitHub
#meander
<
2020-02-27
>
Daniel Hines01:02:59

Guys it's been a while since I've been in Meander. I'm trying to turn this:

{"users" [{"name" "Bob" "favoriteFood" "apple"} ...]
 "foodsByName" {"apple" {"category" "fruit"} ...}}
into this:
[{"name" "Bob" "favoriteFood" "apple" "category" "fruit"} ...]
But I'm stuck at the first step 😛
(m/search data (m/scan {"name" ?name}) ?name) ;; => ()
What am I doing wrong here?

Daniel Hines01:02:17

Duh. I'm missing the "users" key.

grounded_sage11:02:19

It would be cool to have something like this for Meander. https://borkdude.github.io/re-find.web/

👍 4
jimmy16:02:57

@grounded_sage So I mentioned this at the end of my meander talk. But I actually did implement something where you can hand in some input and output and it will spit out a rewrite for you. It is pretty limited and didn't handle anything with repeats or anything like that. I've found those are the more common things. If someone wants to take a stab at making something like the above, I'd definitely be happy to help out with that.

grounded_sage16:02:48

@jimmy ah. It’s been a while since I watched that talk. It would definitely be hard to handle the more complex cases and doing some reshaping before or after sometimes is a more ideal solution. But definitely the more simple use cases could be handled

grounded_sage16:02:32

As an aside. I’m at the Clojure Datascience Meetup here in Berlin. Lots of people are really interested in Meander and have shown people how I have been using it

noprompt17:02:35

That’s great! This year should see some big improvements to what you can do with it. In particular, I’m excited for the ability to aggregate during pattern matching and generate data from patterns.

noprompt17:02:35

I think these new additions would be handy for data science.

noprompt17:02:15

Feedback good and bad would be appreciated. Let folks know we welcome criticism. 👍