Slashdot Log In
What is Perl 6?
Posted by
ScuttleMonkey
on Tue Jan 17, 2006 01:34 AM
from the it-all-started-with-a-camel dept.
from the it-all-started-with-a-camel dept.
chromatic writes "Perl.com has a new article entitled What is Perl 6?. It analyzes the changes to the language in light of the good and bad points of Perl 5 and provides new information about the current state of the project: Perl 6 exists, you can write code in it today, and it's more consistent and easier to use than Perl 5."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
What is Perl 6? (Score:2, Insightful)
(http://slashdot.org/~eldavojohn/ | Last Journal: Tuesday October 16, @03:26PM)
Yeah, I know I'm late to get on this but
Re:What is Perl 6? (Score:5, Interesting)
So is Perl 6 going to bring about a Perl revival, or is it (as I suspect) going to fall flat when faced with Perl 5's quietly entrenched support and PHP's proclaimed grip on new uptakers? TFA mentions the reasons for cutting backwards compatibility (or at least reducing its priority) far too often for me to be optimistic there.
I think Perl 6 will catch on, eventually... but it's going to be more of an alternative language, not an upgrade, to Perl 5 for a long time yet.
Re:What is Perl 6? (Score:4, Insightful)
(http://marshallbrain.com/manna1.htm)
But if you need to do a longer project, pick up Programming Perl and read it (from front to end). Without that book, Perl can just be extremely weird, after reading the book it at least makes sense in its own world, no matter how unconnected that world seems to be to the rest of the universe :-)
unfortunately (Score:5, Funny)
(Last Journal: Sunday November 06 2005, @11:51PM)
You can never be told what Perl is.
You just have to see it for yourself.
sorry, i just had to.
Re:unfortunately (Score:5, Funny)
You just have to see it for yourself.
Is this [thiesen.org] what you saw?
What is perl? (Score:5, Funny)
Don't hurt me
No more
TFA (Score:2)
(http://www.pheed.com/)
No language that I like better (Score:5, Interesting)
Then I met Perl (5.003). What a difference it made! The data structures were built in, and on top of that, it was EASY to nest structures to build complex data types. It was like having a semester of Data Structures immediately made clear.
Then I found myself back with C++ again. First I wrote my own List classes. However I soon realized that STL made available exactly the types of data structures that Perl has. Maps, Lists, Vectors. And since I understood what I was doing in Perl, it was so much easier to catch on with C++.
Perl taught me C++. Who would have thought?
Re:No language that I like better (Score:5, Funny)
Somewhere, a maintenance programmer just slit his wrists.
Re:No language that I like better (Score:5, Funny)
Another is swallowing a bullet, while a third fell on his sword. There's more than one way to do yourself in!
Re:No language that I like better (Score:5, Informative)
Right now i found all i needed in the Perl.org site - this OO tutorial [perl.org] for Perl is pretty complete. There's also this one [perl.org], which is oriented to begginers.
In fact, i always keep a browser window open to Perl.org when i'm coding Perl - the tutorials are very nice, but the function reference has been priceless to me.
Re:No language that I like better (Score:4, Interesting)
In C, you do this with functions in a
In C++, you put the data and the functions together in one package and call it a class. Think of a class as a C struct with a bunch of function pointers in it. So instead of calling myfunction(mystruct) you call myclass.myfunction(). Its conceptually the same (in fact, the machine code is almost identical).
By now you should be thinking "damn, that sounds like what I do in C already". It is. Good C programmers did OOP before OOP was a buzzword. languages like C and Java just add some syntactic sugar like inheretance (one of the most abused language features ever, especially in Java) and autoatic constructiors and destructors into the mix.
What is Perl 6? (Score:3, Funny)
(http://rob.axpr.net/)
New Perl excitement (Score:5, Insightful)
(http://www.chrisdolan.net/)
What Perl 6 offers is a rejuvenation of the language. Perl 5 still works great (better than ever due to new efforts to stamp out even the most obscure bugs) but this new revision is attracting some *really* smart people who are bringing interesting new ideas to the language. Audrey Tang and Luke Palmer come to mind right away.
My greatest hope, however, is not that a revitalized Perl will squash the other dynamic languages (Python, Ruby, PHP, ECMAScript, etc) but will instead bring them into a state of interoperability. I really, really want Parrot to succeed so well that the other languages decide to target it as a backend so I can trivially call Python or C libraries from Perl and vice versa.
Re:New Perl excitement (Score:5, Insightful)
Neat, yes, but It's not pleasant to read... (Score:2)
starting from the bottom (Score:1, Interesting)
They add features, which already exists in some other language, only they maybe improve the interface, or add any sort of incremental improvement to it.
My problem I see, they didn't start with a dream, which became a vision, which became a mission, which transalted to goals, and then a solid implementation.
If you are already familiar with strategic management, you will noticed I borrowed some terms, from that field. Strategic management suggest that for an organization to succeed, it must have a clear vision (based on a dream a good cause or whatever), a mission (a more realistic translation of the vision/dream) , and finally goals and objective (implementation detail)
So I ask, what's perl6 vision, I think perl6 started with details, this is why me and many others are not existed about it, sure it will better (maybe), but it won't be new, and probably it won't add much to the technology arena.
One thing perl is still good for. (Score:2, Insightful)
(http://www.ktfcc.com/)
Perl 6 is evolving the language into awesome! (Score:3, Interesting)
(http://inoshiro.com/)
"(Perl 5 overloaded curly braces in six different ways. If you can list four, you're doing well.)" ! Java has something like 22 levels of precedence. Most people will use the bare minimum of that, lest they tread upon a dragon's tail.
And, one of my favourite points: "Why is the method call operator two characters (one shifted), not a single dot? "
Perl 6 means a simpler, better parser, while keeping all the language strengths. This means it won't be such a bitch to deal with mod_perl's weird gleeps once it's Perl 6. This means smaller process overhead. This means quicker development of web applications that are cool (although I must admit, Ruby on Rails is also pretty neat looking).
The new regex syntax alone is reason to switch!
Re:Perl 6 is evolving the language into awesome! (Score:4, Insightful)
And a dot suggests a decimal point. Plus or double bar are used as concat
almost everywhere else. Using a dot was not very logical. But I guess that
follows the general philosphy of perl syntax anyway.
Re:Perl 6 is evolving the language into awesome! (Score:4, Informative)
(Last Journal: Saturday January 06 2007, @01:13AM)
"1"."2" eq "12"
and
1 + 2 == 3
If a loosely typed language is using + for concatenation, it's poorly designed (you'd end up typing more to specify what you want done).
You need to know that the concatenation of two variables is not the same as adding them together.
Slightly relieved that Perl 6 switched from using underscore to tilde for concat - underscore is overloaded with so many other tasks already. Unfortunately ~ still requires shift to be pressed on my keyboards, but I guess they are running out of symbols, and at least I think ~ won't require you to keep putting spaces around it to disambiguate it from other meanings.
Q. What is Perl 6? (Score:5, Funny)
(http://www.withano.com/)
Who cares what Perl 6 is.. (Score:2, Informative)
(http://amarok.kde.org/blog/categories/1-markey)
WHOOPITUPTITUDE! (Score:4, Funny)
(http://reidyoung.com/)
From TFA:
Whipituptitude?!
That is awesome. Made up words a--
Whats this? Manipulexity?
How much awesome can you cram into a single sentence?
Re:The funny thing is... (Score:4, Funny)
(http://www.ki.se/ | Last Journal: Tuesday August 28, @07:06AM)
* In TFA1: whipituptitude
* In TFA2 referenced from TFA1: whipuptitude
With Perl, there is always more than one way to spell it.
My short experience with perl... (Score:3, Insightful)
I knew what I wanted to do, but needed to learn the language. I struggled with the awful syntax for three days. The breaking point came when I wanted a list of lists and realised that Perl "flattens" nested lists. How do you write nested lists such as [[1,2],[3,4],5,[6,7,8]]? In Python, it's trivial (that's how you'd write it), but in perl, nobody I talked to could give me an answer. It flattens it, unasked, to [1,2,3,4,5,6,7,8] and, try as I might, I can't see the point. (It turns out it's possible to have nested lists, but it's yet another example of perl's horrendous syntax).
Finally, I decided to give python a try. I spent an hour reading the python tutorial, and in another three hours, I had reimplemented everything I'd done in the last three days in perl, and an hour after that I'd finished the job. Python syntax was, and still is, the cleanest I've ever seen. It's an amazing language. And it changed the way I think about programming: it gave me an appreciation of functional methods (I now use ocaml [inria.fr] a lot) and also changed the way I write C (vastly for the better).
That was it. No more perl for me.
Re:My short experience with perl... (Score:5, Informative)
Intuitively, a new user would look at the TOC and see perldata "Perl Data Types" and think that the complete definition of the 3 main Perl data types would be described. So rsidd looks for instructions on creating multidimensional arrays, sees "List value constructors" and gets this:
So they head over to perlref (an extra level of indirection) and notice in Item 2:
But this isn't really easy to understand. Why does he need an arrayref when he wants an array?
@array = [1, 2, ['a', 'b', 'c']];
That isn't the same as what he wants. In fact, it's not what you'd expect from DWIM. It's a single entry array, not a multidimensional array. It's not even a list of lists (unless you perform a little magic on it).
So finally after struggling with this and ending up with some ugly monstrosity like the following:
@array = @{[1,2,\@{['a','b','c']}]};
Now his code works, but it isn't very easy to understand, and the maintainers of this code are going to tell everyone how evil and illegible Perl is because the programmer here couldn't figure out how to make a multidimensional array.
The only FAQ entry with the term "multidimensional" in it refers to some DBM-specific topic that doesn't seem to have any relation to the problem at hand. While "list of lists" may be the preferred term in the Perl community, it would be nice to have a FAQ entry like "How do I create a multidimensional array?"
As you've mentioned, perllol has the exact syntax of how to do this. Unfortunately for our poor programmer, the link to that is buried in the See Also section alongside perldsc (which is large and contains quite a bit of irrelevant information like 'use strict' information, while at the same time not providing very detailed information about the data structures themselves). The very first 'perldoc perllol' page displayed gives the answer immediately:
Why is it so hard to get to this simple explanation? Why should a neophyte have to go through two documents to finally get to perllol? The FAQ should describe the technique using "multidimensional" as a keyword.
I love Perl, and I love the depth and breadth of the Perl docs, but they are difficult to navigate for Perl neophytes.
Re:My short experience with perl... (Score:4, Insightful)
Having used python for about 3 years now, I'm yet to find something that I can't easily do in it, that I can in other languages. Except for speed/numbercrunching issues. And then I use ocaml (for new code) or C (for existing code). Even if I liked perl syntax and hated python's whitespace-significance (I don't and I don't), I imagine I'd have migrated to ruby by now.
Actually, the really cool feature of Python, one that I use all the time now, is "list comprehensions" -- an idea stolen from Haskell, and as far as I know, no other language has it. You can't do anything with it that you couldn't with map() and filter() but it's a much more elegant way of writing things -- just the way mathematicians would with sets.
Re:My short experience with perl... (Score:5, Informative)
(http://cliveholloway.net/ | Last Journal: Saturday February 28 2004, @05:54PM)
Oh please.
"Especially when every perl doc I see around tells me to use curved parentheses for lists, and @ prefixes for variables that refer to them..."
How hard did you look, really? If you go to Google and type in perl list of lists, the FIRST link takes you here [perl.com].
And within 1/2 a page, you see this:
Damn anti-Perl trolls :-)
Re:My short experience with perl... (Score:4, Funny)
Perl 6 is (Score:3, Interesting)
(Last Journal: Sunday July 16 2006, @03:31AM)
It's a new language built by rewriting an ugly, old hack, that only fans of the old version will probably ever use. Everybody who didn't like Perl already moved on.
10 Years Overdue (Score:4, Insightful)
Re:10 Years Overdue (Score:5, Informative)
(http://wgz.org/chromatic/)
Did you read the same article I wrote or is your post from the mysterious future? Larry announced Perl 6 in the summer of 2000.
Hiring here. (Score:5, Funny)
(Last Journal: Thursday August 21 2003, @11:52AM)
We need 5 years experience Perl 6 programmers for 3D game. Reference: P6DNF.
Alternative to perl6 (Score:1)
(http://qoretechnologies.com/qore)
Even compared to perl6, qore has cleaner object support (IMHO), also features exception handling, embedded logic support, and more. Qore has a syntax superficially similar to perl's (except for the OO parts), but less scripty and more like C++ or Java's syntax in some ways.
It's even possible to write pure OO programs in qore (the program is a class), like:
http://qore.sourceforge.net/examples/xml-rpc-clie
Anyway of course if has drawbacks compared to perl as well (it is a realtively new language), but, as it was designed to write interfaces in and to be fun and efficient to program in, some perl fans may still like it, as it also addresses some of the shortcomings of perl5 at least from my point of view, and, after reading this article, I believe it has advantages over perl6 still as well in some areas (can't comment on the threading model, because I couldn't find any reference to it in the article, but qore has a clean shared-everything threading model and the whole language is thread-safe - also qore data structures are very simple and powerful and it's very easy to serialize and deserialize data to and from XML strings, SQL queries, TIBCO AE messages, etc which makes it a good tool for interface development).
Anyway, here are some links:
http://qore.sourceforge.net/ [sourceforge.net]
http://sourceforge.net/projects/qore/ [sourceforge.net]
(disclaimer: I am the author of the language
PDL (Score:5, Interesting)
(http://ered.info/)
I had to break down a equation into a sequence of linear equations. So I hacked up some PDL in like 2 hours to do that. Couldn't have been easier, even though I'd never used PDL or its perldl perl shell; I just started typing in the interactive shell until it worked as expected and until I knew what I was doing. Then I needed the results in interger, so I rounded everything down, built a permuter and sorted the permuted results for each individual segment. That took three hours, but only because I kept botching the matrix multiplication. Even with huge datasets, generating hundreds of thousands of linear equations, each spanning dozens of datapoints, permuting the linear equations, sorting them and selecting the optimal, PDL would run it all my slow arse 800mhz crusoe laptop in seconds. Matlab couldnt touch it.
Thats the other really truly thing about PDL; the performance. If someone else would chime in and do it better justice, but my crude understanding is that it generates some kind of extremely optimized machine code on first use and runs whatever equations you've thrown at it like silk from that point on.
Little late and a little off topic, but PDL really is just a masterpiece of perl hackability. The PDL perl shell is truly spectacular; get some symbolic integrators and differential equation solving packages in there and I wouldn't need to break open Mathematica or Matlab ever again. Ok, long way away, pdl is really just about matricies, but it is really really sweet, and its shell is good for anyone who just wants to try something out really quickly in fully interactive perl.
That being said, I really cant wait to see where the perl6 VM is going.
G'night!
Myren
Perl 6 ~= LISP (Score:3, Interesting)
(Last Journal: Tuesday October 30, @01:08PM)
The question is: is Perl becoming a LISP implementation?
PUGS (Score:4, Informative)
(http://www.thebrickt...assacre/jg21_11.html | Last Journal: Tuesday December 20 2005, @06:19AM)
Apparently they are having a lot of fun.
Perl is between awk and C (Score:3, Insightful)
I keep waiting for a task where it would make sense for me to learn perl... it's never come along.
Meditations on Perl 6 (Score:5, Funny)
(http://www.axisoftime.com)
Perl 6 may be more akin to a divine programming language, which makes the implimentation of complex data structures simple and sublime. Then again, it could all be a nasty trick to lead us away from the true path of enlightenment.
Perl 6 is not
Perl 6 is not controlled by any major corporation; I haven't decided whether this is advantageous or not yet.
If I were to have a child, would it be written in Perl 6?
Can Perl 6 be used to unlock the secret mysteries of the Bible code to reveal the end times?
Is Perl 6 really being developed by the descendants of Jesus Christ? Is the Pope trying to cover it up? Does the Pope know what Perl is? If so, is using Perl 5 a sin? How about Perl 6?
I bought a preview book on Perl 6 a few years ago. Is it still useful? Can I have my money back?
If Ruby was an upgrade to Perl, and Perl 6 is a an upgrade to Perl and Ruby, will Ruby need to changes their name in such a way as to play off of Ruby Tuesdays?
If I enter the Perl 6, can I change my mind later?
If Perl 6 is brillian, but no one uses it, is it still brilliant? What if it's awful and everyone uses it?
So very tired....
Old and tired Camel (Score:1)
With hacked on OO, CGI that is painful - there is little reason to revisit, because looking at Perl 5, and Perl 6 - they look completely different.
Thank god for new things like this [ruby-lang.org] to keep [python.org] one amused [php.net].
My latest web development platform, is Ruby on Rails. I was a sworn Perl, PHP guru until I started using this puppy - its absolutely amazing. Everything else is just too tiring..
Oh my god, let the flame wars begin!
link kills browser (Score:1)
(http://www.theworldwidewebguy.com/)
Which book for starting with Perl 6? (Score:2)
(http://www.christopherculver.com/)
About 3 years too late (Score:4, Interesting)
I really hope that Perl 6 arrives one day. I'm pretty deep into using Ruby these days having left Perl 5 behind long ago (the part of the article about what's wrong with Perl 5 was really superfluous; maybe it was intended to convince the remainingn Perl folks who are happy with 5 to check out 6), but I'll give Perl 6 a look when it arrives. The grammar support alone looks pretty awesome; it'd be great to have a viable lex/yacc alternative. In the meantime I want to learn some languages that have a bit more immediate promise like Io [iolanguage.com]. It seems that maybe the plans for Perl 6 were just too ambitious. Yes, it's great to start with a clean slate and try to revolutionize, but often it's evolution that wins out.
Is this the last revision? (Score:3, Insightful)
(http://powerlord.livejournal.com/)
In other words, the spec still isn't nailed down. I may have only been been loosely following Perl 6's progress, but having seen the concatention operator change from . to ~ to _ during Perl 6's development, I'll wait until the final spec comes out, thanks.
Perl What? (Score:2)
perl 5.8.
Come on now, how long as Perl 6 been in beta? According to this page, [perl.org] it's been an ongoing effort for at least 3 years, and the oldest link on that page talks about how long it's been since a Perl 6 update!
It's like waiting for the next release of Debian - don't hold your breath, don't delay your shower. Check back when your grandson has his first kid.
Rewrite (Score:2, Funny)
(http://slashdot.org/)
Some much better... (Score:3, Interesting)
(http://dev/null/)
Some thing are just so easy there's no pride in it. Now make something more wich is harder to read then Perl 5 and you've achieved something. It may be better, but is it good?
The real question is: who cares? (Score:1, Interesting)
Then, we have CPAN - the mangled mess of packages which makes fedora's rpm system look well managed.
And the worst bit: the perl zealots who insist of using this language for everything, even when they have to jump through hoops to get it working.
If perl was wiped of the face of the universe tomorrow, I for one would cheer!
Perl6's direction (Score:2, Interesting)
(Last Journal: Friday March 31 2006, @10:51PM)
Obligatory Muppets Quote (Score:3, Funny)
(http://www.igrill.co.uk/)
The Question is "Who Cares"
Perl 6 = COBOL 9x (Score:3, Interesting)
(http://www.scottmcmahan.net/)
hand waves a lot... (Score:1)
(http://www.badstep.net/ | Last Journal: Tuesday December 30 2003, @06:04AM)
One-word answer (Score:2)
(http://www.jasonlefkowitz.net/)
Late.
Too many changes all at once (Score:2)
The developers honestly should have started with the P5 code and incrementally made changes, eventually making sweeping changes.
Even after saying all of that, I'm still looking forward to P6, but I fear it may be a long wait. Long enough that I'm using Ruby and Python more and more.
Re:Too many changes all at once (Score:4, Insightful)
Think about it. Larry Wall accepted numerous RFCs from programmers of all walks, discussing Perl's problems / desires for new features / suggestions for new implementations / ideas how to change the syntax. He commented on each one, indicating whether (1) he agreed with the problem, (2) whether he agreed with the solution, (3) what, if anything, he thought should be done about it.
In the mean time, a radically new language glue system is introduced - Parrot. Perl had such wild success with XS - granted, Parrot isn't just about making language A talk to language B, but it's certainly an example of natural evolution.
As for Pugs, it's been fantastic. It's allowed lots of people to write real and working Perl 6 code (including lots of tests) to evaluate all aspects of the Perl 6 design before it goes into production.
Now, I'm not addressing you directly with this last part; rather, a greater community of Slashdot trolls. If you don't feel like Perl is for you, or if you feel like Perl is no longer for you, fine. Find your way to Ruby, Python, Java or whatever floats your boat.
But please, it's getting really goddamned irritating to have to sift through the comments of a handful of armchair morons that sit at home, interfacing with something called "comments.pl", eating doritos and talking about how the greater Perl community should just drop everything and go to language X, or repeating a tired meme about how the language is making no progress at all (when all they need to do to see the massive progress is read Audrey Tang's blog or visit pugscode.org). And then, there are some mods that feel it appropriate to mark clueless jabs as "insightful".
I am thankful of one thing - Perl's momentum. While everyone else is barking about how (name my scripting language) is great this week for doing web pages or some nonsense, there is still a huge community of devoted, bleeding edge language researchers and smart people, chisel in hand, forming Perl 6 from the rocks.
And while the naysayers are switching languages once a week as they make incremental advantages over eachother -- while they're totally clueless that so many of the 'advancements' in their own languages over the years have been 'borrowed' from or 'inspired' by perl, the aforementioned language scientists are preparing to do once again what Larry Wall did, intentionally or not, when he released Perl on the world - bring about a revolution.
The better question (Score:2)
A better question would be: WHY is Perl 6?
(and don't say "because 7 8 9", because that's the wrong answer.)
I for one... (Score:2)
(Last Journal: Wednesday July 28 2004, @09:50AM)
BTM
What is Perl 6? (Score:2)
(http://www.pobox.com/~meta/ | Last Journal: Sunday February 29 2004, @09:19AM)
Just one question (Score:3, Interesting)
Some of us have predecessor's code to use and maintain that do the darnedest things, you know. A bit of protection from the madness of others, that's all I'm asking for.
Target the CLR (Score:2)
(http://mspong.com/)
Yeah, yeah, Microsoft bad, and so on. Fuck that. They need to be practical instead of dogmatic if they want to get this language accepted and used, and targetting the CLR would be a perfect way to do that.
-Matt (who was excited about Perl 6 half a decade ago)
Re:Python (Score:1)
(http://www.faqs.org/rfcs/rfc3675.html)
Re:What is Perl 6? (Score:2)
It's when some reviewer said Tron was the Matrix of the eighties.