meander

All things about https://github.com/noprompt/meander Need help and no one responded? Feel free to ping @U5K8NTHEZ
2021-02-17T13:41:35.055300Z

@theller has checked the repo and thinks the problem must be somewhere on the meander side

2021-02-17T13:42:13.055400Z

jimmy 2021-02-17T13:43:14.056Z

Sorry I didn't get a chance to check this last night. Will today.

2021-02-17T13:46:44.056200Z

It's nothing urgent mate

2021-02-17T13:47:12.056400Z

I'm just messing around for fun

2021-02-17T14:03:16.056500Z

@jimmy

2021-02-17T14:46:46.056700Z

if I had to guess, it's probably this place.

noprompt 2021-02-17T16:49:41.057400Z

Thats in a clj file.

noprompt 2021-02-17T16:51:05.057600Z

But

src/meander/substitute/epsilon.cljc
676:                         (catch Exception e#

noprompt 2021-02-17T16:55:30.058200Z

K I just pushed a patch for this but not a new release

noprompt 2021-02-17T17:35:52.058700Z

If what is on epsilon works lemme know.

noprompt 2021-02-17T17:35:57.058900Z

I can make a release later today.

noprompt 2021-02-17T17:49:26.063200Z

Everyone, eventually this message will vanish but apart from bug fixes that people mention, I’m no longer working on epsilon anymore. I’m only working on zeta from here on out and have been in this mode for a little while. So far, things are looking good on the zeta branch. There is a new design at work which has, overall, lead to reduction pretty big reduction in code. There is still a lot to do and test, however.

👍 2
2021-02-17T18:27:04.063500Z

Is zeta usable like epsilon?

jimmy 2021-02-17T18:27:24.063700Z

Not yet

2021-02-17T18:28:49.063900Z

then I'll just keep my fingers crossed

noprompt 2021-02-17T18:52:00.065500Z

A lot of progress has been made. Essentially, the whole thing has been rewritten to accommodate the things people have asked for such as explanations, being able to interpret matching/rewriting, as well as a few things I’ve wanted.

noprompt 2021-02-17T18:53:15.066800Z

What I did was abstract the overlapping parts of compilation and interpretation such that the code which builds an interpreter for a pattern can also build a compiler for it.

noprompt 2021-02-17T18:54:44.068Z

The abstraction also handles returning one or many results e.g. find or search.

noprompt 2021-02-17T18:56:01.069200Z

Also, both sides of rewriting use the same abstraction which means that both interpreters and compilers can make more aggressive optimizations.

2021-02-17T18:56:24.069700Z

Can I read something about the decisions and the idea behind the meander? Key words will suffice, I can google myself if I know what to look for

noprompt 2021-02-17T18:56:51.070100Z

Partial evaluation, abstract interpretation?

2021-02-17T18:56:57.070200Z

meander is probably the most interesting and best thing since sliced bread

noprompt 2021-02-17T18:57:05.070400Z

Well thanks! 🙂

noprompt 2021-02-17T18:57:29.070800Z

Finally, the idea of a variable is somewhat different internally.

2021-02-17T18:58:21.071500Z

you're welcome

noprompt 2021-02-17T18:58:55.072200Z

A variable is, essentially, I think, both a fold (reduction) and unfold (disperse).

2021-02-17T18:59:30.072800Z

I'm too weak for most ingenius things, but meander combines cool solutions with really simple use

noprompt 2021-02-17T18:59:56.073200Z

This is absolutely the intention.

noprompt 2021-02-17T19:01:42.074700Z

I’m by no means a genius. I have to look stuff up all the time. I can’t remember anything. And I certainly won’t be solving any deep mathematical problems before I die.

2021-02-17T19:02:48.076Z

To a dog, all humans are magicians because they can open doors. As I read @jimmy's blog, this is how I felt

😹 2
noprompt 2021-02-17T19:03:05.076300Z

But I think programming in most of its currently formulations hinders interesting creative efforts, experimentation, and creates social problems.

noprompt 2021-02-17T19:03:09.076500Z

LOL

noprompt 2021-02-17T19:03:58.077400Z

And I don’t mean to besmirch modern PLs. This is just my observation/opinion.

jimmy 2021-02-17T19:06:44.079300Z

There’s definitely a lot of different things coming together in meander. A big one is term rewriting. https://vimeo.com/155448425 Lot’s of stuff borrowed from Racket, particularly their pattern matching https://docs.racket-lang.org/reference/match.html There are a bunch of different influences that @noprompt synthesized together and made something fairly unique. But those should be some good jumping off points.

2021-02-17T19:07:09.079600Z

thx

2021-02-17T19:08:17.079800Z

usually the hardest part is synthesizing the knowledge. everyone has the same elements, but not everyone can make something unique out of it

noprompt 2021-02-17T19:12:30.081700Z

Some of my biggest influences are • TXL https://en.wikipedia.org/wiki/TXL_(programming_language) • Maude https://en.wikipedia.org/wiki/Maude_system • Datalog • miniKanren • Regular Expression • Definite Clause Grammars https://en.wikipedia.org/wiki/Definite_clause_grammar • Operational semantics https://en.wikipedia.org/wiki/Operational_semantics

noprompt 2021-02-17T19:13:21.082800Z

Data flow would probably be another thing to chip in here.

noprompt 2021-02-17T19:13:33.083100Z

But that’s somewhat outside the scope.

2021-02-17T19:14:47.084500Z

I will definitely try to read if I can understand

noprompt 2021-02-17T19:15:23.085200Z

I will let people know when I feel comfortable with them playing with the zeta branch the first moment I get that feeling.

noprompt 2021-02-17T19:15:51.085700Z

Mostly, I want to suffer through the testing and debugging so others don’t have to.

noprompt 2021-02-17T19:17:16.087Z

The most important thing for me on this branch is making sure the experience is smooth and performant. And when it is not I would like it to be very convenient for people to either solve their own problems or report issues with the explanation feature.

noprompt 2021-02-17T19:18:15.087700Z

Personally, I would prefer not to roll out a Cyberpunk 2077.

3
noprompt 2021-02-17T19:19:43.089Z

I don’t want it to be a “Have they fixed the AI yet?” sort of thing. 🙂

2021-02-17T19:21:09.089300Z

that means zeta is supposed to be faster than epsilon?

noprompt 2021-02-17T19:25:20.089600Z

I want to be at least as fast.

noprompt 2021-02-17T19:26:28.090500Z

The compiler I’ve been chipping away can make very aggressive optimizations.

noprompt 2021-02-17T19:27:41.091800Z

It already avoids duplicate logic checks, binding something more than once, etc.

noprompt 2021-02-17T19:28:21.092600Z

Pretty soon it will generate code that ensures thats calls to functions are made exactly once.

noprompt 2021-02-17T19:28:37.092800Z

These things add up.

2021-02-17T19:31:33.093Z

as of today, meander can successfully replace datascript. pull without reverse lookup is 50 loc and is faster 10x, q is 40 loc and we have working datalog, which even looks identical. For simple queries it is slower 5x, but for longer ones it is faster ~2x.

2021-02-17T19:32:41.093200Z

If zeta is faster, it will be the perfect tool for the frontend

2021-02-17T19:33:37.093400Z

In fact, it already is, because this speed is more than enough.

noprompt 2021-02-17T19:53:02.094Z

Oh that is a very interesting finding. Have you had a look at #asami?

noprompt 2021-02-17T19:54:05.094900Z

Asami is very fast. AFAIK sure it is faster than datascript and most certainly would be faster than Meander for its particular niche.

noprompt 2021-02-17T19:54:17.095200Z

Part of the reason for that is that Asami does query planning.

noprompt 2021-02-17T19:55:17.096300Z

But also, Paula Gearon, is an expert in the space. She’s on our team at Cisco and we use Asami heavily.

noprompt 2021-02-18T15:46:26.102300Z

Both, however, we use indirectly on the frontend.

Lucy Wang 2021-02-19T05:13:47.102600Z

What does "indirectly" mean 🙂 ?

noprompt 2021-02-19T18:41:26.102800Z

Indirectly means that, on the front end, our consumers not using directly but, rather, going through an API.

noprompt 2021-02-19T18:41:55.103Z

So they will send an asami query with a string which will then be parsed, etc.

2021-02-19T18:53:11.103200Z

If it's not a secret, what do you use on the front end? CLJS? TS? JS? If CLJS, then reagent? re-frame? fulcro?

noprompt 2021-02-19T18:58:42.103500Z

Our consumers use TS, JS, and we’re messing with using CLJS with re-frame.

2021-02-19T19:29:40.103700Z

don't you suffer from map fatigue?

noprompt 2021-02-19T20:31:12.103900Z

On our team, not especially. We work with a data model that is well defined and that gets loaded pretty quickly into asami. In some places we use meander, and in others, when nothing seems to work well, we turn to algorithms.

Lucy Wang 2021-02-20T12:01:24.000600Z

Ah, so you guys use asami in the backend server kinda like a graph database, cool.

noprompt 2021-02-17T19:55:38.096700Z

IOW there’s pressure to make it go faster and she’s more than happy to accommodate us. 🙂

2021-02-17T20:09:12.097Z

asami looks great, but I think it works poorly in combination with reagent and re-frame

2021-02-17T20:10:25.097200Z

I haven't checked, but I suspect that, it has a significant impact on buildsize

2021-02-17T20:13:37.097700Z

This is an idea that has been on my mind, but the language barrier doesn't seem to help me convey it

2021-02-17T20:14:31.098500Z

when I finish it and I think it's not a junk, I'll probably post it as one of the uses of meander

noprompt 2021-02-17T20:19:13.099700Z

I merge 100% of patches to doc/ and examples/ 🙂

2021-02-17T20:20:07.099900Z

: >

noprompt 2021-02-17T22:13:54.100500Z

Merged 🙂

2021-02-17T22:15:24.101500Z

thx