I know the syntax of the expressions is not exactly the most intuitive if you’re used to mainstream programming languages and that’s something that we will hopefully address some day. In the meantime I’ve been experimenting with a block-style programming environment (think Scratch etc.):
It’s just a standalone experiment right now, it’s not integrated with the configuration website in any way so you have to manually copy and paste the resulting expression and you can’t take an expression from the configuration website and import it into the builder.
Still, maybe it will help someone wrap their head around the expression syntax.
Pro tip: if your expression is getting too wide, try right-clicking a block and selecting “External Inputs”. “Collapse Block” can also make certain blocks look nicer.
Thanks @jfedor. The expression builder works for me in Firefox macOS, but it’s good to know that Chrome and Safari should work too.
I didn’t think I had any browser extensions that would cause problems - just my password manager - but I’ll try again with fresh profile in each browser.
I think you can actually get pretty far just using the markdown file that explains the expressions, plus all the config examples as a knowledge base for an LLM. That should already be enough to quickly put something together.
What’s still a bit missing though is some insight into the technical side of things, so you can better understand what might cause performance issues. Like conflicts at higher polling rates, or if there’s a difference between using one big expression that sets registers versus splitting things across multiple expressions. Also things like common do’s and don’ts, plus some general tips (best practices) etc.
There’s no difference between putting everything in one expression and splitting it into multiple expressions. We have multiple expressions because the initial version didn’t have registers and the expression result was the only thing you could use in a mapping. Still maybe good for organization purposes.
That performance thought came up because I was thinking about mapping the right stick to the numbers 1–8. Depending on the angle the stick is moved in, it would trigger a specific key, so you could map directions to buttons.
While thinking about that, I noticed that the number of expressions is limited. I later found out that there are also 32 registers available that could potentially be used for something like this.