hlang

A FBP-Inspired language for building universal applications.

Hlang aims to make programming easier, faster and more comfortable. It avoids coding, repetition and frustration.

Starting
RTextReadable
TUppercaseTransform
WOutputWritable
PORTS ARE LIVE STREAMS

Activity from the interpreter

  1. Type in the Text node.

What an hlang program is

A Readable sends, a Transform maps, a Writable receives, and every port between them is a live stream.

One program, two backends

planGraph checks a graph and plans it once. The interpreter runs that plan; the compiler prints the same plan as a module.

First it is data: an IGraph.

IGraph

text · R · text-sourcetransform · T · uppercaseprint · W · print2 connections

Then planGraph checks and plans it.

ExecutionPlan

roots: texttext.out → transform.intransform.out → print.in

The interpreter runs it in process.

interpret()

in · Ports are live streamsout · PORTS ARE LIVE STREAMS

Or the compiler prints it as a module.

compile()

import {Flow} from "@hlang-org/runtime";import {Subject} from "rxjs";import Node0 from "./nodes/text-source.js";import Node1 from "./nodes/uppercase.js";import Node2 from "./nodes/print.js";export function run(options = {}) {

Lumen, the editor for hlang graphs

This is the editor itself, running in your browser. Drag a node, change a parameter in the inspector or connect a port, and the running total follows.

Loading the editor

Lumen is three packages, released as 0.x while the API settles: a headless core, React bindings and a design system. Read the Lumen docs

Built on hlang

Anything that produces an IGraph can run it with the interpreter or ship it with the compiler, so each product builds its own surface on the same engine.

Seven packages

Every package is published under @hlang-org, and with identical builds and versions under @hlang-tech. Use one scope in a project.

Start with the runtime and the interpreter.

npm install @hlang-org/runtime @hlang-org/interpreter

The Lumen packages are 0.x: they are in active development and can change in any minor release.

Get started

Write your first graph in the getting started guide.Start