Earlier quoted context omitted.
skill issue
You just need to have the skill to overcome whatever non-technical, legacy, lack of education, or poor judgement issues that are steamrolling you into choosing to use awk instead of a sane rational decent modern efficient maintainable language.
Parsing Awk Is Tricky
21–30 of 95 posts
Re: Parsing Awk Is Tricky
#22Reading awk as a human is hard too. And performance of awk is crap. A lot slower than most interpreter language out there. I had replaced all the awk scripts in python and everything is a lot faster.
My experience points exactly the other way: for data-processing tasks, especially streaming ones, even Gawk is a lot faster than Python (pre-3.11), and apparently I’m not the only one[1]. If you’re not satisfied with Gawk’s performance, though, try Nawk[2] or, even better, Mawk[3]. (And stick to POSIX to ensure your code works in all of them.)
[1] https://brenocon.com/blog/2009/09/dont-mawk-awk-the-fastest-...
Re: Parsing Awk Is Tricky
#23If you think AWK is hard to parse then try C++. The latter is so hard to parse thus very slow compile time that most probably inspired a funny programmer skit like this, one of the most popular XKCDs of all time [1]. Then come along fast compilation modern languages like Go and D. The latter is such a fresh air is that even though it's a complex language like C++ and Rust but it managed to compile very fast. Heck it…
Pretty sure Rust's compile times are a function of the complex type system and generic instantiation. Everything's a trade-off.
Re: Parsing Awk Is Tricky
#24If you think AWK is hard to parse then try C++. The latter is so hard to parse thus very slow compile time that most probably inspired a funny programmer skit like this, one of the most popular XKCDs of all time [1]. Then come along fast compilation modern languages like Go and D. The latter is such a fresh air is that even though it's a complex language like C++ and Rust but it managed to compile very fast. Heck it…
Pretty sure Rust's compile times are a function of the complex type system and generic instantiation. Everything's a trade-off.
Re: Parsing Awk Is Tricky
#25Reading awk as a human is hard too. And performance of awk is crap. A lot slower than most interpreter language out there. I had replaced all the awk scripts in python and everything is a lot faster.
skill issue
Re: Parsing Awk Is Tricky
#26If you think AWK is hard to parse then try C++. The latter is so hard to parse thus very slow compile time that most probably inspired a funny programmer skit like this, one of the most popular XKCDs of all time [1]. Then come along fast compilation modern languages like Go and D. The latter is such a fresh air is that even though it's a complex language like C++ and Rust but it managed to compile very fast. Heck it…
> According to its author, the main reason D has very fast compile time (as long as you avoid the CTFE) is because of the language design decisions avoid the notorious symbols that can complicated symbol table just like happened in C++ and the popular > overloading for I/O and shifting. But the fact that Rust come much later than C++ and D but still slow to compile is bewildering to say the least. The reasons why Rus…
Re: Parsing Awk Is Tricky
#27Earlier quoted context omitted.
skill issue
You just need to have the skill to overcome whatever non-technical, legacy, lack of education, or poor judgement issues that are steamrolling you into choosing to use awk instead of a sane rational decent modern efficient maintainable language.
Re: Parsing Awk Is Tricky
#28IIRC, awk does this in a context sensitive manner, by looking at the previous token.
Re: Parsing Awk Is Tricky
#29Earlier quoted context omitted.
You just need to have the skill to overcome whatever non-technical, legacy, lack of education, or poor judgement issues that are steamrolling you into choosing to use awk instead of a sane rational decent modern efficient maintainable language.
Perl, then?
Been a couple decades since I was wrangling the survey systems there though, no idea what it looks like now.