News for hackers. Stuff that matters.

orksliver

Re:Petri Nets as a Music Sequencer on Saturday August 08, 2026 @12:22AM (#49218867)
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

Re:Petri Nets as a Music Sequencer on Saturday August 08, 2026 @12:14AM (#49218842)
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.

Re:Petri Nets as a Universal Abstraction on Monday February 16, 2026 @03:16PM (#47039751)
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.

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.

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.

Re: on Tuesday December 31, 2024 @09:12AM (#42558799)
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.
Re:Revisiting the Algebra of Play with Petri.jl on Sunday December 15, 2024 @09:43PM (#42427539)
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.

Re:Formally Verifiable tic-tac-toe in Bash on Saturday May 22, 2021 @12:39PM (#27248141)
Using petri-nets as a formal method to encode a game of tic-tac-toe - written in bash (for fun)
Re:Using Petri-Nets to Construct Zero Knowledge Proofs on Wednesday March 20, 2019 @03:34PM (#19445962)
Added another example to the repo based on this work

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

Re:Using Petri-Nets to Construct Zero Knowledge Proofs on Thursday March 14, 2019 @09:47AM (#19389147)
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.

Re:Solving State Explosion with Petri-Nets and Vector Clocks on Saturday March 18, 2017 @07:40PM (#13904098)
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

Re:Solving State Explosion with Petri-Nets and Vector Clocks on Saturday March 18, 2017 @06:24PM (#13903811)
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...

Re:Solving State Explosion with Petri-Nets and Vector Clocks on Saturday March 18, 2017 @05:29PM (#13903617)
> 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-...

Re:Solving State Explosion with Petri-Nets and Vector Clocks on Saturday March 18, 2017 @05:10PM (#13903538)
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.

Re:Solving State Explosion with Petri-Nets and Vector Clocks on Saturday March 18, 2017 @12:49PM (#13902133)
"Cool! I'm doing DFAs with my fifth graders right now and I'm definitely showing them this." :)
Re:Solving State Explosion with Petri-Nets and Vector Clocks on Saturday March 18, 2017 @12:49PM (#13902131)
https://www.reddit.com/r/compsci/comments/5yktdo/tictactoe_s... <- Related post focusing only on the TicTacToe State machine.