jevkalk VS easyjevko.js

Compare jevkalk vs easyjevko.js and see what are their differences.

easyjevko.js

A JavaScript library for Easy Jevko -- a simple data format built on Jevko. (by jevko)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
jevkalk easyjevko.js
4 7
4 0
- -
9.1 10.0
8 months ago over 1 year ago
JavaScript JavaScript
- MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

jevkalk

Posts with mentions or reviews of jevkalk. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-03.
  • November 2022 monthly "What are you working on?" thread
    25 projects | /r/ProgrammingLanguages | 3 Nov 2022
    [1] Here's one of my tries: https://github.com/jevko/jevkalk
  • Jevko: a minimal general-purpose syntax
    5 projects | /r/programming | 25 Oct 2022
    Here is a toy language that uses Jevko as syntax that I've been hacking on a bit recently: https://github.com/jevko/jevkalk
    30 projects | news.ycombinator.com | 25 Oct 2022
    > is doing? It sure looks to me like it's asking whether a symbol (i.e. indivisible atom) ends with an equal sign, which is semantic gibberish.

    There are no symbols or indivisible atoms here.

    What's happening here is parsing. `jevkoToHtml` is a kind of parser-transpiler which operates on a syntax tree, rather than a sequence of characters or tokens.

    The syntax tree is the output of an earlier stage of parsing, done by the Jevko parser.

    So you can think of this as multi-pass parsing, by analogy with multi-pass compilation.

    At the same time as this second pass of parsing is happening, translation to HTML is happening as well.

    Hope this clarifies things!

    ---

    [0] To clearly see the point, here is a toy programming language which uses Jevko as its syntax: https://github.com/jevko/jevkalk

    30 projects | news.ycombinator.com | 25 Oct 2022
    Yes, it has the same spirit of S-expressions and shares the lovely square brackets of Rebol. The major difference is that Jevko is whitespace-agnostic: it has no notion of elements separated with whitespace.

    Generally it's a simpler, more low-level thing. It could be used to build a Rebol-like language. You could add whitespace rules on that level.

    A toy example: https://github.com/jevko/jevkalk

    This one does not use whitespace as a separator, allowing spaces in identifiers at the expense of more brackets.

easyjevko.js

