News for hackers. Stuff that matters.
Re:Perl first commit: a “replacement” for Awk and sed by imiric on Saturday July 08, 2023 @09:39PM (#36650641)
I certainly have, and might have written a few of those myself.

But this doesn't make this approach inherently wrong or obsolete. The programmer is wrong for trying to use the tools beyond their capabilities. Where that line is drawn is subjective, as is the concept of maintainability, but if you feel that you're struggling to accomplish something, and that it's becoming a chore to maintain, the path forward is choosing a more capable tool, like a programming language.

Re:Perl first commit: a “replacement” for Awk and sed by Scubabear68 on Saturday July 08, 2023 @09:46PM (#36650686)
I think we are actually mostly in agreement there then.

Perl was invented because the gap from shell to more capable languages was (and is) really big. Languages like Python and Ruby didn’t exist yet, and Perl had a really, really strong sweet spot in text processing.

Re:Perl first commit: a “replacement” for Awk and sed by ryl00 on Saturday July 08, 2023 @11:33PM (#36651243)
> Perl had a really, really strong sweet spot in text processing.

Still does.

Re:Perl first commit: a “replacement” for Awk and sed by cutler on Sunday July 09, 2023 @09:28AM (#36654292)
Since Ruby took the best bits of Perl what advantage does Perl retain?
Re:Perl first commit: a “replacement” for Awk and sed by thesuperbigfrog on Sunday July 09, 2023 @10:21AM (#36654655)
>> what advantage does Perl retain?

Ubiquity, speed, and conciseness.

Perl is usually installed by default on Linux and Unix systems. Ruby might be there, it depends.

Perl is faster than Ruby. Ruby has been one of the slower scripting languages. But Ruby has been working on performance improvements in the past few releases. I have not seen any benchmarks of the current Perl versus the current Ruby, so this may have changed.

Perl is more concise than Ruby allowing more functionality for less code.

Re:Perl first commit: a “replacement” for Awk and sed by cutler on Sunday July 09, 2023 @12:10PM (#36655715)
I don't know about conciseness. Ruby excels here. As for speed it's useful to distinguish between startup and runtime.
Re:Perl first commit: a “replacement” for Awk and sed by thesuperbigfrog on Sunday July 09, 2023 @03:49PM (#36658179)
>> As for speed it's useful to distinguish between startup and runtime.

The JVM would like a word. (It has slow startup, but can be very fast at runtime due to JIT optimization and cacheing.)

Scripts should start and run quickly.

Ruby has historically been fairly slow which is why Ruby 3 focused heavily on performance. It has been improving a lot, but I have not seen any benchmarks against other programming languages.

Re:Perl first commit: a “replacement” for Awk and sed by cutler on Sunday July 09, 2023 @04:13PM (#36658406)
The thing to remember here is that speed is relative. I haven't checked but Ruby 3 is probably faster than Perl 5.0. For most scripting purposes on modern hardware Ruby is plenty fast enough. Whilst there may may be marginal speed differences between Perl, Ruby and Python the differnce is insignificant.
Re:Perl first commit: a “replacement” for Awk and sed by gamache on Sunday July 09, 2023 @10:30AM (#36654727)
I used Perl then Ruby as my main language for almost a decade each. These days, I don't really write Ruby anymore; I moved on to Elixir and never looked back. But I still find myself using Perl on the command line, in contexts where Awk or Sed would also make sense. Ruby never optimized for the one-liner case IMO.
Re:Perl first commit: a “replacement” for Awk and sed by cutler on Sunday July 09, 2023 @12:14PM (#36655746)
I don't understand your last point. `ruby -e` has excellent parity with `perl -e`.