proposals

Formal proposals for changes to the code, new libraries, etc.

View the Project on GitHub

meta

The meta-programming type, allowing you to make a new type based on an existing type.

meta TYPE NEW_TYPE {
    # keys...
}

TYPE must be an existing type and NEW_TYPE must be orthographically valid for a type name and must not be the same as TYPE.

meta types explicitely do not export or import anything where they are in the structure and effectively have no siblings.

There are three suggestions for accessing the data passed to the constructor:

Following examples will use @{} to stand out.

Simple example: intlist

meta list intlist {
    type: number { size: 4 }
    length: @{}
}

Then this can be used in something such as:

intlist(8)

To pull out a list of 8 uint_32s

Complex example: string strip

meta string strip {
    {
        bin: @{}[0].bin
        padside: both
        padding: @{SyncEncoding}.padding.bin
    }
    encoding: @{}[0].encoding
    static SyncEncoding {
        padding: @{}[1]
    }
}

This structure will strip some character sequence from a string by abusing the padding decoder; i.e. strip["##abc#", "#"] is equal to "abc"

Other properties and notes

Complexities