News for hackers. Stuff that matters.

abrgr

Re:The Coming Need for Formal Specification on Saturday December 13, 2025 @01:29PM (#46256728)
Great article!

> There exists a higher level problem of holistic system behavior verification

This is the key observation. Strict, code-level verification of every line, while valuable in the small, doesn't contribute very meaningfully to understanding or building confidence in higher level system properties.

I see a future of modules with well defined interfaces and associated contracts. Module level contracts can be formally verified or confidently believed via property based testing. Higher level system behavior can then be proven or tested by assuming the module contracts are upheld.

Module boundaries allow for varying the desired level of confidence module by module (testing, property based testing with variable run time allotments, formal verification).

LLMs can handle each step of that chain today, allowing humans to invest specifically where we want more confidence.

Re:The Workflow Pattern on Friday October 06, 2023 @08:41PM (#37798029)
Modeling workflows as state machines is incredibly powerful.

In addition to everything the author mentioned, the constraints of state machines allow a workflow platform to provide a ton of additional guarantees and capabilities around consistency, state propagation, reliable timers, inter-instance messaging, etc.

We built our workflow execution platform [1] around state machines and we've seen great results. We find our workflow code is incredibly simple and easy to understand.

[1] https://www.statebacked.dev

Re:Show HN: Symphony – Make functions invokable by GPT-4 on Friday September 22, 2023 @02:21PM (#37615682)
This is really cool. Love to see usage of state machines on the backend!

It's such a good fit for multi-step LLM apps and a really nice abstraction for generic backend flows as well.

Re:Using enums to represent state in Rust on Friday September 22, 2023 @10:02AM (#37612192)
Rust ADTs and pattern matching are so much better than other mainstream languages I find that once my code compiles it actually is almost always correct.

The next step is to encode your transition logic in the From impls between the enum structs and you've got yourself a first-rate state machine.

Re:Your back end should probably be a state machine on Thursday September 21, 2023 @01:19PM (#37600823)
Great points.

It's very similar to a DAG you'd make for a workflow but not necessarily acyclic and events can be sent from external sources as well as internal processes.

States can be grouped into parent states, which gives you some additional nice things like parallel states and also a totally reasonable way to zoom out and hide info in visualizations.

When you have a pure function or a single effect, that should definitely just be a function rather than its own machine. Sate machines are most useful for orchestrating those effectful functions and for situations where you want to accept external events. So you're still writing regular code but you're writing it in small functions that get invoked by the state machine as needed.

That is, state machines don't replace code. They're just a really nice way to organize it.

Re:Your back end should probably be a state machine on Thursday September 21, 2023 @01:15PM (#37600756)
Very true!
Re:Your back end should probably be a state machine on Thursday September 21, 2023 @11:34AM (#37599212)
Well put and thank you!
Re:Your back end should probably be a state machine on Thursday September 21, 2023 @10:37AM (#37598284)
Thanks! Running systems with this pattern for the past few months, it has been so nice being able to cleanly upgrade instances.

The old Joel on Software blog has some gems.

Re:Your back end should probably be a state machine on Thursday September 21, 2023 @10:21AM (#37598042)
Thank you! These workflow systems were such an amazing advance over what came before but we can do even better.
Re:Your back end should probably be a state machine on Thursday September 21, 2023 @10:09AM (#37597855)
Great point! State machines are a really nice way to orchestrate multi-step LLM invocations.

They're also a great way for LLMs to produce code. It's human-readable so you can vet that it's doing what you want it to and it's high-level enough that the remaining bits to fill in tend to be small functions that AI can easily generate.

Re:Use your database to power state machines on Monday September 18, 2023 @11:13AM (#37557278)
So happy that others are getting behind this idea. Protecting critical backend state by establishing a state machine that owns it makes so many things so much easier to reason about.

Recently opened up access to a backend as a service [0] for running arbitrary state machines as reliable workflows or real-time backends. After building a bunch of systems on top of this, I'm definitely convinced that this is a better way to structure a lot of systems.

[0] https://www.statebacked.dev

Re:Sketch.systems on Monday June 19, 2023 @10:47AM (#36391676)
Love sketch.systems!

We built https://www.teampando.com out of a similar love for state-based thinking. We turn natural language requirements into state machines, have a Figma plugin to connect designs to states (didn't realize sketch.systems had embeds that can support that - very cool!), and can export XState state charts.

State-based thinking is already helpful just to get your thoughts organized as you're building something but it's super helpful to give everyone (eng and non-eng) on the team something concrete to talk about and play with.

Re:Sorry to tell you this but your epistemology is showing on Thursday December 08, 2022 @07:37AM (#33907203)
Thanks for the recommendation.

Ontology should take up the most mental effort.

Unfortunately, much of the advice in vouge today argues against thinking about ontology. That advice comes from an epistemological stance that you can't know the right ontology beforehand so you shouldn't even bother trying. Instead, I would argue, in those situations, you should design for the ability to easily evolve your ontology and system.

Sorry, more investigation prior to mitigation than mitigation. I think moving the lambda aspects of sst to a lambda extension would allow for a workflow like this: 1. Find production issues 2. Replicate production issues in user facing tools 3. Run a local `sst start <fn> --filter '.userId == 'my-user-id'` to have remote <fn> connect to my local for any requests that match `evt.userId == 'my-user-id'` 4. Replicate issue and debug with the request sent to this particular lambda, potentially many calls away from the user action 5. Patch and deploy.

Being able to debug in situ would be fairly incredible in a complex application.

None of that is meant to take away at all from what you've built. What you have here is really awesome and I'm excited to use it.

Older »