TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

An Awk Implementation in C99

107 pointsby asicspabout 1 year ago

6 comments

throw0101babout 1 year ago
The second edition of <i>The AWK Programming Language</i> by Aho, Kernighan, and Weinberger was just released in February:<p>* <a href="https:&#x2F;&#x2F;awk.dev" rel="nofollow">https:&#x2F;&#x2F;awk.dev</a><p>ToC and preface of the new edition:<p>* <a href="https:&#x2F;&#x2F;awk.dev&#x2F;pp1-13.pdf" rel="nofollow">https:&#x2F;&#x2F;awk.dev&#x2F;pp1-13.pdf</a>
评论 #39900948 未加载
评论 #39898451 未加载
benhoytabout 1 year ago
I&#x27;ve chatted with Ray (the author of wak -- love the name) a few times about our respective AWK implementations. He&#x27;s a nice guy and a really thoughtful programmer, and he even found several edge-case bugs in my GoAWK implementation: <a href="https:&#x2F;&#x2F;github.com&#x2F;search?q=repo%3Abenhoyt%2Fgoawk+raygard&amp;type=issues">https:&#x2F;&#x2F;github.com&#x2F;search?q=repo%3Abenhoyt%2Fgoawk+raygard&amp;t...</a>
anthkabout 1 year ago
I have a mirror of an awk-related gopher hole from an awk fan as sadly the former domain it&#x27;s offline. Here&#x27;s the github repo, but the author has nice addons such as a universal awk library with missing functions for awk (tan, bitwise ops...) <a href="https:&#x2F;&#x2F;git.sr.ht&#x2F;~luxferre&#x2F;" rel="nofollow">https:&#x2F;&#x2F;git.sr.ht&#x2F;~luxferre&#x2F;</a><p>Luckly, the AWK library it&#x27;s used for a project:<p><a href="https:&#x2F;&#x2F;git.sr.ht&#x2F;~luxferre&#x2F;DALE-8A&#x2F;blob&#x2F;master&#x2F;tgl.awk" rel="nofollow">https:&#x2F;&#x2F;git.sr.ht&#x2F;~luxferre&#x2F;DALE-8A&#x2F;blob&#x2F;master&#x2F;tgl.awk</a><p>Also, there&#x27;s a solitaire written in POSIX AWK:<p>git:&#x2F;&#x2F;git.luxferre.top&#x2F;nnfc.git<p>His homepage:<p><a href="https:&#x2F;&#x2F;luxferre.top" rel="nofollow">https:&#x2F;&#x2F;luxferre.top</a>
dwheelerabout 1 year ago
Cool. Awk is a nice tool for semi-simple record-at-a-time processing.<p>As far as I can tell, this implementation is much slower than other awks. Most awk implementations use a non-backtracking regex implementation (as do Rust and Go). By contrast, this seems to be using a backtracking implementation (e.g., like Perl and Python). For simplicity that makes sense, but for some regexes this kind of implementation can be many orders of magnitude slower.<p>My guess is that this slowdown doesn&#x27;t matter for a typical toybox user, where small code size is valued. Thanks for the link!
评论 #39897852 未加载
评论 #39897861 未加载
评论 #39897879 未加载
riedelabout 1 year ago
Always good to see some love for the awk language. I, however l,went down the rabbit hole to find out about toybox and some background. Came back just puzzled (260 slides of slidedeck only for the message that it has a more permissive licence).
评论 #39904398 未加载
abathurabout 1 year ago
Oblique, but since this topic might be catnip for people who&#x27;d know:<p>Anyone aware of a Python parser for the Awk language?<p>I found a number of Awk-alikes implemented in Python, but they all sounded like they took enough liberties that I wouldn&#x27;t expect them to have a parser worth trying to lean on to parse wild Awk scripts.
评论 #39904455 未加载
评论 #39897744 未加载