News for hackers. Stuff that matters.
Re:Perl 6 Introduction by mundanevoice on Saturday November 28, 2015 @06:16AM (#10640762)
I am curious, what's the use of learning perl6 in 2015?
Re:Perl 6 Introduction by krylon on Saturday November 28, 2015 @07:52AM (#10640929)
Well, I can tell you what's the use of learning Perl 5 and that I suspect most of it will apply to Perl 6 as well:

Perl, more than any other language I know, sacrifices nearly every other property in the name of being useful. It's not a conceptually clean language, or an elegant one, or a simple one, but if you need to get stuff done, now, there is very little that can compete with it. (At least for some rather specific values of "stuff" - Perl, IMHO, really shines at small-ish scripts that need to convert data from some format to another, or merge data from different sources, especialy when lots of text-handling are involved). Parsing a log file, or matching user accounts from a Windows domain with employee records in an ERP system's database are two examples that come to mind because I had to do those things not too long ago.)

Perl 5 has problems though, especially when it comes to writing large-ish programs. While you can write readable und unreadable code in any language, Perl makes writing unreadable, unmaintainable code easier than, say, Python. Perl 6 tries to fix a lot of this while remaining as useful as Perl 5 (or at least trying to).

Re:Perl 6 Introduction by username223 on Saturday November 28, 2015 @08:47AM (#10641037)
> Perl, more than any other language I know, sacrifices nearly every other property in the name of being useful.

Another factor that mattered back during Perl's heyday was the insane lengths it went to for maximum portability. The Perl porters shouldered the burden of making it run on DOS/Windows, Mac OS, VMS, and all the weird Unices that existed at the time. This doesn't matter as much nowadays, but it was crucial back then.

If you had a text-munging or scripting problem, and wanted to solve it once and for all, Perl was the perfect tool.

Re:Perl 6 Introduction by krylon on Saturday November 28, 2015 @09:02AM (#10641069)
Oh yes. The Perl documentations comes with things like perlos400 or perlvms that details the specific problems or advantages people looking to run Perl on that particular platform will face, and the list of these OS-specific documents is really impressive. There are systems on it that run Perl that I have never heard of (or only in whispering, at a New Moon).

Perl lets you pretend that Windows know how to fork. That alone still amazes me in a way.

During my training, I had to set up BIND 9 on IBM mainframes running z/OS and configure TSIG (cryptographically verified zone transfers), which among other things required changing the (shared) keys on a regular basis (about once per month, I think) and distributing them across about half a dozen systems. Fortunately, at that precise point in time, I stumble across a news headline that IBM just released Perl 5.8 for z/OS and managed to get the sysprog to install it.

The alternative would have been REXX. I looked at it, quickly, and then looked away, very determinedly. I was really glad Perl was available on those machines.

Re:Perl 6 Introduction by ribasushi on Sunday November 29, 2015 @12:08PM (#10645191)
FWIW perl currently builds and passes tests on z/OS, under straight EBCDIC: http://www.nntp.perl.org/group/perl.perl5.porters/2015/11/ms...
Re:Perl 6 Introduction by username223 on Sunday November 29, 2015 @10:06PM (#10647412)
And this is why Perl is awesome: IBM mainframes are the opposite of sexy, but some people use them, and Perl will work there.
Re:Perl 6 Introduction by athenot on Saturday November 28, 2015 @08:57AM (#10641060)
A lot of that has to do with Perl being multi-paradigm. C++ is another (though lower-level) example of that. On the one hand, there's a strong argument in favor of designing a "clean" paradigm and sticking to it.

On the other hand, there's an equally strong argument to "pick the right paradigm for the task". It's taken me many years to appreciate the elegance in that approach, as it requires a thinking in multiple models at the same time. On a totally subjective note, I find it more "human" as our creativity lets us what's suitable for the task, without trying to mold everything into the same uniform mold. That may appeal to certain personalities more than others.

Re:Perl 6 Introduction by mundanevoice on Sunday November 29, 2015 @10:32PM (#10647512)
It all sounds good but I can do almost everything in Python too right? That too with the cleaner syntax and easy to debug/read code. I hardly see any job openings that requires perl these days unless it's for some legacy Perl project.
Re:Perl 6 Introduction by wwweston on Saturday November 28, 2015 @02:47PM (#10642123)
I don't know Perl 6. But here's the reasons why I've considered dusting off my Perl 5:

- Subjective, but in my experience, the Perl community is more full of smart yet practical people than any other dynamic language community I've participated or dipped my toe in (and most popular static manifestly typed language communities to boot). I don't say this to trash Ruby or Python (or even JavaScript and PHP, which have plenty of smart users and participants); I just mean that I often learn more from engaging with the Perl folks.

- Kindof a corollary, but Perl 5 seems one of the few places where industry's reflexive treadmill dash towards the newly-formed but usually isocapable turned into a careful reflection on using the existing power at hand wisely and the best marginal gains from key additional features.

Place two jobs in front of me, one of them working on a new Go project, the other on a new Perl 5 project, my bet is going to be that the latter would be part of a more satisfying overall experience.

Now, Perl 6, this is starting to look like a language where they are going to make a number of things easy that most programmers didn't even know were hard, a number of things possible that most programmers didn't even know were possible, where recent PL research is going to meet further practicality, where unicode might even actually be reasonably comfortable to work with.

Re:Perl 6 Introduction by s_kilk on Saturday November 28, 2015 @06:19AM (#10640771)
Same use as in learning any other language.

We could very well have asked what was the use in learning Go in 2010, but look how that turned out.

Perl6 is currently a very interesting language with a relatively weak module ecosystem. Which is a position many languages have been in before.

Let's not dismiss it out of hand.

Re:Perl 6 Introduction by jsnathan on Saturday November 28, 2015 @06:26AM (#10640781)
I wonder what ever happened to the dream of Perl 6 running (or interfacing with) Perl 5 code out of the box, and thus having access to all of CPAN from the get-go. Does anyone know if that is still a goal?

I always thought that would make a world of a difference.

Re:Perl 6 Introduction by peteretep on Saturday November 28, 2015 @06:27AM (#10640786)
Re:Perl 6 Introduction by cygx on Saturday November 28, 2015 @06:49AM (#10640825)
v5 isn't in a usable state right now.
Re:Perl 6 Introduction by awwaiid on Saturday November 28, 2015 @10:28AM (#10641275)
Perl6 is such a completely different language and implementation that calling Perl5 is no different than calling Ruby or Python -- they all involve effectively embedding or calling out to the other language.

Here is a gist where I'm calling out to some Python. It is not done in the magical future way (which is in progress) of just doing "use matplotlib::pyplot:from<python2>" or similar, but not too bad.

https://gist.github.com/awwaiid/ef3f0abcfa96e34977b4

(I wrote this some months ago -- it can be a bit cleaner now)

Re:Perl 6 Introduction by s_kilk on Saturday November 28, 2015 @10:57AM (#10641364)
Apparently Inline::Perl5 works well enough: https://github.com/niner/Inline-Perl5/
Re:Perl 6 Introduction by peteretep on Saturday November 28, 2015 @06:29AM (#10640792)
If you'd learned Perl5 in 1994, you'd have had twenty years of exceptionally fun employment and community out of it.
Re:Perl 6 Introduction by arca_vorago on Saturday November 28, 2015 @12:12PM (#10641620)
Well I'm not doing it anymore, but I was using bioperl extensively when I was in biotech, but there were some gotchas and it wasn't as fast as it could be. With better concurrency, that certainly could reduce analysis time.

Currently, I am also using a monitoring tool called Argus (http://argus.tcp4me.com/) which is completely written in perl. It doesn't seem super well maintained, but I really like it, so I have been reading through the source and have been thinking about doing something similar in Elixir, but Perl6 would be a perfect update for it.

Perl is largely a sysadmin tool, in that many of us sysadmins are not formally trained in programming, but we often need to get shit done, and perl enables that. When bash, awk, and sed start to falter, we tend to use python and perl, so that's another use case. Simpler syntax and better threading would certainly help with that.

Re:Perl 6 Introduction by Ultimatt on Monday November 30, 2015 @03:07AM (#10648340)
So I've written some Bio stuff for Perl 6 and unfortunately Rakudo is still way too slow for super heavy computational lifting. On average stuff is 10x slower than Perl 5 and worse case 100x. I strongly believe this will improve next year to the point it's competitive though. Shaped native arrays just came on the scene which means a list in Perl 6 can act in memory exactly like a C array which opens up the ability for the JIT to use SSE instructions. That said I've been using Perl 6 at work for basic file manipulation just because its so nice and quick. Anything that's 100sMB rather than 100sGB finishes up in acceptable times and sometimes Grammar support is super helpful.
Re:Perl 6 Introduction by omaranto on Monday November 30, 2015 @02:57PM (#10651357)
Have you compared the MoarVM and JVM backends recently? Is one substantially faster than the other for your applications?