benhoyt/goawk
View on GitHub ↗ ★ 2,068 Go
A POSIX-compliant AWK interpreter written in Go, with CSV support
22 mentions on Hacker News by 13 people: 1 story, 21 comments · first 2018-08-18 · latest 2026-01-16
20082026
-
…-- as the creator of (I think?) the only AWK interpreter written in Go ( https://github.com/benhoyt/goawk ), I was curious. It turns out that if there's only one item in the training data (GoAWK), AI likes to copy and paste freely
comment by benhoyt · 2026-01-16 · in Cursor's latest “browser experiment” implied success without evidence -
GoAWK uses panic & recover to simplify error handling in the recursive descent parser: https://github.com/benhoyt/goawk/blob/master/parser/parser.g...
comment by commandersaki · 2025-04-02 · in When is it OK to panic in Go? -
…numpy) Indeed, they have a comment saying array of functions is faster for older versions of go: https://github.com/benhoyt/goawk/blob/158232a76856e12d680a53... For VMs Go had a problem for large switch statements: it would always use…
comment by __s · 2024-04-14 · in Go performance from version 1.0 to 1.22 -
Thanks! ICYMI: GoAWK [1] - A POSIX-compliant AWK interpreter written in Go, with CSV support. [1]: https://github.com/benhoyt/goawk
comment by ryenus · 2023-06-30 · in The Awk Programming Language, Second Edition -
…as well as special syntax for fetching a @"named-field" rather than a $numbered_field. Docs: https://github.com/benhoyt/goawk/blob/master/docs/csv.md
comment by benhoyt · 2023-06-28 · in Using command line to process CSV files (2022) -
…-y busybox gawk mawk original-awk - ln -s "$(which busybox)" awk - busybox wget -O goawk.tar.gz https://github.com/benhoyt/goawk/releases/download/v1.21.0/goawk_v1.21.0_linux_amd64.tar.gz - tar xzvf goawk.tar.gz test: script: - AWK=false…
comment by networked · 2023-03-30 · in Awk Technical Notes -
You should include qsv ( https://github.com/jqnatividad/qsv ) and goawk ( https://github.com/benhoyt/goawk ) into the CSV section! Goawk got a csv/tsv mode and qsv is loaded with features being developed.
comment by horseRad · 2023-03-16 · in Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON -
There's also GoAWK, which supports CSV natively ("-i csv"): https://github.com/benhoyt/goawk
comment by jefftk · 2023-03-16 · in Miller: Like Awk, sed, cut, join, and sort for CSV, TSV, and tabular JSON -
…about adding a JSON mode, too, to get an AWK-flavored alternative to jq? Edit: I see that you have: https://github.com/benhoyt/goawk/issues/152
comment by nequo · 2023-01-20 · in A first person shooter in 571 lines of GNU Awk (2016) -
…but my GoAWK interpreter can also be used as a library (Go) library. See reference docs: https://pkg.go.dev/github.com/benhoyt/goawk/interp A project that's using it that way is Benthos, a "stream processor" written in Go. Awk is one of…
comment by benhoyt · 2023-01-19 · in A first person shooter in 571 lines of GNU Awk (2016) -
…-- from O(1) to O(N), turning O(N) algorithms which use length() into O(N^2). See this issue: https://github.com/benhoyt/goawk/issues/93 Similar with substr() and other string functions, which when operating as bytes are O(1), but become…
comment by benhoyt · 2022-08-21 · in Brian Kernighan adds Unicode support to Awk -
…performance implications (rendering some algorithms to be O(N^2) instead of O(N)), if done naive https://github.com/benhoyt/goawk/issues/35 . Therefore the change was reverted till the more efficient implementation can be found.
comment by xonix · 2022-08-20 · in Brian Kernighan adds Unicode support to Awk -
The author maintains an AWK implementation: https://github.com/benhoyt/goawk
comment by e4m2 · 2022-07-24 · in Performance comparison: counting words in Python, C/C++, Awk, Rust, and more -
…but I got my current job at Canonical due to the CTO there reaching out about my GoAWK project ( https://github.com/benhoyt/goawk ). I get regular recruitment emails because I have my CV/resume online: most of them are very low-effort, but…
comment by benhoyt · 2022-07-18 · in Ask HN: Is having a personal blog/brand worth it for you? -
…the write benchmarks now write a big 1GB, 20-column CSV and the read benchmarks use that same CSV: https://github.com/benhoyt/goawk/commit/07eb4505a7f64cffceeb...
comment by benhoyt · 2022-05-13 · in Modernizing AWK, a 45-year old language, by adding CSV support -
…explicit tests for ASCII and Unicode unit and record separators, just to ensure I don't regress: https://github.com/benhoyt/goawk/commit/215652de58f33630edb0...
comment by benhoyt · 2022-05-12 · in Modernizing AWK, a 45-year old language, by adding CSV support -
There is also goAWK[0], a re-implementation of AWK in Go. [0] https://github.com/benhoyt/goawk
comment by mkdirp · 2022-02-15 · in Frawk: A fast, JITted, statically-typed AWK written in Rust -
…of GoAwk[1]) is a nice look at the relevance of Awk in 2020: https://lwn.net/Articles/820829/ [1]: https://github.com/benhoyt/goawk
comment by bewuethr · 2021-10-07 · in A Git Implementation in Awk -
Overall for GoAWK I get an 18% speed increase on my micro-benchmarks between Go 1.16 and 1.17 (see https://github.com/benhoyt/goawk/commit/1f314f421273b3dc164f... ) and I measured an 8% speed increase on my "slightly more real-world"…
comment by benhoyt · 2021-08-17 · in Go 1.17 Release Notes -
Wow, this update is awesome: my GoAWK interpreter ( https://github.com/benhoyt/goawk ) runs a simple CPU-bound AWK program 38% faster when compiled with Go 1.17 (compared to 1.16). $ time goawk_go1.16 'BEGIN { for (i=0; i<100000000; i++) s…
comment by benhoyt · 2021-08-16 · in Go 1.17 Release Notes -
…the first few chapters, I thought, "it'd be fun to write a version of AWK in Go". I ended up with https://github.com/benhoyt/goawk And OP, thanks for posting. I'm the author of the LWN article. Nice to see it re-posted here some six months…
comment by benhoyt · 2020-11-19 · in The State of the Awk