Redis array: short story of a long development process

· ai coding · Source ↗

TLDR

  • antirez built a new Redis Array data type over four months using GPT/Codex-assisted design and implementation, including a custom sparse/dense directory structure and ARGREP with TRE regexp.

Key Takeaways

  • The data structure uses a three-level hierarchy: super directory of sliced dense directories pointing to 4096-element array slices, enabling ARSCAN and ARPOP in time proportional to existing elements.
  • A month-long written specification came first; AI was used for iterative design feedback before any code was written.
  • ARGREP was added after antirez used Redis arrays as a markdown knowledge base; TRE was chosen for regexp safety, then optimized for alternation patterns like foo|bar|zap.
  • AI enabled antirez to tackle complexity he would have otherwise skipped, including full 32-bit support and exhaustive testing of complicated algorithms.
  • The PR is open at github.com/redis/redis/pull/15162; Array type is not yet merged.

Hacker News Comment Review

  • antirez confirmed the specification document will be released after a cleanup pass, which is notable given it drove the entire AI-assisted workflow.
  • Commenters and antirez agree: current SOTA AI is a powerful collaborator for system programming but human ownership of algorithms, product, and review remains essential – “not for Redis, not yet at least.”

Notable Comments

  • @SuperV1234: “Extremely useful collaborator, far from being a replacement for human intelligence and creativity” – matches antirez’s own framing closely.

Original | Discuss on HN