Live data from Hacker News

Perl 5.17.6 is now available

nntp.perl.org

51–60 of 62 posts

Re: Perl 5.17.6 is now available

#51
post #19

Earlier quoted context omitted.

Unless you've been living under a rock Perl has been the goto language for Unicode support for half a decade now.

Indeed, the "Unicode support" in question is tracking changes to the Unicode standard itself. Perl 5 has long been one of the top-flight Unicode implementations (and not just implementation , but a community-wide set of best practices, documentation for use, etc.).

I must say, when Perl is the "top flight" implementation for unicode i don't want to be a programmer anymore..

http://stackoverflow.com/questions/6162484/why-does-modern-p... Just scroll to the end of the first comment, boilerplate code.. jesus....

Re: Perl 5.17.6 is now available

#52
post #15

I'd be genuinely interested in reasons why I should learn Perl? I've been hacking away at some Perl interfaces lately but finding it difficult. It seems like a big language (I'm reading Perl Programming, which is certainly a big book). So rather than just hacking away, is there a good reason I should learn the language properly and push through "Perl Programming" or say learning Ruby, Python or golang really well. Wi…

i'll wade in. note that i'm bigoted against perl, i'll say so clearly up front. perl is better than shell scripting at automation, this much is true. perl has a strong use case there. had, i'll argue. perl's idioms and structure promotes wonky, hard to read and hard to maintain code. it's true. get even the most die hard perl fan a beer or two and they'll wind up admitting it, sheepishly and quietly. but yeah, perl t…

Exactly my feelings. Usually when i bring this up on HN it's just a heavy downvote and i gave up with it.. I must really say that the most horrifying times in my current job over the last years have not been critical situations like server failures or the like but the countless hours i spent on debugging and "cleaning up" the perl scripts of other people. Since then i made clear that i don't touch those anymore, someone else can waste their time. Especially when you spent more on fixing some script then it would take you to rewrite it in python..

Re: Perl 5.17.6 is now available

#53
post #25

Earlier quoted context omitted.

Yea, I kind of agree with some of this. My coworkers are big fans of Perl Critic because it enforces a standard (and I assume one that promotes cleaner Perl). But it often seem to me that the popularity for Critic is somewhat of a language failing. I guess the argument could be main that it allows you to write hacky little scripts which could can then apply Critic too and slowly refactor into large projects. I'm not…

the popularity for Critic is somewhat of a language failing By this argument, Javascript (JSLint), C# (StyleCop), C (lint), Python (Pychecker and Pylint) all have failings.

No, whereas pylint promotes a good style, same space between function definitions, etc. this is something that is heavily missing in perl. Python also doesn't have (or actually it's almost never used) global variables and goto and all that crap that people still use in perl code. On of the first things i do when having to work on others perl code is to run Critic and first fix the myriad of warnings that come up. With Pylint it's typically just some minor stuff. With Critic it's typically some major stuff that's plainly wrong.

Re: Perl 5.17.6 is now available

#54
post #47

Earlier quoted context omitted.

i very firmly believe the following: first, that some languages promote decent coding practices, while some actively encourage bad ones, either through crappy idioms, bad docs and a lousy community, or a lack of immediate penalties. second, that where you spend much of your time coding has a significant effect on how you think about problem solving, consequences, etc. the practice of programming builds behaviors, mod…

> the values it places on hacked up gimmicks (under the > guise of "more than one way to do things" and "see! > it's a one liner!") is a large part of this. I'm curious where there is official documentation of Perl as a language putting emphasis on "See! It's a one-liner!" Sure Perl has things like Perl Golf[1], but I could equally point you to The International Obfuscated C Code Contest[2]. That doesn't prove that C…

