~pepe/eleanor

Data manager
35a90186 — Josef Pospíšil 1 year, 6 months ago
Name anonymous asserted
4b4bcc9d — Josef Pospíšil 1 year, 7 months ago
Message for asserted is optional
886b758b — Josef Pospíšil 1 year, 7 months ago
Add asserted point

clone

read-only
https://git.sr.ht/~pepe/eleanor
read/write
git@git.sr.ht:~pepe/eleanor

You can also use your local clone with git send-email.

#Eleanor

Data structures querying tool. The basic concept is the function created from the path with guide function from the library code, which can be called with data structure to query. There is also the tour convenience function that created the quite and calls it in one go.

#General overview

#Data types

Eleanor is specialy designed for the mutable Janet types, eg. tables and arrays. Or better, we did not have any motivation for working with immutable types.

#Path

Path could be considered a Janet DSL akin to the peg definition, but simpler both in definition only couple of the operations are available.

Any path must be a tuple, bracketed by tradition, and contain points needed to traverse or transform the datastructure. Inside the tuple you need to list the points along the way, similar to core get-in. Each step operates on the current base, which is usualy result of the traversing or transforming previous base. The first base is the provided datastructure.

There are three main kinds of points:

#Functions with arity one

Function receive current base, and its return is set as next base.

#Functions with arity two

Function receive current base, and array with already collected data. Its return is set as next base.

#Everything else

Keyword, string, number, tuple, struct you name it are called with get on the base

#Status

~Consolidation phase of the development. All the bits and pieces are in place, we just need to polish and document them all. Stay tuned.~

Just after complete overhaul. Things will burst into your face.