Introducing Jevko: a minimal general-purpose syntax

Darius J Chuck

2022-02-22

I’ve been working on Jevko every day for about 7 weeks now. Today I have posted the first public status update on my website.

I’m reposting it here as well.


Dear Hackers,

I am making something for you and I’d like to show you an early preview today, on this palindromic datetime of 2022-02-22T20:22:02.

It is a small thing, but one that I hope at least some of you will like, because it’s very hackable.

I hope that it turns out to be a valuable contribution, and all the energy and time I put into obsessing over this will turn out to be worth it.

I’ve been working on this on and off for a very long time now, but my latest streak started on the second week of this year and I’ve been at it every day since. This is the first public status update.

Anyway, let me tell you about the thing and show you how you can try it out, and then I hope you will tell me whether it is worth obsessing over further. Feel free to skip to the bits which are the most interesting for you.

What is it?

The main thing I’m showing you here is the minimal general-purpose syntax that I developed, called Jevko.

Everything else is built on top and around it. This everything else includes formats and prototype libraries or scripts to handle them. There is a demo for a data-interchange format I’ve been calling Interjevko that you can play with here.

The syntax is stable. There is a simple parser for it in JavaScript and a tutorial to write your own in your favorite programming language (not yet finished; I hope I can find some syntax enthusiasts who can help write parsers to support the syntax in different programming languages – the good news is that it is really dead simple – porting the basic parser should be a matter of minutes for a seasoned hacker). The software is a bunch of prototypes and demos, so not quite polished, but it gets the job done.

Alright, let’s get to the syntax.

How minimal is it?

Well, its grammar can be condensed into one line of ABNF:

Jevko = *("[" Jevko "]" / "`" ("`" / "[" / "]") / %x0-5a / %x5c / %x5e-5f / %x61-10ffff)

But you don’t have to know what ABNF is or need to derive anything from this fact. I’m just illustrating that the thing has an extremely minimal formal definition. Everything that follows is rooted in this.

A less minimal, but more workable and useful definition of the syntax is formally specified here (a solid starting point for implementations).

How general-purpose is it?

Here are some of the different applications of this syntax that I’ve been working on (a mess at the moment):

Where is it?

Official Jevko-related content can be found here:

How is it different?

Jevko is simpler and more low-level than JSON, XML, or even S-expressions.

It has no data types, no semantics, no underlying model of cons cells or anything similar. It’s as close to pure generic syntax as it gets.

Basically there is only one recursive syntactic structure (Jevko/tree) and one non-recursive primitive (text).

So at the lowest level Jevko is a minimal formal specification for flexible trees of text.

A notable and distinguishing syntacitc feature of the syntax is that whitespace does not play a role. It is not a word or token separator. It’s just part of text. Interpretation of the text is a separate, higher-level concern.

Jevko is then an extremely simple and flexible low-level syntactic building block.

It is an extreme manifestation of syntactic minimalism, a basic recursive syntax – just like any recursive syntax, but with everything inessential removed.

This simplicity and flexibility is what is valuable.

Jevko as a building block can be composed together with additional syntactic and semantic blocks to build portable or semi-portable formats. The syntax is simple to write and read and can be easily embedded in JSON or XML strings – in this way it can complement them. A Jevko-based format, like Interjevko, can also stand on its own, as a simpler alternative.

Roadmap

Here is a rough roadmap for Jevko and related projects.

ASAP:

Next in line:

That’s it for now

Time is up, so this is it for now.

If you have any feedback please reach out to me at darius.j.chuck+jevko at gmail.

Thank you for reading.

Until next time.

Cheers,
Darius


Discussions

This post was discussed on Hacker News, Lobsters, reddit.

Support TAO

If you like, you can support my work with a small donation.

Donate directly via Stripe   or   Buy Me a Coffee at ko-fi.com   Postaw mi kawę na buycoffee.to

Thank you!

Darius J Chuck