Perl 6 Synopsis 5
XaXXon writes: "perl.com has Synopsis 5 for Perl 6 up. It's a brief overview of all the changes made in Larry Wall's Apocalypse 5. Lots of stuff about the new regex syntax. I must admit, however, that I'm getting tired of reading about perl 6 -- I want to start using it." We posted Larry Wall's 5th Apocalypse in May.
... I'll finally be able to make sense of my perl code after I write it?
~geogeek
Perl 6 seems to be a whole new camel. This one's definitely uglier and has two humps.
The Perl community seems to have become something of an inbred group where the only ideas come from people who have been using Perl exclusively for years. While this may be fine for a while, the end result is a jumble of personal preferences and half-baked ideas.
I have been pwned because my
you're on glue. php is useless as a general purpose language, even as a glue language.
or are you one of those wannabes who think web scripting is what coding is about?
Well, go right ahead. From the Parrot VM, the Perl6 engine, page:
Use Perl6--Write some Parrot assembly, and help out!Click here or here.
Looks like a reference in some holy book.
You're a moron. You couldn't "code" your way out of a paper bag.
Go upstairs. Your mom is calling you.
you are simply a fux0ring stupid so-called person.
For instance there is now OO COBOL but the only people that use it are COBOL programmers who are stuck, perhaps because of their company's dictates, perhaps by choice, with COBOL. In the same way perl may be heading towards irrelevance wrt "mainstream" language. I've written commercial perl in the past, it was a pain then and it's still a pain now. The thing is that now there are alternative languages in the same space (python, ruby etc., php for web side) that do the "perl thing" better than perl.
Perl was great, it introduced many people to programming, just like COBOL did. But now it's time to move on. To move on to languages that learnt from perl, that improved on it, that don't have to drag around a syntax and culture that values neat tricks and trying to guess what the programmer really meant over providing the needed building blocks and letting you build code that does what you say, not what it thinks it heard you say. Or even, dare I say it, to move on to languages outside the perl family for some programming and choose the right tool for the job for a change.
I'd prefer to think of this as provocative rather than a flame, there is a difference you know.
yes, imho php is better but what can I do if my prorgammers (here) used perl? if I want to use only php now must I rewrite perl modules or not?
For all of the hub bub and brouhahah, I think after it is released and people start to explore all the new (and old) features, folks are going to find Perl 6 an amazing tool that improves on an already amazing tool set.
With all of the flame wars regarding Perl/Python/Ruby (like triplets calling each other ugly), it's good to see Perl continuing to innovate, improve and set a brisk pace for others to follow.
-- My choice of computing platform is a symbol of my individuality and belief in personal freedom.
Wall has changed the language too much and now more regex changes. Like Pascal when major updates became Modula or later Oberon. Original Pascal was left to evolve on it own. Same with Turbo Pascal when Borland heavily changed it they changed the name to Delphi. Call Perl 6 the new beast that it is.
It seems to me like egos are getting in the way of efficiency here. After all, why re-invent the wheel when we already have python ? Why break all those working perl scripts ?
Ego is the enemy of open source, and here we see why.
Stolen from adequacy.org. I have passed your details along to legal@adequacy.org.
If ya are I'd like some to try.
#sarcasm# Yeah!!! Just what we need more RegEx fragmentation #/sarcasm#
.
Honestly, RegEx hasn't changed much since awk and when it did, Perl usually led the way. The changes though usually just added features or tweaks, my RegEx still basically looked the same though whether I used VIM, Python, ASP, C++, Perl,
Shortly after reading the changes, I was aghast. Sure some of the changes make sense but some are going completely against RegEx as we know them now (getting rid of character classes for one []) . Sure you can use the p5 modifier or do the funky syntax to use [] but the issue is its a radical change.
This is a bad thing(tm). This is going to force all us RegEx people who currently using 4 or 5 different RegEx tools to not only learn minor differences based on each app, but we will be forcec to learn a COMPLETE DIFFERENT subset of RegEx syntax incompatible with anything else.
Now wait you say, Perl has always led the way and other tools seem to use perl compatable RegEx libraries. Not so with Perl6. Have floated this question out on a couple developer lists (PHP for one) and everybody is saying, Perl 6 RegEx support isn't going to happen. They are all happy with the current state of RegEx's. This is especially go to cause hell with PHP's perl_regex functions. PHP has stated they are not going to support Perl6 RegEx. Real perl_regex compatible then huh.
Some the Perl6 changes are pretty good for RegEx, but the complete drop of support for character clases just isn't a good thing (tm).
My 2cents (who is glad at least Larry added the P5 modifier)
De Oppresso Liber
I guess the Christians are going to be waving banners over the naming of this one. Are they going to sue for false advertising when they realize this isn't the Apocalypse the Bible spoke of?
Job? I don't have time to get a job! Who will sit around and bitch about being broke and unemployed then?
php may be better for web based solutions, but perl can be used for everything you can think of, for example GUI apps. and as usual its a matter of taste. use what you like to use. perl rocks! :)
I used to write a lot of Perl scripts and libraries. But I've been cutting back and using other scripting languages instead. Perl6 looks like it would not be a pleasant transition from Perl5; I don't want to have to learn a new, idiosyncratic language every major release. If some of the features in Perl6 turn out to be useful (like the new regex syntax), they will make it as libraries into other languages.
Not at all! Thanks to the money my open source solutions provider is bringing in, I've almost got enough saved up for my very own can of gravy.
Where's your can of gravy, Bill? LOL That's what I thought you Micro$oft loser! Open source rules, OK!
you passed his details? so is adequacy going to sue all ACs hoping they get the right one?
I used to be a big fan of Perl, but I've found that I can typically code any particular application much more quickly using PHP compiled for command-line operation.
Is it just me, or have other's found this? Also, the performance of command-line PHP is quite acceptable.
Only idiots believe that the design of programming languages and other tools, and the resulting choices among these tools, are matters of taste.
Taste is a deciding factor only when everything else is equal, which it almost never is. The intelligent look at the inherent technical merits of a tool, and of course other considerations, such as quality and availability of implementations targetting a given set of platforms.
Perl is, technically, a crap of a language, and everyone knows it. This is not a statement of taste, like someone ``dissing'' your favorite band.
Clarification:
... some syntax seems essential and such, should be unchanging .+*()[] and later {}? ... This modifiers seem to be the core basic syntax of all regex engines. What next, to much a single character we replace . with <!.!> (not real code), or how about * with <%many_not_zero%> ... my point it [] is basic syntax, it doesnt' need changing.
.... Perl 6 is what?
... this seems to me to look like [^[:alpha:]^[:num:]^.*] which is completely wrong (and doens't work)
Never said they are going away. I said you now have to do some completely odd funky syntax to do character classes as we know them.
<[a-z_]> <--sure its only the addition of <> (well not really, because it soon starts looking completely unlike RegEx... [^a-b] compared to <-[a-b]> BUT character classes have alway as long as I have know been []
Now here is my fun Perl6 question.
Before I could do [^[:alpha:][:num:].*]
<-alpha><-num><-[.*]> isn't correct since that is not ONE character class.
<<-alpha><-num><-[.*]>> maybe? (though it also doesnt' look right)
De Oppresso Liber
First - the myths, untruths etc that have sprung up so far.
Perl6 is not backwards-compatible with Perl5 - uhm, yes it is. All your perl5 scripts will compile.
Why not contribute to phython or [insert other language here] well, python will compile through Parrot too, so who cares? If you like Python, write in Python. I prefer $%&? syntax to whitespace-as-syntax, but each to their own, but that is the joy of Parrot. Think .Net CLR without the so-far unfounded feeling that M$ are doing something underhand and nasty that you can't put your finger on. Before someone replies with "Why not just use the CLR instead of Parrot"? bear in mind this has been done to death already. It's in the FAQ, read first, flame later.
But why Perl? Okay, so it can be write-only. But this is only because of the flexibility, There Is More Than One Way To Do It. This includes obfuscated code, and plain unreadable alien transmissions. However - if you're writing code only you will ever see, then use the short-cuts. If you are writing code that needs to be maintained, then YOU the developer have the responsibility to ensure it is readable.
Heck, you could always use english; - but this is perl, you can also code in Latin, or, uhm, Klingon.
Perl is simply the most flexible language out there IMHO. If you're a sysadmin, you will have the Camel and the cookbook on your desk. Our entire environment is held together with Perl. Half the Internet is running on Perl. A dead language? Sheesh, Perl is dead, long live Perl.
If there is anything that does worry me about perl6, it is that it is becomiung too powerful, and too encompassing - it is important that the balance is maintained whereby it remains the Swiss Army Knife of languages, that it remains as easy for the casual Perl programmer to keep getting their job done with simple scripts as it is to create large projects.
Worst...update...ever...
He also goes on to note that the CLR could be a pluggable backend for Parrot to export to.
What a wussy response. So what you're saying is that those languages are all good, except when they're not.
I love Intercal because it destroys all the "they're all very nice" language relativity arguments. Here's a language that's specifically designed to be as annoying as possible. I dare you to advocate Intercal in the same way you did above.
Both the PHP language and its implementation have significant problems. Regular users of PHP already have their own list of language design annoyances ("it has to be a global??") and you can see some of the implementation problems here. You will note PHP's implementation getting beaten by Tcl, gawk, xemacs, and njs. :-(
PHP would have been better off if the implementors had used an existing language like Lua (80k of x86 code for standalone interpreter+core libraries!) and focused on the embedding features unique to the application area.
Well, the grammar/regex isomorphic to class/method _is_ interesting - about the only other language where one could achieve that degree of cleverness and finish before the heat death of the universe is Common Lisp... At least in CL, it'd be readable. Lots of parentheses, but readable...
I must admit to only just having gained a handle on some of the more esoteric features of Perl 5 regex. But I have a definite opinion on the use of the /x modifier on regex - contrary to (what seems like) popular belief, I find it makes regex harder to read, not easier.
Having to mentally scroll a line after each token impairs my parsing of the regex as a whole. It seems much easier to me to compare a sample of the input to the regex, and see how it looks. I realise it won't be mandatory to lay regexes out like this in Perl 6, but it worries me that this is seen as good programming practise. Don't even get me started on people who comment after every token...
Still, there's hope that the introduction of this modifer as the default will work against this mindset, rather than for it. Perhaps with its common usage will come enlightenment amongst the Perl posse. I also notice that Larry doesn't use the monstrously verbose regex form during his Apocalypse. So I'm not really sure whether this is a good or a bad thing - but I'm certain that people in the Perl community need to stop preaching that excessive commenting of regexes makes for maintainable code.
(This probably should have been posted in response to the original Apocalypse 5 thread. Tough titty. BTW, I thought Slashdot would wait for the Exegesis, and how come this is a few days late. Bah, humbug.)
You look beautiful! Incidentally, my favourite artist is Picasso.
LOL
Perl has always had ugly points, but regular expressions were always concise and well-known. And now Wall's ramblings about how he wants to change regular expressions are longer than the entire section about them in the camel book. Doesn't this strike anyone else as ridiclous? Perhaps too many special cases and too many borrowed extensions are being thrown into the language. What an ugly mess it is becoming.
I'm not a big Python fan, but now I'm wondering why I shouldn't just switch to Python now and save myself the grief of having to switch to a completely new Perl-like language later.
No, most likely adequacy will sue slashdot, based on the 'follow the money' principle of legal action.
Seems to be a lot of Perl bashers. Surprising.
:-).
Where I work Perl helps us with System Integration, fast scripting, production reports, database connectivity where speed of writing the application and flexibility in changing that application quickly are important, web sites for change control systems, bug reporting systems, etc. and much much more.
If speed of creating the application and flexibility of changing that application need to be blazingling fast Perl is the choice. If Perl is not going to provide the application speed you need then use C or C++. That is why Perl is written in C
If the Perl code you are reading isn't readible it probably had to be written too fast for the programmer to accout for that or else the programmer simply didn't care. Perl is the most flexible language ever and it can be the most readible if some care is taken. Especially in a smaller size applications.
If the perl 6 regex's have real benefits over the old style of regex's, then everyone else will switch over. Sure it will take a while, but then what improvements in life ever happened instantly?
They laughed at Einstein. They laughed at the Wright Brothers. But they also laughed at Bozo the Clown. -- C. Sagan
While there are countless reasons to adopt Microsoft Visual J#(TM) .NET, these 10 reasons top the list.
.NET can be used by Java-language developers immediately with almost no learning curve.
.NET provides developers with a modern and intuitive object-based type system that eliminates the need for complex and error-inducing pointer and template features found in other languages.
.NET Framework .NET provides developers with access to the Microsoft .NET Framework, a robust, thread-safe library of collection classes, networking functionality, data access classes, and more.
.NET allows developers to deploy and consume rich, interactive XML Web services that reduce development time by enabling software aggregation from any platform.
.NET provides a low-cost route to migrate your Java programs and programmers to .NET-connected technologies and applications.
.NET IDE .NET provides developers with the award-winning Visual Studio .NET integrated development environment (IDE), which includes support for Task Lists, Property Editors, Microsoft IntelliSense®, Forms Designers, and much more.
Number 1
Familiar Language Syntax
If you are already familiar with the syntax of the Java language, why learn anything else? Microsoft Visual J#
Number 2
Multi-Language Aware
Integrate your applications directly with components, services, and classes written in other languages.
Number 3
Object-based Type System
Visual J#
Number 4
Access to the Microsoft
Visual J#
Number 5
Interactive XML Web Services
Visual J#
Number 6
Java Investment Protection
Visual J#
Number 7
Visual Studio
Visual J#
Number 8
Powerful Windows-based Applications
The new Microsoft Windows® Forms Designer enables developers to get their desktop applications to market in less time. New features include control anchoring and docking to eliminate the need for complex resize code, the in-place menu editor to deliver WYSIWYG menu creation, and the tab order editor to provide rapid application development (RAD) organization of controls.
Number 9
Easy Web-based Application Development
Using new Web Forms, you can easily build true thin-client Web-based applications that intelligently render on any browser and on any platform. Web Forms deliver a RAD programming experience for the creation of great Web-based applications. The new HTML Designer delivers IntelliSense statement completion for HTML tags and the separation of user interface (UI) and code enable more efficient team-based development.
Number 10
Simple Reliable Deployment
"No-touch" deployment features make application installation as easy as copying software onto the disk drives of client machines or to the servers in your data center. New applications won't interfere with existing applications. Rich Windows interfaces, once an operational problem, can now be easily installed and serviced using the new Windows Forms technology.
i would just have them spend an afternoon transitioning their skills to writing good PHP, since they are so similar.
Jeremy
and I'm about to drop it altogether - both 5 and 6. Franky, coding Perl can be fun, but maintaining and debugging the code written by somebody else - isn't. THis is the implication of having the language with 'the same thing can be done in a 1000 different ways' and the language whose design mostly depends on Larry's whims - and remember that Larry is a linguist by education, and apparently he has somewhat limited understanding of all the issues concerning the 'production quality' language. So - I'll be taking a closer look to apparently minimalistic and restricted Python. Cheers.
If they're following the money, Slashdot will be the last place they go!
Many people say Perl is too big, has too many features, is too complicated, etc. This is simply false. Perl has tons of features, but, more than any other language I have ever used, you can use as little or as much of it as you want. You can pick up a Perl book and start writing Perl code in 15 minutes.
Perl is ugly, hard to read, "write only", etc. This is complete horseshit, probably stemming from lack of experience with using Perl. Perl is very easy to write and read. Where I work, I have a co-worker who is not a programer. He learned Pascal years ago, but did not do any real coding until recently. Despite this, he can fairly easily read and modify my code. Yet, he can't read or modify my C/C++ code at all, and it's usually very readable, very clean, simple and concise.
PHP/Python is better. A lot of people like to compare Perl to PHP and Python. Neither are "better", there really is no such thing. PHP is for web developers, and Perl can do everything PHP can do in nearly the exact same ways. Take a look at CPAN, there are so many Perl modules for use with Apache and web development in general that Perl is far, far more capable of a web programming language than PHP(IMO anyway). And Python, I've seen some absolutely fantastic stuff written in Python, but I hate Python, because it gives me a frickin headache. I cannot read/write Python, the lack of braces, indentation as syntax is just horrible on my eyes. Perhaps I'm slightly dyslexic or something, but when I'm looking at a page of Python code it all starts to swim and I cannot tell where each code block begins and ends.
Now don't get me wrong, Perl isn't perfect. There are some things that bother me about Perl 5. # for comments, not bad but I really wish I could use C and C++ style comments in my Perl code. A bunch of #'s just look rather ugly. Threads, Perl 6 will have decent thread support from what I understand, I wish Perl 5 did, luckily for me everything I use Perl for I can fairly easily use multiple proceses instead, still would be nice though.
I for one am looking forward to Perl 6. There will definately be a learning curve, but at least it will run most scripts without modification, will make upgrading much easier.
Oh wait... this is /., it's easier to get modded up for bashing something... ok... Microsoft sucks! ;-)
Sticking feathers up your butt does not make you a chicken - Tyler Durden
I don't get why people whine about obvious improvment in regexp engine. First of all: there always p5 modifier to turn on compatibility mode. Moreover do not afraid of complexity of new regexps. You don't have to use all features! Simple things are still easy to do (and even easier). The best thing about new regexps is that they make previously impossible possible.
--
Ilya Martynov (http://martynov.org/)
All others stay away...
Perl for GUI apps? Save us!
If you must script a GUI use somthing that's been designed for it like TCL (another language I hate but it has its uses).
What a load of crap. If it was to Jesus, why is some of it addressed to the seven churches?
You should reread the whole book again.
nice to see something so influential having a go at fixing regular expressions.
If you hate Java as unscalable proprietary lang then use either Python or CLOS/Lisp.
For those who argue about security of object attribute access - that has nothing to do with OOP and with security either. It's just a marketing blob and nothing useful. Hence, Python and CLOS/Lisp are still the choice.
Finally, CLOS/Lisp has not enough portable GUI libraries. Scheme is not OOP lang either. Thus we've left alone with Python. Portable open-source scalable stable-as-old and modern-as improved good OOP (and some FP!) lang Pyhton.
Less is more !
Just thought I'd rerun my previous comment producing post. Despite all of the ranting that generated I think I'll stick with my contention that Perl is COBOL for the 21st Century. In this respect perhaps perl 6 is going to be ADA, a wonderful language with lots of nice features that NOBODY USES. Perhaps abandon the backwards compatibility and design a new language with all of the features that modern languages should have. Surely that's less effort, and time better spent, that trying to maintain backwards compat. with perl 5. I mean, what can't you do with perl 5 now? Will perl 6 attract a single non perl user that perl 5 wouldn't have attracted? I'm sure perl 6 will be a great language, and a great monument to something, rather like
"My name is Ozymandias, king of kings:
Look on my works, ye Mighty, and despair!"
Nothing beside remains. Round the decay
Of that colossal wreck, boundless and bare
The lone and level sands stretch far away.
development.lombardi.com
"new regex syntax" !!? So they want to use regex to attract more programmers?
:)
Would somebody tell me where I can find an application server written in perl? Or IDE? I'm wondering what's the perl good for? CGI!??
The reason that perl is successful is because it's useful. Only time will tell if people think perl6 is useful. If they do, they'll use it; if not, they'll stick to perl5.
Ob regex troll: I think the new regex handling kicks major ass. The new regexes have been promoted to true first-class variables, cleaning up a lot of messy syntactical issues. In addition, everyone who says it's not backwards compatible, well you're right. That's because the current regex libraries SUCK in comparison to the features offered by perl6. That's right, they SUCK, and it would be impossible to be backwards compatible with all the new (useful) features that have been added. If you don't believe the new syntax useful, try backtracking a 100,000 character repetitive string only to discover that the 15th matched number is too large or too small. Now think <{ ... }>.
This post expresses my opinion, not that of my employer. And yes, IAAL.
I agree with this post!
"Any connection between your reality and mine is purely coincidental." -Slashdot
I've read every Apocalypse, Exegesis and, err, "Synopsis" (why the namechange?) so far. Almost everything I've read so far has seemed like a good idea. I've personally run into quite a few of the exact issues they're attempting to solve with these changes. Regexps are just as problematic as the rest of it, and I agree with the changes. And since they're ensuring reverse compatibility with every aspect (usually via a flag), even if I didn't like a particular aspect, I wouldn't have to use it.
Frankly, I'm looking forward to it. Parrot is nice, and if it weren't for the memory management issues from string-scalar registers, I'd be seriously looking into implementing it in hardware, but its still not too impressive without the Perl6 parser. So I'm waiting patiently, but I feel it'll be well worth it.
The changes may seem like a lot, but far more will actually be staying the same. Perl's already by far the easiest language for me to implement things in (and I've given basically everything a good try), and it seems as if this batch of changes will solve the few remaining rough areas. Except the learning curve - I think BASIC (for initial concepts) and Pike (for C syntax and functional structure) still have it beaten in that area. Still, it's kinda funny how many apparent perl-haters (old perl and new perl) there are, posting to a forum thats, err, written in Perl =)
Paranoid
Bwaahahahahaa.
Lisp hasn't enough portable GUI libraries???
Lisp has: CLIM (great), Gtk (usual crap), CLUE/CLIO, Garnet (great), CLM (Motif...), CommonWindows, etc,etc,etc - in fact, lisp is a playground for new GUI technologies...
A disclaimer cannot change the law. Slashdot may like to think they are not responsible for their content, however a court of law might well disagree with them. They have removed stuff in the past (scientology stuff) and they will remove stuff in the future.
Wow... you totally blew your credibility with that one! ;D
Umm, TCL was not designed for GUI scripting. John Ousterhout desinged TCL in the spring of 1988 as a generic command language, to replace the command languages for various different tools used mainly for integrated circuit design. It had nothing to do with any sort of GUI whatsoever.
Tk was spawned out of his frustration with Apple's HyperCard system and his belief that a "shared scripting language" could provide the glue to tie together components that a small group such as a university research team could build up over time. Plus, I personally suspect, his desire to reuse Tcl for more than its original design.
Pick up "Tcl and the TK Toolkit" by John K. Ousterhout published by Addison-Wesley. The info above is gleaned from page xvii, the first page of the preface...
BTW you suck too
and what about ruby