mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

4.8K
active users

Anders Stenberg

Ok, so the UI editor thing is coming along. But, it's faaar from being actually usable and I don't know if it ever will be. It was mostly an experiment to dev the UI system, and that's starting to be more or less usable.

But the UI XML is pretty awful, so without an editor I need another format. I haven't found an existing that fits so I probably need to do something custom, and that's a whole new project i don't know if I want to dive into. 😭

QML looks like a very close fit to what I want, but it's strongly tied to Qt. I wish there was a generic data format that worked in a similar way.

CSS is also kind of close in data structure but - again - is very tied to a specific domain. Editors autocomplete CSS property names etc.

Or maybe I just double down on the UI editor and make it usable.

@SonnyBonds thinking aloud - QML ends up looking very much like a Lisp dialect. An option you may already have considered and rejected - embedding a simple Lisp dialect, and using it as a combination UI DSL and scripting language.

@bbbscarter I haven't used lisp in many many years and I don't know what dialects there are really. Any suggestions?

My current idea is to not have scripting as such, but some expressions. I guess functional maybe makes sense there though.

@SonnyBonds I mostly use Lisp via Emacs, so I'm certainly not an expert.

My thought was that the key features of QML (e.g. hierarchical, clean syntax, id tags, variables and functions if needed) map onto Lisp quite well. And I've seen examples where Lisp looks quite pleasant for UI layouts. e.g.

github.com/clj-commons/seesaw/
lispworks.com/products/capi.ht
github.com/ailisp/simple-gui

The choice of 'which Lisp' would be mostly down to ease of embedding/FFI. S7, Chicken, Guile and ECL seem popular?

@bbbscarter I'll have a look at these. Thanks!

@SonnyBonds

this looks great!

may i recommend ... #edn
learnxinyminutes.com/edn/
github.com/edn-format/edn

all the flexibility of xml without all those triangle brackets and closing tags - plus, it can be made to express actual program logic if necessary (#clojure's based on it). here's someone's prototype parser: github.com/shaunxcode/edn-cpp

plan b: pugjs.org/ is also good if you like significant indentation - it can compile down to xml directly, and allows js code to be embeded inline

learnxinyminutes.comLearn EDN in Y Minutes

@unspeaker Not sure I've seen EDN so thanks for the tip! EDN as such doesn't seem to have language support in e.g. VS Code, but maybe Clojure support covers it in a reasonable way.

I'll have to dig into it a bit.