Replies: 2 comments
-
Really excited about this. It should make for a much nicer user experience. I'm going to be populating this thread with some of our internal notes over the next week to inform longer-term design. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm really digging the expressiveness of this... and somehow it feels right that a scripting language can help us tackle the harder problem of- how do I custom parse something like a binary file. Couple of comments/questions:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since the current way of writing synth schemas is...well, pragmatic from a code simplicity standpoint, I set out to improve this. So after looking around for suitable languages I happened upon koto which ticked all the boxes (well, except one that is being worked on, we use my fork for now). Why I made that choice is for another discussion. Here I want to show what should be working really soon, and where I intend to go with this:
Let's say we have a database table:
The corresponding synth schema could look roughly like this:
As you can see, this isn't exactly easy to get right (I've written this by heart right now and I'm sure I must've made some errors). Nor is it easy to read. With the current koto bindings, we should get (roughly, this is still untested):
I'm trying to add a trick to coerce values from koto to Rust that would give us:
Also adding the koto runtime will enable us to extend synth with scripting capabilities that I want to explore cautiously later on. We may also opt to add some syntactic sugar to make it even nicer to read. What do you folks think?
Beta Was this translation helpful? Give feedback.
All reactions