I am wondering why it is as it is. I think it may be because of perls abundance of short cryptic symbols that people feel somehow "proud" to 1) know what "while(){print if($.==2 || $& && !$x++); $.=0 if (/^--+$/)}" does and 2) to make it even shorter. Because with )(!§&/$?(=)% with hell a lot of meanings you could write entire perl scripts based on special characters.

A good example is http://www.nntp.perl.org/group/perl.beginners/2009/01/msg106... that i just found googling for perl one liners. The OP want's to know what this line does, the first answer is "you can make it even shorter!". Somewhat explains what i try to say ;)

Surely there is a lot of clean perl code out there but from my experience at customers (i'm consultant) what happens in-house in some development departments looks very very very different. Then again i've seen a lot broken, half-tested and unmaintained CPAN modules as well.

Re: Perl 5.17.6 is now available

#55
post #30
post #26

Earlier quoted context omitted.

I think the argument might be that it's easy (easier than many languages) to slip into writing bad Perl, which promotes brain rot, it also sounds like it's a discussion he's had many times before... and perhaps isn't too interested in having again.

> it's easy (easier than many languages) to slip into > writing bad Perl Bad programmers will write bad code no matter the language. I don't like this idea that the language can somehow force people to write better code, or that it should.

See it that way: A bad programmer that can use such a variety of difficult to read symbols in a language (which perl clearly has) will just use all of them and the result will be horrible to read and understand. Also, often times python really has one obivous way to do a specific thing. Last time i was googling for some perl code (i think it was for some array handling) i have found at least 10 equally good totally different way on perlmonks in one thread. That's not bad per se but it promotes that every one uses another line of code and the bad ones choose the lines that may have unintended side effects but work in 90% of the usecases.

Re: Perl 5.17.6 is now available

#56
post #14
post #9

Earlier quoted context omitted.

Despite being a pythonista at heart and a rubyist at work, Perl is still my go-to language for when I notice bash scripts getting messy and growing out of scope and destined to enrich my personal long-term unix toolset. Yes, Perl is still very relevant today, for me and for countless others[0] [0]: https://github.com/languages

Out of interest, why do you go to Perl instead of Ruby?

1. It's everywhere. By that I mean my code will work everywhere, without much thinking about it being installed, versions, or packages, or whatnot.

2. Ruby is too 'core' and needs too much additionals gizmos to be efficient

3. Ruby is concise and conventional, while implicitness and terseness are idiomatic of Perl

4. I'm no Perl monk but things in my head translate to code structure more easily in Perl for this use case (unix tools, text/binary/file content stream manipulation)

5. Perl strict mode

6. Occasionally, Perl suid support

7. Bonus: performance under Windows, or rather lack thereof for Ruby

Mind you, Ruby is extremely apt and I enjoy working with it (especially - but not only - with Rails), but this is more a matter of using the right tool for each problem.

Re: Perl 5.17.6 is now available

#57
post #35

Earlier quoted context omitted.

5.17.6: "The seed used by Perl's hash function is now random. This means that the order which keys/values will be returned from functions like keys(), values(), and each() will differ from run to run." Wait, what? 5.8.1: "Mainly due to security reasons, the "random ordering" of hashes has been made even more random. Previously while the order of hash elements from keys(), values(), and each() was essentially random,…

Relevant discussion on perl5-porters: http://www.nntp.perl.org/group/perl.perl5.porters/2012/10/ms...

Some more relevant links:

* Hash order randomization is coming, are you ready? - http://perlmonks.org/?node_id=1005122

* Hash randomisation breaks CPAN - https://rt.perl.org/rt3/Public/Bug/Display.html?id=115908

Re: Perl 5.17.6 is now available

#58
post #51
post #19

Earlier quoted context omitted.

Indeed, the "Unicode support" in question is tracking changes to the Unicode standard itself. Perl 5 has long been one of the top-flight Unicode implementations (and not just implementation , but a community-wide set of best practices, documentation for use, etc.).

I must say, when Perl is the "top flight" implementation for unicode i don't want to be a programmer anymore.. http://stackoverflow.com/questions/6162484/why-does-modern-p... Just scroll to the end of the first comment, boilerplate code.. jesus....

This is very thorough boilerplate code for dealing with all corner cases when using utf-8 data with Perl.

Instead of dismissing or dissing Tom Christiansen excellent post I would highly recommend reading into his The Good, the Bad, & the (mostly) Ugly presentation from OSCON 2011 [1] where he compares Unicode handling across mainstream languages and then see how this code (and Perl) shapes up in comparison.

In the meantime pragmatic Perl programmers can cover most of that utf-8 boilerplate with just:

  use 5.016;
  use warnings;
  use utf8::all;
Or if you're like me and use perl5i [2] then its just:

  use perl5i::2;

[1]: http://training.perl.com/OSCON2011/index.html

[2]: https://metacpan.org/module/perl5i

Re: Perl 5.17.6 is now available

#59
post #50
post #15

I'd be genuinely interested in reasons why I should learn Perl? I've been hacking away at some Perl interfaces lately but finding it difficult. It seems like a big language (I'm reading Perl Programming, which is certainly a big book). So rather than just hacking away, is there a good reason I should learn the language properly and push through "Perl Programming" or say learning Ruby, Python or golang really well. Wi…

Let me tell you why learning Perl is important. You will never realize why Perl is important unless you start using Perl to solve the problems it was designed to solve. The whole thing really is Perl doesn't have any real competition. And it has always been the case. And even the competing languages more or less end up largely looking like Perl. The biggest examples are ruby and Perl 6 itself. Python is not Perl's co…

Thanks this was really useful. I use bash scripts, awk etc. fairly frequently but I guess rarely consider Perl for the same applications I do awk, perhaps I should.

Your comment really helped me understand where Perl should sit in my toolkit of programming languages, thanks again!

Re: Perl 5.17.6 is now available

#60
post #51
post #19

Earlier quoted context omitted.

Indeed, the "Unicode support" in question is tracking changes to the Unicode standard itself. Perl 5 has long been one of the top-flight Unicode implementations (and not just implementation , but a community-wide set of best practices, documentation for use, etc.).

I must say, when Perl is the "top flight" implementation for unicode i don't want to be a programmer anymore.. http://stackoverflow.com/questions/6162484/why-does-modern-p... Just scroll to the end of the first comment, boilerplate code.. jesus....

Perl 5 was released in October 1994, so it's impressive in its own right that a) there is boilerplate you can add at all to get good Unicode support and b) that you can extend the language to support it using just boilerplate.

As the other comment mentioned, improvements by "default" to Unicode support do get included into later Perl 5 releases, but you have to let the compiler/interpreter know that you're buying into that so that it can reduce the boilerplate for you.

Post reply on HN