l122.code.zephyr about code posts

* zr 0.1.0 * ISC * incomplete * unstable *

* home * files * history *

██████████████████

l122.code.zephyr.description

A human readable and machine readable interchange format whose syntax is light as air and a breeze to use!

Zephyr is designed as a lightweight data format to end the wars between configuration languages by creating something we *all* can understand and use very easily. Zephyr is intentionally designed to have almost no features but give in return a robust and flexible set of usecases that can apply to almost any project.

Zephyr heavily uses all forms of whitespace and creatively packages its necessary data in a nearly invisible syntax. Zephyr notably uses tabs as its delimiter between all fields on the same row instead of separating them by more syntax. This makes Zephyr extremely easy to parse and easy to read^(especially with tabs visible), as well as editable in any text editor which has hard tabs an on option.

Zephyr has 3 different modes denoted by the amount of tabs on the first line, with the last line reserved for any other data that should be passed to the parser.

* data^(pseudo-binary compatible format)

* hash^(similar to a configuration file with key-value pairs)

* table^(named key spreadsheet format)

table represents a spreadsheet similar to a CSV file, but clearly standardized. This is the first design for Zephyr and the only current working format in the current Lua implementation, but by far the most useful! It allows you to write data and process it in a way that everyone can understand, very compactly. Best suited for data tracking sheets or data that is meant to be human-editable!^(how youd use a spreadsheet!)

Section 1 First Second Third Body 1 Body 2 Body 3 Body 4 Body 5 Body 6 Body 7 Body 8 Body 9 Section 2 First Second Third Body 1 Body 2 Body 3 Body 4 Body 5 Body 6 Body 7 Body 8 Body 9

In the Lua Zephyr implementation this is represented as a hashmap of sections, each with arrays representing each row, with fields for each column. This can be seen in :/tst/test.lua:65 as Body 5 of Section 2 is retrieved by accessing ["Section 2"][2].Second .

hash represents a tree data structure with sub-hashes within it, each able to represent either a scalar or array value.


uploaded 26.08.06 updated 26.11.21, 1795290198