Fork me on GitHub
#meander
<
2021-08-29
>
dominicm17:08:27

Unrelated to my other project, I'm evaluating pattern matching in an open world context based on something like best-fit. Meander is a macro in current design, is there a version where pattern matching is compiled to a value that's run through an interpreter of some kind? My thinking is to avoid eval after adding a new pattern, sorting and compiling.

ribelo17:08:22

meander.interpreter.epsilon

delaguardo17:08:53

Unrelated to meander but here's my attempt to create macro-free pattern matching library https://github.com/xapix-io/matchete

👍 2
dominicm21:08:13

@U0BBFDED7 that's great, thanks. I'd missed that!

dominicm21:08:28

@U04V4KLKC I considered matchete but I'm unclear on the performance characteristics. Meander has a lot of optimizations in reducing redundant checks.

ribelo21:08:29

however the interpreter is rather difficult to use and the performance sucks

ribelo21:08:24

meander's super optimizations have no way of working on runetime

dominicm22:08:13

Oh, that's a shame @U0BBFDED7. I'd hoped it'd be possible to do analysis on the forms to determine redundant paths... The machinery for those optimizations is all there, so perhaps that's possible in a future update.

noprompt15:08:44

The performance of the interpreter can be improved. It probably will never get as close to the performance of the compiled code but it can get closer. At the moment, I don’t think the interpreter does any optimizations. Since the interpreter is built e.g. it “compiles” a function, it is possible to eliminate many redundancies.