3 ms·
Yes, this is a Standard HN Reply: the "Specialist's Rebuttal". It's usually in some form of, "___ is obsolete, ___ is better in every way, everyone should just
by thaumaturgy 5y ago
Yes, this is a Standard HN Reply: the "Specialist's Rebuttal". It's usually in some form of, "___ is obsolete, ___ is better in every way, everyone should just be using ___ now."
Okay, acknowledged. Python and Ruby are superior in every regard. Would you mind letting us chat about sed and awk now for a minute?
- yesenadam 5y agoI replied to someone's "There is no reason for anyone to program in C nowadays" recently on here with "But I like programming in C". They hadn't considered that reason in their mental survey of Every Possible Reason. Also.. I use Awk every day, for all kinds of things. I forget the order of parameters in split, sub etc, which takes a few seconds to look up with man awk. I got into sed a while ago but never use it. Awk, together with sort and uniq sometimes, is all I need. And it is interactive. You have an input. Print that out and look what needs to be done. Write the first transforming step in Awk. See what that did. Add the next step. See what that did. Extremely interactive. After a few minutes I have a one-liner (often 2 or 3 wrapped lines) that does exactly what I want, and easy to adapt to other similar things. I have very large bash history enabled so they stay Ctrl-R-accessible.
- sitkack 5y agoHeh, Not over here doing arm chair yucking someone's yum, to you and everyone else in this shrub of the conversation. If you guys want to do SCA or model trains with ancient programming languages, go all in. I play around with Forth and APL as well. If the premise is the title of the post "day to day usage ..." then total task efficiency is important. Are you moving the goal posts and putting words in my mouth? If I have to enumerate EPR then we also suffer from the HN Standard Reply where caveats and defensive pirouettes are wedged between all the words. I think you and @thaumaturgy should chill a bit and put some dovetails on that C compiler. Oh and @thaumaturgy, I didn't say and don't think Python/Ruby are superior, my comment was addressing suitability for a task in the larger context. They were used as a concrete example. Please be a little more charitable or threads like these fall into a "someone is wrong on the internet". I just realized that the people that probably need the most assistance arguing (in the classical sense) on the internet are the ones that make it. Ironic. Or, the barbarians will and have moved in. *replying to your Also ... Your interactive workflow sounds like (and this is only an indicative example) my use of IPython the console based advanced python repl. # now here goes the philosophical rant portion of the reply But at the same time, the host isn't bash it is Python, so I can also use the full power of the language without having to think about how to serialize text between tools I am composing. Because composition is more important that each individual tool and the shell is lousy; awk/sed are shell enablers. If you are only working with line oriented text and some wellish defined delimiters, go for it. We now operate over structured formats, we should have tools that compose well with those formats so that we an think about domain problems and not self-made problems. Tools that have supplanted awk/sed are like jq and gron with new ones popping up all the time. This is where the Little Language innovation is going on. Something like jq is powerful enough both in expressivity and compute performance to part of my goto bag of tools. https://github.com/stedolan/jq https://github.com/stedolan/jq https://github.com/TomNomNom/gron https://github.com/TomNomNom/gron (it really makes json RIPgreppable) https://github.com/BurntSushi/ripgrep https://github.com/BurntSushi/ripgrep I hope the peanut gallery enjoys our exchange because we aren't even talking about the same things. Your building model sailboats and I am talking about problem solving efficiency so we can focus on domain problems. I wish Erik was here to school us both.
- deleted 5y ago[deleted]
- dang 5y agoWould you please not post in the flamewar style to HN, regardless of how provocative another comment was or you feel it was? This is not at all what we're trying for here. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- sitkack 5y agoI don’t know what flame war style is, not playing dumb. I think the person behind the provocative comment isn’t much different than me. I thought my comment might land ok, which due to a lack of response might have. It explained educated and <funny joke> I might have typed the same thing in a different time. *edit, it would be fun to have a forum board that allowed for out of band semantic information so … being cut off
- dang 5y agoActually when I re-read your comment it doesn't seem so flamewarrish to me—sorry! a lot of the time I'm skimming these things in haste. A couple bits that do correspond to 'the flamewar style', though, are when users start telling each other to "chill a bit"; and when people start arguing about "moving the goal posts and putting words in my mouth". It's a reliable sign of bad internet discussion when people start arguing about they are or aren't saying (rather than talking about whatever the ostensible subject was).
- kerblang 5y agoWait I need to toss an extra bomb over the wall and point out the superiority of swapping "sed" out for "perl -pe" and getting everything sed had plus superior regex without needing to learn much of anything new. (I might be wrong about "everything" but that's what bomb-tossing is all about)
- sitkack 5y agoWelcome to the discussion. I like it, I haven't perled in a while but does that mean you can evolve from a one liner to a full program using all of perl using this technique?
- kerblang 5y agoI suppose it's a "pathway to perl" in the sense of a mild gateway drug. Perl is definitely one-liner-friendly. Every time I get into Perl I have to relearn it all over again (which is apparently not an isolated phenomenon), so I don't have great suggestions for digging further. I just habitually reach for perl -pe about 3/4 of the time.
- dang 5y ago"Be kind. Don't be snarky." "Please don't sneer, including at the rest of the community." https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html