toot.cat is one of the many independent Mastodon servers you can use to participate in the fediverse.
On the internet, everyone knows you're a cat — and that's totally okay.

Administered by:

Server stats:

489
active users

I just noticed the release notes for @gotink’s parser and it has this new tool for defining KDL<->JS mappings in a more complex way than just JiK. This is AMAZING. It lets you really harness the power of KDL’s node-based system but still work easily with JS objects, in a well-defined and structured way!

Cause sometimes what you really really want is a tree structure, not just objects and arrays. And you never want yaml, even if you think you do :P

github.com/bgotink/kdl/release

(De)Serialization Tools
This release introduces a new export: @bgotink/kdl/dessert which contains a bunch of utilities to deserialize KDL text into a JavaScript structure and serialize it back agai...
GitHubRelease v0.3.0-next.0 · bgotink/kdl(De)Serialization Tools This release introduces a new export: @bgotink/kdl/dessert which contains a bunch of utilities to deserialize KDL text into a JavaScript structure and serialize it back agai...
Public

@zkat I'm glad you like it! I want to iterate over it a little before publishing it as stable API though.
I've already had to make a few changes when I tried to use it for the first time for the `.config/prettier.kdl` file 😅

I want to add one extra API, one that's a bit more high-level and rigid but that takes care of both serialization and deserialization in one go and that could later gain support for applying modifications to a KDL file by making changes to the mapped JS data.

Public

@gotink it would be super interesting to have this API AND also make it format-preserving btw

Public

@zkat I want to give it a shot but I want to try format preserving changes in the more limited API first because I'm more confident I can get that to work

Public

@zkat Ok never mind, I had an epiphany on how to tackle this during NYE dinner—no one at the table noticed, thankfully—and I've been able to implement it!
It requires a small extra step during deserialization and serialization in order to link the serialization with the deserialization so the serialization code can access the original KDL structure, but that should be easy enough in most scenarios.

github.com/bgotink/kdl/release