8 ms·
I am curious, what's the use of learning perl6 in 2015?
by mundanevoice 11y ago
I am curious, what's the use of learning perl6 in 2015?
- s_kilk 11y agoSame 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.
- jsnathan 11y agoI 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.
- peteretep 11y agohttps://github.com/niner/Inline-Perl5/ https://github.com/niner/Inline-Perl5/ https://github.com/rakudo-p5/v5/ https://github.com/rakudo-p5/v5/
- cygx 11y agov5 isn't in a usable state right now.
- awwaiid 11y agoPerl6 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 https://gist.github.com/awwaiid/ef3f0abcfa96e34977b4 (I wrote this some months ago -- it can be a bit cleaner now)
- s_kilk 11y agoApparently Inline::Perl5 works well enough: https://github.com/niner/Inline-Perl5/ https://github.com/niner/Inline-Perl5/
- peteretep 11y agoIf you'd learned Perl5 in 1994, you'd have had twenty years of exceptionally fun employment and community out of it.
- krylon 11y agoWell, 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).
- username223 11y ago> 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.
- krylon 11y agoOh 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.
- arca_vorago 11y agoWell 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/ 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.
- Ultimatt 11y agoSo 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.
- omaranto 11y agoHave you compared the MoarVM and JVM backends recently? Is one substantially faster than the other for your applications?
- wwweston 11y agoI 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.