Hacker GitHub

← All repos

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

Mentions per year 22 mentions · busiest year 2022 (7)
20082026
  1. …-- 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
  2. 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?
  3. …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…
  4. Thanks! ICYMI: GoAWK [1] - A POSIX-compliant AWK interpreter written in Go, with CSV support. [1]: https://github.com/benhoyt/goawk
  5. …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
  6. …-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
  7. 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.
  8. There's also GoAWK, which supports CSV natively ("-i csv"): https://github.com/benhoyt/goawk
  9. …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
  10. …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…
  11. …-- 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…
  12. …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.
  13. The author maintains an AWK implementation: https://github.com/benhoyt/goawk
  14. …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…
  15. …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...
  16. …explicit tests for ASCII and Unicode unit and record separators, just to ensure I don't regress: https://github.com/benhoyt/goawk/commit/215652de58f33630edb0...
  17. There is also goAWK[0], a re-implementation of AWK in Go. [0] https://github.com/benhoyt/goawk
  18. …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
  19. 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
  20. 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
  21. …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