est.social on üks paljudest sõltumatutest Mastodoni serveritest, mida saab fediversumis osalemiseks kasutada.
est.social on mõeldud Eestis üldkasutatavaks Mastodoni serveriks. est.social is meant to be a general use Mastodon server for Estonia.

Administraator:

Serveri statistika:

90
aktiivsed kasutajad

#kdl

3 postitusega2 osalejaga0 postitust täna
Kat Marchán 🐈<p>FINALLY got around to speccing out the new suffix type annotation feature for <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a>: <a href="https://github.com/kdl-org/kdl/pull/513" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/kdl-org/kdl/pull/513</span><span class="invisible"></span></a> Commentary welcome! It's very exciting!</p><p>I believe right now that the complexity cost, especially taking into account that there's a serviceable escape hatch, and fairly good ambiguity/typo protection, is well worth the value of people being able to write DSLs that use this feature.</p><p>I am, by the way, mostly writing out the grammar/spec itself after a much longer discussion by a bunch of people who poked all sorts of holes in a silly idea I threw over the fence: <a href="https://github.com/kdl-org/kdl/issues/510" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/kdl-org/kdl/issues/</span><span class="invisible">510</span></a></p><p>I am immensely thankful to the KDL spec and implementer community for everything they do! We're really all making an amazing language here.</p>
Hemera :nixos: :ms_snow_leopard:<p>Some example testcase errors, thanks to the awesome <a href="https://meow.social/tags/miette" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>miette</span></a> crate from @zkat (who also authored <a href="https://meow.social/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> btw!)</p>
Hemera :nixos: :ms_snow_leopard:<p>Alright!</p><p>I just released a first functional version of a new crate: </p><p>🔧 <code>test-dsl</code> at 0.1.0</p><p>🦀 <a href="https://github.com/TheNeikos/test-dsl/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/TheNeikos/test-dsl/</span><span class="invisible"></span></a></p><p>To paraphrase the readme: <code>test-dsl</code> allows you to easily author tests by decoupling between the 'test harness', 'verbs' and 'conditions'.</p><p>It's role in your testing infra would be as boilerplate reduction, so that you can focus on just writing tests around the behaviour of your system. I'm using this pattern for example in a client-server context. So I have verbs like <code>start_server 1</code>, <code>start_client 2</code>, <code>connect_client 2 1</code> etc...</p><p>Of course the meaning of these verbs is highly project-specific.</p><p>If a verb does fail, either by panicking or returning an error, you get a nice error output telling you exactly which file and which verb caused the error. Allowing you to more easily pin-point directly what went wrong, rather than potentially searching through a log.</p><p>It works great together with <code>datatest-stable</code> from the <code>nextest</code> project, but it works just as fine standalone.</p><p>It uses <a href="https://meow.social/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> as the language to write your testcases in, so its fairly nice to read.</p><p>It's still missing more comprehensive documentation, but as a prototype it should work just fine!</p> <p>It actually sprung out from having used this pattern a few times, and I didn't want to re-write the boilerplate around it, and maybe re-use some code between projects.</p><p><a href="https://meow.social/tags/rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rust</span></a> <a href="https://meow.social/tags/rustlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rustlang</span></a></p>
Kat Marchán 🐈<p>GitHub is now officially highlighting <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> docs!! On the app, too!</p>
Kat Marchán 🐈<p>Realistically, would <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> being officially standardized by one of the major international standards organizations influence your interest and/or ability to use KDL, especially at work?</p>
Kat Marchán 🐈<p>There is a proposal for <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> to extend it such that you can have things like <code>10%</code> or <code>20px</code> and have that mostly Just Work in terms of existing KDL features</p><p>But, t’s not as perfectly clean as I would’ve liked, and so I’m hoping others (you?) will help 👀 for other issues</p><p><a href="https://github.com/kdl-org/kdl/issues/510" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/kdl-org/kdl/issues/</span><span class="invisible">510</span></a></p>
Kat Marchán 🐈<p>lol turns out that when you base a language on xml/s-exp and you give it a really lightweight syntax, it just kinda turns into a really really nice DSL format <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a></p><p>I think that might be what actually sets apart node-based formats from JSON-semantic “map and array” formats. It’s much less convoluted, usually, to make the former look and feel like an executable language</p>
Kat Marchán 🐈<p><a href="https://github.com/kdl-org/kdl/issues/510" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/kdl-org/kdl/issues/</span><span class="invisible">510</span></a> what do y’all think of this? I know I promised not to change stuff anymore but it’s… a reasonable ask, and I think this might be an elegant solution? <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a></p>
Slatian<p>Is someone already working on a rust adapter that implements <a href="https://github.com/kdl-org/kdl/blob/main/JSON-IN-KDL.md" rel="nofollow noopener noreferrer" target="_blank">json-in-kdl</a> to serde compatibility?</p><p><a class="hashtag" href="https://pleroma.envs.net/tag/kdl" rel="nofollow noopener noreferrer" target="_blank">#kdl</a> cc: <span class="h-card"><a class="u-url mention" href="https://toot.cat/@zkat" rel="nofollow noopener noreferrer" target="_blank">@<span>zkat</span></a></span></p>
Kat Marchán 🐈<p>I should probably figure out a way to put this on the site but honestly, it's not the cutesy+professional vibe <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> is really trying to give off so maybe I'll just post it here and be done with it.</p>
Kat Marchán 🐈<p>how do y'all feel about this hypothetical <code>package.kdl</code>?</p><p><a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a></p>
Kat Marchán 🐈<p>what if.... Rust macro for a mostly <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> syntax so you can just do:</p><pre><code>kdl! {<br> foo 1 2 3 bar {<br> hey key=val #true; there!<br> }<br>}<br></code></pre>
Kat Marchán 🐈<p><a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> dedented multiline strings are absolutely incredible. I don't know how I've managed to survive in languages that don't have this feature. I'm using the heckin out of it</p>
Kat Marchán 🐈<p>Oh god I think we’re gonna have to do a new edition of <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> with a fairly impactful change. But I want it so bad. It’s so good. And there’s a few other minor tweaks we’ve been wanting to pop in there too, for certain corner cases.</p><p>Perhaps a new process: <a href="https://github.com/kdl-org/kdl/discussions/496" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/kdl-org/kdl/discuss</span><span class="invisible">ions/496</span></a></p><p>Thoughts?</p>
Kat Marchán 🐈<p>I just had the most ridiculous idea for enabling <code>/</code> in plain <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> identifiers.</p><p>Quick, someone talk some sense into me:<br><a href="https://github.com/kdl-org/kdl/discussions/494" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/kdl-org/kdl/discuss</span><span class="invisible">ions/494</span></a></p>
Kat Marchán 🐈<p>So I had an idea last night: What if there was a way to define, in <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> Schema, an LSP SemanticTokens mapping such that kdl-lsp could provide custom syntax highlighting for your KDL-based DSLs?</p><p>So for example, the following KDL would be highlighted such that “class” and “@“ would be highlighted with your editor theme “keyword” color, “Foo” with your theme “class” color, <code>"hello"</code> as “documentation”, and <code>name</code> as “property”, and <code>string</code> as “type”?</p><pre><code>class Foo {<br> @ hello<br> name string<br>}<br></code></pre><p>There’s some limitations as to how far you would be able to take this without your own LSP server, but it would probably take you pretty far.</p>
Kat Marchán 🐈<p>Another cool project using <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a>!</p><p>This one is a neat little programming language using KDL for its package manifest. Literally what it was created to do!</p><p><a href="https://onyxlang.io/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">onyxlang.io/</span><span class="invisible"></span></a></p>
Kat Marchán 🐈<p>Heh. At first I thought it would be kinda silly to <em>start</em> the KDL Schema spec by using it to author its own schema…</p><p>…but actually it’s been really helpful and the schema is getting more and more clean as I iterate on it. I’ve even learned a few tricks I just hadn’t thought about before that only really work in a language like <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a>.</p>
Kat Marchán 🐈<p>gawd, I've been drafting big, complicated <a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a> docs recently, refactoring and editing them, just full-on restructuring everything as I go along.</p><p>Just like... grab the whole scope. shove it somewhere else. done. And when authoring, I don't feel like I'm constantly having to type "structural chars"</p><p>And it is <u>really nice</u>. Like, this has been a genuinely smooth experience compared to the constant delimiter-tweaking of JSON, or the Absolutely Bananas nonsense that is YAML semantic indentation (WHY).</p><p>When authoring, JSON/XML have a very low signal:noise ratio. YAML opts for cognitive overhead.</p><p>To poke holes in my own thing: the main "cognitive overhead" I seem to be running into is the classic XML "should this be an attribute/property or a child?" for key/value stuff. They both have pros/cons, incl doing both</p><p>The other difficulty is the node thing, since KDL doesn't map to arr/obj/scalar</p>
Kat Marchán 🐈<p>27 pages! By contrast, the JSON RFC is 16. Honestly that’s not bad at all, considering how barebones JSON is. YAML is… 80. 😬</p><p><a href="https://toot.cat/tags/KDL" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KDL</span></a></p>