Giter Site home page Giter Site logo

cellulose's People

Contributors

propensive avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

cellulose's Issues

Reimplement binary serialization(s)

Two variants of the binary serialization should be provided: one optimized for when the data is stored as a string, and offsets are character-based, and another for random-access from disk, where offsets are in bytes.

Implement vertical alignment checking

Using two or more spaces should force consistent vertical alignment all adjacent lines on parameters preceded by two or more spaces. This needs to be formalized, though.

Simplify derived instances

The derived instances are unnecessarily cumbersome to define, and can be mostly simplified to one-liners.

Simplify serialization

Serialization to a string should be easier. Currently it uses an java.io.Writer, though we shouldn't be exposing Java APIs.

Work out exceptions to double-space rules

We have a general rule that on a line, after two or more spaces, a single space does not constitute a new parameter. That is, two or more spaces are required to separate subsequent parameters. For key/value-style data, this works well most of the time, but not always. In a hypothetical project definition we could have, for example,

id           my-project
name         My project
description  The project I'm developing
keywords     experimental data cli

and experimental data cli would be treated as a single parameter, which would lead to a validation failure if keywords are not allowed to contain spaces, while it should really be three separate parameters (which would be interpreted as a repeated parameter according to the schema). But we would not want the description to be split on spaces.

Offering a way to specify (in a schema) whether a field can include spaces (or not) might help here. Concretely, this would mean that the example above could be correctly interpreted without additional spaces being required between the keywords.

Provide support in schemas for coproducts

There should be a standard way of serializing a coproduct. For example, given,

sealed trait Node
case class File(path: Text) extends Node
case class Directory(path: Text, empty: Boolean) extends Node

we should write these as,

node file
  path /path/to/file
node directory
  empty yes
  path /path/to/directory/

where the parameter, file or directory would have the name type. The children of each should be checked for the particular type.

In a schema, the definitions for node file and node directory should (on some level) be as different as any other two distinct keywords, but consideration needs to be paid to the multiplicity of node... This is currently unresolved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.