6 ms·
I like Perl mostly because it's poetic (the code is super nice to read, with variable types standing out thanks to sigils), but another core strength is how ver
by csdvrx 2y ago
I like Perl mostly because it's poetic (the code is super nice to read, with variable types standing out thanks to sigils), but another core strength is how very fast and light it is.
Instead of "cross-compiling" or just running a native perl interpreter (there's one for about every platform!), I prefer how Actually Portable Executables make Perl multiplatform with just 1 binary asset running everywhere!
I wanted to write a webserver processing CGI to learn more about the "old school web", so I wrote https://github.com/csdvrx/PerlPleBean https://github.com/csdvrx/PerlPleBean and the simplicity of just downloading and running the .com on anything is very nice
I'm now trying to do the same in Python3, but it's not as fun - and I'm not yet to the part where I will try to safely run python code within the python webserver, either through restrictedpython or ast.parse(), ast.walk(), eval(compile()) ...
- dwedge 2y agoI also choose Perl most of the time, but I think this is the first time I've ever heard anyone call it super nice to read
- johnisgood 2y agoMy Perl code is super nice to read. :D
- chgs 2y agoMy perl code isn’t. But neither is my Python, or Java, or C, or JavaScript or bash or anything. Clearly the problem is all these languages, and not me.
- johnisgood 2y agoCould be... or readable by who, who do not know these languages at all? :P
- raffraffraff 2y agoI've heard it called a "write-only language"
- fuzztester 2y agoAlso called executable line noise, like Python is called executable pseudocode. But I like Perl (and other languages) too. Variety is the spice of life.
- rurban 2y agoIt's more readable than C++, C or Rust though
- tmountain 2y ago100% depends on how it’s written. It gives a ton of flexibility regarding incorporating “magic variables” which can lead to incredibly abstruse code. The language motto is “there’s more than one way to do it”, and that’s implemented to a fault.
- rurban 2y agoSame with C or C++. Only recently there came up some examples of well-written C++ code. But most of old cooperate, Microsoft or Stroustrup code is just horrible, worse than hard-core perl nonsense.
- bluGill 2y agoReal Programmers can write FORTRAN in any language. Making a large code base easy to read is very hard. People often work on tiny code bases and talk about how easy it is to read, not understanding that they are comparing something with a couple thousand lines of code to something with tens of millions.
- dataflow 2y ago> Only recently there came up some examples of well-written C++ code. I'm not sure what you're referring to (link?) but note that whether C++ code is good or bad can depend strongly on the tooling. Certain coding patterns can be fantastic when your tooling can adequately detect their misuse, and awful when it doesn't. Which means sometimes you can't tell just look at code and tell whether it is good or bad. > But most of old cooperate, Microsoft or Stroustrup code is just horrible, worse than hard-core perl nonsense. I got the impression Microsoft's C code was always pretty good, their C++ not so much a decade ago - not sure how their C++ is now.
- IshKebab 2y agoMaybe he's used to K?
- davidwritesbugs 2y agoThe joke used to be that Perl code looked like an explosion in an apostrophe factory.
- csdvrx 2y agoIt may looks chaotic ("explosion") when you don't see the structure. When you do, you appreciate the density of information. When I read perl it's like I read a poem: to take a simple example, 'while/until' instead of 'while/while not' creates more beautiful code
- dwedge 2y agoI once accidentally piped an SSL certificate into Perl and got 40+ warnings before it realised it wasn't Perl. I'm not joking.
- vram22 2y agoThat's why Larry Wall said he'll be certified before Perl is (when asked about the prospect of standardizing the language). It's one of his well-known quotes. https://quotefancy.com/quote/1497280/Larry-Wall-I-think-I-m-likely-to-be-certified-before-Perl-is https://quotefancy.com/quote/1497280/Larry-Wall-I-think-I-m-...
- vram22 2y agoI posted a link to many of his quotes: https://news.ycombinator.com/item?id=43287809 https://news.ycombinator.com/item?id=43287809
- vram22 2y agoNow try piping Perl into itself. #@$%&^*! A homopipic / homeopathic language? Similiia similibus curentur. https://www.google.com/search?q=similia+similibus+curentur https://www.google.com/search?q=similia+similibus+curentur
- deleted 2y ago[deleted]
- kamma4434 2y agoImporting stuff fron CPAN used to be a nighthmare but I admit I have a sweet spot in my heart for Perl.
- ajsnigrutin 2y agoI like perl, because the code i wrote 20 years ago still works without issues.
- phatskat 2y agoJust wanted to say that I really dig your enthusiasm! I read most of PerlPleBean’s README and was smiling the whole time - APE was so exciting to read about when it came out, and your project may just inspire me to look more into what it can do!
- yellowapple 2y agoPerl was my first "real" language, i.e. the first one that actually "clicked" for me. Still holds a soft spot in my heart, even though I don't use it much these days. It's one of the few languages (along with Ruby, Erlang, and Zig) that I feel have made me a better programmer by learning them.