5 ms·
I've never written a single line of but written python, bash and c and go. I am not sure how important perl is.
by econcon 6y ago
I've never written a single line of but written python, bash and c and go.
I am not sure how important perl is.
- pferde 6y agoSo why write this comment? What is your comment adding to the discussion? Knowing when to shut up is a valuable skill to have.
- mfontani 6y agoI would strongly recommend you do learn Perl 5 (and Raku, and Haskell, and lua, and functional languages, and ...), even if only to be able to know enough about them to be enlightened about what each of them gets right and wrong. For Perl 5, you could do worse than going through the _free_ "Modern Perl" book, at http://modernperlbooks.com/books/modern_perl_2016/ http://modernperlbooks.com/books/modern_perl_2016/
- IggleSniggle 6y agoThanks for recommending this book. Mostly I write TypeScript day-to-day, so naturally I typically reach for nodejs when I want to "upgrade" a script from bash to a more expressive language in a cross-platform way. I've been frustrated with that tooling, however, for a whole bunch of reasons, at lot of it to do with how clunky nodejs actually is in shell pipelines. I've thought about reaching for python, but it has some similar issues to nodejs: you need a particular environment, and some things which ought to be natural in a shell environment just...aren't...in python. I think someone here suggested Lua, and I just...don't care for Lua (although I haven't tried it in a scripting-like context). Anyhow, I've been reading this for a half-hour or so and I'm struck by how incredibly similar common Perl idioms feel to JavaScript as it is commonly used today. I think part of this familiarity has to do partly with type coercion, partly with destructing assignments, partly with function "context"(as in Perl) as it is commonly deployed in the nodejs ecosystem, partly because of the way default arguments and function passing relates to the default scalar variable in Perl. I've been playing around with OCaml and Rust a bunch recently, but haven't had any good reason to reach for them "in real life." The fact that Perl is "everywhere" (much the way JavaScript is "everywhere" as a side effect of browsers being ubiquitous), means that I'm likely to start reaching for Perl instead of nodejs when I need to move beyond Bash. It really does seem to be the right tool for the job. So, a hearty "thank you" for the recommendation.
- mfontani 6y agoGlad to hear you opted for adding another tool to your toolbox :)
- chromatic 6y agoYou might find it amusing that "JavaScript: The Good Parts" directly inspired the "Modern Perl" book.
- IggleSniggle 6y agoThat is entertaining to know! Thank you for writing this, it seems very well done so far. And thanks for also making it available in the way that you did: I almost certainly wouldn't have played with Perl today without your book, made effortlessly available on my e-reader via Pragmatic. I'm curious why it's not available in physical copy from Pragmatic? And I'm not confident about the correct "buy" link to use to properly support the book. One sidenote that I hate to mention, but: I couldn't figure out how to open a PR for this or even email someone who would care, but I found a code-typo on the CPAN website: it's instruction to "install via App::cpanminus" and then use with "cpanm name::module" is...an unfortunate early typo on that site.
- chromatic 6y agoI'm curious why it's not available in physical copy from Pragmatic? I believe it is: https://pragprog.com/cart/add/skus?sku_id=821_820 https://pragprog.com/cart/add/skus?sku_id=821_820 I'm not confident about the correct "buy" link to use to properly support the book. It's more valuable to me if you share and enjoy. I give away electronic versions so that it's useful, not to make money from the time I spent writing it. I found a code-typo on the CPAN website Is this the page you were reading? https://cpan.metacpan.org/modules/INSTALL.html https://cpan.metacpan.org/modules/INSTALL.html It's not explained on that page, but the distribution App::cpanminus installs a program called cpanm, not cpanminus (as one would expect).
- IggleSniggle 6y ago