meander

All things about https://github.com/noprompt/meander Need help and no one responded? Feel free to ping @U5K8NTHEZ
yuhan 2020-01-03T00:18:45.214200Z

That's an interesting way of getting around it, feels slightly hacky but understandable due to the nature of EDN literals

yuhan 2020-01-03T00:21:43.214400Z

Going a step further for programmer safety I guess it should be possible to detect when "undefined behavior" like that is happening (same memory var being used in separate branches of a map/set literal, excluding &) and flag it as an error

yuhan 2020-01-03T00:23:35.214600Z

the example above might be contrived but I imagine it could happen with a big record-like map pattern and everything appearing to work fine until the 9th key is introduced

yuhan 2020-01-03T01:18:12.215100Z

sounds good, I'll create a GH issue to track it :)

👍 1
yuhan 2020-01-03T01:20:30.215300Z

actually it's still a little confusing - here's a simpler case where memory vars currently fall apart:

(m/rewrite [:a [1 2 3] :b [4 5]]
  [!k [!n ...] ...]
  [!k [!n ...] ...])
;; => [:a [1 2 3 4 5]]

yuhan 2020-01-03T01:22:17.215500Z

how would I use the hypothetical &scope construct to retain the nesting associations and rewrite back to the same data on the RHS?

jimmy 2020-01-03T02:25:07.215700Z

They don’t fall apart, you just need more of them 🙂

(m/rewrite [:a [1 2 3] :b [4 5]]
  [!k [!x ..!n] ..!m]
  [!k [!x ..!n] ..!m])
;; => [:a [1 2 3] :b [4 5]]

jimmy 2020-01-03T02:25:53.215900Z

My plan was to let you be able to just do ..! without naming them and make it all work out. I had an implementation, but never finished it and got it in.

yuhan 2020-01-03T02:35:52.216300Z

ahh, more undocumented syntax 😮

jimmy 2020-01-03T02:37:22.216500Z

I’m shocked that didn’t get documented. My bad. I will start writing the documentation right this moment.

jimmy 2020-01-03T02:38:20.216700Z

And I will throw in some & documentation.

yuhan 2020-01-03T02:39:31.216900Z

Thanks!

jimmy 2020-01-03T02:55:31.217100Z

Not comprehensive, but hopefully it is a start. https://github.com/noprompt/meander/pull/98

jimmy 2020-01-03T02:59:37.217400Z

I do apologize of the lack of documentation on things like this. I need to sit down and write a comprehensive tutorial. But there is honestly just a lot. It is hard to remember what got documented and what didn’t. It is also just hard to document. It is more like learning a language than learning a library. Libraries are typically not too hard to document, but libraries require a different approach. I also need to finish my in browser meander evaluator so we can have an interactive cookbook that anyone can contribute to.

noprompt 2020-01-03T04:01:53.219900Z

I apologize as well. I’m almost always busy with work, family, or something due to this project and documentation frequently slips my mind or doesn’t get priority.

noprompt 2020-01-03T04:02:52.221500Z

I will also admit that it often takes me a bit of time to write articles because I have to focus really hard to organize my thoughts into words.

noprompt 2020-01-03T05:31:27.222100Z

I really appreciate all the lively, thoughtful discussion from everyone. 🙂

noprompt 2020-01-03T05:31:35.222300Z

Thank you!