question: what’s your favorite schema/data defini...
# thinking-together
i
question: what’s your favorite schema/data definition language? for now graphql is my favorite for the simplicity of writing/reading. it’s simple enough to be easily translatable to other languages but it still retains some great features. the details are resolvable on the edges of your system, but the schema is a universal interface between all the clients/servers.
w
OCaml 😉
But actually, I’ve never seen a data language with proper variants. Protobuf at least tries, but they have to cripple it for compatibility reasons.
i
Protobuffs are ❤️! but to me graphql seems to be at a higher level of abstraction and that’s kind of what I’m looking for. I’d use protobuf below the graphql level’s (resolvers and similar) but I prefer the lack of details graphql has for properties.
g
i’ve actually been compiling a little list of data structuring/destructuring languages i like let me paste them in
jq clojure core.match specter datascript pull datomic fulcro falcor statecharts destructuring graphql kind of kakoune rebol parse rebl nav ometa/PEGs
you can kind of get variants in EDN with clojure and some libraries:

https://youtu.be/ZQkIWWTygio

w
@Will FlatBuffers has (strongly typed) unions built-in: https://google.github.io/flatbuffers/flatbuffers_guide_writing_schema.html (disclaimer: I designed it)
❤️ 1
i
@Garth Goldwater that’s a great list, got a bunch of stuff to research now, thanks! @Wouter damn, FlatBuffers look great. Might end up using them, seems more readable than protobuffs. tho I gotta say they seem pretty unknown compared to protos which are everywhere (at least by google services).
w
@Ian Rumac yup, protos have been around at Google since the start, FlatBuffers only in the last 5 years..
b
I'm biased, and it is still VERY early, but I like my Grammar Language (http://jtree.treenotation.org/designer/#standard%20grammar)...It is written in itself. It can support strongly typed SSV data, for example the class Iris dataset:(http://jtree.treenotation.org/designer/#standard%20iris) and it can support full fledged programming languages.....both graph and tabular languages work great
classic* Iris dataset
You can infer basic prefix grammars with 1 click, but it also supports postfix or omnifix/pattern matching....you write in Grammar and get syntax highlighting, autocomplete, type checking, program synthesis, and more, for free
It only works for Tree Languages...it is not designed for BNF/CFG languages
i
@Breck Yunits oh, you made language designer? Awesome! Similar project is why I’m asking, I’m making a tree based software editor and am wondering which data definition languages should I add as “first class support”
I just noticed treenotation.org is actually a thing, glad to see there’s more people working on this. trees are ❤️
b
@Ian Rumac cool! Do you have a link to play with yet? I am quite obsessed with tree structures and think there is huge unexplored terrain for new types of editing experiences
i
coming soon! it’s unfortunately gonna be a desktop app, I’m best at Kotlin so screwing around with Vue to get it where I want took me too long, lost a ton of time on it, so I’m sticking to a desktop editor.
b
I think a desktop editor is fine for dev tools, especially if it's native. I mostly use native apps for dev.
d
Ian Rumac, are you making some kind of projectional editor? Anyway, LES http://loyc.net/les/ isn't a data definition language but it could be one - it can be used for almost anything.
I've been thinking LES might be the right foundation for a projectional editor based on the WYTIWYS (what you type is what you see) principle... because I think such an editor must interop well with plain-text environments like reddit or github, and support copy/paste really well. Therefore I don't think that keeping the program semantically valid at all times is realistic, but keeping it syntactically valid is certainly doable.
To relate LES with tree notation, if we think of languages as a continuum from less to more structured, I think it goes like unstructured text < tree notation < JSON/XML < LES < high-level language, what do you think @Breck Yunits?