Overview

tube-logo

Tube is a declarative, completely unneeded, functionalish language that transpiles into Javascript.

Note
Tube is a subset of Javascript, you still need some JS code in order to work.

Installation

Motivation

After reading the amazing super tiny compiler repository I became more interested in compilers. The idea of building one yourself kept growing and this is the result.

The language design is influenced by some ideas from Eric Elliot´s book Composing Software

Idea

Tube aims to be a declarative, verbose language based upon pipes. The key principle is to be able to read those pipes as an english text. For this reason, you still need Javascript to implement these declarative actions.

Limitations

There are limitations for nested expressions in the majority of features, at this moment only if/else clauses support infinite nested expressions.

These limitations are designed, to restrict some patterns and mantain the main goal of readability.

Project status

Tube was made as a fun side project over four weekends, at the moment it is not production ready.

Online editor

Jump into the online editor to compile and run your tube code on the online playground