Skip to content

Releases: cenonym/trmt

v0.6.0

01 Jul 07:30
3332214

Choose a tag to compare

What's new in v0.6.0

Version 0.6.0 improves on the random rule generation and adds support for direction based characters, as well as some fixes and general maintenance.

🔀 Direction Based Characters

You can now map characters from the head_char array to specific turns and directions using the new direction_based_chars = true config option. Check out the new pipedream and transistor examples to see what it can do.

Characters are picked based on the direction they are coming from in combination with the direction they are travelling. This is achieved by mapping indices of the array to specific directional rules:

(Some(Direction::Up), Direction::Up) => 0,              // │
(Some(Direction::Up), Direction::Down) => 0,
(Some(Direction::Down), Direction::Down) => 0,
(Some(Direction::Down), Direction::Up) => 0,
(Some(Direction::Left), Direction::Left) => 1,          // ──
(Some(Direction::Left), Direction::Right) => 1,
(Some(Direction::Right), Direction::Right) => 1,
(Some(Direction::Right), Direction::Left) => 1,

// Turns
(Some(Direction::Up), Direction::Right) => 2,           //┌
(Some(Direction::Left), Direction::Down) => 2,
(Some(Direction::Up), Direction::Left) => 3,            // ┐
(Some(Direction::Right), Direction::Down) => 3,
(Some(Direction::Down), Direction::Right) => 4,         // └ 
(Some(Direction::Left), Direction::Up) => 4,
(Some(Direction::Down), Direction::Left) => 5,          // ┘
(Some(Direction::Right), Direction::Up) => 5,

// Diagonals
(Some(Direction::UpRight), Direction::UpRight) => 6,    // ⟋
(Some(Direction::UpRight), Direction::DownLeft) => 6,
(Some(Direction::DownLeft), Direction::DownLeft) => 6,
(Some(Direction::DownLeft), Direction::UpRight) => 6,
(Some(Direction::UpLeft), Direction::UpLeft) => 7,      // ⟍
(Some(Direction::UpLeft), Direction::DownRight) => 7,
(Some(Direction::DownRight), Direction::DownRight) => 7,
(Some(Direction::DownRight), Direction::UpLeft) => 7,

// Diagonal turns
(Some(Direction::UpRight), Direction::DownRight) => 8,  // ⟋⟍
(Some(Direction::UpLeft), Direction::DownLeft) => 8,
(Some(Direction::DownRight), Direction::UpRight) => 9,  // ⟍⟋
(Some(Direction::DownLeft), Direction::UpLeft) => 9,

Using this logic, our head_char array could look something like this:

head_char = ["", "──", "╭─", "", "╰─", "", "", "", "⟋⟍", "⟍⟋"]

Which would give us the pipes.sh-like look seen in the new pipedream example.

While this supports the vast majority of possible directions, it does not cover all cases. Supporting individual characters for any possible turn and direction combination, at least using the current method, has diminishing returns in terms of config complexity. Any direction this system does not cover therefore falls back to the index 0, the first character in the head_char array. A more granular system is definitely doable, but requires larger changes.

🎲 Improved Random Generation

The original implementation for randomly generated rules was a bit clunky, and often resulted in simulations that would immediately halt, or were just generally uninteresting. A new system has been introduced that internally decides if a rule is good or not based on several parameters; it values Left/Right balance, variety in directions, and prioritises rules that are not too long and not too short.

This gives more consistent random generation, while reducing the amount of short-lived simulations. Here is a video demonstrating the new rule generation in combination with direction_based_chars = true and the head_char array set like this:

head_char = ["", "──", "", "", "", "", "▂▂","▔▔"]
trmt_v0_6_0_demo.mp4

👾 New Examples

Two examples have been added to showcase the new direction_based_chars option; pipedream and transistor:

Pipedream

Transistor

🏗️ Internal Improvements

  • Split config module for better maintainability
  • Added missing config validation for fade_trail_color

🔧 Fixes

  • Initial direction of heads are no longer hardcoded to UP, but instead correctly uses the direction of the first rule in the rule string
  • Removed height constraints on help popup for better readability

📚 Other Changes

  • README updates reflecting new workflows
  • Updated dependencies
    • Update rand from 0.8 to 0.9.1
    • Update crossterm to latest 0.29

v0.5.0

12 Jun 20:23
195ce84

Choose a tag to compare

What's new in v0.5.0

Version 0.5.0 introduces a randomization workflow for both seeds and rules, new rule parsing capabilities to support standard notation, upgrades to the user experience and some quality of life features like keycasting and autoplay.

Here is a video showcasing random rule and seed generation, as well as keycasting:

trmt_0_5_0_demo.mp4

🎲 Enhanced Randomization

