Skip to content

Instantly share code, notes, and snippets.

View stackdump's full-sized avatar

stackdump stackdump

View GitHub Profile
@stackdump
stackdump / generics-usage.md
Last active January 26, 2026 19:18
Petri-Pilot Generics Usage Examples

Generics in Petri-Pilot Generated Code

Petri-pilot generates Go code that leverages generics from go-pflow for type-safe event sourcing.

1. Type-Safe Aggregate State Machine

Every generated aggregate uses eventsource.StateMachine[State] for compile-time type safety:

// generated/erc20token/aggregate.go
# Petri Net Lemmas
Formal properties of arcnet's Petri net object model.
## Definitions
**Model** = (P, T, A) where:
- P = set of places
- T = set of transitions
- A = set of arcs ⊆ (P × T) ∪ (T × P)
@stackdump
stackdump / NEW_PROJECT.md
Last active January 3, 2026 20:25
Dual State Engine Architecture - Go/JS event sourcing template

Dual State Engine Architecture

A template for building deterministic, verifiable systems with parallel Go/JavaScript implementations.

Core Concept

Build complex stateful systems where state is a function of events:

State(t) = fold(apply, initialState, events[0..t])

Petri Net ODE Simulation Results

pflow

Simulation Parameters

  • Time Span: 0 to 10
  • Initial Step: 0.01
  • Absolute Tolerance: 0.000001
  • Relative Tolerance: 0.001

Petri Net ODE Simulation Results

pflow

Simulation Parameters

  • Time Span: 0 to 10
  • Initial Step: 0.01
  • Absolute Tolerance: 0.000001
  • Relative Tolerance: 0.001
@stackdump
stackdump / simulation.md
Created December 7, 2025 15:36
pflow ODE Simulation Results

Petri Net ODE Simulation Results

pflow

Simulation Parameters

  • Time Span: 0 to 1000
  • Initial Step: 0.01
  • Absolute Tolerance: 0.000001
  • Relative Tolerance: 0.001
@stackdump
stackdump / pflow.md
Created December 7, 2025 15:30
pflow Petri net diagram

pflow