Hacker News new | ask | show | jobs
by 082349872349872 582 days ago
> how far is this regex from non-associativity

The binary ops, sequencing and alternation are associative (monoidal).

The unary op, kleene star, blocks reassociation.

However, it is occasionally useful to use the associative-adjacent identity A;A* == A*;A (and more generally, A^n;A* == A*;A^n;A* == A*;A^n == ...)

A Chirurg, an Architekt, and an Informatiker are discussing whose profession has the most patina. The Chirurg points out that when God removed Adam's rib to form Eve, He was doing surgery. The Architekt points out that when God made Heaven and Earth out of the Chaos, He was doing architecture. The Informatiker just smiles broadly and then asks, "Und? where then think you the Chaos came from? a cereal Gimmick?"