5 ms·
Perl: https://www.perl.org/ https://www.perl.org/ Like Bash, Perl is also widely available, more concise and faster than Python, and more of a full programmin
by thesuperbigfrog 4y ago
Perl: https://www.perl.org/ https://www.perl.org/
Like Bash, Perl is also widely available, more concise and faster than Python, and more of a full programming language than Bash.
People love to 'hate on' Perl, but how many of them have actually used it?
Most Linux and Unix systems include Perl by default and Perl-compatible regular expressions are the defacto default. For quick and dirty, non-Bash scripts Perl is an excellent choice.
- crowdhailer 4y ago> Most Linux and Unix systems include Perl by default So what's important is that the system already has the language installed and so it's not worth considering options you need to install yourself.
- thesuperbigfrog 4y ago>> So what's important is that the system already has the language installed and so it's not worth considering options you need to install yourself. OP asked, "What are the most interesting, alternatives for simple scripts." My answer is Perl is a useful alterative to Bash for simple scripts. I did not say that other scripting languages that needed components or a runtime installed were not viable alternative or not useful. However, I would argue that part of the reason that Bash scripts are frequently used is that Bash is widely available and installed by default. In such environments where Bash is installed by default frequently Perl is also installed by default. Thus it might be a suitable alternative to Bash depending on the purposes of the script.
- gladiatr72 4y agoFor years. And then Mr. Wall went all Perl6. (le sigh)
- thesuperbigfrog 4y agoPerl 5 is still around, widely installed, and maintained: https://www.perl.org/get.html https://www.perl.org/get.html https://stackoverflow.blog/2022/07/06/why-perl-is-still-relevant-in-2022/ https://stackoverflow.blog/2022/07/06/why-perl-is-still-rele... Raku (Perl 6) is also around, but was not widely adopted: https://raku.org/ https://raku.org/
- gladiatr72 4y agoSo are Lisp and Ada. Only after it languished for years without a release did a team from the remaining community take over maintenance.
- lisasays 4y agoPeople love to 'hate on' Perl, but how many of them have actually used it? No one who remembers the 90s-00s (and how incredibly helpful Perl was, until those other languages at its lunch) has any "hate", as such for Perl. Even its staunchest critics (best as I recall) still had a strong baseline respect for what it was able to accomplish, and how it moved the craft as a whole forward. I disagree that it still makes for a good choice, for the simple overriding reason that (whatever one thinks of it) it has objectively become a niche language, and a will continue to remain a slowly fading one at that. In fact it's been solidly on that course for close to 20 years now. As such it's hard to think of a good argument for bringing it into your toolchain in a big way, absent some very good reason (like some specific tool or subsystem based on it). That said I don't mind your sticking up for it, and there's no reason you should be downvoted for doing so.
- thesuperbigfrog 4y ago>> it has objectively become a niche language, and a will continue to remain a slowly fading one at that. In fact it's been solidly on that course for close to 20 years now. Perl 5 is a camel: https://en.wikipedia.org/wiki/Programming_Perl#/media/File%3AProgrammingPerl.jpg https://en.wikipedia.org/wiki/Programming_Perl#/media/File%3... It is a smelly, sturdy beast that requires minimal resources and can get you through the desert. OP asked: "What are the most interesting, alternatives for simple scripts." As you've stated, Perl 5 has served as an alternative to shell scripts for nearly 30 years. It may not be the best choice for every use case, but I have seen several questions on HN where people need an alternative to Bash and Python, but have no idea how easy the problem could be solved with a Perl one-liner. All too frequently Perl is dismissed by people who are ignorant of it because it is trendy to 'hate on' it.
- deleted 4y ago[deleted]
- ihatepython 4y ago> and there's no reason you should be downvoted for doing so. You are correct, but this is HN.