Time traveling debuggers w/ Adam Chalmers (Zoo.dev)

Discover Zoo's breakthrough in CAD: time traveling debuggers and custom KCL. Talk by Adam Chalmers, engineer at Zoo.dev.

Time traveling debuggers w/ Adam Chalmers (Zoo.dev)

Everything is so much cooler if it involves time travel, right?!

And debugging is no exception, as we learned from Adam Chalmers, systems engineer at Zoo.dev— a startup developing next-gen CAD products. He gave a brilliant talk at Tech Talks ATX with Cloudflare and Jam.

Adam is a senior engineer, before Zoo he led the engineering team behind Data Loss Prevention at Cloudflare.

Now he's building a new programming language, introducing us to the idea of a time traveling debugger, available for KittyCADLang (KCL).

Here's the full talk.

And a quick recap below.

The tech behind Zoo's CAD tools

Zoo is changing the CAD landscape by creating their own CAD kernel, so that core CAD operations can finally take advantage of modern hardware (like highly-parallel CPUs and GPUs).

The Zoo Modeling App

Adam presented the Zoo Modeling App, a cloud-based tool that allows users to build CAD designs in real-time. This app offloads the computational workload to powerful cloud-based GPUs and streams the video back to the user in real-time. Users can interact with their designs via an API client or a GUI, so even low-end hardware can design complex CAD models.

Key features:

  • Design CAD models with a traditional point-and-click GUI or with code, with immediate visual feedback.
  • Cloud-based operation, eliminating the need for high-end local hardware.
  • Integrates with the rest of KittyCAD’s API, so you can easily calculate your model’s weight, center of gravity, etc, or convert to/from a range of CAD formats.

Building a custom programming language: KCL

Recognizing the limitations of existing programming languages in hardware design, Adam created KCL (Kitty CAD Language). This language is tailored to the needs of hardware design, eschewing unnecessary software-centric features like variable updates, networking support or nondeterminism. Instead, it focuses on essential aspects like units of measurement and 3D geometry.

Developing a bytecode VM and debugger for KCL

The high-level KCL language is compiled into instructions for a low-level bytecode virtual machine, KittyCADVM (KCVM). Adam compared KCVM to a fantasy computer that inherently understands 3D geometry and the KittyCAD API. Simulating this virtual machine on a real machine is a relatively straightforward way to compile and run KCL.

The time traveling debugger

Zoo's time traveling debugger for the KCVM records memory snapshots at each step, allowing developers to trace back the state of the program at any point in its execution.

It was fascinating to see the blend of innovation in CAD tools and programming languages. Thank you Adam for showing us!

Dealing with bugs is 💩, but not with Jam.

Capture bugs fast, in a format that thousands of developers love.
Get Jam for free