HNHacker News
TopNewBestAskShowJobs

orksliver

49 karma · joined March 18, 2017

Petri-net Maximalist / building pflow.xyz: a visual state machine SDK for web3
submissionscomments
orksliver··on Petri Nets as a Music Sequencer
Also one of my motivations here was to see what we can do with completely deterministic generated beats - it relies only on a seed value (no AI etc)

I also created a schema.org compatible protocol for the file format for each generated tack

https://beats.bitwrap.io/schema/index.json

orksliver··on Petri Nets as a Music Sequencer
Hello people!

Thanks for checking out my blog - yes it's heavily written by claude, and contains AI slop ;-)

I'm a lover of petri-nets this was my most interesting experiment so far.

I do have another version of this post that shows a a vis each instrument as a petri-net.

https://blog.stackdump.com/posts/beats-launch-jambox - the 'stage' view shows a better viz.

NOTE: As you all have mentioned - this doesn't work well on phones - I would try this again with another non-browser framework, but the browser is a fun place to iterate w/ claude: Open to suggestions here

also : this project is open source https://github.com/stackdump/beats-bitwrap-io

I can answer any questions - this is almost 100% vibe coded app using claude code, and I do make use of a separate render farm using a headless chrome if I want reproducible builds.

orksliver··on You're Building Petri Nets. You're Just Building Them Badly
agreed https://book.pflow.xyz/
orksliver··on Petri Nets as a Universal Abstraction
Petri nets were invented in 1962. They predate Unix, the internet, and object-oriented programming. For most of their history, they lived in academic papers — a formalism known to theorists but invisible to working programmers.

This book argues they deserve wider use. Not because they're elegant (they are) but because they solve practical problems. A Petri net is a state machine that handles concurrency. It's a workflow engine with formal guarantees. It's a simulation model that converts to differential equations. It's a specification that can be verified, compiled to code, and proven in zero knowledge.

orksliver··on Using Petri nets as a formal language for LLM-assisted development
What this actually do?:

You define a Petri net, simulate it with ODEs, and the structure becomes a scaffold for LLM-generated code. The net is the spec that both humans and LLMs can reason about.

I use Claude Code with a skill file that enforces: sketch topology → validate with simulation → extend monotonically → never delete, only grow. The discipline works with how LLMs operate.

orksliver··on Using Petri nets as a formal language for LLM-assisted development
I've been experimenting with Petri nets as a shared representation between humans and LLMs. The model becomes the artifact—you sketch topology, validate with simulation, extend monotonically. Code is derived.

Why Petri nets? Visual (humans can reason about them), mathematical (ODEs, invariants), executable, and compositional. LLMs can manipulate the structure without losing semantic meaning.

orksliver··on [dead]
In our previous post, we demonstrated how Petri.jl can model Tic-Tac-Toe by translating its states and transitions into a dynamic Petri net framework. By embedding win conditions into Ordinary Differential Equations (ODEs), we quantified move heuristics to evaluate the value of each opening move.
orksliver··on Revisiting the Algebra of Play with Petri.jl
Explore how to model Tic-Tac-Toe as a Petri net and convert it into an ODE problem for deeper analysis!

By combining game logic with mathematical rigor, we unlock new ways to analyze strategies and dynamics.

orksliver··on [dead]
Using petri-nets as a formal method to encode a game of tic-tac-toe - written in bash (for fun)
orksliver··on Using Petri-Nets to Construct Zero Knowledge Proofs
Added another example to the repo based on this work

https://github.com/FactomProject/ptnet-zkp/blob/master/examp...

orksliver··on Using Petri-Nets to Construct Zero Knowledge Proofs
Help Wanted: Still looking for feedback for this linked Gist.

It seems like this approach using a Linear Algebra Solver offers guaranteed privacy and security, but more results are needed to offer proof of this claim.

orksliver··on Solving State Explosion with Petri-Nets and Vector Clocks
Ah I see - maybe I should find a better article to demonstrate the 'State Explosion' Problem.

I thought you were referring to my live demo: https://bitwrap.github.io/#octothorpe

orksliver··on Solving State Explosion with Petri-Nets and Vector Clocks
I'm afraid I've learned about them mostly by tinkering - the tool I use is: https://github.com/sarahtattersall/PIPE

I believe "Dining Philosophers" is the usual problem used to introduce the need and concept of Petri-Nets - googled for some examples I found:

http://www.cs.cmu.edu/afs/cs/academic/class/15671-f97/www/le...

Also here's the link to the PNML source used for tic-tac-toe: https://github.com/bitwrap/bitwrap-io/blob/master/bitwrap_io...

orksliver··on Solving State Explosion with Petri-Nets and Vector Clocks
> But if someone can explain the problem better, I'm all ears.

Assuming you mean it...

Here's a youtube video about the benefits and attributes of event-sourcing. https://www.youtube.com/watch?v=8JKjvY4etTY

Though the demo project is presented in the browser, I'm trying to demonstrate that I can model the game of Tic-Tac-Toe using a much smaller and comprehensible (I hope) graph.

Additionally - because these are mathematical graphs I'm speaking of - it means the 'program' that the graph represents - can be expressed as pure math ( which is nifty to say the least )

A classic DFA would have to represent all the permutations of the board like so: https://upload.wikimedia.org/wikipedia/commons/1/1f/Tic-tac-...

orksliver··on Solving State Explosion with Petri-Nets and Vector Clocks
Hi thanks for the feedback:

Just a few comments in response:

> event-based calculator in VBScript

It's mostly coffeescript

> My problem with this is the calculator program is very poorly written.

It's a demo - also the coffeescript is only there to show how the python server works. ( I'll update the docs to explain this better )

> One could probably get rid of most of the bugs by using a "single source of truth" state object that includes all state data necessary for all events to act correctly.

This is in fact what exists -- the "single source of truth" in his case is the python event store - My pooly written UI is only there to forward events server-side.

> But this is largely a solved problem. The React folks developed Flux[0] to get away from these kinds of situations.

Front end UI isn't my focus - building a quality event store is.

I'd love to find other state machine implementations that have similar properties.

Thanks for your post - I know everything is poorly documented - I'll take your criticism as a guide to fixing that.

orksliver··on Solving State Explosion with Petri-Nets and Vector Clocks
"Cool! I'm doing DFAs with my fifth graders right now and I'm definitely showing them this." :)
orksliver··on Solving State Explosion with Petri-Nets and Vector Clocks
https://www.reddit.com/r/compsci/comments/5yktdo/tictactoe_s... <- Related post focusing only on the TicTacToe State machine.