Fork me on GitHub
#meander
<
2022-08-27
>
timothypratley22:08:20

Hold onto your hat 🎩 here comes another zany syntax 💡 idea: So . has a meaning in vectors/sequences, but AFAIK isn't meaningful in maps. What would it mean in a map? Now in JavaScript es6 introduced the whole nifty object constructor shorthand thing: {a} means {:a 1} where a is bound to 1. This is actually pretty nice when you use long names: {very-descriptive-name} instead of {:very-descriptive-name very-descriptive-name} ES6 also allows you do do things like {foo: 1, ...m} which is kinda the same thing as Meander: (subst {:foo 1, & ?m}) But what Meander is missing is the nifty symbol => key value pair trick. So that's one thing you could use . for in a map! (subst {. very-descriptive-name}) => {:very-descriptive-name very-descriptive-name} Well, it's a little bit more complicated than that because you need to decide exactly what kind of things can be treated like this... should it be limited to memory variables? Any bound symbol? Not sure, but it is an interesting substitution use case. Pros: being able to provide a key/value pair in a single symbol is very popular in JavaScript. If substitution were allowed for this operator on non memory variables it might make for a very concise collection constructor. Cons: For rewrite patterns, we usually match on a single character name anyway, so it's likely only useful in the substitution phase, not with matches. Alternatives: % might be a better operator than . because it kinda looks like a key value thingy with the dot slash dot.

noprompt21:08:55

This can be done on the zeta branch entirely by the user. 🙂

noprompt21:08:24

What is on zeta right now is probably in a stablish state (because I can't keep experimenting). I mostly need to organize and document it.

simple_smile 1
😎 1
noprompt21:08:05

zeta for the time being will probably be much slower than epsilon until a compiler can be devised for it.

noprompt21:08:22

A big part of the problem is CLJS.

noprompt21:08:34

I really hate CLJS and don't really want to support it.

👿 1
noprompt21:08:06

It's just a pain the ass.

noprompt21:08:33

What I have on zeta probably mostly works in CLJS.

👍 1
noprompt21:08:19

Depending on what google closure can do, it may perform well too.

noprompt21:08:03

zeta is different from previous versions in many ways.

noprompt21:08:43

I think I may talk about it toward the end of next month at a scicloj meetup.

noprompt21:08:19

Mostly, I'm working on it when I feel the urge (in between trying to pick up ML/AI).

noprompt21:08:33

Lotta time in python.

🐍 1
noprompt21:08:11

Not a bad language, but not a great language either.

noprompt21:08:24

I really wanna compile to it. 😛

noprompt21:08:16

But I'm trying to stay focused on picking up all the ML tech and not get bogged down by my own language snobbery.

noprompt21:08:12

@U06S1EJPL I think I will use your syntax concept as an example.

noprompt21:08:40

I'll post it here when I get around to hacking it together.