Post
I actually wrote a useful line of awk today. I have a very short term project that requires some text munging and awk and paste are seriously helping, along with a vim macro or two. This isn't worth doing in Python, I'm on Windows so I'm using utilities from msys2. Kids, don't put diagnostic […]
I expect to need a portable way to pull text excerpts out of code output, either text reports or columnar or CSV numerical data files (aka "plotfiles"). Python could do it but that's way too much infrastructure, overhead, and fragility. Perl is possibly better but a bad precedent to set. That […]
0 reposts1 like
@arclight sed and awk are a strictly worse precedent to set than Perl. This usecase is like its whole thing
@kevinr There's more to the story. Perl would be great if I was building a standalone parser. Part of this project's goal is to decouple the parsing from the main automation and for a few reasons I don't want to use a full general purpose language here. I wrote Perl for about 15 years; I'm fine […]
This has prompted a number of very good questions about language selection. If I were writing a complex standalone parser, both Perl & Python would be good choices, balancing technical advantages with local programming culture. I don't want or need a full language in this use case. Both awk […]
There are a number of design considerations here. I don't want to write more of a DSL than I have to. On the other hand I want that DSL to be extremely limited for security reasons and to make it difficult to apply outside this very specific problem domain. The DSL needs to do a a handful of […]
@arclight AWK is a powerful and surprisingly underappreciated tool for this kind of thing. Also it's already available everywhere, and has stayed compatible across decades. We don't always need to reinvent the wheel.
@jannem I don't want or need a full language in this use case. Both awk and sed are stable and likely will support the same options and syntax in 10 years as they do today. They're both effectively _done_. They can be treated as tools and that's critically important for what I'm trying to do […]