4 ms·
Why not?
by mister_hn 6y ago
Why not?
- dijit 6y agoIt's a good question because OpenBSD (rather famously) chases simplicity. Perl is antithetical to simplicity, often jokingly referred to as "write-only software". Not to mention the myriad of packages that usually end up being brought in (thanks CPAN!). So, it's a fair question, not just "why is there a perl interpreter?", which is a decent question given openbsd's overall lack of shipping with much; but also "Why are large parts of the glue code written in perl?" EDIT: I know it's frowned on to talk about downvotes, but I received quite a few and I'm not sure why. Please leave a comment if you're going to flag a comment.
- clarry 6y agoIdk why people would downvote, but I don't agree that OpenBSD ships with little. In fact, I find it to be full of useful tools; it's very much a "batteries included, complete operating system" (as opposed to many small/minimalistic linux distros that really have you go through the pain of having to install every little thing you might need). It's small but not minimalistic. It's small but they managed to pack a ton of useful functionality in small size. And that's what I love about it; the rest of the world seems to be very fixated on extremes.
- pacija 6y agoAgreed. It includes a huge set of tools needed by admins dealing with fundamental stuff such as routing and firewalling. I guess people bashing it are more into higher application layers. Having pf, bgpd, ospfd, isakmpd etc. included in base for systems I administer are crucial for my daily tasks, while I couldn't care less for node.js. But application developers not dealing with network stuff probably have the opposite needs. It's not about "which OS is better" but about "which tool is appropriate for the job".
- DFHippie 6y agoSo here's a theory about the downvotes. Some person P likes technology X, but they are aware that others consider it a sport to dump on X. A rare article about X comes up in a popular forum. P clicks on it with dread to see how X is being dumped on this time. But it says positive things! P's dread is replaced with optimism. Then P reads the typical dumping-on-X post, which says something like "X is a hideous monstrosity. I fart in its general direction" or "X is antithetical to simplicity, often jokingly referred to as etc". P's dark mood returns and P does as people do when they feel like someone has been unnecessarily cruel and provoking: they press the shun button.
- hpcjoe 6y agoAlternative theory. Perl aficionados have a long history of being on the receiving end of passive aggressive language zealots. Usually they are Pythonistas, but others have joined in as well. You see this in messages that say "perl is a write once language" or "its too complex" or "line noise" or "why is it still alive when X is better" ... Really, its tiring after 25+ years using it. So, in an effort to express a valid and terse critique of the comment, the respondent does the right thing, and down votes the specific comment making those, frankly, inane points. From there, people draw up interesting theories as to why the passive aggressive behavior was down voted. The reality. Perl is a modern, highly capable, fast, easy to use language. It is comprehensible by mere mortals, while having powerful features that other languages often attempt to replicate poorly (regex, etc.) It is portable, running the same code across *nix, windows, macos, ... . It is fast[1] (yes really). It doesn't claim to solve the worlds problems, but is a tremendously useful and portable tool, embedded in many companies products. Specifically, when they need to get something done, and done well, perl in the toolbox is a godsend. Claims it is dead, hard, slow, incompatible, etc. tend to come from a vocal minority of people with an agenda. I don't claim my theory is correct. I do believe it fits a very long standing pattern in language advocacy. For me personally, I use the best tools for the job. Perl is often the right tool, but not always. Sometimes its python. Sometimes Julia. Sometimes C/C++. Rarely these days Fortran (moving to Julia). This said, I am not going to bash any of the tools I use, or that others use. If visual basic .net works for you, use it. If you need to be portable across systems and OSes, you probably don't want to be writing things in powershell (literally had this conversation at $dayjob a few times over the last few months). Languages come with dependencies and baggage. You can write great maintainable code in Perl, and terrible not comprehensible code in Perl. As you can in any language. Arguing that one language or the other "enables" you to do this "more easily" is a perfect example of that passive aggressive stance that is not helpful to anyone. Use the right tool for the job. Perl, more often than not, is the right tool. [1] https://scalability.org/2020/05/on-optimizing-scripting-languages-and-where-they-are-useful-and-where-they-are-not/ https://scalability.org/2020/05/on-optimizing-scripting-lang...
- tankenmate 6y agoIf you write a lot of systems code on Unix in C, write bash scripts, and write awk scripts then Perl largely just makes sense. It takes large chunks from all of the above. So if you don't like UNIX, C, (ba)sh or awk (all of which came from Murray Hill) chances are you won't like Perl either.
- microtherion 6y agoMaybe not so much C, but I saw Perl 4/5 as very attractive for sysadmin-type engineers, because it was pretty much explicitly designed to make onboarding as easy as possible for awk, sh, sed (and BASIC) programmers. Quite a few people I know got started with Perl because they were reasonably comfortable with awk, sh, or sed, started to outgrow their sweet spot, and found that perl provided a very natural transition from each of these languages, could do everything those scripts could do in fairly similar ways, and was obviously more powerful.