TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Jevko: a minimal general-purpose syntax

68 pointsby memorableover 2 years ago

12 comments

ianbickingover 2 years ago
Seems like there&#x27;s a bunch of problems:<p>1. It relies on later stages to do things like convert to native values or remove whitespace. As such an intermediary can&#x27;t really &quot;understand&quot; the document very well. E.g., if you are using this syntax to express key&#x2F;value then you can only know the keys if you know the whitespace rules that will be used to interpret the keys.<p>2. It reminds me more of XML than S-Expressions. If you are familiar with the ElementTree [1] representation of XML then these parsed examples become more familiar, just a prefix instead of suffix, and no attribute children.<p>3. Connecting whitespace and XML, I suppose this explains why so many XML formats ended up only using attributes for text values, and used tags and children only for nesting. Otherwise interpretation requires understanding how to interpret these mixed documents with unclear whitespace rules. But Jevko doesn&#x27;t have attributes.<p>4. If an intermediary can&#x27;t understand it then why define a syntax at all?<p>5. I don&#x27;t see any escaping rules so including literal [] seems... impossible? You can essentially deserialize the parsed value to reintroduce them, but that&#x27;s weird and awkward, and only works with balanced brackets anyway.<p>6. No way to embed binary data, or otherwise uninterpreted data. JSON has the same problem. Base64 encoding things is yet another way in which the data is not interpretable by intermediaries.<p>I think XML shows that &quot;just strings&quot; isn&#x27;t fatal, and lots of things get jammed into strings in JSON too, you&#x27;ll never be able to reproduce every type in a general purpose serialization format (I guess XML with namespaces attempted, but also clearly failed). So I can see a place for something that defines a tree where all leaves are strings. But this doesn&#x27;t seem like a very clean way to do that.<p>[1] <a href="https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;xml.etree.elementtree.html#element-objects" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;xml.etree.elementtree.html...</a>
评论 #33335448 未加载
评论 #33335181 未加载
zokierover 2 years ago
I don&#x27;t understand the whitespace handling here, it seems very underdefined?<p>Taking the example from github page (abbreviated):<p><pre><code> first name [John] last name [Smith] address [ street address [21 2nd Street] ] </code></pre> why isn&#x27;t it equivalent to this json?<p><pre><code> { &quot;first name &quot;: &quot;John&quot;, &quot;\nlast name &quot;: &quot;Smith&quot;, &quot;\naddress &quot;: { &quot;\n street address &quot;: &quot;21 2nd Street&quot; } } </code></pre> somehow the whitespace is instead implicitly magiced away, but that isn&#x27;t defined in the grammar anywhere as far as I can see?
评论 #33334306 未加载
评论 #33334314 未加载
评论 #33333953 未加载
评论 #33334063 未加载
评论 #33335191 未加载
tomjakubowskiover 2 years ago
I&#x27;d be interested in a more detailed comparison to s-exprs. Jevko reads less noisily because it uses fewer brackets, which is nice, but the ambiguity around whitespace gives me pause.<p>How is it simpler or lower-level than s-exprs?
评论 #33334971 未加载
bokumoover 2 years ago
A minimal general purpose syntax for what?<p>I followed the link and read the page, but I’m still not sure what the point is!
评论 #33334636 未加载
评论 #33333474 未加载
评论 #33339488 未加载
tpoacherover 2 years ago
I appreciate your effort, but your explanation on the first page is too abstract to the point that I read to the end and still didn&#x27;t know exactly what Jevko is and how to use it.<p>E.g. you introduce &quot;Subjevko&quot; as if it&#x27;s known knowledge.<p>Also, the singular link to &quot;examples&quot; on that page, which is what I <i>really</i> want to see first, was broken.<p>My advice: for every point you make have a single, simple, illustrative example right below the explanatory text (or better yet, right above it!).
评论 #33395237 未加载
eterpsover 2 years ago
Found an example where it is used as markup: <a href="https:&#x2F;&#x2F;github.com&#x2F;jevko&#x2F;jevkodom.js&#x2F;blob&#x2F;master&#x2F;test.js#L6" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jevko&#x2F;jevkodom.js&#x2F;blob&#x2F;master&#x2F;test.js#L6</a>
评论 #33333624 未加载
chriswarboover 2 years ago
How does this relate to the (earlier?) tree-annotation&#x2F;TAO system (seemingly from the same author): <a href="https:&#x2F;&#x2F;djedr.github.io&#x2F;mirror&#x2F;tao&#x2F;tao.html" rel="nofollow">https:&#x2F;&#x2F;djedr.github.io&#x2F;mirror&#x2F;tao&#x2F;tao.html</a>
评论 #33335963 未加载
lgasover 2 years ago
Nice! I wrote a little parser for it (<a href="https:&#x2F;&#x2F;github.com&#x2F;lgastako&#x2F;jevko" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lgastako&#x2F;jevko</a>). It was fun. I&#x27;ll have to play with building higher level formats on top of it.
评论 #33338701 未加载
评论 #33344933 未加载
Nullabillityover 2 years ago
I wish we could stop making up new languages in 2022 that use unenclosed strings...
评论 #33333905 未加载
Trufaover 2 years ago
Interesting, I&#x27;m wondering where something like this could be useful.
评论 #33333263 未加载
评论 #33339115 未加载
zeckalphaover 2 years ago
Reminds me of Rebol, a precursor to JSON.
评论 #33338765 未加载
djedrover 2 years ago
Author here, thanks for posting this.<p>If anybody has any technical questions or comments, ask away!
评论 #33338574 未加载