Fork me on GitHub
#meander
<
2021-02-17
>
huxley13:02:35

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

jimmy13:02:14

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

huxley13:02:44

It's nothing urgent mate

huxley13:02:12

I'm just messing around for fun

ribelo14:02:46

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

noprompt16:02:41

Thats in a clj file.

noprompt16:02:05

But

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

noprompt16:02:30

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

noprompt17:02:52

If what is on epsilon works lemme know.

noprompt17:02:57

I can make a release later today.

noprompt17:02:26

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.

👍 6
ribelo18:02:04

Is zeta usable like epsilon?

ribelo18:02:49

then I'll just keep my fingers crossed

noprompt18:02:00

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.

noprompt18:02:15

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.

noprompt18:02:44

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

noprompt18:02:01

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

ribelo18:02:24

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

noprompt18:02:51

Partial evaluation, abstract interpretation?

ribelo18:02:57

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

noprompt18:02:05

Well thanks! 🙂

noprompt18:02:29

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

ribelo18:02:21

you're welcome

noprompt18:02:55

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

ribelo18:02:30

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

noprompt18:02:56

This is absolutely the intention.

noprompt19:02:42

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.

ribelo19:02:48

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

😹 6
noprompt19:02:05

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

noprompt19:02:58

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

jimmy19:02:44

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.

ribelo19:02:17

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

noprompt19:02:30

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

noprompt19:02:21

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

noprompt19:02:33

But that’s somewhat outside the scope.

ribelo19:02:47

I will definitely try to read if I can understand

noprompt19:02:23

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

noprompt19:02:51

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

noprompt19:02:16

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.

noprompt19:02:15

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

9
noprompt19:02:43

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

ribelo19:02:09

that means zeta is supposed to be faster than epsilon?

noprompt19:02:20

I want to be at least as fast.

noprompt19:02:28

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

noprompt19:02:41

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

noprompt19:02:21

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

noprompt19:02:37

These things add up.

ribelo19:02:33

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.

ribelo19:02:41

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

ribelo19:02:37

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

noprompt19:02:02

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

noprompt19:02:05

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

noprompt19:02:17

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

noprompt19:02:17

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

Lucy Wang13:02:53

@noprompt May I ask do your team mainly use asami in the backend or in the frontend? I have been heard of asami for a long time but haven't yet evaluated it.

noprompt15:02:26

Both, however, we use indirectly on the frontend.

Lucy Wang05:02:47

What does "indirectly" mean 🙂 ?

noprompt18:02:26

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

noprompt18:02:55

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

ribelo18:02:11

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

noprompt18:02:42

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

ribelo19:02:40

don't you suffer from map fatigue?

noprompt20:02:12

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 Wang12:02:24

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

noprompt19:02:38

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

ribelo20:02:12

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

ribelo20:02:25

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

ribelo20:02:37

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

ribelo20:02:31

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

noprompt20:02:13

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

noprompt22:02:54

Merged 🙂

Lucy Wang13:02:53

@noprompt May I ask do your team mainly use asami in the backend or in the frontend? I have been heard of asami for a long time but haven't yet evaluated it.