fern

A human-readable and modifiable data-expression language with minimal clutter.

https://github.com/moderocky/fern

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

configuration data data-structures data-visualization language
Last synced: 6 months ago · JSON representation ·

Repository

A human-readable and modifiable data-expression language with minimal clutter.

Basic Info
  • Host: GitHub
  • Owner: Moderocky
  • License: mit
  • Language: Java
  • Default Branch: master
  • Homepage:
  • Size: 125 KB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
configuration data data-structures data-visualization language
Created over 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md

Fern

Opus #5

A clean and simple storage or configuration format with easy readability, minimal meta-characters, lenient parsing and simple conversion.

This is built to be a minimalist alternatives to popular configuration formats such as YAML or JSON, but without their individual pitfalls, such as YAML's strict whitespace grammar and JSON's reliance on quotes and brackets.

Fern is also designed to be easily customisable and extendable, allowing a user to build domain-specific features into the general parser or framework to build handlers for custom data types.

Fern ignores all whitespace, except for the single character that separates entities.

Data Types

| Type | Delimiter | Description | |---------|-----------|-------------------------------------------------------------------------------------------| | Branch | () | A new sub-branch, a key value map. | | List | [] | A list. | | String | "text" | Simple strings, supports both simple character escapes and multi-line content. | | Integer | 100 | Simple int-32. | | Long | 100L | Simple int-64. Suffix is only required to differentiate from an integer in small numbers. | | Short | 100S | A short. Suffix is always required. | | Double | 100.0D | A double. Suffix is not required, unless the number is not a decimal. | | Float | 0.5F | A floating point number. Suffix is always required. | | Byte | 13B | A byte. Suffix is always required. | | Null | null | A null-value. | | Boolean | true | A boolean true/false value. | | Insight | <Type> | A type insight provided by a third-party library. |

Domain-specific data types can be added by custom parser implementations by adding a new ValueHandler - they require only a recognisable identifier. \ An example would be a Bird class. A parser can register <Bird> as a special identifier, which would pass the subsequent value to the desired value handler.

Comments

Some fern implementations support a style of comment marked by a ` backtick character.

These comments are an entity like keys and values and so require some separation.

fern key `comment` value key value `comment` `this is a really long comment`

Examples

Basic uses of types.

```fern name "Tony" age 42
height 1.85 weight 70.2 spouse null
likes [ "chicken" "pasta" "bacon" ] dislikes [ "fish" "ice cream" 74 ] education (
school "Hartlepool Secondary School" college "Wisham College" university null )

```

More examples of type usage.

fern a_key ( abc 1 xyz 2D pqr 5.0 ) another_key "value"

Fern does not require whitespace, except to separate entities. This means a user can mix indentation units to their heart's content.

fern map ( key "value" thing 66 ) list [ 1 2 3 ]

Maven Information

```xml

kenzie Kenzie's Repository https://repo.kenzie.mx/releases ```

```xml

mx.kenzie fern 2.0.0 ```

Binary Data

The Java implementation of Fern contains a binary data format for more compressed values. Naturally, using this eliminates Fern's potential as an editable configuration format.

The binary format is supplied as a simple way to compress the internal data. The BinaryFern object is fairly interchangeable with the regular Fern but has no support for third-party handlers: only the built-in data types are supported.

Adding Types

Fern is built to support additional value types for domain-specific use.

A type must have a recognisable starting character (e.g. .) and a recognisable end. Types are responsible for recognising their own end, so this may not be a single distinct character.

Owner

  • Name: Moderocky
  • Login: Moderocky
  • Kind: user
  • Location: United Kingdom
  • Company: @SkriptLang

Specialist in metaprogramming tools, compilers and interpreters. Lead @ ByteSkript Lead @ SkriptLang

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Scott"
  given-names: "Mackenzie"
title: "Fern"
version: 2.0.0
date-released: 2021-05-23
url: "https://github.com/Moderocky/Fern"

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

pom.xml maven
  • junit:junit 4.13.2 test