Hasty Briefsbeta

Bilingual

Show HN: Pure Effect – Reproduce production bugs on your laptop without a DB

2 days ago
  • #testing
  • #software development
  • #functional programming
  • Pure Effect separates business logic from I/O by returning plain objects describing I/O instead of executing it immediately.
  • It enables testing by inspecting the structure of effects without running I/O, using mocks or infrastructure.
  • Production bugs can be reproduced by recording I/O results and replaying them locally without a database.
  • The library provides six core shapes (Success, Failure, Command, Ask, Retry, Parallel) that compose into effect trees.
  • It includes features like retry semantics, concurrent execution, context management, and lifecycle hooks for tracing.
  • Pure Effect is suitable for request-shaped operations but not for background processes.
  • It allows auditing AI-generated code by reading effect trees before execution, verifying control flow without running I/O.