Posts with mentions or reviews of easyjevko.js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-03.
  • Jc – JSONifies the output of many CLI tools
    16 projects | news.ycombinator.com | 3 Nov 2022
  • Jevko: a minimal general-purpose syntax
    5 projects | /r/programming | 25 Oct 2022
    Short answer: in https://github.com/jevko/easyjevko.js a thing like [ my text ] is converted to a JS string " my text " -- all whitespace is preserved.
    5 projects | /r/programming | 25 Oct 2022
    To compare directly to YAML, you'd look at a format built on Jevko, such as Easy Jevko (WIP): https://github.com/jevko/easyjevko.js
    30 projects | news.ycombinator.com | 25 Oct 2022
    > concatenating them changes the label for [b] from "a" to "z\na", and perhaps more damningly, erases the whitespace before "z". But, since none of the alternative formats (except ndjson and I guess plain uninterpreted binary, ASCII, or Unicode) is closed under concatenation, maybe that's less important.

    Yes, being closed under concatenation is a feature I was aiming for and it indeed does bring with it this issue.

    Just something to have in mind when devising formats. A simple solution here is to disallow having anything other than whitespace in the suffix of a Jevko with > 0 children. Then, if a format converts these labels to keys in a map, trimming leading and trailing whitespace, there is no problem. This is how I did it here:

    https://github.com/jevko/easyjevko.js

    > I don't know if you saw the last time this topic came up I linked to https://ogdl.org/, which seems pretty close to a minimal rose-tree notation.

    Yes, I've seen OGDL before. It's pretty nice. A similar one is https://treenotation.org/

    I have experimented with indentation-based syntaxes myself, before settling on brackets.

    I have found them to be problematic, at least because:

    * For complex structures they become less compact.

    * A grammar that correctly captures significant indentation can't really be written in pure BNF. The way OGDL does it is this:

      [12] space(n) ::= char_space*n ; where n is the equivalent number of spaces (can be 0)
    30 projects | news.ycombinator.com | 25 Oct 2022
    Now on top of that you can build a format that specifies what happens to whitespace, etc. Usually you'd want it trimmed if the prefixes mean keys in a map.

    The simplest format/library that does just that is this:

    * https://github.com/jevko/easyjevko.lua

    * https://github.com/jevko/easyjevko.js

    30 projects | news.ycombinator.com | 25 Oct 2022
    Responding to some points I left off here https://news.ycombinator.com/item?id=33336789

    I guess the main one is this:

    > If your audience is people like me, I think it would probably be worthwhile for you to spend some time up front describing the intended semantics of a data model, as I've attempted above, rather than leaving people to infer it from the grammar. (Maybe OCaml is not a good way to explain it, though.) You might also want to specify that leading and trailing whitespace in prefixes is not significant, though it is in the suffix ("body"); this would enable people to format their name-value pairs readably without corrupting the data. As far as I can tell, this addendum wouldn't interfere with any of your existing uses for Jevko, though in some cases it would simplify their implementations.

    You're right, things should be explained more clearly (TODO). Especially the exact role of Jevko and treatment of whitespace. I'll try to improve that.

    Here is a sketch of an explanation.

    Plain Jevko is meant to be a low-level syntactic layer.

    It takes care of turning a unicode sequence into a tree.

    On this level, all whitespace is preserved in the tree.

    To represent key-value pairs and other data, you most likely want another layer above Jevko -- this would be a Jevko-based format, such as queryjevko (somewhat explained below) or, a very similar one, easyjevko, implemented and very lightly documented here: https://github.com/jevko/easyjevko.js

    Or you could have a markup format, such as https://github.com/jevko/markup-experiments#asttoxml5

    This format layer defines certain restrictions which may make a subset of Jevkos invalid in it.

    It also specifies how to interpret the valid Jevkos. This includes the treatment of whitespace, e.g. that a leading or trailing whitespace in prefixes is insignificant, but conditionally significant in suffixes, etc.

    Different formats will define different restrictions and interpretations.

    For example:

    # queryjevko

    queryjevko is a format which uses (a variant of) Jevko as a syntax. Only a subset of Jevko is valid queryjevko.

    > I think this is a more useful level of abstraction, and it's more or less the level used by, for example, queryjevko.js's jevkoToJs, although that erroneously uses () instead of [].

    The `()` are used on purpose -- queryjevko is meant to be used in URL query strings and be readable. If square brackets were used, things like JS' encodeURIComponent would escape them, making the string unreadable. Using `()` solves that. "~" is used instead of "`" for the same reason. So technically we are dealing not with a spec-compliant Jevko, but a trivial variant of it. Maybe I should write a meta-spec which allows one to pick the three special characters before instantiating itself into a spec. Anyway the parser implementation is configurable in that regard, so I simply configure it to use "~()" instead of "`[]".

    > (Also, contrary to your assertion above that this is an example of "leaving [Jevko's data model] as-is", it forgets the order of the name-value pairs as well as I guess all but one of any duplicate set of fields with the same name and also the possibility that there could be both fields and a body.)

    I meant [whitespace] rather than [Jevko's data model].

    Again, queryjevko is a format which uses Jevko as an underlying syntax. It specifies how syntax trees are converted to JS values, by restricting the range of valid Jevkos. It also specifies conversion in the opposite direction, likewise placing restrictions on JS values that can be safely converted to queryjevko.

    The order of name-value pairs happens to get preserved (because of the way JS works), but that's not necessarily relevant. If I were to write a cross-language spec for queryjevko, I'd probably specify that this shouldn't be relied upon.

    Duplicate fields and Jevkos with both fields and a non-whitespace body will produce an error when converting Jevko->JS.

    I hope this clarifies things somewhat.

    Lastly, I'll respond to this for completeness:

    > (By the way, if you want to attribute your JSON example for copyright reasons, you need to attribute it to its author or authors, not to the Wikipedia, which is just the site they posted it on.)

    According to this:

    https://en.wikipedia.org/wiki/Wikipedia:Reusing_Wikipedia_co...

    there are 3 options, one of them being what I did, which is to include a link.

    I think that's all.

    Have a good one!

    30 projects | news.ycombinator.com | 25 Oct 2022

What are some alternatives?

When comparing jevkalk and easyjevko.js you can also consider the following projects:

jevkostream.scm - (WIP) Streaming parsers for Jevko in Scheme

easyjevko.lua - An Easy Jevko library for Lua.

edsl - Example of embedding TypeScript as an EDSL inside of another language

community - Features Jevko-related things created by various authors

Glide - Glide programming language

binary-experiments - Experiments with various binary formats based on Jevko.

nederlang - Nederlandse programmeertaal 🇳🇱. Geïnterpreteerd en met dynamische types. Met bytecode compiler en virtuele machine, in Rust.

parsejevko.py - Simple parser for Jevko in Python.

motorway-lang - An esoteric programming language based on the British motorway network

parsejevko.java - Simple parser for Jevko in Java.

yapl - YAml Programming Language

jevko