meander

timothypratley 2022-08-27T22:59:20.065939Z

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.

noprompt 2022-08-29T21:06:55.967609Z

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

noprompt 2022-08-29T21:08:24.473859Z

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.

1
😎 1
noprompt 2022-08-29T21:09:05.506679Z

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

noprompt 2022-08-29T21:09:22.983819Z

A big part of the problem is CLJS.

noprompt 2022-08-29T21:09:34.076789Z

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

👿 1
timothypratley 2022-08-29T21:09:57.842829Z

why's that?

noprompt 2022-08-29T21:10:06.013149Z

It's just a pain the ass.

noprompt 2022-08-29T21:10:08.254779Z

🙂

timothypratley 2022-08-29T21:10:10.193059Z

hahaha

timothypratley 2022-08-29T21:10:12.563159Z

fair enough.

noprompt 2022-08-29T21:10:33.937599Z

What I have on zeta probably mostly works in CLJS.

👍 1
noprompt 2022-08-29T21:11:19.264559Z

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

noprompt 2022-08-29T21:12:03.952839Z

zeta is different from previous versions in many ways.

noprompt 2022-08-29T21:13:43.015209Z

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

noprompt 2022-08-29T21:14:19.729479Z

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

noprompt 2022-08-29T21:14:33.398329Z

Lotta time in python.

🐍 1
noprompt 2022-08-29T21:15:11.988269Z

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

noprompt 2022-08-29T21:15:24.049619Z

I really wanna compile to it. 😛

timothypratley 2022-08-29T21:15:31.087129Z

🙂

noprompt 2022-08-29T21:16:16.976569Z

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

noprompt 2022-08-29T21:18:12.815389Z

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

noprompt 2022-08-29T21:18:40.216199Z

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