9 ms·
GNU Awk 5.0
- indeyets 8y agoRelease notes are a bit weird. It's like an author is shy of actual major changes: NAMESPACES and hides them behind mentions of c99 compliance and test infrastructure :-/
- acqq 8y agoI would rather say “who asked for namespaces in awk”? Who needs that and what’s the point? Any compatibility breakage in awk should start wit “negative points” so what are the positive ones to even qualify it as desired?
- rwbhn 8y agoSee http://www.skeeve.com/awk-sys-prog.html http://www.skeeve.com/awk-sys-prog.html
- billsmithaustin 8y agoSomething I just learned: there is an awk debugger! From the above page: “Beginning with version 4.0 in 2011, gawk provides an awk-level debugger: dgawk, which is modeled after GDB. This is a full debugger, with breakpoints, watchpoints, single statement stepping and expression evaluation capabilities.”
- acqq 8y agoThere are no details there. Just “it’s needed” claim. Brian Kernighan is also cited there, and also not convinced. I’m in a good company, at least.
- Bootvis 8y agoIt seems to have some breaking changes and non-user facing improvements though. I'm not sure major changes are needed but it should allow them more easily now.
- fredsanford 8y agoArnold Robbins is a busy dude. He maintains awk, bash, gnu grep and several other must have packages. A little slack would be nice.
- OskarS 8y agoWow, I had no idea those things were maintained by the same guy! That's amazing! Is there somewhere one can contribute to his development efforts? I guess just donate to GNU Foundation?
- BlackFingolfin 8y agoActually, Chet Ramey maintains GNU Bash, and Jim Meyering maintains GNU Grep. As far as I can tell, Arnold Robbins "just" maintains GNU awk. Don't get me wrong, I don't want to trivialize this at all, just correct the record.
- black-tea 8y agoWait, are you making sure that credit is given correctly? Is it just because Arnold Robbins is a woman? Why the sexism?
- Stratoscope 8y ago> Is it just because Arnold Robbins is a woman? Arnold and his family would be surprised to hear that. https://www.oreilly.com/pub/au/459 https://www.oreilly.com/pub/au/459
- black-tea 8y agoOh.. My bad. I thought he was a woman. No harm done then.
- geofft 8y agoAlso, if one person really did maintain all those things and was overworked, my reaction wouldn't be "Wow, you do so much!" but "Why haven't you found other people to help out so you're not overworked?" All this software is too important to be left to people who don't have time for them.
- clan 8y agoHow so? It is actually one of the very first things mentioned: > This is a major new release, with new or improved features, including namespaces. The relevant part of the NEWS file is appended below. So you would be happier to have the item as number 1 rather than 11 in the list further down? > 11. Namespaces have been implemented! See the manual. One consequence of this is that files included with -i, read with -f, and command line programsegments must all be self-contained syntactic units. E.g., you can no longer do something like this: gawk -e 'BEGIN {' -e 'print "hello" }' I found the announcement rather concise and to the point. Apart from that it would have been nice with a reference to what section of the manual to look at. Especially as https://www.gnu.org/software/gawk/manual/ https://www.gnu.org/software/gawk/manual/ still references 4.2 (will probably be updated soon).
- vesinisa 8y agoPerhaps the changes were listed in the chronological order of version control history, as is often the case with release notes, as opposed to any subjective notion like significance.
- jph 8y agoCongratulations and thank you! Namespaces are a big help for me personally. From the GNU Awk 5 manual: A qualified name consists of a two simple identifiers joined by a double colon (::). The left-hand identifier represents the namespace and the right-hand identifier is the variable within it. Namespaces are a big help for writing libraries, especially for clients with systems (e.g. banking, government, education, medical) where awk code is fine yet other kinds of languages (e.g. python, go, perl) are not available and/or require management audit practices.
- koolba 8y agoWhy would awk not require audit and code management practices vs those other languages in a controlled environment?
- timClicks 8y agoProbably because awk is available as a stock build of the approved OS. It's been around a long time. I mean, to be POSIX-compliant, you need an awk interpreter in your system https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/a...
- ivanbakel 8y agoI took it to mean that getting support for those languages would require management audit practices i.e. "why are we installing a new package on all of our servers?". In that case, awk would be better since the gnutils are much more likely to already be installed and in use. The resulting awk code would still probably fall under code management.
- aries1980 8y agoGo, you mentioned, does not require package to be installed. It compiles to a single, native binary.
- whatshisface 8y ago
- fs111 8y agoI remember the days when I was working in a data company and one of the product check tools was a 2000 line GNU awk script with some korn shell in the mix. It was both scary and awesome at the same time..
- stevekemp 8y agoIn 2016 I fuzzed awk and found a bunch of segfaults. Sadly it seems still not fixed: $ ./bin/gawk -V | head -n 1 GNU Awk 5.0.0, API: 2.0 $ ./bin/gawk 'for (i = ) in steve kemp rocks' gawk: cmd. line:1: for (i = ) in steve kemp rocks gawk: cmd. line:1: ^ syntax error gawk: cmd. line:1: for (i = ) in steve kemp rocks gawk: cmd. line:1: ^ syntax error gawk: cmd. line:1: fatal error: internal error Aborted (core dumped) I'll have to forward bugs from the Debian-tracker to the maintainers directly I guess.
- neilwilson 8y agoI don't know Steve. Can't leave you alone with anything :-) Nicely found!
- zerr 8y agoDid you try to contact directly Alfred, Peter or Brian? :)
- stevekemp 8y agoI reported to the Debian bug-tracker where I assumed it would either be forwarded upstream, or be searched by the project authors: https://bugs.debian.org/816277 https://bugs.debian.org/816277 I appreciate that most of the time reporting directly is the right thing to do, but often there is a good relationship between packager and developer and things flow well in both directions. I guess I should make sure I chase old reports and reroute if they seem to be orphaned/ignored/overlooked.
- ifoundthetao 8y agoI know from a "getting bugs fixed" perspective it's important to make sure that things are being fixed, or followed up on... but geeze, is it ever a time sink.
- stevekemp 8y agoThe oldest bug report I think I've made is now reaching 15 years old. Sometimes I go through things, but its easy to think you've done your part if you submit a bug report, a reproducer, and even a patch.
- aquamo 8y agoCongrats! Long live {,g}awk !
- tyingq 8y agoAssuming the syntax is $name::spaces it could look like Awk borrowed something from Perl, which is a funny full circle.
- nrclark 8y agoI wonder if the new namespaces functionality will break compatibility for users. I guess I always assumed gawk was feature-complete, or at least a mature enough tool that I wouldn't expect compatibility breaks. 11. Namespaces have been implemented! See the manual. One consequence of this is that files included with -i, read with -f, and command line program segments must all be self-contained syntactic units. E.g., you can no longer do something like this: gawk -e 'BEGIN {' -e 'print "hello" }'
- charlesdaniels 8y agoIt's not entirely clear, but I believe that some of these changes, namely namespacing, may impact compatibility with POSIX awk[1] (as shipped on BSD, macOS, etc. al.). Historically, GNU awk has been a strict superset of "standard" awk. I for one am concerned that this may impact portability of awk based scripts between platforms using gawk and other implementations. It could be that I have missed a detail and this isn't really the case; I also certainly don't want to discourage progress, but there is something to be said for being able to write an awk program once and be confident it will work on any POSIX-ish system, rather than only those with a GNU userland. 1 - http://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ http://pubs.opengroup.org/onlinepubs/9699919799.2018edition/
- dontbenebby 8y agoDoes anyone know a good awk tutorial or book? I kind of skipped over it in my journey into the world of Unix... I usually either (bash shell scripting, tools like cut and grep + pipes and redirection) or use python.
- fooblitzky 8y ago_The AWK Programming Language_ ( https://smile.amazon.com/AWK-Programming-Language-Alfred-Aho/dp/020107981X https://smile.amazon.com/AWK-Programming-Language-Alfred-Aho... ) is one of the best programming books, on any language, in my opinion. Worth reading even if you don't use awk. In less than 200 pages it covers an introduction to the language, through to implementing a relational database, recursive-descent parsing, and graph-based algorithms. For gawk, the manual covers the gaps between the language introduced in the book and the latest implementation.
- brians 8y agohttps://news.ycombinator.com/item?id=13451454 https://news.ycombinator.com/item?id=13451454 The Aho and Kernighan book is amazing.
- noufalibrahim 8y agoI have a rule of thumb that I'll buy and read any book which Kernighan is an author of regardless of subject. He's more or less the gold standard of technical writing for me.
- dontbenebby 8y agoCool, thanks for the suggestion! Are the basics pretty much unchanged? I see that edition is from 1988. I like free stuff, but I don't mind paying if you think a more recent edition is worth the $.
- burgerdev 8y agoThe 6 page summary in the 7th edition manual turned out to be comprehensive while still being approachable. I knew next to nothing about awk, not counting some snippets found on the web, after reading through this document twice awk feels like home. https://9p.io/7thEdMan/v7vol2b.pdf https://9p.io/7thEdMan/v7vol2b.pdf (starting on page 105)
- microtherion 8y agoAmazing how long gawk has been around, and still with the same maintainers. My port of gawk to MacOS in 1990/91 was my first active involvement in open source. I was rather crushed when told that my patches would not get accepted, because RMS at the time had a Fatwa against accepting MacOS code in GNU projects, and, though the gawk maintainers were quite civil about it, it was clear that they would not go against RMS' wishes. Shortly afterward I discovered perl, so I never did all that much awk, and when a few years ago, I decided a 5 line awk script was the most elegant way to solve a configuration problem, my coworkers vetoed the plan.
- purplezooey 8y agoDifferences from gawk 4.2.1 are not available; they would be too large. That's my kind of changelog. I, too like to live dangerously.
- rhabarba 8y ago> Bug reports should be sent to address@hidden Will do.