Toggle behavior has been replaced with random generation to improve the workflow of discovering new patterns without having to tinker with the rule syntax. The simplest way to randomize your simulation is by simply leaving rule and seed empty in the config:

rule = ""
seed = ""

This way, a new rule and seed is generated every time you reload config with c.

Other ways to randomize seeds and rules are also available:

  • s now generates random seed and resets
  • n now generates random rule and resets
  • R generates random seed and rule, then resets

💾 $XDG_STATE_HOME

trmt no longer writes directly to the config, and instead stores runtime seeds and rules in XDG_STATE_HOME. This prevents config file modifications during use, enables compatibility with declarative systems like NixOS, and allows proper separation of user configuration from runtime state. You can still use c to clear state and reload from config.

📝 Support for Standard Notation

The standard triplet rule syntax often found in other implementations of turmites is now supported in trmt, allowing you to use the standard notation directly in the config:

rule = "{{{1, 8, 0}, {1, 2, 1}}, {{0, 2, 0}, {0, 8, 1}}}"

This was based on a request from 01mf02 on reddit – thank you!

🎹 Keycasting and Autoplay

New QoL config options has been added, namely keycast and autoplay.

  • keycast: Displays a popup with pressed key in the bottom left corner. It will only display keys that have an actual function, and respects your controls config when checking.
  • autoplay: If true, the simulation starts running automatically on launch, reset and config reload
[simulation]
autoplay = true

[display]
keycast = false

📦 Package Distribution

Following this release, trmt will be available for Arch Linux through AUR, as well as NixOS with home-manager support. Big thanks to @orhun for Arch Linux support, and to @yunusey for NixOS support! See the installation section for more information.

🔧 Fixes

  • Extended max number of states in rule from 26 to 256
  • Fixed heads spawning in hardcoded areas instead of using dynamic grid dimensions
  • Removed height constraints on help popup for better readability

📚 Other Changes

  • Documentation: Comprehensive README updates reflecting new workflows
  • Examples: Optimized all example images from PNG to WebP and added scaffold, the new example seen below
  • UX: Updated help overlay and status messages for clarity

⚠️ Breaking changes

Keybind behavior: s and n keys now generate random values instead of toggling state persistence.
State precedence: Runtime state now takes precedence over config values on startup. Use c to reload to config.

v0.4.1

09 Jun 08:37
4b2d37e

Choose a tag to compare

What's new in v0.4.1

🐞 Bug Fixes

  • Fixed character flashing issue when randomize_heads and randomize_trails are enabled

Other Changes

  • Performance improvement by reducing hash calculations per character

Documentation

  • Added example video to README for better project showcase

v0.4.0

08 Jun 15:29
ba38262

Choose a tag to compare

What's new in v0.4.0

🎨 More Customization Options

  • fade_trail_color config option creates trail gradients from head color to background (or any other color)
  • randomize_heads config option to randomize head character selection from array
  • randomize_trails config option to randomize trail character selection from array

By combining these options, you can even make your own cmatrix copy using trmt:

📁 Examples

🏗️ Internal Improvements

  • Refactored render module for better maintainability
  • Improved hash distribution to prevent character flashing
  • Updated to ratatui 0.29

All new features include sensible defaults - existing configs continue working unchanged.

v0.3.0

07 Jun 08:42
b6cf9ba

Choose a tag to compare

Version 0.3.0 adds several new features, and improves code structure for future maintainability. Proper error handling has been added, and the config validation has been improved.

🎨 Per-state colors

  • Toggle between head-based and state-based coloring with state_based_colors in config
  • Live color previews for heads, showing next cell color with live_colors in config
  • Colors in the array are now reused if amount of colors are less than amount of heads or states
    trmt_v0_3_0_state_colors

🖥️ TUI improvements

The entire TUI has been overhauled, and a new system to handle overlays has been implemented. trmt is now cleaner and more uniform in terms of design.

Statusbar TUI

The statusbar is now less cluttered, and only features the most relevant info.
trmt_v0_3_0_statusbar

Help TUI

Help TUI is now simpler.
trmt_v0_3_0_help

Error TUI

The new error overlay shows potential errors and config validation issues.
trmt_v0_3_0_error

⚠️ Breaking changes

  • Split machine module into multiple files for separation of concerns and maintainability
  • Config field names changed (removed default_ prefixes)

v0.2.1

06 Jun 05:45
ce567b3

Choose a tag to compare

🎉 Public release v0.2.1

  • Bump version to 0.2.1
  • Added README.md
  • Fixed infinite_trail behavior - no more white dead cells when disabled
  • Removed random_head_direction feature (simplified config)
  • Updated default config
  • Simulation now runs on launch instead of starting paused