nowfound

Dev tools · July 7, 2025

CXXStateTree – A modern C++ library for hierarchical state machines

Hi HN! I've built [CXXStateTree](https://github.com/ZigRazor/CXXStateTree), a modern C++ header-only library to create hierarchical state machines with clean, intuitive APIs. It supports: - Deeply nested states - Entry/exit handlers - State transitions with guards and actions - Asynchronous transitions with `co_await` (C++20 coroutines) - Optional runtime type identification for flexibility It's ideal for complex control logic, embedded systems, games, robotics, and anywhere you'd use a finite state machine. I’d love feedback, use cases, or contributions from the…

CXXStateTree – A modern C++ library for hierarchical state machines launched on July 7, 2025 with 48 votes, #580 of 9,223 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 1 year on.

Visit github.com ↗Alternativestop 6% of July 2025

In plain words

CXXStateTree is a header-only C++ library for building hierarchical state machines with clean APIs. It enables developers to create deeply nested states with entry and exit handlers, transitions guarded by conditions, and asynchronous operations using C++20 coroutines. The library includes optional runtime type identification for flexibility. It targets software engineers working on complex control logic in embedded systems, games, robotics, and other applications requiring finite state machines.

written from the facts on this page · September 2026

From the sources

A C++ Header-Only Hierarchical State Tree Library. Contribute to ZigRazor/CXXStateTree development by creating an account on GitHub.

# include < iostream > # include " CXXStateTree/StateTree.hpp " using namespace CXXStateTree ; int main () { auto machine = StateTree::Builder () . initial ( " Idle " ) . state ( " Idle " , [](State& s) { s. on ( " Start " , " Running " , nullptr , []() { std::cout << " Idle -> Running " << std::endl; }); }) . state ( " Running " , [](State& s) { s. on ( " Stop " , " Idle " , nullptr , []() { std::cout << " Running -> Idle " << std::endl; }); }) . build (); machine. send ( " Start " ); machine. send ( " Stop " ); } 🛠️ Building Shared Library cmake -S . -B build cmake --build build After these command the Shared Library can be found in build directory cmake -S . -B build…from github.com

In the maker’s words, at launch

Hi HN! I've built [CXXStateTree](https:&#x2F;&#x2F;github.com&#x2F;ZigRazor&#x2F;CXXStateTree), a modern C++ header-only library to create hierarchical state machines with clean, intuitive APIs. It supports: - Deeply nested states - Entry&#x2F;exit handlers - State transitions with guards and actions - Asynchronous…

Does a similar job

all alternatives →
  • A hash array-mapped trie implementation in C2023 · github.com · ▲171

    Long-simmering side project that is finally ready to see the light. HAMTs are a cool persistent data structure and implementing one has been a lot of fun. Beyond the code, there is likely some value in the extensive and largely complete implementation docs; basic benchmarks are linked in the README, too. Kind of aiming to be "the libavl for HAMTs". That is obviously a high and aspirational bar but a distinct possibility if it stirs up a little interest and&#x2F;or contribution. Anyways, it's time for this to go out, collect feedback and maybe even some use outside of toy projects. Let me…

  • Coros – A Modern C++ Library for Task Parallelism2024 · github.com · ▲129

    Hello Hacker News. I’m Martin, a graduate student from Prague, and I’ve been working on Coros, a C++ library for task-based parallelism. After spending some time with OpenMP and oneTBB, I wanted to try building a library using modern features from the C++ standard library. I’ve used coroutines for task encapsulation and C++23 expected for exception handling, while trying to maintain good performance. Additionally, I’ve implemented monadic-like behavior to allow easy chaining of tasks, similar to the monadic operations in std::expected. You can check out the project here:…

  • Compile-time HTML parsing in C++142017 · github.com · ▲175

    A C++ HTML template engine that uses compile time HTML parsing - rep-movsd/see-phit

  • I built a Cargo-like build tool for C/C++Apr 2026 · github.com · ▲177

    I love C and C++, but setting up projects can sometimes be a pain. Every time I wanted to start something new I'd spend the first hour writing CMakeLists.txt, figuring out find_package, copying boilerplate from my last project, and googling why my library isn't linking. By the time the project was actually set up I'd lost all momentum. So, I built Craft - a lightweight build and workflow tool for C and C++. Instead of writing CMake, your project configuration goes in a simple craft.toml: [project] name = "my_app" version = "0.1.0" language = "c" c_standard = 99 [build] type = "executable"…

  • I built a small browser engine from scratch in C++Jan 2026 · github.com · ▲146

    Hi HN! Korean high school senior here, about to start CS in college. I built a browser engine from scratch in C++ to understand how browsers work. First time using C++, 8 weeks of development, lots of debugging—but it works! Features: - HTML parsing with error correction - CSS cascade and inheritance - Block&#x2F;inline layout engine - Async image loading + caching - Link navigation + history Hardest parts: - String parsing(html, css) - Rendering - Image Caching & Layout Reflowing What I learned (beyond code): - Systematic debugging is crucial - Ship with known bugs rather than chase…

  • Fast Random Library for C++172025 · github.com · ▲52

    Morning HN. Random number generation feels is a somewhat underrepresented topic in the C++ realm. There is a lot of questionable info about it found online and even the standard library is quite behind the times in terms of it's algorithms. It suffers from trying to accommodate sometimes impractical standard requirements and has several ways of getting significantly bad statistical results. This leaves a lot easily achievable performance & quality on the table. So, being a mathematician who mostly works with stochastic models and wants these models to run fast and well, I embarked on a…

