Furth FortuneEngineering reference
TECHNICAL DOCUMENTATION

2027 · MerTek technology

On this page

2027 / Application platform

2027

In 2027, MTK is one application platform: the Trident language, typed data, network access, rendering, a development workspace and the security controls that tie them together. One program runs on a laptop, a server, a tablet or a headset with the same rules and the same data.

Worked example

A parts check, from first line to running service

A maintenance depot wants a small service. A technician scans a part, the service looks up the part, and the supervisor's board updates. Here is that application on MTK, one step at a time.

  1. Declare the record. A trove is a record type the database stores. Every field has a type, and a misspelled field name fails when the program is checked, long before a technician scans anything.

    trove part { text serial, text unit }
    part p = { serial = "P-204", unit = "Unit 12" }
    p.unit = "Unit 14"
    # p.unti = "x" refuses at compile:
    #   no column unti; admitted:
    #   serial unit
  2. Accept the scan as an endpoint. The method, the route and each parameter's type are part of the language, so the compiler checks them instead of a router at run time.

    on request({
        method = "GET"
        pattern = "/parts/{id}"
        parameters = [{ name = "id", source = "path", typeSpelling = "u64" }]
    }, const p) {
        u64 id = p.id
        return describePart(id)
    }
  3. Handle a bad scan on purpose. expect binds every field it needs, with the right types, or leaves through its else arm. There is no half-read record.

    text describe(chest scan) {
        expect { text serial, i64 count } = scan else {
            return "incomplete scan"
        }
        return serial + " x" + text(count)
    }
  4. Lend only what the code uses. The application's lend names the one library it needs, t.log, and its setting. The host checks the code against the lend both ways before it starts.

    u16 schemaVersion = 1
    chest[] libraries = [
        {
            u16 schemaVersion = 1
            text id = "t.log"
            chest? config = {
                u16 schemaVersion = 1
                text threshold = "info"
            }
            chest[] storeSlots = []
        }
    ]
What happened

The service starts with logging and nothing else: no files, no other network calls. A malformed scan takes the else arm and returns a message instead of failing the request. A typo in a field name never reaches the depot, because the compiler names the field and lists the ones that exist.

What the 2027 platform includes

Trident

The application language. Explicit types with units, bounded loops, complete branches, structured faults and endpoints in the language itself.

Data

MerTekTypes gives every value one meaning. MerDB stores typed records behind declared access paths. Rune moves them between machines as checked bytes.

Rendering

Thalassa draws one declared scene on a watch, a tablet, a workstation or a headset. Glint is its shader language. Nautilus imports outside models and images.

Host and network

Fathom is the boundary to the operating system and the network. A program reaches files, sockets and devices only through what its host lends it.

Tools

Wheelhouse edits, runs and debugs applications. MerTekStak publishes and rolls back releases. MerTek.io is the front door for users and developers.

Security

Grants limit what code may call. Identity, record access, classification and output checks decide who sees which data and where it may go.

What an application looks like on disk

An application is a folder. Trident source lives under a/, its identity in _app/app.draft, and its lend in _grant/grant.draft. tricli calc compiles everything under calc/a/ into one program. Test suites sit in _test/ folders and stay out of the shipped program.

Shell

An application folder

Module names follow the folders, so a/geometry/units.tri is a.geometry.units everywhere in the program.

calc/
  a/
    main.tri         a.main
    report.tri       a.report
    geometry/
      units.tri      a.geometry.units
      shape.tri      a.geometry.shape
      _test/         a suite; stays out
  _app/
    app.draft        its id and name
  _grant/
    grant.draft      the lend
FURTH FORTUNE / ENGINEERING REFERENCEBack to top ↑