I've been writing Perl every day, at work and at home, since 1993, ranging from mission critical operational components in the USAF, to automation that produced many 9's of network availability in a 'fortune 10' giant, to innovative operational management and process systems in a Silicon Valley (kind of) startup, to some pretty interesting stuff at my current company (SAP).
Perl 5 has certainly paid the bills. I have taught it to hot-shot C programmers and mainframe Cobol programmers alike in a community college.
Perl 5, by any modern standard, is, at best, a 'quaint' language.
Perl 6 is literally everything I wanted Perl 5 to be. The incremental data typing is very exciting. The regular syntax is going to make it even easier to teach. And there are so many other well considered and awesome features.
And I just get giddy when I think of the amazing things that really smart people are going to make with Perl 6. It's powerful from the top of its head to the bottom of its feet. And I think that it's going to be a very fast language too.
Thank you, Perl. Thanks to the many people who have made it possible. May my 13+ years of high hopes not be in vain!
I haven't touched Perl in quite a long time. For the type of automation stuff you are doing, i'd likely use python or ruby, depending on the nature of the problem.
Would you say people like me should be looking hard at Perl 6? I'm curious what the benefits would be.
At least for the past decade or so, I would (roughly and humbly) put Ruby and Python on par with Perl 5 for the purposes of system administration, with a whole lot of pros, cons and caveats. Very roughly. It's just that, as a language, Perl has always resonated with me, even though I've rather enjoyed writing in both Ruby and Python.
Assuming you are akin to 'Jill Sysadmin' or 'Joe Devops', I would honestly say that Perl 6 won't be more compelling than Perl 5 for a while.
And, by the way, Perl 5 has grown enormously in the past 10 years. I would say that if you haven't taken a look in a while, give it another shake.
I honestly struggle to imagine the really cool things that will start to come out of Perl 6 acceleration. It has some really novel concurrency concepts, far more interesting than goroutines, for instance.
And once again, I believe Perl 6 will turn into a very fast language.
> And, by the way, Perl 5 has grown enormously in the past 10 years. I would say that if you haven't taken a look in a while, give it another shake.
this. I can hack a bit in Perl 5, but "modern Perl" is virtually a unique language that just so happens to be written using the same words I use. I haven't had a chance to really learn modern practices, I keep telling myself I'm going to sit down and do it, but I haven't had a chance. But what I've seen is really pretty different than what I grew up with.
I still find Perl is better for some tasks (over Python - I don't know Ruby). It has loads of syntactic sugar such as globbing files, backticks for executing system calls.
If this is true, I'm incredibly excited. Perl is like a girl I used to love, broke up with, but never got over. I'm eager to start hacking on Perl 6 code, but don't want to put the time in dealing with preproduction versions of the language.
To me, Perl was a girl like none I'd ever met, strange and wild and inspiring! But polite society rejected her... it was just because they didn't really know her. My parents said she was trouble and banished her from our home. I loved her so much I would sneak out at night and find any way I could to spend some time with her.
(Wait, or is this the plot of Phantom of the Opera? I'm bad at musicals.)
Larry is very involved in Perl 6[1]. I'm not sure what grondilu was thinking there. While as far as I know Larry sprang that on the rest of us, the general reaction I've seen has been that the gauntlet has been thrown down, and we've got to live up to it.
The speaker is Larry Wall but I interpreted timotimo's quote as meaning that the abstract on the FOSDEM page, along with the pseudo-announcement, has not been written by Larry himself.
Unfortunately I cannot recommend the parrot backend for production use yet. We recently found a serious GC bug which is reproducible under very tight memory constraints, such as my mips box with 256MB RAM or with very big perl6 modules.
I'm working on it for a week already and cannot promise to be finished until Jan 31, 2015.
But the other 2 backends, jvm and moar, are doing fine.
Larry Wall is not saying P6 will be declared "officially production ready" on Jan 31st 2015. He's saying the devs are aiming to declare that sometime in 2015, quite plausibly Dec 1st 2015 or somesuch.
The parrot jit will need some time.
First the runloop changes for method calls and argument autoboxing needs to be reverted, then the jit will be revived.
But on the other side I just fixed the GC bug, so it looks good now even on parrot.
However, Linux on the Desktop (almost) already had its time, and it passed. It was around 2009, Ubuntu was at its pinnacle, it was the time of Compiz and Gnome 2 and transparent terminals and themes and whatever. A lot of my (non-technical) friends were suddenly interested in Linux (well, distros of GNU+X11+Desktop Environment+Free/Open Source applications). This was a free alternative to Windows, better than Vista or XP, actually easier to use for many tasks ("I can't believe that it is so easy to install new fonts, I never knew how to do that on Windows"). This was before all of the experimentation (Gnome 3, Unity, ...) that, while in principle a good thing, the way it was executed effectively killed the old lineages (Gnome 2). When it comes to languages: Python 2.7, and on-topic: Perl 5. This was also before all the annoying in-fighting for mostly political reasons (systemd cough but there are many more examples). I don't know whether politics is an issue for Perl.
But that there is no golden way of transitioning to a new version in the FOSS world definitely is a problem that is harming so many projects.
But there is. Make damn sure the old and the new can live side by side on the same system for as long as the user/admin see fit. Thus making the user/admin the arbiter of change, not the project devs or the distro maintainers.
You find this on the kernel level, where old and new APIs sit side by side. But higher up it seems like egos override pragmatism. Or "perfect is the enemy of good".
China is making big moves to switch over to Linux. They are aiming to have a significant portion of their computers on Linux by 2020. The resources they pour into Linux may change the landscape considerably.
The older webOS devices are incredibly hackable on the software end compared to any other consumer electronics devices I've dealt with. Far more open than Android, much closer to an old-school Linux distro even then some desktop distros, easy dev unlocking (and good tools!), and Palm/HP even used .ipk as their package format. I loved my old Palm Pre and HP Touchpad until they both eventually died violent deaths (technically one still runs after a 5-story fall onto marble, but it's not happy). The homebrew community rather quickly got an X server working complete with a couple of common desktop environments. Or rather I should say X servers plural, you could launch more than one and flick between them like any native app.
With a bluetooth keyboard and mouse I could work much more comfortably than with the exact same hardware running Cyanogenmod. Being able to do Perl/Ruby development and run a real RDBMS is possible on Android, but it's not natural. When webOS came out GUI was also more pleasant than Android or iOS for a lot of things and definitely better at multitasking, but they couldn't compete in the market. Luckily some of the webOS UI folks ended up at Google and Apple (and some had come from there), so things like the Android notification system benefited.
I would like Perl to be the Perfect Extended Ruby Language. Sometime ago, there was a post from some Perl people about using Scala for the next Perl. Today Haskell, Clojure, Julia, Scala, Ruby and Lisp (batteries provided by quicklisp) are very big contenders.
Perl has cpan but I think the Perl community is really small, the great exodus happened long ago. Perl can make you feel as a real hacker, also J, but cryptic syntaxes is no longer buying you anything.
How can anyone seriously take any credibility to a calendar when Perl 6 has been delayed for ever.
Perl 6 is not the gift that Perl 5 was hoping to receive, Perl 6 is a modest advance not a revolution.
Today, now, we need much more. I wish Perl 6 the best, but I doesn't believe it will gets much traction.
Edited: Grammar. Summary: Too little, too late, there is no longer confidence.
Honestly, there are so many (too many) languages out there now. I highly doubt any of them has more than 100 regular contributers.
Perl built an awesome foundation because in the beginning, that was all there was so you had 1000's of regular contributers to the core and cpan. I don't think any language will ever see that kind of activity again.
Perl6 has a lot going for it though. I believe with its new OO system, concurrency similar to Go, and the ability to compile to a binary, might take this new language to places where Ruby, Python, Perl5 can't go.
And in the similar perl5 fashion, it will be the programmers and not the corporates that own it. Therefore one is only limited by their imagination and not their pocket book.
Do you mean contributors to the core or to the package system?
Because NPM (for Node.js) has a cool way to browse the recent updates at 100/page at https://www.npmjs.org/browse/updated and so far today over 500 modules have been updated.
We live in a much bigger world than Perl was, so that's not surprising. The huge trouble is that these hackers don't talk much to each other.
I can still compile non-free software to any Distro on FSF's list.
The policy is if the official repos have non-free software. You can always install non-free on any of the FSF listed distros also. Also I think the world has moved past FSF when you just look at the distro names. Very small communities.
After a quick look, Perl 6 still looks like $#%&@ to me. I don't see why anyone would bother.
When Python 3 came around, I thought it was a good idea and that everyone would want to migrate as soon as possible. What we got instead is 3 more parallel installs of language versions. Beside Py-2.7 (which will apparently never go away), you will need Py-3.3, 3.4 AND 3.5 because every project wants a different one. Why would anyone want the same drama with Perl?
>>After a quick look, Perl 6 still looks like $#%&@ to me.
So you took a 'quick' look at the massive Perl 6 specification there is and already made decisions over it.
>>I don't see why anyone would bother.
A great deal of the programming world still runs on Perl. That includes the Internet itself. Plus a whole lot of new Perl projects are started everyday. There are companies which have pretty big Perl code bases running in production. And Perl has one of the most biggest following any language can boast of.
I am sure there are several who wouldn't just bother but use it do all kinds of awesome stuff.
>>Why would anyone want the same drama with Perl?
Because Perl 5 and Perl 6 aren't even the same languages. Python 3 was a just print statement and a for loop refactor over Python 2. The reason why there was so much friction in Python adoption was no one saw why they were supposed to deprecate a whole code base just for a print statement and a for loop.
Perl 6 is a whole new language, Only retaining some of its Perl 5 roots. Apart from these, they are two different languages in their own regard. No one is going to rewrite Perl 5 applications in Perl 6.
Some cool libraries and framework ideas from the Perl 5 world are going to seep into Perl 6 but that is that. For nearly all the cases there are Perl 6 is going to be used for new projects.
Meanwhile Perl 5 is developed and maintained at a good pace and will be continued to. Perl 5 and 6 will co exist, neither will go away. Unlike Python's case, where the 2.x cycle won't be developed and maintained anymore.
Perl 6 might have 'Perl' in the name, but it's essentially a new language. Objecting to having both P5 and P6 on the same computer is like objecting to having both C and C++ compilers on the same computer.
There's definitely a lot of very interesting stuff in Perl 6, but sadly, I can only get all too well where you're coming from: aside from adding a lot of visual clutter (which does matter), I've come to see the overuse of sigils (in both 5 and 6) to be just wrong, conceptually. It's like they're of the biggest flaws in Perl 5 that should have been at the top of the list of stuff to get rid of.
Yet they lie at the very heart of what the language is, to many people -- to such an extent that to do without them in Perl 6 would have violated one of the key design principles from its earliest days: "Perl 6 should still be Perl."
"Overuse" is subjective. If you are you suggesting that some use is good, can you give an example of usage you think is good and usage you think represents overuse?
That said, I didn't like some specific things about use of symbols in P5 and the problems have been fixed in Perl 6.
And of course there is more than one way to do it, for example this is one way to write the Ackermann function in P6 using Unicode names (symbols) for parameter/argument identifiers:
proto A(Int \𝑚, Int \𝑛) { @[𝑚][𝑛] //= {} }
multi A(0, Int \𝑛) { 𝑛 + 1 }
multi A(1, Int \𝑛) { 𝑛 + 2 }
multi A(2, Int \𝑛) { 3 + 2 𝑛 }
multi A(3, Int \𝑛) { 5 + 8 * (2 𝑛 - 1) }
multi A(Int \𝑚, 0 ) { A(𝑚 - 1, 1) }
multi A(Int \𝑚, Int \𝑛) { A(𝑚 - 1, A(𝑚, 𝑛 - 1)) }
Now on a more serious note, the perl community has always had a goal of backwards compatibility. When was the last time you heard someone having to update their perl5 interpreter to get something to work? Perl6 will be similar I assume, it can even in a limited way run perl5 code.
I've stuck with perl through the years just because of this. So you use perl to avoid those same issues you speak of.
* One can run (a subset of) Perl 5 code directly on any of the Rakudo backends (thus even on the JVM) by using v5, a Perl 5 compiler written in Perl 6.[1] I think it will be many years, if ever, before v5 parses all of Perl 5 and becomes a good choice for running arbitrary legacy Perl 5 code without tweaks, but it's probably going to be a key piece of technology bridging to Perl 5 in 2015. In particular, there's been talk recently of combining it with Inline::Perl5, discussed next, to provide improved sugar for P5 <-> P6 combinations.[2]
* Any host that can run arbitrary C code can run just about any Perl 5 code (including modules that use XS) via libperl, an embedded version of the stock Perl 5 interpreter. Inline::Perl5 uses this approach to allow the Rakudo Perl 6 compiler to run P5 code under P6 control without significant limitations. Inline::Perl5 allows one to pass P5 objects to P6 code that can then alter said objects and pass them back. And vice-versa, with P6 objects passed to P5 for manipulation back in P5 land. One can also create P6 sub-classes of P5 classes, thus using P6 code to tweak or extend P5 code. This already works out-of-the-box for Rakudo Star with the MoarVM backend; it's just a SMOP to make it work likewise for other backends.
(There are other nice pieces related to having P5 and P6 work together, but this is already a long comment.)
What's supposed to be so great about Perl 6? I associate Perl with inscrutable cat-walked-on-the-keyboard programs and little else. Can someone in the know explain?
Perl was, in its day, a breath of fresh air. It had an emphasis on practicality that made easy things very easy: regex literals, default arguments like $_, minimal syntax overhead, with things that would be syntax in other languages hoisted to interpreter args (-e, that arg that means "run this as an awk-style loop"), and so on. More than that, the project worked as a holistic ecosystem, rather than just a language and some tools: these days every language has something like CPAN, but it was a huge innovation at the time. Perl also pioneered a lot of the unit-testing infrastructure that we take for granted these days; every project in CPAN was expected to have tests, using the same libraries, and they ran as part of the install process. A cynic might say that perl innovated here out of necessity; lacking static typing and not having VM isolation means good unit tests are a necessity. But still, the resulting infrastructure is very good, and some very solid programs are written in perl. In many ways I'd say it was the go of its day.
The downside of the emphasis on practicality was that the language always suffered from incoherence; with no principled foundation it's been slow to adapt as the practical things users want to do change (e.g. I'd argue string manipulation is a lot less important than it used to be - if you were writing perl today, you might give json manipulation the same prominence as regexes). Perl 6 may have been an effort to fix this, but went too far in the opposite direction; overly formalized, with a premature separation between VM and language that massively slowed development.
There's a lot of good stuff about modern perl - Moose and the like - but IMO it's too little, too late; other languages have been able to improve their infrastructure to (mostly) match perl for easy things. Meanwhile perl's incoherence makes it very hard to write large programs and solve hard problems, where languages with a firmer theoretical foundation and stronger stylistic principles have a huge advantage.
Every time I try to write ruby or python code, as soon as I need to write classes I realise just how much boilerplate they require compared to Moose and how depressing not having first-class attributes, method modifiers and roles is, and end up back writing perl5.
As someone who has written both Perl and Ruby (in that order), you might be interested in this Ruby gem to alleviate at least some of those problems: https://github.com/solnic/virtus
> Meanwhile perl's incoherence makes it very hard to write large programs and solve hard problems ...
I've been on teams writing very large systems solving very hard problems in Perl 5 for more than 20 years. I know that some of that stuff that was written in the 90s is still under active development and maintenance today, even though it's several developer generations in the past.
Perl 5 may or may not be 'incoherent'. It is certainly somewhat idiosyncratic. But so is JavaScript, perhaps to a lesser degree.
Perl 5 in the large requires some somewhat different (but not too difficult) disciplines.
But that's not so different than most other languages.
> Perl 5 may or may not be 'incoherent'. It is certainly somewhat idiosyncratic. But so is JavaScript, perhaps to a lesser degree.
I think if "it's not a lot worse than Javascript" is the best you can say in its favour...
> Perl 5 in the large requires some somewhat different (but not too difficult) disciplines. But that's not so different than most other languages.
The problem I always saw was that libraries would follow their own styles, so once you had a project that depended closely on several different libraries you'd be forced to cut against the grain of several of them. It's a problem that's lessened in a language with a single standard way of doing OO, a single standard way to do event-driven I/O, or even trivial things like code formatting. Maybe the perl community has found more of a consensus in recent years.
Nowadays I work almost completely in scala, which some people compare to perl, so I'm concerned about not repeating perl's decline in popularity.
> The problem I always saw was that libraries would follow their own styles, so once you had a project that depended closely on several different libraries you'd be forced to cut against the grain of several of them. It's a problem that's lessened in a language with a single standard way of doing OO, a single standard way to do event-driven I/O, or even trivial things like code formatting.
The Perl 6 language design directly addresses this problem. The intent is to avoid throwing out the baby (making both timtowtdi and long term language evolution practical) with the bath water (lack of composability of the various ways to do things and of new features that emerge). The Rakudo implementation is most of the way there.
I think the impact of Perl is even bigger than what you are describing. I kind of see Perl as the first language which finally lead the masses out of the wilderness-of-C, and brought forth the light of reference-counting/garbage-collection (no more manual memory management and segfaults), dynamic typing, and "advanced" data structures like hashes/dictionaries (no more off-by-one errors, no more buggy reimplementations with pointer chasing). And actual honest-to-goodness strings, not null-terminated abominations. All without out a syntax that was too scary or unfamiliar. In the 90's Perl was the gateway drug to the more lispy future that we now inhabit.
I like that Perl 5 uses reference counting instead of a full-blown GC and that small scripts start up quickly with a small memory footprint. Alas, Perl 6 went down the garbage collecting virtual machine path, at which point, it has to catch up with Java while trying to differentiate itself from it.
What startup delay and RAM usage do you think is just too large to be acceptable for a small script, no matter how good a language/compiler is in other respects?
Good question, and I'm not even sure. Perl 5 on my Mac is about 1.2 MB resident to run a one-liner, though, and I'm pretty sure I can't load the JVM in 1 or 2 MB. Need to follow up on that to find smallest practical Java program (as a contrast)
Similarly (same laptop), I can get perl to print its version (5.16.2) in about 0.01 secs (2nd time), but java (1.8.0_11-b12) takes about 0.11 secs (2nd time).
Most of my work is in Java, but it gets to be a tyrannical hammer that must be used for everything in some minds :-(
Again: Parrot having to compete with the JVM makes me sad.
Fwiw most Rakudo devs now prefer MoarVM for most things because it's generally the fastest, leanest, least buggy and most specification compliant of the currently available backends (MoarVM, JVM, Parrot). MoarVM is definitely the right pick for folk who want the leanest startup P6 can deliver.
Even with the MoarVM backend, Rakudo takes a lot more time and RAM to startup than the compiler for most mainstream languages. It handily beats the JVMs devs use but that's not saying much.
On the third hand, a few devs have said they are regularly using Rakudo at $work, including for one-liners.
Maybe. I think people underestimate the importance of TCL, because it was (relatively) buried so shortly after (mostly for political reasons) - it had a lot of influence on Python in particular. But my perspective is of course coloured by my own experience.
> Perl 6 may have been an effort to fix this, but went too far in the opposite direction; overly formalized, with a premature separation between VM and language that massively slowed development.
I also think the Parrot VM project added a few years to P6's gestation.
When you say "overly formalized", perhaps you mean the early break out of mailing lists and especially the Parrot project? I don't think "overly formalized" fits the last decade of Perl 6 development -- Pugs (2005 - 2007) was distinctly anarchistic.
I've been farting around the software world for a while (but have never touched Perl) and that's the best explanation of Perl's appeal that I've ever read.
Perl optimized itself to death. They wanted a new feature, realized they could save 3 keystrokes per day by using $‽ for some new feature, all the experts agreed, and they go with it.
I'm really afraid that Rails is going the same way, that the DRY mantra is going to eventually lead to a Huffman encoding only parseable by Rails experts, and then no one new will want to get on board.
Perl's "magic" variables like "$?" were not named to optimize keystrokes.
Most of Perl 5's syntax comes from well established (for perhaps a decade) UNIX culture, from shell, awk, sed, and C syntax conventions. Vanishingly little is actually novel to Perl.
Rails, which is obviously not a peer to Perl, but which you bring up as "going the same way," does similarly have a huge emphasis on convention. But most of its conventions are de novo, made up within the Rails/Ruby community.
You can hate Perl (5) all you like; no accounting for taste and all. But if you find parts of it unfamiliar, it's probably because you are ignoring (or ignorant of) where it came from.
Standard Perl 6 has just these non-English variables:
* $_ means "it"
* @_ means "args"
* $! means "current exception/error"
* $/ means "last match"
* $0 means $/[0], the first captured value of the last match
All other system variables have understandable English names, eg:
* $IN means the STDIN object/handle
$OUT means the STDOUT object/handle
%ENV means a hash (dict) of system environment variables
$PID means the system process id
$*KERNEL means the operating system kernel running under
Yes, I love Ruby, and use it a lot outside of Rails.
I have some issues with Ruby "helpfully" letting you leave out more and more syntax, like parentheses from multi-argument function calls, or saying you don't need {} if the last argument is a hash, which are easy to grok if you already know Ruby but can be yet-another-confusing-rule for newbs. But those are relatively minor.
When I first learned ruby, it was my first dynamic language I ever fully experienced. I never found the poetry mode to be an issue, and in fact the community was so new and vibrant, they made it very clear to me what was going on. I believe every ruby tutorial I have ever seen made it very clear what was going on.
as far as the hash, you can always inspect the actual arguments being passed, which doubles as a nice learning exercise for beginners.
explicit strong typing
proper parameter lists
active metadata on values, variables, subroutines, and types
declarative classes with strong encapsulation
roles
full OO exception handling
support for the concurrent use of multiple versions of a module
extensive introspection facilities (including of POD)
LL and LR grammars (including a built-in grammar for Perl 6 itself)
subroutine overloading
multiple dispatch
named arguments
a built-in switch statement
hierarchical construction and destruction
distributive method dispatch
method delegation
named regexes
overlapping and exhaustive regex matches within a string
named captures
parse-tree pruning
incremental regex matching against input streams
macros (that are implemented in Perl itself)
user-definable operators (from the full Unicode set)
chained comparisons
a universally accessible aliasing mechanism
lexical exporting (via a cleaner, declarative syntax)
multimorphic equality tests
state variables
hypothetical variables
hyperoperators (i.e. vector processing)
function currying
junctions (i.e. superpositional values, subroutines, and types)
coroutines
lazy lists
strong module and language versioning
concurrent object pipes
I'm not a Perl hacker, but there's one thing that I've wanted a bunch of times in other languages: Perl 6 does for PEGs (Parsing Expression Grammars) what Perl 5 did for regexes: they're part of the core language, you can execute Perl expressions when a PEG rule is matched, that kind of thing.
In Python when I have some data and it grows just a bit too irregular for regexes, I have to start manually writing state-machines or add a dependency on a third-party library and spend an afternoon explaining parsing theory to my co-workers.
I want to see Perl 6 push the boundaries but the world isn't quite like it was when Perl 5 made using regex seemless. Competition is much more stiff.
Even in C you can use something like Ian Piumarta's PEG generator[0] that let's you embed semantic actions written in C. For regular grammars, scanners and lexers you have powerful tools like Ragel[1] (which targets 7 languages)
I'm not a Python person, so if the Python libraries proved inadequate I'd probably resort to these tools and then push out a Python module using Cyphon[2].
Personally I'm not a fan of using semantic actions for AST construction. I generally prefer the 'attribute' approach taken by libraries like Spirit (C++) which make the process feel a lot more like deserialization. SAs are still useful however for rejecting or accepting rules based on complex requirements (like "is this IP address routable"?).
Sure, but what happens when someone needs something other than PEG/recursive descent, like expression parsing with a custom precedence table? Will Perl6 add that to the core language as well? Where do you draw the line?
LPeg is a library, Spirit X3 (for C++, not yet complete) is a library. Both achieve pretty seamless integration with your code. I think in a library is where this stuff should be.
It's pretty easy (to the extent that implementing custom parsing logic is ever easy) to add custom parsing bits to a Perl 6 grammar.
The grammar is just a special class with the rules as methods, so rules with non-standard parsing logic can be implemented using Perl 6 code. Reusing standard rules from custom rules is simply a matter of calling the corresponding method.
The best example of this is probably the EXPR rule in the NQP compiler (which is in turn used by Rakudo's parser), which inserts an operator precedence parser into the recursive descent of the rest of the grammar.
Perl is a fundamentally different approach to language design.
It's almost anti-academic in the approach and more linguistic. It's superficially like any other curly braced language but there was lots of thought put into how statements are constructed and making things easy to humans to write rather than for computers to process. So it features all kinds of implicit actions and context sensitive approaches to the language and how it works. It's also an amalgamation of several preceding tools and ideas, and in that sense is almost an "English" of the programming world.
Perl is almost more of a human language than a programming language, and like any other human language, once you learn it and some dialects it makes all kinds of natural sense. Even if you're away from it for a long time it comes back like a second language does and you're up and running really quick. It feels less like programming and more like you're having a conversation with your computer friend.
Even small things that you get used to in Perl turn into huge pains in other languages, things like having regexes be a literal type (rather than trying to shoehorn the syntax into a string like in almost every other language) makes wanting to use them and using them second nature and really natural. Having a state machine you can type up in a few characters and be a first class citizen of the language is incredibly powerful.
Perl 6 is supposed to take these ideas and expand on them, lots of clever new language constructs and first-class grammars are exciting new promising notions. It'll be like going from the language a child speaks to the language an educated adult uses.
I'm concerned Perl 6 has missed it's window, but there's enough interesting stuff going on in the Perl 5 community and there's some really smart people working on it that I'm hopeful it'll be more than another language curiosity.
I'd say academic approach to programming languages is anti-scientific and therefore anti-academic on itself. They just don't realize it yet.
> Perl 6 is supposed to take these ideas and
> expand on them
The problem is we already have lots of features in Perl 5 that nobody really needs, they just complicate things, raise entry cost, split community, make it impossible to address performance and deployment issues. So, approach on expanding feature set is flawed and frankly always was.
Instead, Perl 7 maybe should get rid of all the unneeded features, restrict feature set, restrict coding conventions, make it easier for newcomers, make it easier for everyone to understand each other's code, make it faster, easy to compile and deploy without having to install interpreter and so on. These issues are much more important, than language features. And yet no one seems to understand that.
>I associate Perl with inscrutable cat-walked-on-the-keyboard programs and little else.
That's because Perl had a lot of "convenient" shorthand and quirks in the language that could be abused, leading to unreadable, "cat-walked-on-keyboard" code. However, that is just a stereotype. One could also force Perl to straighten its posture with a strict pragma, making much of the eccentricity disappear. I have worked on several large Perl 5 codebases that were/are clean and easy to understand and maintain.
Yeah, the default Perl is more of a slang dialect. Lots of implicit assumptions made about you, the language and your job. Once you turn on strict and use some common sense your code reads more like an school essay, but strangely is just about as easy to work in.
Just like real languages have different modes to communicate in, Perl has it's own modes.
I've worked on a couple large-ish Perl codebases too and with some decent code standard found them really easy to work on and extend.
Perl 6 claims saner defaults. For the strict pragma, it's off by default for one liners and on by default for everything else.
A much bigger relevant change is Perl 6's support for hygienic lexically scoped "slangs". These can be used to relatively cleanly package composable dialects, DSLs, language tweaks etc. Slangs make it practical for a group to establish a default local policy (policies include anything from switching some language tweak on or off to switching to another language entirely) and for an individual programmer to extend or alter that policy in a cooperative manner.
Slangs aren't yet nearly as easy as they supposed to be, but they're getting there. A couple examples are v5 (which switches to another lang entirely) and Tuxic (a tiny idiosyncratic tweak to standard Perl 6):
Perl 6 improves upon Perl 5 in countless ways. One of the strongest parts of perl, the regular expressions, have received further improvements. Check out https://en.wikipedia.org/wiki/Perl_6_rules
Perl had its time and lost many of its users (including me) "thanks" to the inacceptable delay. Meanwhile the competitional advantage of Perl 6 is completely gone because many new features have also been implemented in other languages (Rust for instance), even in dinosaurs like Java and C++.
PCRE wrappers like the module you linked don't give other langs the nice regex integration available in Perl 5, they just give them support for "Perl Compatible Regular Expressions" (hence PCRE), a rough equivalent of P5's regex functionality:
Perl 6 has Perl 6 rules, a unification of PEGs, regex, and lexical closures, built right in to the language. There's nothing like them in Nim, Java, or C++.
> Nim supports direct access to the AST so macros can be used to define new programming constructs like in Lisp.
Nim macros can't modify Nim's syntax.
That constraint makes perfect sense for Nim but not Perl 6.
> ANTLR
ANTLR has switched from LL(star) parsing to what they call Adaptive LL(star) for v4. P6 Rules have been what Larry has called "LL(star) with kludges" (by which he means the same thing) for about a decade. So ANTLR has caught up with that aspect and indeed ANTLR v4 is nice tech.
But P6 Rules are built in to P6. Its grammar is defined in P6 Rules. User code can modify the language on the fly by modifying the rules. Java (or whatever) + ANTLR is nothing like Perl 6 and Perl 6 Rules.
Nim macros can extend Nim's syntax (additional "repeat ... until" for instance). They cannot change the built-in syntax of Nim.
A macro system should never be allowed to change the core syntax of a language because that could lead to very strange errors. If Perl 6 is actually able to do that then it is a dangerous feature.
The real question is: can they get Perl 6 off the ground?
It took 6 years for Python 3 to reach a decent level of usage and recognition (http://python3wos.appspot.com/), and that was with mostly minor language changes.
Perl 6 has been 14 years in the making and still doesn't have a stable version. Mindshare will be very hard to come by at this point.
Well, as you pointed out, Python 3 differs from Python 2 only with minor languages changes.
Perl 6 is drastically different from Perl 5 (though clearly in the same lineage). Not only the language is quite different, but so is the design of the implementation.
If any single feature would convince you to use it, then Perl 6 has them all. (Seriously...pretty much every thing and the kitchen sink is in Perl 6.)
I'm not convinced having all the features will do it, but there are certainly a lot of things to like about Perl 6. It is among the most powerful languages on nearly every axis I can think of.
Note that ปฏิบัติจริง is 9 somethings or 11 something elses.
Finally, move the cursor along the "characters" in either google translate's output field (it's fiddly but works if you are patient) or the Unicode Inspector.
Note that there are SEVEN movements.
What sort of elements are these cursor movements moving over?
Graphemes.
There aren't 7 Code Points. Or 7 Code Units. Or 7 Bytes.
There are 7 Graphemes.
Graphemes are defined in the Unicode consortium's glossary as "What a user thinks of as a character."
There really couldn't be a more fundamentally important aspect of text processing for half the planet than dealing with text at the grapheme level ("what a user thinks of as a character") BY DEFAULT, unless the dev wants to do tricky stuff.
But almost all current langs (including Python 3.x) get this stuff terribly wrong in all sorts of ways.
* Perl 6, by default, stores all strings given to it in NFG form, Normalization Form Grapheme. It's a Perl 6-invented character representation, designed to deal with un-precomposed graphemes properly.
* The Perl 6 C<Str> type, and more generally the C<Stringy> role, deals exclusively in NFG form.
* By default regexes operate on the grapheme (NFG) level, regardless of how the string itself is stored.
So, as far as graphemes ("what a user thinks of as a character") are concerned, Perl 6 gets this basic aspect of text processing right when almost all others get it terribly wrong.
(There are a couple other langs that seem to have made an effort to take graphemes seriously enough. For example, the .length function for strings in Elixir (related to Erlang) returns the count of graphemes by default. And a few like Clojure take graphemes seriously, just not seriously enough.)
So, a significant and rapidly growing chunk of the planet's programmer population are likely to end up interested in at least playing with P6 to see if it gets this bit right (and they'll find it does).
I wonder if that "significant and rapidly growing chunk of the planet's programmer population" will find that an untested and partially implemented feature suffices for their needs in the real world.
To me Perl is the monk's language. Not very friendly monks either. Solitary monks, except when they're talking about the virtues of Perl with each other. Except within intentional cloisters, it's not a good language to use for largescale or outward looking projects.
My last line of Perl for work was a few hours ago. My last line of Python at work was in 2006. I've switched between Perl and Python as my primary language a couple of times in the past 15+ years of working professionally on Open Source software. Also written quite a bit of PHP, C, JavaScript, and POSIX and bash shell.
What does that tell us about the state of the industry? Exactly nothing.
Groovy's being heavily promoted behind the scenes by its handlers at VMWare, everything short of paid adverts. It's been sitting in the 40's on TIOBE constantly since 2007, sometimes higher, sometimes out of the top 50, but hasn't had any consistent uptake since then. It's main use case was with Grails, but like its "inspiration" Rails, Grails is on the decline. Groovy's original use was as a dynamic language with closures for scripting Java classes, but there's now many other options like Clojure where you can define a 3-line macro to eliminate some repeating code that can't be done with a function. Its backers have tried to use their Groovy distribution channel to ship other addons such as DSL syntax (2009), a parallel processing library (2011), static typing and compilation (2012), and (soon) an Android version, but like when this trick is pulled with other software from elsewhere developers aren't biting. Gradle 1.x used Groovy for its DSL syntax, but Gradle 2.0 removed virtually all Groovy code from its internal codebase, probably an indicator of their future plans regarding Groovy.
Overall, use Groovy
* if you're still using Grails
* for quick scripts that your certain won't need to scale
Groovy is one of the best kept secrets of the JVM scripting world. I hardly _ever_ write pure Java if I can do it in Groovy instead. Look at how insanely easy parallel programming is in Groovy using gpars: http://gpars.codehaus.org/
This (theoretically) parallel processes and then puts the results back in order. The X is the cross metaoperator; it applies the following operator (the * symbol which is the multiply operator) to each of the combinations of the items in the lists on its left and right, and does so in parallel if the compiler so chooses, and ensures the results are returned as if it was processed sequentially.
Perl 5 has certainly paid the bills. I have taught it to hot-shot C programmers and mainframe Cobol programmers alike in a community college.
Perl 5, by any modern standard, is, at best, a 'quaint' language.
Perl 6 is literally everything I wanted Perl 5 to be. The incremental data typing is very exciting. The regular syntax is going to make it even easier to teach. And there are so many other well considered and awesome features.
And I just get giddy when I think of the amazing things that really smart people are going to make with Perl 6. It's powerful from the top of its head to the bottom of its feet. And I think that it's going to be a very fast language too.
Thank you, Perl. Thanks to the many people who have made it possible. May my 13+ years of high hopes not be in vain!