hof

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

README

hof

hof-lang is a framework for creating low-code libraries, modules, and tools for any technology, system, process, or platform. It is build on Cuelang with the unification to ensure correctness and all the mathemtical rigor. hof differs in that it makes code generation a first-class concept, outside of the tool itself. This means you can create domain specific, low-code modules and tools for any language or technology without needing to understand and modify the hof codebase.

hof also has roots in declarative programming and DSLs, where your write your high-level "designs" in the "language" of a DSL. The hof tool will read your designs and use polyglot generators to output the implementation in one or more computer languages and technologies. You can modify the code in the output, update your designs, and regenrate the output. hof-lang allows you to work in both sides of the transformation, using diff3 to merge the files together.

Concept flow in hof

Designs -> DSLs -> Generators

Designs are written in DSLs using cuelang syntax. They form the "source-of-truth" for your application, data validation, or other creation. Designs are essentially data or configuration with a predefined structure and their own validation from the DSL.

DSLs have cuelang which acts as the spec for a domain or technology. This DSL spec creates the contract between the designs and generators. There are DSLs for data validation and creation, cross-platform CLIs, REST APIs, CI/CD setups for projects.

Generators implement a DSL in one or more languages or technologies. They are the realization of a DSL from your designs.

hof also supports modules, packages, and imports. The semantics are based off of Golang, except exporting is an explicit statement because data keys often start with lowercase letters.

Getting started

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL