Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Strawk – I implemented Rob Pike's forgotten Awk
5 points by ahalbert2 5 months ago | hide | past | favorite
Rob Pike wrote a paper, Structural Regular Expressions (https://doc.cat-v.org/bell_labs/structural_regexps/se.pdf), that criticized the Unix toolset for being excessively line oriented. Tools like awk and grep assume a regular record structure usually denoted by newlines. Unix pipes just stream the file from one command to another, and imposing the newline structure limits the power of the Unix shell.

In the paper, Mr. Pike proposed an awk of the future that used structural regular expressions to parse input instead of line by line processing. As far as I know, it was never implemented. So I implemented it. I attempted to imitate AWK and it's standard library as much as possible, but some things are different because I used Golang under the hood.

Live Demo: https://ahalbert.github.io/strawk/demo/strawk.html

Github: https://github.com/ahalbert/strawk



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: