The biggest unsolved mystery of software engineering remains the widespread use of #YAML.
Can we just agree to use #KDL instead please!?
#yaml #kdl #softwareEngineering #softwareDevelopment
I have begun working on a new model for Wander. Wander is the scripting language used for working with Ligature. Previously Wander looked more like an ML influenced language. As I started using it in practice I realized that I wasn't using most of the features of the language and I could probably simplify it. I've started implementing something that I'm considering a more command oriented approach. I'm taking a lot of inspiration from https://kdl.dev/ for the syntax. #kdl
A new challenger approaches!
There is now a #kdl parser/printer in/for #commonlisp! My first programming language and one that is still dear to me, even if I haven't hacked it in years!
Thanks to @chee for putting this together!
I've been itching to use #Kdl (kdl.dev) for my new project... but I recently switched to Go and I am not near skilled enough atm to write a whole implementation :blobfox0_0:
Showed a coworker https://kdl.dev/ and now he's making alternative setups for some of our YAML/etc with #KDL and it's so pretty.
> This means that loading an untrusted yaml document is generally unsafe, as it may lead to arbitrary code execution.
Ouch! 😳
#YAML might be the next "billion dollar mistake". Seriously.
It should actually be called "YACT" => Yet Another Compilation Target.
Regarding alternatives: definitely check out #KDL - pure love! ❤️
@zkat is the maintainer of it.
In 32 hours, among with IRL issues, I managed to complete my first scenario draft. I will try to improvise the idea and will write one or two more drafts. This 4:49AM sleep is very well deserved! Good nacht! #KDL #KULT #KULTDivinityLost
Really disappointed that the config crate's API is kinda fundamentally unusable for something like #kdl, so I guess I'm just gonna have to write a dedicated crate for KDL-based file configuration :\
On the flip side: I can take advantage of all the nice span information KDL has to make it really really easy to give very rich and semantically meaningful errors for folks using that crate for their own config purposes!
I really do need to stop picking up new projects, tho...
Breaking #kdl news!
I just landed https://github.com/kdl-org/kdl-rs/pull/61, which implements a full-on parser and query engine for KQL, a CSS selector-like query language designed for KDL.
Let's take a KDL document like this:
<pre>
a {
b "hi"
c 2 {
d
}
e
}
</pre>
Things you can do with kdl-rs now:
<pre>
doc.query("d")
->Some( `d` node)
doc.query_all("[val()]")
-> iterator that returns `b` and `c`
doc.query_get("b", 0)
-> Some("hi")
doc.query_get_all("a > []", 0)
> iterator that returns `"hi"` then `2`
</pre>
...and so much more!
This was all just released as part of kdl-rs 5.0.0-alpha.0. Please give it a shot if you've wanted to give KDL a go, I think it'll make working with KDL way easier in general!
omg it works! My #kdl #KQL engine works beautifully!
So to summarize:
a > b 👉🏻 any child "b" of node "a"
a >> b 👉🏻 any descendant "b" of node "a"
a + b 👉🏻 any "b" that immediately follows an "a" node under the same parent
a ++ b 👉🏻 any "b" anywhere after "a" under the same parent.
I've also got multiple parallel selectors working (with the `,` operator, just like CSS), and some magic around the toplevel `scope()` selector that lets you do things like `scope() > a` to make sure you're selecting only direct children of the *current* document/node you're querying from.
Whew. It's been a couple of days but this was really fun! 💯 would parse again.
Oh and it has all the nice error reporting you would expect from a tool that uses #miette 😉
#kdl #kql #miette #rust #rustlang
thinking about KQL, the #kdl query language, and how even though it's taken me a few days to implement the query _engine_, I wrote the parser in a matter of a few hours, and it basically worked on the first try, minus like two tweaks, including fancy error reporting.
Thanks miette and nom, and I guess the fact that I've gotten pretty damn good at writing parsers this far into my career lol
So far, I've got the following #kdl queries working "as expected":
foo > bar
foo >> bar
:scope > foo
:scope >> foo
foo > bar > baz
foo >> bar >> baz
That all seems to be working, returning results in depth-first order. Next, siblings/neighbors (+ and ++)!
Then, I make sure all the various matcher types besides node names work (they should _already_ work, I just haven't tested them). That is, [prop = "value"], [val(2) = 1], etc.
@schuelermine https://github.com/kdl-org/kdl/blob/kdl-v2/QUERY-SPEC.md the #kdl query language. Think CSS Selectors or XPATH, but meant for KDL itself.
A #KQL implementation built right into kdl-rs is Coming Soon™️ to a crates.io near you!
I spent some time actually _using_ kdl-rs this weekend on a project, and realized the whole experience would be *massively* improved if I actually had access to KQL (and extractors), so I switched gears from a $newproject and went back to this.
It's basically CSS selectors, but for #kdl!
KDL, https://kdl.dev/.
> KDL is a document language with XML-like semantics that looks like you're invoking a bunch of CLI commands! It's meant to be used both as a serialization format and a configuration language, much like JSON, YAML, or XML.
As a configuration format, it just rocks.
happy Monday, it's time for a periodic reminder that #kdl exists and that you should check it out!
It's a really lightweight config/data language with more conveniences than JSON, but without the complexities and footguns of YAML, and with XML semantics.
Please check it out and tell me what you think! Learn more at https://kdl.dev
Good morning everyone!
Today is an exciting day for me. I gathered my final native game group and it's for a #KULT #KULTDivinityLost #KDL campaign. I'm planning lots of #BDSM #occult and #horror stuff for this game, thanks to the game's own #tarot cards. We already did the #consent form thing, and everyone looks ready.
Time to unleash the eternal #chaos
#KULT #KultDivinityLost #kdl #bdsm #occult #horror #tarot #consent #chaos