More dev tools this month

the category →
  • /dev/null▲493

    a social network for devs

    Dev tools · 4d ago · dev-null.sh

  • Contribute to oosexgang/hackios-xnu-kernel development by creating an account on GitHub.

    Dev tools · 1d ago · github.com

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 29d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 27d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 24d ago · openbot.run

  • Talanoa▲346

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 22d ago · talanoa.email

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, July 2025

the whole month →
  • Clueso▲1,300

    Create stunning product videos in minutes with AI

    AI · 2025 · clueso.io

  • Hey HN! Introducing Trickle Magic Canvas: the world’s first Agentic Canvas, where you can visually co-create apps and websites with AI, from idea to production. Why is a canvas better? Most AI tools today rely on linear chats or text prompts. We believe that limits creativity and clarity. Canvas changes the game. 1. Every version & page at a glance. Each page and sub-page lives on a timeline. You can quickly browse, edit, and preview progress like a living, visual document — no more digging through chat logs or scattered states. 2. The canvas is the context. Unlike linear chats, you can…

    AI · 2025 · trickle.so

  • TB
  • Today marks ten years, 3653 consecutive days, of running at least one mile every day under the USRSA rules [1]. To celebrate, I built an interactive dashboard that turns a decade of GPX files into charts you can explore. Running has truly changed my life: I've made lifelong friends, explored beautiful places, and more importantly invested into my own health and fitness, which I'm starting to see the positive benefits as I get older. The stack is pretty simple: a NextJS app, with a Postgres database to keep all my running data, and all the stats are pre-computed and cached in Redis, so I…

    Dev tools · 2025 · nodaysoff.run

  • Made this website as an exercise in vibe-coding and GCP. It was posted about a few times around the internet, on sites like Morning Brew (https:&#x2F;&#x2F;www.morningbrew.com&#x2F;issues&#x2F;business-buzzkill), MetaFilter (https:&#x2F;&#x2F;www.metafilter.com&#x2F;209703&#x2F;Draw-A-Fish), boingboing.net, etc. I think it's cute! I built a basic CNN trained against penises and swastikas, and then anything that doesn't hit the 63% confidence score gets sent to a mod queue, a vibe-coded fish-tinder…

    AI · 2025 · drawafish.com

  • Hi HN - I made a site that takes a UK postcode, grabs the local MP's information and generates an AI mockup of what their ID might look like. It's a small, silly protest at the stupidity of the Online Safety Act that just came into force. edit - My open AI credits got hugged to death, please use a known postcode (like one from Kier Starmer's constituency, WC2B6NH) in the meantime.

    AI · 2025 · use-their-id.com