HeadlinesBriefing favicon HeadlinesBriefing.com

Make.ts: A Better Way to Run Benchmarks and Experiments

Hacker News: Front Page •
×

Tired of shell history and repetitive commands? A recent article on Hacker News introduces make.ts, a pattern for interactive scripting. It advocates writing commands to a persistent file, then executing it. This approach streamlines the process, especially when working with multiprocess applications, by providing a better alternative to manual command entry.

This method offers several advantages. The use of a text editor makes it easier to manage complex commands. It also facilitates incremental improvement, making it easier to build and refine your workflow. Eventually, you can transform your interactive commands into full-fledged scripts with minimal effort. This is particularly helpful in projects with multiple processes.

The author uses TypeScript with the Dax library for scripting, leveraging its ergonomics and concurrency support. The article provides concrete examples of how this approach was used to benchmark a TigerBeetle cluster. By using a consistent filename like `make.ts`, the author streamlines the process of running benchmarks and experiments.

Ultimately, make.ts offers a more efficient and maintainable way to run benchmarks and experiments. By treating your interactive commands as a script from the start, you can easily develop them over time. This approach avoids the need to juggle multiple terminals or construct complex shell commands, making it ideal for developers.