meander

All things about https://github.com/noprompt/meander Need help and no one responded? Feel free to ping @U5K8NTHEZ
ikrimael 2020-07-19T13:37:18.125400Z

Yeah, probably different learning styles (ex: I looked up how closures are implemented before using them) I think there's still probably utility in highlevel explanation (like the link and your description two paragraphs ago on logic/memory fvars)

ikrimael 2020-07-19T13:39:53.125500Z

for me, the disconnect is mostly in the "magical joins and constraint satisfiability" and in turn, what governs if something will be emitted multiple times or if it will be used as a constraint

noprompt 2020-07-19T19:07:47.131Z

I think the interpreter could be instrumental in helping someone understand one way the semantics can be implemented.

➕ 3
jimmy 2020-07-19T19:10:59.133400Z

Yeah I guess that is more my point. The semantics really matter. An interpreter is definitely a decent way to learn those. But in my view the goal is to understand those semantics more than it is to have a good idea of how meander is working under the hood.

☝️ 1
noprompt 2020-07-19T19:13:34.134600Z

And I think you know that I share that bias. Meaning is key.

noprompt 2020-07-19T19:16:03.136700Z

Another key thing is being able to map, structurally, implementation details.

noprompt 2020-07-19T19:17:24.138Z

But I’m dangerously close to rambling. 🙂

2020-07-19T20:46:27.138900Z

I found a strange behavior that I can't understand

2020-07-19T20:47:24.139500Z

[[:single-match
  (m/find {:a 1 :b 2}
    (m/map-of !k !v) :work!)]
 [:single-match-with-catch-all
  (m/find {:a 1 :b 2}
    (m/map-of !k !v) :work!
    _ :error)]
 [:multiple-match
  (m/find {:a 1 :b 2}
    (m/pred integer?) :_
    (m/map-of (m/pred int?) (m/pred int?)) :_
    (m/map-of !k !v) :work!)]
 [:multiple-match-with-catch-all
  (m/find {:a 1 :b 2}
    (m/pred integer?) :_
    (m/map-of (m/pred int?) (m/pred int?)) :_
    (m/and ?mfn (m/map-of !k !v)) :work!
    _ :error)]]

;; => [[:single-match :work!]
;;     [:single-match-with-catch-all :work!]
;;     [:multiple-match :work!]
;;     [:multiple-match-with-catch-all :error]]

jimmy 2020-07-19T20:49:04.139600Z

Just fyi doing wrapping the code in ` (no spaces escapes don't seem to work so I did that.) will help it format better.

[[:single-match
  (m/find {:a 1 :b 2}
    (m/map-of !k !v) :work!)]
 [:single-match-with-catch-all
  (m/find {:a 1 :b 2}
    (m/map-of !k !v) :work!
    _ :error)]
 [:multiple-match
  (m/find {:a 1 :b 2}
    (m/pred integer?) :_
    (m/map-of (m/pred int?) (m/pred int?)) :_
    (m/map-of !k !v) :work!)]
 [:multiple-match-with-catch-all
  (m/find {:a 1 :b 2}
    (m/pred integer?) :_
    (m/map-of (m/pred int?) (m/pred int?)) :_
    (m/and ?mfn (m/map-of !k !v)) :work!
    _ :error)]]

;; => [[:single-match :work!]
;;     [:single-match-with-catch-all :work!]
;;     [:multiple-match :work!]
;;     [:multiple-match-with-catch-all :error]]
Let me take a look at what is going on, there is a lot here.

jimmy 2020-07-19T20:51:29.140900Z

What version of meander are you using?

2020-07-19T20:51:50.141200Z

meander/epsilon      {:mvn/version "0.0.469"}

jimmy 2020-07-19T20:52:32.141700Z

Seems like a regression to me. I had an old version open and it worked totally fine. Just tried with latest and it does have the error, which seems wrong to me.

2020-07-19T20:54:32.142100Z

: (

jimmy 2020-07-19T20:56:53.142900Z

Yeah, I'm sorry about that bug. I am going to look at it a bit and see if I can uncover the problem. In "0.0.421" it worked fine for me.

2020-07-19T20:57:18.143200Z

I'm gonna add the dependency using the git and try again

2020-07-19T20:59:06.143800Z

It's an amazing piece of code and I'm having a lot of fun playing with it

2020-07-19T20:59:29.144400Z

thanks for that

jimmy 2020-07-19T21:00:16.145400Z

Yeah, it looks like search is finding an extra value that I don't think should be there. And if it should, it is in the wrong order. I'm guessing it has to do with some recent changes to the search stuff. I probably won't be able to fix it right now, but glad you have work around for the time being. If you have time to make a github issue that would be great, if not I will do that soon.

jimmy 2020-07-19T21:00:44.146100Z

Glad that you are enjoying it. Always sad when people discover bugs not caught by our test suite, but that gives us another case to add. Thanks

2020-07-19T21:02:57.146400Z

I'll add in a minute

🙂 1
noprompt 2020-07-19T22:02:32.147400Z

I think I know what’s causing that bug.

noprompt 2020-07-19T22:05:28.148Z

When I have an opportunity, I’ll take a look at this.