finds.dev← search

// the find

kputnam/stupidedi

★ 292 · Ruby · BSD-3-Clause · updated May 2026

Ruby API for parsing and generating ASC X12 EDI transactions

Stupidedi is a Ruby library for parsing and generating ASC X12 EDI documents — the ancient, delimiter-heavy format still used throughout US healthcare and supply chain. It encodes transaction set specifications directly in Ruby and derives a parser and builder DSL from them, which is a genuinely smart design. If you're building healthcare billing integrations (837, 835, 277) in Ruby, this is the most serious option available.

The grammar-as-code approach means adding a new transaction set doesn't require writing a new parser — you define the spec and get validation for free. Incremental validation during generation is a real win: you find out the moment you emit a bad segment, not after serializing 500 lines. The immutable parse tree design makes it safe to traverse in parallel. Coverage of HIPAA 005010 transaction sets (HC837, HP835, HN277, HB271, HS270) is broad and reflects real production use over more than a decade.

Memory usage on large files is a known, unresolved problem — the README acknowledges it and points to a work-in-progress branch from 2021 that hasn't landed. The traversal API is a monad chain (flatmap everywhere) that will feel alien to most Ruby developers and becomes hard to follow quickly. There's no built-in JSON/CSV output — you have to write your own tree walker, which is non-trivial given the API surface. The benchmark table still references Ruby 1.9.2 and JRuby 1.6.6, suggesting the performance documentation hasn't been touched in years even if the code has.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →