Timeline

An event-based programming language for safe time travel.

← ← ←
 
Get Started

What problems does Timeline solve?

Since time travel is inherently dangerous, the programming language we use must focus on safety, predictability, and comprehensibility. Timeline is designed to make it as easy as possible to write software whose behavior we can both accurately predict and accurately explain. It makes many tradeoffs in order to achieve this, all based on its core values.

Core Values

The most important thing about a program is knowing what it will do.

The second is knowing what it did do.

Features

No Functions or I/O—Only Events

on vortex established [] {
  send disconnect [] in 10ms
}

All code is executed in response to a well-defined event. While code can have logic and computation, it's only means of interacting outside of itself is to send events. Above we tell the Time-Space Manifold to disconnect its vortex 10ms after it's been established.

Static Typing, Including Literals

on startup [] {
  send trip details [
    destination: [
      declination: 37°20'12"3
      ascension: 12°
      distance: 1,345,980km
      time: 19,234,123s
    ],
    traveler: [
      weight: 98kg,
      dimensions: [
       width: 4m
       height: 4m
       depth: 1m
      ]
    ]
  ] now
}

The runtime knows—and will enforce—the types of everything. The literal values above are typed. There is rarely a need for primitive/untyped vlues like raw integers. The compiler understands that 37°20'12"3 is an Angle of 37 degrees, 20 hours, 12 minutes, and 3 seconds, and will construct the requisite data type. Further, `destination` is a `Destination`, which is created by the values inside the brackets. Lastly, large numeric values must have commas for readability.

Minimal Density Per Line

direction is 45°
opposite-direction is 360° - direction
offset is direction - opposite-direction + 
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          |
          |-- All expressions must be named

if direction < 50° {
   ^^^^^^^^^^^^^^^
   |
   |-- must be variable or literal
}
else {
  do nothing
}

All expressions are X «oper» Y and cannot be nested or compound. They cannot be used in control structures. This means that every expression must have a name—the variable to which it is assigned.

Names Must Be Defined…in the Dictionary

direction     is 45°
opp-direction is 360° - direction
^^^
|
|-- “opp” is not a word

send mv up [] now
     ^^
     |
     |-- “mv” is not a word

All variables must either be dictionary words, or be dictionary words joined with a dash. To use an undefined word in a variable, that word must first be defined in the dictionary. The result is that all variables are constructed of defined words. Same goes for custom event names.

There are No Unit Tests—Plans are Simulated

> timeline plan.timeline
Success..............92.00%
Failure..............08.00%
  Hardware failure..........02.23%
    Failed connection..............01.23%
    Failed midstream...............01.00%
  Small Object Collision....04.70%
  Large Object Collision....01.07%

Writing code—and checking if it will work—is done through a Monte Carlo simulation. Based on our understanding of the universe and the objects within it, Timeline will give you a risk assessment of your flight plan. You write code only to address a known risk. When the risk has been reduced enough that the trip is worth it…take the trip.