Open-source projects

Besides Truke KF we build software that we release in the open, under the MIT licence. Each project has its own home, where the code, the documentation and the issue tracker are. This page tells you what each one is for and how far along it is.

Truke Ktest

Your test bench and your CAN bus, in one browser window and one recording.

MITGo · LinuxEarly, active work

Ktest turns a Linux machine and the instruments connected to it into a rack you drive from a browser. Bus tools do not see the bench, and bench software does not see the bus, so a supply transient and the CAN traffic it caused usually have to be matched up by hand. Ktest puts both on one timeline.

  • Bus work. CAN and CAN FD monitoring, decoding, transmit and replay over SocketCAN.
  • Bench work. Programmable supplies and oscilloscopes over SCPI.
  • Recording. Everything goes into one open format, Logb.
  • Safe by default. Nothing is actuated until a client takes a lease and arms the rack, and every action is checked against limits written into the recording.

It is meant as an open alternative to proprietary test environments, and it keeps your test data in a format you can read without it.

Status. The first three milestones of the design are built. LIN, ISO-TP, J1939, DMMs, loads and function generators are planned. Interfaces, file layouts and flags may still change.

 
The Ktest rack driving a bench supply: gauges, setpoints and a live voltage and current plot

Truke Folio

Printed-page layout in the browser, with no server and no PDF step.

MITTypeScriptNew

Folio takes an HTML document styled with CSS Paged Media and lays it out as pages: page sizes and margins, running heads and page numbers, footnotes, tables that split and repeat their headers, cross-references that know which page they point to, and tables of contents with dot leaders. Mathematics is laid out and broken across lines and pages as part of the same problem.

It is a drop-in replacement for Paged.js: all 122 documents of the Paged.js spec corpus paginate with nothing changed but the script tag. Chromium 109, Firefox 115 and Safari 16.4 or later.

Status. The engine is new. Paged.js has years of real books and real users behind it, and passing a test corpus is not the same as having been through that. If Paged.js does what your project needs, keep it.

<!-- the whole integration --> <script src="/dist/folio.polyfill.js"></script> <style> @page { size: A5; margin: 18mm 16mm; @bottom-center { content: counter(page) } } h1 { break-before: page } </style>

Logb

An open binary format for measurement data, bus traces and simulation output.

MITSpecification · Go reference implementationDraft v0.1

The automotive industry has no open standard for test data. MDF is in common use, but its specification sits behind a paywall, and Vector's BLF is proprietary outright. Logb's specification is public under the same terms as its code, and a conforming reader is about a thousand lines plus a decompressor.

  • Crash-safe. Nothing points forward, so a file cut at any byte still holds every complete frame before the cut. No repair tool, no recovery mode.
  • Readable from the middle. The schema is restated in every segment, so a reader handed part of a file resynchronises and decodes it in full.
  • Self-describing. A CAN recording carries its own signal definitions: a tool with no DBC can still name and scale every signal.
  • Raw values kept. Physical values are derived by a declared conversion, so a round trip is byte-identical.

Bus traces, bench measurements and simulator output are the same kind of file. Importers read MDF4 recordings and SPICE .raw files, and Ktest records into Logb.

Status. A draft for discussion. The format is not frozen yet, and the reference implementation and its tools work today.

 
The structure of a Logb file: a file header, one or more segments, and optional index and end frames; each segment opens with a sync frame and its schemas

Nomo

Engineering worksheets that show their work and give the same answer on every machine.

MITRust · WebAssemblyv0.6.0

Nomo is an open, Linux-native and web-based replacement for SMath Studio. You write a worksheet as plain text with units on every value, and it is evaluated in dependency order and rendered as worked-through steps: the formula, the values substituted into it, and the result.

  • Units are checked. Every value carries its dimensions, so adding a length to a pressure is an error, not a number.
  • Bit-reproducible. The arithmetic, transcendentals included, gives the same bits on x86-64, ARM and in the browser. The test suite compares results byte for byte, with no tolerance.
  • Runs in the browser. The engine is compiled to WebAssembly. There is no backend, it works offline, and no worksheet leaves the tab.
  • Imports SMath. Existing .sm worksheets can be brought across.

Plots, tables, complex numbers, matrices, figures and prose are part of the language, and a command-line tool renders a worksheet to text or to a self-contained HTML page.

Status. The original plan is complete and tagged releases are published, with binaries for Linux and macOS, the WebAssembly module, and the editor as static files for any web server. The typesetting of the output is still being improved.

 
' # Cylinder volume r = 5 cm h = 12 cm V = pi*r^2*h V -> dm^3 ' renders as V = π·r²·h = π·(5 cm)²·(12 cm) = 0.000942478 m³ V = 0.942478 dm³