Slashdot Mirror


What is Perl 6?

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."

343 comments

  1. What is Perl 6? by eldavojohn · · Score: 2, Insightful
    What is Perl 6?
    Probably a pretty good sign I should get off my ass and spend some time learning the language if I don't want to become obsolete to my employer.

    Yeah, I know I'm late to get on this but ... well ... my personal needs and job have never forced me to use it.
    --
    My work here is dung.
    1. Re:What is Perl 6? by Perey · · Score: 5, Interesting

      That's the thing, though. PHP is the big name (from management's perspective), at least in the P category of LAMP, right now. Not that Perl's gone away by any stretch of the imagination, but the existing Perl shops are happy to keep on doing what they're doing, while the PHP advocates crow about how many new jobs are being done in their language.

      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.

    2. Re:What is Perl 6? by Anonymous Coward · · Score: 0

      perl 6 is an absolute waste of time....

      Go with the strength.... Go with .NET!

    3. Re:What is Perl 6? by slashdotnickname · · Score: 2, Interesting

      Probably a pretty good sign I should get off my ass and spend some time learning the language if I don't want to become obsolete to my employer.

      I'm sure if your employer starts needing perl solutions, they'll buy you a book. It's not that hard to pick up if you come from a programming background. I once got tasked to modify a perl script, and was able to learn enough perl to get the job done within an afternoon. Been a fan of it ever since!

    4. Re:What is Perl 6? by l3v1 · · Score: 1

      Well, you most probably wanted to say Ruby, Perl's neater nephew. I mean check the dates.

      It's when some reviewer said Tron was the Matrix of the eighties.

      --
      I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
    5. Re:What is Perl 6? by Scarblac · · Score: 3, Insightful

      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 :-)

      --
      I believe posters are recognized by their sig. So I made one.
    6. Re:What is Perl 6? by Colonel+Panic · · Score: 2, Insightful

      Probably a pretty good sign I should get off my ass and spend some time learning the language if I don't want to become obsolete to my employer.

      I suspect your manager (if s/he is a typical manager) hasn't even heard of Perl 6.

      Perl 6 is still vapor at this point. It's probably still a year or two away (and may be perpetually, unfortuneately). Yes, there are cool ideas there and you might want to be familiar with some of the highlevel concepts. But if you really want to study some new languages that will help your employment prospects you'd probably be better off learning Ruby at this point (that Rails stuff is really taking off). If you want to learn something on the leading edge you might even want to consider learning Io No books for Io as yet, but it seems to be be generating buzz among the early adopters (the sort of folks who were using Ruby five years ago).

    7. Re:What is Perl 6? by beef3k · · Score: 2, Funny

      Last I heard it was a long forgotten dialect of Klingon.

    8. Re:What is Perl 6? by Anonymous Coward · · Score: 0

      Isn't that also the definition of pornography?

      I guess this is the next form of cultural expression after Perl poetry...

    9. Re:What is Perl 6? by chriseyre2000 · · Score: 1

      Perl is extremly wierd. Get over it.

    10. Re:What is Perl 6? by hattmoward · · Score: 1

      What vapor? Sure, this isn't the real implementation, but it's certainly better than imagining that you're writing Perl 6 after reading a book on it. PUGS is finding implementation obstacles and speeding up the Parrot implementation of Perl 6. I don't think I'd use it for production work, either. People are already porting CPAN modules, too.

      Ruby is a great language, and I do recommend having it and some familiarity with Rails under your belt, but stay away from the abomination that is PHP. *points to wretched soul* Look what happened to him...

    11. Re:What is Perl 6? by jonadab · · Score: 1

      > 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 :-)

      Has it ever occurred to you that maybe it's the rest of the universe that's weird?

      (Okay, okay, so maybe *I'm* weird... Nah, couldn't be. Thinking in Perl isn't weird, is it?)

      --
      Cut that out, or I will ship you to Norilsk in a box.
    12. Re:What is Perl 6? by CRCulver · · Score: 2, Informative

      If you want to learn something on the leading edge you might even want to consider learning Io No books for Io as yet, but it seems to be be generating buzz among the early adopters (the sort of folks who were using Ruby five years ago).

      I've heard of Io before, but I find it hard to take a language seriously if it has its own UI toolkit. That for me implies a lack of abstraction, a philosophy of micromanagement, and--since there's already plenty of existing UI toolkits for which its a cinch to write bindings--a sentiment of Not Invented Here. Let the language be designed so that it steps out of the user's way on many fronts and encourages him to code with whatever already-available libraries might be available.

      FWIW, if the OP wants to learn another language beside Perl 5 just in case he were tasked to maintain some outside project, I'd recommend Python. O'Reilly's Learning Python and Programming Python are dynamite books.

    13. Re:What is Perl 6? by ultranova · · Score: 1

      I've heard of Io before, but I find it hard to take a language seriously if it has its own UI toolkit. That for me implies a lack of abstraction, a philosophy of micromanagement, and--since there's already plenty of existing UI toolkits for which its a cinch to write bindings--a sentiment of Not Invented Here. Let the language be designed so that it steps out of the user's way on many fronts and encourages him to code with whatever already-available libraries might be available.

      The problem with bindings is that it requires the user to install more software besides the runtime. Each piece decreases the chances that the user will bother jumping through the hoops, and increases the chances that some piece of the puzzle is too old / too new / compiled with a different compiler version / just doesn't like some othe piece.

      Then there's the matter of toolkits being designed around some paradigm, be it procedural or object-oriented or whatever. If that paradigm doesn't match the paradigm the language is based on, using that toolkit is going to be a pain. Unless, of course, the bindings wrap the toolkit into some friendlier (to the language being used) paradigm - but then there's very little reason not to go all the way and reap the benefits of not depending on any external toolkit at all.

      Besides, if it is so easy to write bindings for some toolkit, then go ahead and write them. The language having its own UI doesn't stop you from using bindings to some other one (assuming, of course, that the language supports using external libraries at all).

      Oh, and I haven't used Io, these are just general thoughts about various libraries and programs I've come accross. Generally speaking, the more dependencies the program has, the more of a pain it is to hunt them all down, and the bigger chances that some simply refuse to work.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    14. Re:What is Perl 6? by BigCheese · · Score: 1

      I would love to get away from PHP and use more Python, Ruby, Perl, what have you except all the cheap hosting solutions have the canonical shared Linux/Apache/MySQL/PHP setup and not much else. OTOH, if I had to setup something on a dedicated server I'd probably go with Django.
      Not that I hate PHP. It's just the horrible PHP code you find all too often. Hopefully frameworks like Symfony will change that.

      --
      The obscure we see eventually. The completely obvious, it seems, takes longer. - Edward R. Murrow
    15. Re:What is Perl 6? by grcumb · · Score: 1

      "Perl 6 is still vapor at this point."

      Not true. It could qualify as pre-Alpha, perhaps, but there's a working Perl 6 compiler (written in Haskell, of all things!), thanks to autrijus.

      I recently sat down with a friend who's on the Perl 6 documentation team and she showed me a few of the new features in the language.

      The fact that its designer, Larry Wall, is a linguist by training and inclination makes Perl a language that is as powerful and elegant as the author's ability allows. This means that yes, it can be used to create gibberish (and so can English, for that matter), but it can also be made to express things that would be significantly more difficult in other, more inflexible languages. Perl 6 represents a significant improvement in this regard.

      I'm especially excited by the ability to create regular expression 'grammars', which are, IMO, going to revolutionise markup and natural language processing. In other words, Perl 6 promises to significantly increase the strengths of Perl 5, and to build on its capabilities.

      Perl 6 doesn't ignore advances that have happened elsewhere in the programming universe. Data typing is now possible, and different data types have their own intrinsic functions now, which will allow programmers coming from java, etc. to do things they consider intuitive, like invoke the length property of a string.

      It's unfortunate that Larry's poor health rendered the development of this new version such a slow and painful thing, but that doesn't at all mean that Perl 6 doesn't exist, or that it will be a museum piece before it sees the light of day. If you're a programmer working with a lot of textual data, Perl promises to remain just as useful and important as it has ever been.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    16. Re:What is Perl 6? by budgenator · · Score: 1

      there is some horrible php code that I wrote that may end up redone in symphony; thanks for the link.

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
    17. Re:What is Perl 6? by mferrare · · Score: 1
      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 :-)


      Read all of it? Blimey, I was writing my first code after just reading chapter 1! I was a shell script programmer and ch1 was enough for me to get into perl. It's a fantastic book and well laid-out. Read the 1st chapter and you'll be right. Excellent overview.

      --
      Why would anyone want to use a text editor that is not vi?
  2. unfortunately by caffeinemessiah · · Score: 5, Funny

    You can never be told what Perl is.
    You just have to see it for yourself.

    sorry, i just had to.

    --
    An old-timer with old-timey ideas.
    1. Re:unfortunately by EnsilZah · · Score: 1, Funny

      Heh, yeah.
      And once you see what the code looks like, you'll be willing to betray your friends and family to forget you ever knew about it.

    2. Re:unfortunately by dartarrow · · Score: 0, Offtopic

      ** WHOA~

      --
      I love humanity, it is people I hate
    3. Re:unfortunately by value_added · · Score: 4, Funny

      You can never be told what Perl is.
      You just have to see it for yourself.


      Is this what you saw?

    4. Re:unfortunately by Anonymous Coward · · Score: 0

      If only I had taken the blue perl

    5. Re:unfortunately by Julian+Morrison · · Score: 2, Funny

      That's almost right, except that it doesn't quite capture the depth of wierdness. Lets label that beastie a "knuffle". The picture shows one regular sized knuffle, and a casual glance shows perl 6 looking rather like that. In truth though it's more like a fractal aggregation of nano-knuffles which can be morphed into more or less anything else. In fact, apart from the initial morphing commands that initiate the change (lets, say, the antlers), it needn't look anything like a knuffle at all. So perhaps you see a python with antlers, or a cup of coffee with antlers. In fact the antlers can be hidden in hardlink magic, so /usr/bin/perl starts out looking like your regular perl 5 camel.

      I don't actually disapprove of perl 6. If I were a lot cleverer, I might even be able to understand it. But it's a fearsome and alien creature, and I wouldn't use it to do paying work.

    6. Re:unfortunately by Valdrax · · Score: 1

      You can never be told what Perl is.
      You just have to see it for yourself.


      Fortunately, I took the red pill years ago.
      Unfortunately, the company I work for pratically owns stock in the blue pill.

      --
      If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
  3. What is perl? by Anonymous Coward · · Score: 5, Funny

    Baby don't hurt me,
    Don't hurt me
    No more

    1. Re:What is perl? by Anonymous Coward · · Score: 0

      Larry don't hurt me,
      Don't hurt me
      No more

    2. Re:What is perl? by Anonymous Coward · · Score: 0

      go home

    3. Re:What is perl? by Anonymous Coward · · Score: 0

      This is Slashdot, we're more than likely at home.

    4. Re:What is perl? by FuzzyBad-Mofo · · Score: 1
  4. TFA by Mrs.+Grundy · · Score: 1

    Well that will teach me to RTFA. One of things that got me interested in programming, and perl specifically, was the magnificent writing in the Camel and Llama books. It made it seem fun, relaxed and reduced the shock of the sometimes difficult syntax of the language. Hopefully this deadly boring article is not a sign of what Perl 6 documentation will be like.

  5. No language that I like better by BadAnalogyGuy · · Score: 5, Interesting

    I never really understood Data Structures until I learned Perl. I was consistently and thoroughly confused in my DS class. The language used there was C++. There was simply too much baggage in the language that obfuscated the very points we were being taught. If you can't get past the template syntax, how in the world are you going to be able to understand the data structure concepts?

    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?

    1. Re:No language that I like better by patio11 · · Score: 5, Funny
      Perl taught me C++

      Somewhere, a maintenance programmer just slit his wrists.

    2. Re:No language that I like better by HermanAB · · Score: 2, Insightful

      Perl seems to be every Unix hacker's favourite, most hated, language. It fills the huge void between Bash and C.

      --
      Oh well, what the hell...
    3. Re:No language that I like better by Lisandro · · Score: 1

      Perl is a REALLY sweet language. The only thing that i don't like about it is its poor OOP support - i always preffer to code the "old fashion" way (to the point i even dislike objects), but right now i'm working on a proyect sposored by my university, and trying to model a large network using object-oriented code is quirky on Perl, to say the least.

          Other than that, i really like it. It's easy to write, runs really fast for interpreted code, and and it's extensible as hell (CPAN). Great for scripting!

    4. Re:No language that I like better by Anonymous Coward · · Score: 0

      hilarious. a gem.

    5. Re:No language that I like better by Anonymous Coward · · Score: 0

      I've been programming in Perl for about a year now, and I know C pretty well, but I've never been able to grok OOP. Those stupid analogies about objects get in the way. Can you recommend a resource for OOP with Perl?

    6. Re:No language that I like better by Lisandro · · Score: 4, Informative

      Can you recommend a resource for OOP with Perl?

      Right now i found all i needed in the Perl.org site - this OO tutorial for Perl is pretty complete. There's also this one, 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.

    7. Re:No language that I like better by AuMatar · · Score: 3, Interesting

      Ignore the analogies, OOP has nothing to do with obkects at its core. OOP is basicly encapsulation and interfaces. You design your program so that its broken into parts. Each part handles one bit of functionality- networking, or database communication or the like. Each part is self contained, no 2 parts should know how the other part is coded- they only communicate with each other through a set of functions. These functions are called an interface. The functionality of each part is said to be encapsulated, because the actual design of the code is not known to the outside world.

      In C, you do this with functions in a .h file and call it a library or a module. Sometimes you use a struct to pass around data. A great example is the stdio library- you have a bunch of library functions to do IO. You don't know how those are implemented. ANd since you can have open IO on more than 1 file at a time, you need a bit of data to hold the state of an IO. Thats why you pass back and forth FILE* parameters.

      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.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    8. Re:No language that I like better by moonbender · · Score: 1

      (one of the most abused language features ever, especially in Java)

      Care to elaborate? You mean because people write inheriting classes that overwrite functions and violate their contracts?

      --
      Switch back to Slashdot's D1 system.
    9. Re:No language that I like better by master_p · · Score: 1

      So what can the rest of us say about ourselves that were taught data structures on C and had no problem with it? instead of bashing C++, have you considered that your understanding about programming languages was maybe inadequate? and how is a language that must have data structures built in better than a language that allows you to program data structures with the same ease and efficiency?

    10. Re:No language that I like better by Anonymous Coward · · Score: 2, Interesting

      That's one of the problems with inheritance. It's entirely possible to override an innocent looking method, and in doing so break the contract of an apparently unrelated method in a different class. It's extremely difficult to debug when it does occur, and the probability of it occuring increases with the complexity of the system. It becomes a real problem when lots of programmers work on the same project, especially if some of them don't understand the whole codebase, aren't very experienced, or are just plain idiots.

      It is possible to work around this by using disciplined inheritance or, better still, by not using implementation inheritance at all, and going for interface inheritance instead. You still get polymorphism, and you still get code reuse (you just need to design the system differently), but you don't get the hidden problems, and the resulting system will be far more robust.

      By the way, COM actually uses a similar system. It's based purely on the idea of interfaces. Each COM object can implement one or more interfaces, but can not inherit behaviour from another COM object. Internally, you can use implementation inheritance as much as you like, but from the outside there is no inheritance. You can implement the behaviour of one object in another by encapsulating that object and forwarding method calls, which is externally the same as implementation inheritance, but is more flexible (since you can "inherit" from any object that implements a specified interface without problems), and way more robust.

      Hmm... That course I did on component-based software engineering back at university made much more of an impact on me than I thought.

    11. Re:No language that I like better by BlueYoshi · · Score: 2, Interesting

      I was thinkink like you till I was hired in a company that use real OO technique.

      And I learn the beauty of OO and the very nice way to solve problems by using Factory, Prototype, Facade, Visitor Patterns. I can tell you that before I was writing Object but not thinking 'object' and that is very different.

      I agree its possible to code in Assembly using OO technique but it is really not natural and can be really tricky to do .

      --
      "Use cases are fairy tales..." I. S. 2005
    12. Re:No language that I like better by VoidCrow · · Score: 0

      I'd like to join the queue.

    13. Re:No language that I like better by Metasquares · · Score: 2, Informative

      Poor OOP support is an understatement. Classes are really just blessed hashes in Perl 5. You can't do encapsulation (without special modules, anyway) and even inheritance looks like it was just tacked on. (@isa?)

      I'm very glad that Perl 6 will have better thought out OOP support. It would have made a recent 7,500 line project I worked on much smaller, easier, and more stable.

      You're correct, though; it's a very useful language outside of the poor OOP.

    14. Re:No language that I like better by ArsonSmith · · Score: 1

      I think bashing C++ is what perl was intended to do. Take Bash and C++ and combine them together.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    15. Re:No language that I like better by thechao · · Score: 1

      If Stepanov were dead, he'd be rolling in his grave. The STL is primarily an algorithms library; secondarily, a definition for a standardized interface to data-structures--and a nontrivial one at that. The STL containers are just "one example" of any of a number of possible implementations. Teaching STL containers as a beginners course is block-headed.

    16. Re:No language that I like better by Phleg · · Score: 1, Insightful

      I'm going to paraphrase your post, and we'll see if you can catch on to what most of the other readers here are probably noticing.

      Perl is great! I didn't understand the concepts being taught to me in my Data Structures class, until I found Perl. Perl actually has things like hashes and lists built in, so I don't have to think about things on that level! That's when I went back to C++. I started trying to rewrite these data structures, but in the end I didn't actually have to! It turns out that these data structures were in the STL all along! I'm going to go back and tell my professor about that; he probably didn't know, or else why would he have made us write the things in the first place?
      --
      No comment.
    17. Re:No language that I like better by mpeg4codec · · Score: 1

      If you're on a machine with Unix man pages, try man perlfunc. On the plus side, it works even if your internet connection dies. It also works when you're on an airplane, frantically trying to meet project deadlines ;).

    18. Re:No language that I like better by Anonymous+Brave+Guy · · Score: 4, Funny

      Another is swallowing a bullet, while a third fell on his sword. There's more than one way to do yourself in!

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    19. Re:No language that I like better by hardaker · · Score: 1
      Classes are really just blessed hashes in Perl 5.

      Now now... that's entirely unfair saying classes are just blessed hashes. This is perl... they wouldn't restrict you to just one way of doing something. You can actually bless anything, including arrays and scalars.

      --
      The next site to slashdot will be ready soon, but subscribers can beat the rush and start slashdotting it early!
    20. Re:No language that I like better by AuMatar · · Score: 1

      Thats part of it. The other part is over abstraction and deep hierarchies. Java is particularly bad at that in its standard library (this si a fault of the library, not the language)- look how many levels of abstraction there are in their IO classes. Each layer of abstraction adds more cruft, and makes the overall design more difficult to understand. As a general rule, if you have a great-grandfather class you really ought to rethink your design. ANother rule of thumb- if you have an abstract class without at least 2 different child classes inhereting from it, you've over abstracted the problem, the base class isn't needed.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    21. Re:No language that I like better by AuMatar · · Score: 1

      And you don't think you use those in C? Or assembly for that matter? Factory- creation methods. To use the C stdio library as an example (I'm using it because its very well known), open() is a factory method- it creates a FILE* object. Facade- the entire library is a facade to the file system layer, which is generally more complicated. Or if you prefer, look at the BSD socket API- the bind system call is amazingly simple for such a powerful tool. Visitor pattern- I've done that in assembly. Whats an ISR hook but a visitor pattern? And there's plenty of times in C I used lists of function pointers to call registered functions.

      Thats the one place the Gang of 4 stumbled- they tied design patterns to OOP methodology. Its not. Design patterns occur in any methodology. People were writing state machines long before they described the State pattern. Design patterns are pretty global, and they don't need classes or inheretance to work.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    22. Re:No language that I like better by dubl-u · · Score: 2, Informative

      Ignore the analogies, OOP has nothing to do with obkects at its core. OOP is basicly encapsulation and interfaces.

      A reasonable theory, but you're missing half of the power of object-oriented languages. Read Evans' fantastic book Domain-Driven Design for the other half. You will discover than a lot of people, even many of those writing "Intro to Java" books, made the transition to OO languages without ever learning OO design.

    23. Re:No language that I like better by Michael+Woodhams · · Score: 1

      The Gnu Science Library (GSL) is in object oriented C. It is pretty weird to use - I'd rather use C++ and be done with it, even though I'm not very experienced with it.

      --
      Quattuor res in hoc mundo sanctae sunt: libri, liberi, libertas et liberalitas.
    24. Re:No language that I like better by Bastian · · Score: 1

      I take it your data structures class didn't

      a) Involve actually implementing data structures
      b) Cover multidimensional data structures, linked lists, or trees

    25. Re:No language that I like better by BlueYoshi · · Score: 1

      If you have a Turing complete language of course you can technically do anything but some stuff are easier or more difficult to do

      Of course You can implement a dynamic web server connected with a database in 6502/68XXX/X86 assembly but it could beeasier to implement it using java or php..

      But some patterns dont make sense if you dont have some aspect that you find in OO. The Visitor patterns make less sense without object and a factory that can only create static object is not very usefull.

      But really until you have worked with some framework/application that work with patterns it s difficult to truly understand what you can do with a patterns in oop.

      some stuff that are more difficult to do without oo like http://en.wikipedia.org/wiki/Inversion_of_control

      --
      "Use cases are fairy tales..." I. S. 2005
    26. Re:No language that I like better by BadAnalogyGuy · · Score: 1

      In fact, it did.

      To answer your questions:

      a) The problem was that implementation in C++ using generics was a huge hassle and whatever I could have gleaned from the course on top of what I took away from it was lost because of the struggle with the language.

      b) It would be a sad data structures course that didn't cover those. I assure you that these were definitely covered, as were other algorithms including searching, sorting, and data compression.

      The point was that C++ sucks as a teaching language because you can't see the data structures for the trees. Perl provided the Aha! moment I needed to understand what was going on, but unfortunately not until I was already in the industry.

    27. Re:No language that I like better by Bastian · · Score: 1

      Ahh gotcha.

      I actually feel quite the opposite because Perl's referencing system and syntax do such a great job of convoluting the process of storing and retrieving data in a deep or multidimensional data structure.

      Not that I think C++ is any better. It's a self-obfuscating language, too.

    28. Re:No language that I like better by steveski74 · · Score: 1

      Excellent point.
      I'm just finishing off a uni degree and was always gobsmacked as to how everyone thought OOP was the bees knees.
      "It promotes REUSE fo code, encapsulation and data hiding".
      As with yourself I could never understand why students were taught that C was defficient in this area. A .o is called an "object" file after all.

      Yeah it's not discrete classes which can be inherited, but you can supply a .h and a .o (or .a) library to a customer and they can reuse the code in whatever projects they wish.
      But admittedly it does become a little messy if you want to override a function, and overloading rocks my socks.

      Frankly use whatever get the job done in the best way.

    29. Re:No language that I like better by Anonymous Coward · · Score: 0

      I never really understood Data Structures until I learned Perl.
      You don't understand data structures when using Perl. It just makes it easier to "use" the data structures. But if you really want to understand how the data structures themselves work, you implement them yourself -- and Perl is a bad language to do it.

      The language used there was C++. There was simply too much baggage in the language that obfuscated the very points we were being taught.
      I agree that C++'s STL is confusing to new comers (heck, it was confusing for me when I first learnt it... and I had a few years of programming knowledge even back then!). But if you disregard the STL, it's still a nice language to "understand" data structures (as opposed to merely "using" them from a library)

      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.
      Argh... either you're a slow learner, or your professor must have been *really* bad at teaching... :(

      Anyway, good to hear that you finally got it.

    30. Re:No language that I like better by WNight · · Score: 1

      Try Ruby. It looks a lot like Perl in all the nice fast ways, it's got most of the shortcuts and power features. Most importantly, regexes are easy. It's got great OOP support and it's very clean.

      I was a perl coder. Ruby is everything I loved and none of what I cursed.

    31. Re:No language that I like better by Eivind+Eklund · · Score: 1
      Object Oriented programming is *distinguished* by inheritance. The rest of OOP without inheritance is called "object based programming".

      It's possible to program object oriented in C. One example of this is the file system interface in the BSD kernels (the VFS layer). With a language designed for OOP, however, I find that its often easier to create good designs. I also find it easier to think about large problem domains in OO terms (and found it so almost immediately, and I had programmed for 10 years before I learned OOP).

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    32. Re:No language that I like better by webfiend · · Score: 1

      Yeah, but if it helps cut down on the number of C++ programmers and hence the amount of new C++ code, it's worth it. It's all for a higher purpose, after all.

    33. Re:No language that I like better by Anonymous+Brave+Guy · · Score: 1

      Hey! Some of us are C++ programmers, you insensitive clod! :o)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    34. Re:No language that I like better by webfiend · · Score: 1

      Well obviously I wasn't talking about *you*, just the ones I don't like ;)

  6. What is what ? by Anonymous Coward · · Score: 0

    Java, Python, Ruby ... but who cares about Perl now but for regexp ;-)

  7. What is Perl 6? by Rob_Ogilvie · · Score: 3, Funny

    I can't define it, but I know it when I see it.

    --
    Rob
  8. New Perl excitement by ChrisDolan · · Score: 5, Insightful

    What makes Perl strong, in my opinion, is the community's interest in maintaining a large and well-tested library of useful code in CPAN. Without CPAN, it's not clear that Perl would be as alive and healthy as it is today.

    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.

    1. Re:New Perl excitement by Coryoth · · Score: 1

      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.

      I'm really looking forward to Parrot as well. It has the potential to unify Perl, Python, and Ruby in a very nice way - the languages all keep their distinctive qualities, but anyone has access to all the wonderful libraries available for any of them. Moreover, it opens the door for new scripting languages: where before a new language had to manage to rally enough support to get sufficient libraries developed they can now hook into Parrot and get instant access to the richness there. For instance I very much like the look of Amber as a scripting language with maintainability in mind. More choices is a good thing.

      Jedidiah.

    2. Re:New Perl excitement by chhupa_rustam · · Score: 1

      Dude, .NET already does this. Get over your fears of M$ monopolies and just use it! What people should be spending time on is Mono -- make that a worthy tool, and we're set.

    3. Re:New Perl excitement by chromatic · · Score: 1

      Mono has lingering patent questions. Parrot doesn't. That's a strong point in favor of Parrot.

    4. Re:New Perl excitement by killjoe · · Score: 5, Insightful

      Parrot is multi dispach and supports multiple inheritance. It also does not have a patent sword hanging over it like mono does.

      --
      evil is as evil does
    5. Re:New Perl excitement by Haeleth · · Score: 1

      Parrot . . . does not have a patent sword hanging over it like mono does.

      This claim always puzzles me. If Microsoft may have patents that relate to the implementation of virtual machines designed to host a variety of languages, why do people assume that those patents are bound to be so narrow in scope that they will only affect Mono? And why do people assume that Microsoft is the only company that might ever consider taking out patents in such an area?

      Have the Parrot developers conducted exhaustive patent searches at every stage of development? Because if not, then Parrot does have a patent sword hanging over it. A sword made of pure FUD, just like the one invented by the anti-Mono campaigners.

    6. Re:New Perl excitement by ArsonSmith · · Score: 1

      Hate to be a grammer nazi but you spelt "does as well" wrong, and you spelt "against software patents" wrong as well.

      "Mono has lingering patent questions. Parrot does as well. That's a strong point against software patents."

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    7. Re:New Perl excitement by /ASCII · · Score: 1

      You patent technologies, not languages. Since Parrot and Mono use the same kinds of algorithms internally, there is nothing that says Parrot has less patent problems than Mono. Gcj might be potentially safer than mono, but Parrot isn't.

      --
      Try out fish, the friendly interactive shell.
    8. Re:New Perl excitement by nrc · · Score: 1
      ...there is nothing that says Parrot has less patent problems than Mono.
      This is pure FUD. Please be more specific on patented technologies and algorithms that are used by both Mono and Parrot. Bytecode? There are plenty of langauges that use bytecode through either JIT or VM mechanisms and I haven't seen any indication that any of them have run into patent problems over that technology. There's just too much prior art.

      Mono is reproducing patented .Net APIs. The Mono folks are allowing themselves to be led into a maze of patents and IP where Microsoft defines the start and end points at will.

    9. Re:New Perl excitement by killjoe · · Score: 1

      "And why do people assume that Microsoft is the only company that might ever consider taking out patents in such an area?"

      Microsoft is assumed to be a company which might use it's patents to kill open source projects. They have repeatedly said that they fully intend to defend their intellectual property. See the FAT patent for a recent example.

      --
      evil is as evil does
    10. Re:New Perl excitement by ChrisDolan · · Score: 1

      JVM, .NET and Mono are all runtimes for statically typed languages. It's challenging to compile dynamically typed languages to those runtimes, particularly because you can't re-invoke the compiler at runtime, so eval() is impossible (or at least very hard).

      All that said, Jonathan Worthington is working on a cross-compiler that will create .NET bytecode from Parrot bytecode, so your wishes may actually come true in a way you did not expect!

    11. Re:New Perl excitement by Anonymous Coward · · Score: 0

      Promoting MS$ stuffs on /. has not been popular. OTOH, please consider installing a bunch of LINUX or OSS stuff in your office with your spare hardware even if you are a die hard MS$ advocate. It helps to bring a better world if there is competition for MS$. Consider if you can get the same IE free if there isnt a Netscape to kick their butt.

    12. Re:New Perl excitement by Eivind+Eklund · · Score: 1
      I used to think this way. Alas, looking at it, I've found that I *don't* want Perl's libraries for Ruby. Perl's libraries would sit like a big lump of lead in there, impossible to deal with gracefully. Because they're *Perl* libraries. They're designed to Perl conventions, relying on basic Perl functionality. This is significantly different from Ruby conventions, with basic Ruby functionality.

      So, to have the libraries work at all well, it would basically be necessary to port them anyway - or at least create a compatibility layer in the "borrowing" language. At that point, the benefits start diminishing.

      Especially since my experience with CPAN is markedly different from yours. I don't consider it "well maintained" at all. I consider that when I grab something off CPAN, I will most likely have to maintain it myself, with an exception for a few of the major, well-known libraries. And even those don't always have something that approach maintenance. For example, it took me a year to get a serious bug fixed in the localization library - a major feature didn't work at all - and I provided ready-to-apply patches.

      To make CPAN work for us in practice in production, running the same software on more than one machine, we've had to do a bunch of magic around the download process, including fixating versions (instead of using the newest version at all times), adding the ability to apply patches as we install, and moving some of the libraries into our local version control repository for local maintenance.

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  9. Neat, yes, but It's not pleasant to read... by ShyGuy91284 · · Score: 1

    I used Perl in a Programming Language Concepts course. You can do some neat stuff with it, but it isn't really the easiest thing to understand (at least not with maybe a week or two of going over it). My professor likened it to duct tape. It is a quick fix, that others aren't supposed to see. It works, but isn't pretty, and isn't something you should expect to build a whole program (so to speak for a scripting language) with....

    --
    In undeveloped countries, the consumer controls the market. In capitalist America, the market controls you.
    1. Re:Neat, yes, but It's not pleasant to read... by patio11 · · Score: 1

      I'm not exactly a perl fan (more a fault of the perl programming mentality than anything in the language itself). Be that as it may, you certainly can build large-scale web applications in it, including an obscure web site you probably haven't heard of.

    2. Re:Neat, yes, but It's not pleasant to read... by HermanAB · · Score: 1

      It is mainly the regular expressions that are hard to read and that is no fault of Perl. The main problem is that Perl is always full of regular expressions...

      --
      Oh well, what the hell...
    3. Re:Neat, yes, but It's not pleasant to read... by Schraegstrichpunkt · · Score: 1
      and isn't something you should expect to build a whole program (so to speak for a scripting language) with....

      Better Perl than PHP.

    4. Re:Neat, yes, but It's not pleasant to read... by m50d · · Score: 1

      You can do just as full programs in scripting languages as you would in any other, though personally I agree I wouldn't use perl for a big project.

      --
      I am trolling
    5. Re:Neat, yes, but It's not pleasant to read... by plurgid · · Score: 2, Insightful

      > isn't something you should expect to build a whole program ...

      oh, horse crap on that.

      Over 6 years ago, I built a GUI front end to a workflow system (read: database + some business logic) using perl/Tk. An entire department runs the app on it's unix workstations from an NFS mount, and they've been doing it day-in and day-out for that entire 6 year period. All kinds of people have mangled that thing to hell and back, using it in the most inapropriate of ways, yet it's never been broken.

      Perl is what it is, man. It got it's name in the 90's as a web programming language, and I guess it got typecast. Heh ... I guess that'd be "weak typecasting" in this case ...

      Saying perl is dead because PHP r0x0rz so hard is like saying hammers are dead because of nail guns. Pounding nails ain't the only thing a hammer can do.

    6. Re:Neat, yes, but It's not pleasant to read... by Anonymous Coward · · Score: 0

      Typical "professor" attitude - they have no or minimal real-world experience but see fit to voice their opinion on issues about which they know only academically.

    7. Re:Neat, yes, but It's not pleasant to read... by Anonymous Coward · · Score: 0

      It's more than just regular expressions that make Perl hard to read. It's highly magical ($_ being the most pervasive example). Also, the syntax for any structure deeper than a simple hashtable or array is a nightmare.

      And yes, you can build big projects in Perl, but that doesn't mean you should.

    8. Re:Neat, yes, but It's not pleasant to read... by ArwynH · · Score: 1
      Pounding nails ain't the only thing a hammer can do.

      No, they can also be use for pounding the heads of people who say 'PHP r0x0rz'! :)

    9. Re:Neat, yes, but It's not pleasant to read... by Senzei · · Score: 1
      When did he say PHP was great? Personally I don't like either of them. The fact that you can make a whole program in perl does not mean it is a good idea. Given enough time and sufficient understanding you could write a program in assembly, doubt many people will want to do it.

      The biggest problem I have ever seen with perl is the mindset it creates. Flexability is an awesome language feature, but if your perl programming team consists of more than one person (concurrently or over time) being able to do clever programming tricks is going to cause problems.

      That and Larry Wall is nuts. It may be a strength, it may be a weakness, but I don't think it should be in dispute anymore.

      --
      Slashdot: Where anecdotes and generalizations can be freely substituted for facts, logic, or intelligence
    10. Re:Neat, yes, but It's not pleasant to read... by budgenator · · Score: 1

      use english; dude, almost eveybody understands english. We can write some realy obtuse stuff in Perl, or we can write very clear code in Perl; its the programmer not the language.

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
  10. starting from the bottom by systems · · Score: 1, Interesting

    The problem I see with a language like perl6 and mant others, is that it seems they all started from the bottom.

    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.

    1. Re:starting from the bottom by free+space · · Score: 2, Insightful

      With all respect to the importance of strategic management, it is only one way to achieve success. Many of the great organizations of today didn't have a vision when they started and made it up as they went along.

      Linux began as just for fun, Bill Gates' vision when starting Microsoft was "join the bandwagon as fast as you can before you miss the oppurtunity", and Perl itself started as a replacement for awk.

      IMO, you can go either way- top down or bottom up- as long as you're competent enough to see oppurtunity and smart enough to know good decisions from bad.

    2. Re:starting from the bottom by Anonymous Coward · · Score: 0

      I think in this case the vision is to make a better Perl, that would be more then sufficient to create a solid idea of what needs to be done and from there a solid implementation.

      I would also like to note that when you force people into strict systems that they don't tend to do all to well, even if the idea itself seems theoretically sound. This is probably because people hate to be tied down, it just doesn't agree with how alot of people think and do things.

    3. Re:starting from the bottom by l3v1 · · Score: 1

      Gee, are you not working for MS by any chance ? :P start with a dream, which became a vision, which became a mission, which transalted to goals :D Perl is fraggin' cool stuff, has always been, from day one. Not for everything, naturally, but for a lot of tasks a perl-trained hand is mostly unbeatable. Sure as hell the programming world would be a lot poorer without perl.
       

      --
      I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
    4. Re:starting from the bottom by ezeecheez · · Score: 1

      You seem to have borrowed your command of the English language from business school, too.

  11. One thing perl is still good for. by tuxmaster · · Score: 2, Insightful

    One thing that perl is good for that I hope it continues to be good for in the future in command line scripting.

    --
    ~tuxmaster
    1. Re:One thing perl is still good for. by syzler · · Score: 1

      One thing that perl is good for that I hope it continues to be good for in the future in command line scripting.

      What is this "command line" thing of which you speak? I vaguely remember a retiring programmer telling me about using it and other mythical computing concepts such as GPL licensing , POSIX standards and Unix environments, but I always thought they were just fairy tales.

  12. Perl 6 is evolving the language into awesome! by Inoshiro · · Score: 2, Interesting

    My compilers professor has nothing but bad things to say about a language whose syntax is inelegant and tricky. After all, if a language is inelegant, it will be hard to read and understand, as well as hard to create a proper grammar for, or parse.

    "(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!

    --
    --
    Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
    1. Re:Perl 6 is evolving the language into awesome! by Schraegstrichpunkt · · Score: 1

      Strictly speaking -> isn't the method call operator: it's the dereference operator. I think & is the method call operator, but it's optional, so nobody uses it.

    2. Re:Perl 6 is evolving the language into awesome! by Engineer+Chris · · Score: 2, Interesting
      And, one of my favourite points: "Why is the method call operator two characters (one shifted), not a single dot? "
      Because concatenation was already a single dot before method calls were introduced (in perl5).
      --
      Read the sig, read the sig, ziggy ziggy ziggy zig!
    3. Re:Perl 6 is evolving the language into awesome! by Viol8 · · Score: 2, Insightful

      "Because concatenation was already a single dot"

      And wasn't that well thought out. Who needs "+" for concat like most
      other scripting languages when you can use a "." instead. Doh.

    4. Re:Perl 6 is evolving the language into awesome! by Anonymous Coward · · Score: 3, Interesting

      I like the use of "." for concatenation

      "+" as an operator sugguests that the order of the items being operated on has no effect on the answer...

      eg. 2 + 3 == 3 + 2

      but
      "two" + "three" != "three" + "two"

    5. Re:Perl 6 is evolving the language into awesome! by Viol8 · · Score: 3, Insightful

      "sugguests that the order of the items being operated on has no effect on the answer..."

      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.

    6. Re:Perl 6 is evolving the language into awesome! by Anonymous Coward · · Score: 0

      Just because plus is used nearly everywhere else doesn't mean Perl (or any other language) should follow suit. Some people may prefer the use of "." rather than "+".
      I do

    7. Re:Perl 6 is evolving the language into awesome! by Anonymous Coward · · Score: 0

      Careful, your narrow minds are showing... =)

    8. Re:Perl 6 is evolving the language into awesome! by Haeleth · · Score: 1

      This is why I like ML's choice of ^ for string concatenation. Since there's no general consensus among other programming languages whether it should represent exponentiation, bitwise XOR, or pointer dereferencing, it's not a terrible problem to be suddenly faced with yet another possible meaning.

    9. Re:Perl 6 is evolving the language into awesome! by Viol8 · · Score: 1

      Very true. Who needs logical consistency between basic operators anyway?
      I always thought "+" for overrated for addition , lets use "&" instead.
      And how about using "->" for equals. 2 & 2 -> 4. Much better don't you think?

    10. Re:Perl 6 is evolving the language into awesome! by tehshen · · Score: 1

      Actually, Perl 6 will use ~ for concatenation, 'cause it's like tying two strings together. So dot is free.

      --
      Guy asked me for a quarter for a cup of coffee. So I bit him.
    11. Re:Perl 6 is evolving the language into awesome! by TheLink · · Score: 3, Informative

      Because in Perl
      "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.

      --
    12. Re:Perl 6 is evolving the language into awesome! by Anonymous Coward · · Score: 0

      Are you performing "addition" though? - I would say in joining two strings we are performing "concatenation" - linking two strings together.

      At least I find that a clearer way of looking at this.

      To look at it another way,

      you can do:
      3/2
      what about:
      "three"/"two"

      You even use the word concat yourself, the meaning of concatenation is "to connect or link in a series or chain."

      Now that is not addition.

    13. Re:Perl 6 is evolving the language into awesome! by Senzei · · Score: 1
      And, one of my favourite points: "Why is the method call operator two characters (one shifted), not a single dot? "

      I think it is amusing that PHP seems to be borrowing a lot of the bad ideas from perl. I don't care what a method call operator is as long as it fits the following requirements:

      1. It does not step on characters that logically fit other operations
      2. It can be typed with one keypress, no shifting.
      3. If the language is going to abuse OO the way most seem to nowadays the operator needs to be on the home row or one of the adjoining rows.
      --
      Slashdot: Where anecdotes and generalizations can be freely substituted for facts, logic, or intelligence
    14. Re:Perl 6 is evolving the language into awesome! by dubl-u · · Score: 1

      And wasn't that well thought out. Who needs "+" for concat like most other scripting languages when you can use a "." instead. Doh.

      Sorry, but which other scripting languages were using a + in 1987?

    15. Re:Perl 6 is evolving the language into awesome! by Anonymous Coward · · Score: 0

      Except that the . has a historical basis for the concatenation operator well before Perl borrowed the usage. But you would have have to have studied math to know that.

    16. Re:Perl 6 is evolving the language into awesome! by Abcd1234 · · Score: 1

      Umm... why, exactly, is it more consistent to use "+" for both concatenation and addition? They're not even remotely the same operation. Methinks it's these other languages that are less consistent...

  13. Answer by Anonymous Coward · · Score: 0, Funny

    It's what clueless people who haven't already migrated to Ruby will be using soon.

    http://www.ruby-lang.org/en/

  14. What is Perl 6? by Anonymous Coward · · Score: 0

    Ruby's ugly second cousin, twice removed.

  15. Q. What is Perl 6? by dazlari · · Score: 5, Funny

    A.Two Kiwi oysters going at it.

    1. Re:Q. What is Perl 6? by imroy · · Score: 0, Troll

      Q: What's a hindu?
      A: It lays iggs eh!
      (Silly bit of Aus/NZ humour)

  16. Who cares what Perl 6 is.. by ForeverFaithless · · Score: 2, Informative

    ..now that we got Ruby.

    --
    Mark Kretschmann - Amarok Developer, KDE Member
    1. Re:Who cares what Perl 6 is.. by kv9 · · Score: 1

      we have ruby since 1995. whats your point?

    2. Re:Who cares what Perl 6 is.. by masklinn · · Score: 1

      Well, Ruby 2 may actually be faster than a dead snail, that may be the point

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    3. Re:Who cares what Perl 6 is.. by brpr · · Score: 1, Troll

      Let me know when Ruby gets lexical scoping which isn't broken.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    4. Re:Who cares what Perl 6 is.. by rubycodez · · Score: 1

      Lexical (static compile time) scoping in a dynamic language? Something's broken alright, but it ain't Ruby

    5. Re:Who cares what Perl 6 is.. by rubycodez · · Score: 1

      Love my Ruby, but Perl is still fun & exciting. Even has some advantages over other scripting languages: installed by default in most commercial Unix and open source OS, most libraries, and usually the fastest if execution time is a factor. Of course, syntax looks like line noise and variable scoping back-assword and oo an aftermarket bolt-on, but that's part of the fun.

    6. Re:Who cares what Perl 6 is.. by brpr · · Score: 1

      WTF? First, Ruby's scoping is lexical and static, it's just broken. Second, lexical and static aren't the same thing. Third, there's nothing wrong with lexical scoping in a dynamic language. Most dynamic languages don't have dynamic scoping (Common Lisp and Perl are some exceptions -- dynamic scoping is an optional alternative to lexical scoping in both).

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    7. Re:Who cares what Perl 6 is.. by iggymanz · · Score: 1

      are you talking about block-local variables, and their weird rule that Matz himself says "I must have been crazy when I made this rule?", i.e., local variable referenced in a block doesn't create new scope? If variable doesn't exist it will be created, if it does it will not create new scope and use existing local value. Also that block parameters hold same block local rules. That rule has had huge debate, but it looks like it will stay. Doesn't cause any problem if one names one's variables accordingly, or if one always uses methods rather than just making a simple code block.

    8. Re:Who cares what Perl 6 is.. by brpr · · Score: 1

      As I said in reply to another post, it's not only that, it's the fact that there's no way of explicitly declaring local variables in Ruby. So if I declare a variable i within some scope, I have no way of knowing whether or not I'm overwriting a variable 'i' in a higher scope, or creating a new variable. In Perl all local variables are declared with 'my', so this problem doesn't arise.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    9. Re:Who cares what Perl 6 is.. by iggymanz · · Score: 1

      that "my" business in Perl is silly, the default should be local, and I *hate* typing the name of a new variable in a raggy ol' "my list" (been doing Perl for over 11 years, so I have a Right To Rag. But I do like Ruby better, been naming those local variables with care, defining methods for insured isolation, and haven't had any problems.

    10. Re:Who cares what Perl 6 is.. by brpr · · Score: 1

      Variable declarations are silly? Two extra letters per local variable, and you don't have to worry about naming local variables with care, defining methods for ensured isolation, etc. etc. [*] Although in a sense the default in Ruby is for variables to be local, you have know way of knowing -- without looking at variables in all encolising scopes -- of whether you're defining a new local variable or altering an existing one. For sure, this isn't a big problem with Ruby, but then the problems people cite with Perl aren't big problems either. So the syntax is a bit obscure in some cases...big deal. Perl/Python/Ruby are virtually identical in terms of concerete language features. Before someone says "blocks", blocks are just a special syntax for passing anonymous closures to functions, and Perl actually has a special syntax for this just like Ruby! Ruby's OO features are cool, but most of them are also available in Perl because Perl has a very open-ended object system -- if you want mixins, you can easily write your own implementation. And Perl has multiple inheritance anyway, so you don't really need them. Introspection is easier in Python and Ruby than in Perl, but most of the stuff you'd use it for (i.e. serialization) has already been packaged into Perl libraries on CPAN. I guess with your Perl experience you know all of this already. I actually came to Perl after Python and Ruby (the documentation really sucks for mod_ruby and for just about every other Ruby library/module; mod_perl was a welcome change.)

      Python and Ruby are nicer than Perl, for sure, but they don't really win in terms of concrete features. They lose in terms of speed and available libraries, so I use Perl. I'd happily use Python or Ruby instead of Perl if I had to, but I just don't see what the hype is with Ruby/Python. They are all bytecode intepreted imperative OO scripting languages with some functional programming features. End of story.

      [*] Except insofar as doing these things is a good idea anyway.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    11. Re:Who cares what Perl 6 is.. by brpr · · Score: 1

      Oops, Ruby isn't actually bytecode interpreted is it...

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    12. Re:Who cares what Perl 6 is.. by iggymanz · · Score: 1

      no, but there's a wordcode vm in the works, see YARV. the appeal for ruby to me is the passing of code block to a method to get nifty stuff like internal iterators, mixin methods, and less typing compared to almost all languages to get a given job done. And of course Matz stole enough ideas from Perl to do all the nifty quicky shell-script hacks.

    13. Re:Who cares what Perl 6 is.. by brpr · · Score: 1

      But Perl has all the features you mention (yes, including blocks).

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    14. Re:Who cares what Perl 6 is.. by iggymanz · · Score: 1

      sure, but in the realm of perl 5.x at least the objects, closures, interators are alot more effort to build and hard to read with that butt-ugly syntax. The ideas being tossed around for Perl 6 look cool, but I really think that project is getting mired down

  17. WHOOPITUPTITUDE! by reidman · · Score: 4, Funny

    From TFA:

    Not everyone who starts learning Perl for whipituptitude needs manipulexity right away, if ever, but having a tool that supports both is amazingly useful.

    Whipituptitude?!

    That is awesome. Made up words a--

    Whats this? Manipulexity?

    How much awesome can you cram into a single sentence?
    1. Re:WHOOPITUPTITUDE! by ceeam · · Score: 2, Funny

      Give them a break, they are Perl programmers after all. ;)

    2. Re:WHOOPITUPTITUDE! by Mostly+a+lurker · · Score: 1

      In the English language TIMTOWTDI (there is more than one way to describe it). However, to any Perl advocate, there are there never enough ways that you do not need to add more.

    3. Re:WHOOPITUPTITUDE! by maxwell+demon · · Score: 2, Funny

      Well, that's the inventixibility of Perl programmers. :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    4. Re:WHOOPITUPTITUDE! by Senzei · · Score: 1
      How much awesome can you cram into a single sentence?

      They're perl programmers, the most awesome in a single line is an e-peen contest for them.

      --
      Slashdot: Where anecdotes and generalizations can be freely substituted for facts, logic, or intelligence
    5. Re:WHOOPITUPTITUDE! by whterbt · · Score: 2, Funny

      I don't see what the problem is. They're perfectly cromulent words.

      --
      Too late to be known as Bush the First, he's sure to be known as Bush the Worst.
  18. What is Perl 6? by Anonymous Coward · · Score: 0

    A horrific obscenity that must be destroyed!!

    j/k

  19. My short experience with perl... by rsidd · · Score: 3, Insightful

    Three years ago, I could program in C, but had never used a scripting language (except bash, for very basic stuff). I needed to do some non-trivial manipulation of text files and figured that this was a good time to learn. Since others in the group were using perl, I tried perl.

    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 a lot) and also changed the way I write C (vastly for the better).

    That was it. No more perl for me.

    1. Re:My short experience with perl... by chromatic · · Score: 1
      How do you write nested lists such as [[1,2],[3,4],5,[6,7,8]]?

      In Perl? Exactly that way. Really, how much did you try?

    2. Re:My short experience with perl... by NadNad · · Score: 1

      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.

      Uh dude, that's exactly how you write it in perl too. Well maybe you'd want [5] so it's really a "list of lists" and not a "list of lists and scalars", but still...

    3. Re:My short experience with perl... by rsidd · · Score: 1, Informative
      How do you write nested lists such as [[1,2],[3,4],5,[6,7,8]]?

      In Perl? Exactly that way.

      Indeed?
      $ cat list.pl
      @a = ((1,2),(3,4),5,(6,7,8));
      print @a[0], " ", @a[1], " ", @a[2], " ", @a[3], " ", "\n";
      print $a[0], " ", $a[1], " ", $a[2], " ", $a[3], " ", "\n";
      $ perl list.pl
      1 2 3 4
      1 2 3 4
      $ cat list.py
      a = [[1,2],[3,4],5,[6,7,8]]
      print a[0], " ", a[1], " ", a[2], " ", a[3]
      $ python list.py
      [1, 2] [3, 4] 5 [6, 7, 8]
      $

    4. Re:My short experience with perl... by cliveholloway · · Score: 2, Informative
      use Data::Dumper 'Dumper';
      my $LoL = [[1,2],[3,4],5,[6,7,8]];
      print Dumper $LoL;
      Errr??
      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    5. Re:My short experience with perl... by chromatic · · Score: 1

      I said "exactly", not "differently". Why'd you replace the square brackets with parentheses?

    6. Re:My short experience with perl... by rsidd · · Score: 1

      Because perl lists use parenthesis, according to every damn doc I've read?

    7. Re:My short experience with perl... by rsidd · · Score: 1

      Yes, that's really intuitive, thanks. Especially when every perl doc I see around tells me to use curved parentheses for lists, and @ prefixes for variables that refer to them, and I have no clue what data structure you've used above.

      My point was that I didn't need to wrap my head around such mindless syntax issues for python. (Or indeed for any language I've learned since: OCaml, a bit of Haskell and Lisp).

    8. Re:My short experience with perl... by chromatic · · Score: 1

      I don't know if this is helpful to you, but the particular docs that would have helped are perldsc, the data structures cookbook, and perlref, the references and nested data structures documentation. The table of contents, perltoc lists all of the core documentation.

    9. Re:My short experience with perl... by cliveholloway · · Score: 1, Informative

      Yes, indeed. So you change the arrayref of arrayrefs in your first post to an array of lists in the parent code and wonder why it doesn't work?

      Let's assume you actually do want a list of lists and we'll brace the 5 and make it an array of arrayrefs.

      @a = ([1,2],[3,4],[5],[6,7,8]);
      print "@{$a[0]} - @{$a[1]} - @{$a[2]} - @{$a[3]} \n";

      Or, sticking to your original arrayref of arrayref notation:

      $a = [ [1,2],[3,4],[5],[6,7,8] ];
      print "@{$a->[0]} - @{$a->[1]} - @{$a->[2]} - @{$a->[3]} \n";

      cLive ;-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    10. Re:My short experience with perl... by lachlan76 · · Score: 1

      Have a look at the perlref(1) man page. Square brackets provide a list reference. Python does this automatically because it's a reference-oriented language, while perl provides values. In response to your other comment, perl uses a @ for lists, but you have a reference to a list, not a list.

    11. Re:My short experience with perl... by putko · · Score: 1

      You might know this already, but the lisp family of languages have very, very simple syntax. You'd never have this problem with them. Operators are prefix -- not infix.

      Everything is parenthesized fully.

      '((1 2) (3 4) 5 (6 7 8)) would be your list of lists.

      --
      http://www.thebricktestament.com/the_law/when_to_s tone_your_children/dt21_18a.html
    12. Re:My short experience with perl... by cliveholloway · · Score: 4, Informative

      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.

      And within 1/2 a page, you see this:

      # assign to our array a list of list references
      @LoL = (
      [ "fred", "barney" ],
      [ "george", "jane", "elroy" ],
      [ "homer", "marge", "bart" ],
      );

      print $LoL[2][2];
      bart

      Damn anti-Perl trolls :-)

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    13. Re:My short experience with perl... by rsidd · · Score: 1
      print "@{$a[0]} - @{$a[1]} - @{$a[2]} - @{$a[3]} \n";
      ...
      print "@{$a->[0]} - @{$a->[1]} - @{$a->[2]} - @{$a->[3]} \n";

      I think that's what someone told me later, and that's exactly why I hate perl...

    14. Re:My short experience with perl... by Anonymous Coward · · Score: 0

      Everything is parenthesized fully.
      '((1 2) (3 4) 5 (6 7 8)) would be your list of lists.

      That doesn't seem "parenthesized fully" to me! Different people think in different ways. Based on your sentence "everything parenthesized fully", I would put parentheses around the five. If I wanted to MAKE SURE to obey your description "everything is parenthesized fully" I would write your list of lists as follows:
      (((1) (2)) ((3) (4)) (5) ((6) (7) (8)))
      Different minds work in different ways!

    15. Re:My short experience with perl... by cliveholloway · · Score: 1

      Apologies - maybe I shouldn't have dereferenced the lists within a string interpolation to try and keep the output similar to your python example, and shown you a simple example instead. I won't repeat my other reply here, but how complicated is $a[0][1] for the second item in the first list (from my first example)?

      --
      -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    16. Re:My short experience with perl... by forty7 · · Score: 3, Informative

      Yes, that's really intuitive, thanks. Especially when every perl doc I see around tells me to use curved parentheses for lists, and @ prefixes for variables that refer to them, and I have no clue what data structure you've used above.

      You're right; you do need curved parens for real lists. It may be helpful to think of the @ mark as referring to multiple values, rather than to a list specifically. It's also used for list and hash slices, like this: @list[1,3,5] and @names{'tom', 'dick', 'harry'} (Both of those expressions really just evaluate to lists, but, particularly with the hash slice, that's not necessarily obvious).

      The other responders, in their haste to point out how much perlier-than-thou they are, have glossed over the fact that 'my $list = [[1,2],[3,4],5,[6,7,8]];', as you've pointed out, doesn't exactly produce a list of lists. It produces a data structure that's close enough to a list of lists that they can call it that without being entirely wrong.

      (Warning: Perl content. I love Perl, so it'll probably sound like I'm rambling. My apologies.)

      You can't directly create a list of lists in Perl. Not possible, because they'll get flattened. But what you can do is create a list of *references* to lists. There are two ways to do this:
      my @list1 = (1, 2, 3);
      my @list2 = (4, 5, 6);
      my @combined = (\@list1, \@list2);

      Or:
      my @combined = ([1, 2, 3], [4, 5, 6]);

      This second syntax is called the anonymous list syntax.

      The upshot is that lists are surrounded by (), as you already know, but that by replacing them with [], you get a reference to a list with no other name. The same can be done for hashes with {}, which means that all Perl data structures can be arbitrarily nested.

      So, your Python example, in Perl, would create a reference to a list of references to lists. Its elements would be accessed like this:
      my $list = [[1,2],[3,4],5,[6,7,8]];
      print $list->[0][1] # prints 2

      The -> is used for dereferencing, but Perl is clever enough to figure out that the value of '$list->[0]' is also a reference, and doesn't require you to write the -> between [0] and [1].

      You could also write your example like this:
      my @list = ([1,2],[3,4],5,[6,7,8]); # note the ()

      print $list[0][1] # *also* prints 2!

      It turns out Perl is *still* clever enough to figure out that $list[0] is a reference, and will automatically dereference it for you. No -> required.

      I hope this helps clear things up a bit!

    17. Re:My short experience with perl... by l3v1 · · Score: 0, Flamebait

      So first you say it's crap because it can't be done. When you get examples that it can, you say it's crap because how it can be done. Now get lost.

      --
      I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
    18. Re:My short experience with perl... by BadAnalogyGuy · · Score: 5, Informative
      This is one area where the Perl docs (as detailed as they may be) fail new users.

      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:

      LISTs do automatic interpolation of sublists. ... arrays and hashes lose their identity in a LIST... To make a list reference that does NOT interpolate, see the perlref manpage.


      So they head over to perlref (an extra level of indirection) and notice in Item 2:

      A reference to an anonymous array can be created using square brackets:

              $arrayref = [1, 2, ['a', 'b', 'c']];

      Here we've created a reference to an anonymous array of three elements whose final element is itself a reference to another anonymous array of three elements. (The multidimensional syntax described later can be used to access this. For example, after the above, $arrayref->[2][1] would have the value ``b''.)


      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:

      An array of an array is just a regular old array @AoA that you can get
      at with two subscripts, like $AoA[3][2]. Here's a declaration of the
      array:

              # assign to our array, an array of array references
              @AoA = (
                            [ "fred", "barney" ],
                            [ "george", "jane", "elroy" ],
                            [ "homer", "marge", "bart" ],
              );

              print $AoA[2][2];


      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.
    19. Re:My short experience with perl... by forty7 · · Score: 3, Informative

      Dang it, copy-and-paste missed a couple of sentences at the end. Here they are, in context:

      It turns out Perl is *still* clever enough to figure out that $list[0] is a reference, and will automatically dereference it for you. No -> required. The beauty of this automatic dereferencing is that it allows Perl to DWIM (Do What I Mean): Perl is perfectly content to let you pretend that a 'list of *references* to lists' is actually just a 'list of lists'. The downside of the automatic dereferencing is that it turns the easy-to-miss difference between '((1,2),(3,4))' and '([1,2],[3,4])' into Just Another Bit Of Fiddly Syntax To Remember.

    20. Re:My short experience with perl... by Russellkhan · · Score: 3, Funny

      That's the first time I've ever seen or heard anyone say that Lisp didn't have enough parentheses!

      --
      Information doesn't want to be anthropomorphized anymore.
    21. Re:My short experience with perl... by rsidd · · Score: 3, Insightful
      You put it very well. It's possible that if I had seen this doc to begin with, I'd have stayed with perl. But perhaps I would merely have switched later. This was just the last straw -- I'd already spent three days trying to figure out perl syntax (and meanwhile, one colleague was strongly urging me to try python -- everyone else used perl). And I'd already read ESR's article on his first exposure to Python, so I had a favourable impression of it.

      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.

    22. Re:My short experience with perl... by Fnord · · Score: 1

      Ok, I love perl, but I understand where this confusion comes from. In perl, a list and an array are not the same thing. You can consider a list somewhat like a constant array. An array is always a variable (or a reference to a variable). A list is always a value (that's usually assigned to an array).

      Thing is, a list (or the value of an array) is always a list of scalars, so you're right, perl does flatten lists. But elements of a list can be references to arrays. (a,b,c) denotes a list, while [a,b,c] denotes a reference to an anonymous array.

      This seems stupid until you realize that perl is smart enough to treat a reference to an array, and an array itself as near to the same thing. Its logic taken from C (for better or worse).

      So:
      $arrayref = [[1,2],[3,4],[5],[6,7,8]];

      gives you exactly what you want. $arrayref is a reference to the array that contains references to the sub arrays. Just like when you malloc a pointer to a block of memory in C, treat it as an array, and fill the elements of that array with pointers to other arrays.

      If you're treating this as a "pure" high level language, yes, it's fucked. But it's the only high level language that gave me the power I missed from C.

    23. Re:My short experience with perl... by pimpimpim · · Score: 1
      Since I was struggling with this as well yesterday, I have a question for you. I am filling a 2D array by looping 2 times, currently, after searching for a way to do it on the web, it works like this (being a list of hashes, or the other way around :) )
      my $points = ();

      ...

      for my $x (sort keys %$points) {
      for my $y (sort keys %{$points->{$x}) {
      do_something($x,$y,$points->{$x}{$y})
      } } }
      (tabbing didn't work in ecode) Now this works, but it doesn't seem to be the most efficient way to me. Your example just prints everything in one go, but how do you fill structures like that from 2d input data that has to be read in. And how do you print it out if you want to print a line for each separate value of the first dimension, not in one go. Of course silly to post this in slashdot, but seeing GP's post, it's not only me who has to suffer with this in perl :)
      --
      molmod.com - computing tips from a molecular modeling
    24. Re:My short experience with perl... by moonbender · · Score: 1

      Neat. I never knew Python had list comprehensions. My Haskell programming class (nominally compiler design - hah!) was pretty mind bending, but I admit that FP has some fun parts.

      --
      Switch back to Slashdot's D1 system.
    25. Re:My short experience with perl... by Scarblac · · Score: 2, Interesting

      The mind-bending thing of Haskell's list comprehension is mostly that they're evaluated lazily, and can be of infinite length. A famous examples is of course the implementation of the Fibonacci function in Haskell as an infinite list:

      fibo = 1 : 1 : zipWith (+) fibo (tail fibo)

      Python's list comprehensions are rather neat, but they lack those features, so they don't come near Haskell's level of mindbendingness. They're mostly a cool shorthand for writing down lists that would have been ugly with map() and filter(). I wish the dict comprehension PEP had made it...

      (I'm a Python fan, but nowadays I program Perl for a living and play with the book Practical Common Lisp in my spare time... give Lisp a try!)

      --
      I believe posters are recognized by their sig. So I made one.
    26. Re:My short experience with perl... by Eivind · · Score: 1
      Perl is a mess. It can do a lot of stuff, but it's very hard to be diciplined enough to keep it readable. There's tons of write-only code in perl out there. (i.e. code that noone, not even the author, is capable of reading anymore)

      I second python on syntax. Python can do all that perl can do, allthough sometimes at the cost of ten extra keystrokes. For that you get a syntax that is clean and semantics that are sane. The one thing people get hung-up about in Python is that indentation matters.

      Now, any sane person would indent code the way python insists you should indent it anyway, but for some obscure reason some people still need to complain about it.

    27. Re:My short experience with perl... by Eivind · · Score: 2, Insightful
      This is true. And to a perlhead it even makes sense. But it still makes the language a *lot* harder to come to grips with.

      In python, an array consists of "[ what,ever,here ]" and that extends inituitively, *without* needing to read any manual-page to the case where "what" in itself is a array (or anything else).

      It's not inituitive that (1,2,3,4) is the same as ((1,2),(3,4)). That's not reasonable at all. Yes there's an explanation for it. Yes the explanation makes sense, from a certain point of view. The thing is, you first have to *aquire* /precisely/ that point of view. It's not something you'd expect.

    28. Re:My short experience with perl... by master_p · · Score: 0, Troll

      I did not read your post, but my eye fell on 'why is it so hard to get this simple explanation' line...with an explanation so long for such a simple thing, don't you think that it is not simple at all?

    29. Re:My short experience with perl... by BadAnalogyGuy · · Score: 1
      Here are some ideas for your problem:

      1) {a}x{b} => flat array:
      @out = map { $xyz = $_; map { $_*$xyz } @a2} @a1;


      2) {a}x{b} => multidimensional array:
      @out = map { $xyz = $_; [map { $_*$xyz } @a2]} @a1;

      Easy as pie. ;-)
    30. Re:My short experience with perl... by I+Like+Pudding · · Score: 1
      1. Why are you even using hashes when your keys are numeric?
      2. I'll point out this bug in particular: sort does not sort numerically by default, it sorts ASCIIbetically. You would have to use sort {$a<=>$b} keys to get the desired ascending numeric sort. Of course, this should be a 2d array anyhow...
      3. Your "2d input data" question is too vague, but I'll try to give you an example using arrays

      Using this as the example file data:

      54,122,425,123
      64,352,42,123
      325,325,2324,1


      Example:
      my @points;
      my $filename = shift(@ARGV):
      open(IN, '<'.$filename) or die;
       
      while(my $line = <IN>) {
        chomp($line); #remove trailing newline
        my @row = split(/,/, @points);
        push(@points, \@row);
      }
       
      close(IN);
       
      print $points[1][2];
      The print statement would return 42, assuming I did not screw anything up too bad
    31. Re:My short experience with perl... by I+Like+Pudding · · Score: 2, Interesting

      Well then how about
      print map {"(@$_)"} @$a; #---> (1 2)(3 4)(5)(6 7 8)
      instead?

      TIMTOWTDI, bitch!

      Seriously, though, nested data structures and the deferencing syntax is the single worst part of perl. I'm not surprised it made you break out into hives. Your main problem, though, is that you keep thinking a list is an array. It isn't. Parens build lists, and arrays are primarily built from lists. Also: learn to use google. I ran into this same problem when I was first starting out and took a few hours to nail down some docs and get familiar with it. The syntax is ugly and annoying, but not overly difficult (assuming you already understand references).

    32. Re:My short experience with perl... by Moflamby-2042 · · Score: 1

      @a = ([1,2],[3,4],5,[6,7,8]);
      print $a[0][0] . $a[0][1] . $a[1][0] . $a[1][1] . $a[2] . $a[3][0] . $a[3][1] . $a[3][2] ."\n";

      Perl can do arbitrarily nested data structures using numbers, strings, refs to arrays, refs to hashes, refs to code, etc. They are dereferenced in left to right order using [] for array parts or {} for hash parts. I.e.
      $thing{NED}[30]{HAIR}{COLOR}{DAY}[5] = 'Wavy, like I dunno, fields of golden wheat, or something.';
      print "On day 5: $thing{NED}[30]{HAIR}{TYPE}{DAY}[5]\n";

      Perl handles any scripting I've had to do quickly and beautifully and the scripts/code I write with it seem pretty maintainable even a years after last I'd seen it. You have the option of treating things in an object oriented fashion as well too if you like. It's a fantastically efficient language and it doesn't have to look hideous if you don't want it too. There's an incredible number of modules on cpan too..

      Square brackets around arrays declare anonymous arrays of things and return a reference fit for holding in a scalar type (anything prefixed with a '$').
      Parenthesis declares arrays but returns a list type, fit for holding in an array type of thing (things prefixed with an '@').
      So, can do either @a = ([1,2],[3,4],5,[6,7,8]);
      or
      $a = [[1,2],[3,4],5,[6,7,8]];
      But the '$a' case is a scalar thus needs deref first to get to array form. Deref via -> or by 'reinterpreting it' via '@' prefix: @$a. or $a->[3][1] to get to the 7.
      Now python's between character string indexing scheme bothers the heck out of me though, of course with perl I hadn't a need to pursue it to find alternatives ;P

    33. Re:My short experience with perl... by PommeFritz · · Score: 2, Informative

      Python's list comprehensions are generators. Look it up what this means. The infinite Fibonacci sequence can be written in Python as a generator function:

      def fib():
              e=0
              f=1
              while True:
                      yield f
                      e,f = f,f+e

      You can print it like this:

      for f in fib(): print f

      but that wouldn't bee too convenient, other than to see Python's long-number feature :)

      More interesting is combining it with another generator function, one that only returns the first N numbers of the given generator:

      def firstn(g, n):
              gen=g()
              for i in range(n):
                      yield gen.next()

      print list(firstn(fib, 10))

      The explicit conversion to a list is because otherwise you would see that the object you're trying to print is not the list itself, but the generator that will build the list for you one element at a time.

    34. Re:My short experience with perl... by Anonymous Coward · · Score: 0

      Why can't you do :

      @lol = [ ["a", "b"], ["c","d","e"], ["f","g","h"] ]
      print $lol[2][2]
      => h

      Isn't that what you'd expect to do to get a list of lists?

      This weird behaviour is the kind of thing that puts people off Perl.

    35. Re:My short experience with perl... by RichDice · · Score: 1
      How do you write nested lists such as [[1,2],[3,4],5,[6,7,8]]?

      If that's how you did it then you most certainly wouldn't have experienced the list flattening you encountered. You would have a reference to a list, containing 4 elements, the one with index 2 (3rd offset) being a scalar value and the others themselves being references to lists.

      In Python, it's trivial (that's how you'd write it), but in perl, nobody I talked to could give me an answer.

      That's how you'd write it in Perl, too. (Or perhaps you would have the outermost brackets being round () ones, depending on your needs.)

      As for noone being able to give you an answer, you can hardly blame Perl for your friends not knowing Perl. Or for your lack of ability to research (as another poster pointed out).

      I'm not entirely without sympathy, however. I remember list flattening taking me an hour or two to figure out, many moons ago. And I almost gave up Perl while attempting to write my first Perl program. In 15 minutes I had written 50 lines of Perl that accomplished it would have taken me 2 days and nearly 1000 LoC to write in C. But it wouldn't compile. After 45 minutes of sheer frustration I finally tweaked in that "elseif" in Perl is spelled "elsif".

      I don't think that your story demonstrates that Python is superior to Perl, though, or that my reply demonstrates that Perl is superior to Python. (I've written a bit of Python; I think it's more or less Perl but with funny indentation, and without variable sigils.) I think what it shows is how crucial it is for a person to have a positive experience with a language quickly, lest they ditch it and try something else. (I.e. before they develop a "sunk cost" in their earlier learning.) I imagine you've encountered problems with Python since then that have required, oh, say 1/2 an hour of research to work through. Given that you already have a lot invested in the language, you're willing to do that 1/2 hour of research.

      Cheers,
      Richard

    36. Re:My short experience with perl... by NardofDoom · · Score: 1

      Python: "My God! It's full of whitespace!"

      --
      You have two hands and one brain, so always code twice as much as you think!
    37. Re:My short experience with perl... by Eravnrekaree · · Score: 1

      No, try @array=([1, 2], [3, 4], 5, [6, 7, 8]);

      That should work. see, you can do it in Perl too. The [] when used in such a way create array references. An array with embedded arrays is an array with array references in it. The embedded arrays are embedded as array references. Perl does flatten the structure if you use () enclosures exclusively, so thats why you use [] (or {} for hashes) for the embedded structures.

    38. Re:My short experience with perl... by jefu · · Score: 1
      And at the third level do we switch enclosing characters again? To something completely different, or back to the square braces? Or do we use parens again?

      Enquiring minds (though I'm convinced I'm nowhere near smart enough to actually use Perl) want to know?

    39. Re:My short experience with perl... by Scarblac · · Score: 1

      Thanks, I didn't know that they were generators! I haven't been able to use Python intensively for about 18 months, and I think they weren't implemented that way orignally (seem to recall list comprehensions came out before generators). Cool.

      --
      I believe posters are recognized by their sig. So I made one.
    40. Re:My short experience with perl... by Anonymous Coward · · Score: 0
      #!usr/bin/perl
       
      use Data::Dumper;
       
      # @array is list of anonymous lists
      my @array =
      (
        [1,2],
        [3,4],
        [5],
        [6,7,8]
      );
       
      foreach my $element (@array){
        print @$element,"\n";
      }
       
      # Or more simply using Data Dumper
      print Dumper(@array);
      To use a tautology, it's easy once you know how to do it!
    41. Re:My short experience with perl... by asuffield · · Score: 1

      Perl's syntax is based on linguistics, not the last programming language you happened to use. It's something you'd expect if you'd bothered to learn it. Expecting $language_N to behave like $language_N-1 reflects on your expectations, not on $language_N.

      It makes Perl's syntax a lot *easier* to get to grips with if you ever bother to learn it. If you don't bother to learn it, at least it got rid of you before you committed any more atrocities in the language.

      In Python, you can sit down and pound out whatever dumb stuff you like, and then when you deploy it, it'll throw a nice pretty exception telling you exactly why you're fired. No thanks.

    42. Re:My short experience with perl... by Anonymous Coward · · Score: 0

      Oops typo, he meant:
      my @row = split(/,/, $line);

    43. Re:My short experience with perl... by JackDW · · Score: 1

      An excellent question. The documentation really doesn't make the distinction between lists and arrays clear at all. It is especially unclear why there is a distinction in the first place. I assume that it is probably for historic reasons - it's nasty, but changing the behaviour would break legacy code, so the cruft stays.

      --
      You're an immobile computer, remember?
    44. Re:My short experience with perl... by I+Like+Pudding · · Score: 1

      Oops typo, he meant:
      my @row = split(/,/, $line);


      Indeed. 4am code ever looks as good the next day.

    45. Re:My short experience with perl... by Qzukk · · Score: 1
      Because [] is a reference to a list, and () is a list. That's like asking why in C you can use a char * to refer to "hello world" but not a char.

      You could do:
      $ref=[ ["a", "b"], ["c","d","e"], ["f","g","h"] ];
      @lol=@$ref;
      print $lol[2][2];
      Or combine it into one step:
      $lol=[ ["a", "b"], ["c","d","e"], ["f","g","h"] ];
      print $$lol[2][2];
      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    46. Re:My short experience with perl... by Vindaloo · · Score: 1
      @lol = [ ["a", "b"], ["c","d","e"], ["f","g","h"] ]
      print $lol[2][2]
      In perl 5 you're free to just use list references:
      $lol = [ ["a", "b"], ["c","d","e"], ["f","g","h"] ]
      print $lol->[2][2]
      In perl 6 you can eliminate the
      "->"
      from the above code.
    47. Re:My short experience with perl... by Ambush+Commander · · Score: 1

      This was a bit of a put off for me to. I asked a friend about it and they said it was an artifact from the days when Perl didn't need to deal with complex multidimensional arrays. Basically, no one ever thought anyone would need to use it.

    48. Re:My short experience with perl... by after+fallout · · Score: 1

      It may help new users even more to simply think of $ and @ as a description of the context you are writing in. Sort of like writing a sentence using plural words.

      It helped me to think of @ as making your sentence plural. For example:

      @names = (["John","Doe"],["Jane","Doe"],["Bobby","Smith"]);
      $name = ["Mary","Dayton"];

      @names is a list of peoples first and last names, where $name is one person's first and last name.

    49. Re:My short experience with perl... by Valdrax · · Score: 1

      Do you know of any good coding standards for Lisp that make it easy to understand the flow of your code? I had to learn Lisp for a college AI class and pretty much failed every assignment I was given until we were allowed to use a language of our choice because I couldn't tell what my program was doing at any one point.

      It's not that I couldn't understand functional programming, since I did the rest of my assignments in Python making heavy use of functional programming features, but I just couldn't make my Lisp readable because of all those awful parentheses.

      --
      If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
    50. Re:My short experience with perl... by Valdrax · · Score: 1

      That should work. see, you can do it in Perl too. The [] when used in such a way create array references. An array with embedded arrays is an array with array references in it. The embedded arrays are embedded as array references. Perl does flatten the structure if you use () enclosures exclusively, so thats why you use [] (or {} for hashes) for the embedded structures.

      Well, that's intuitive. What's the difference between an array and a list in Perl?

      Personally, my latest personal Perl hell came with trying to stuff an array into a hash a few weeks ago. From my Python experience, I expected the following to work:

      $hash{$key} = @array;
      [...]
      @array = $hash{key};

      Nope, apparently this is wrong. If I recall correctly, you get back a scalar reference. The syntax that I found that eventually worked is this:

      $hash{$key} = \@array;
      [...]
      @array = @{$hash{$key}};

      From my limited understanding, this seems to indicate that Perl is a pass-by-value instead of a pass-by-reference language? If so, that's just nuts in an interpretted language. If not, then why does the first syntax not work properly?

      --
      If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
    51. Re:My short experience with perl... by jbolden · · Score: 1

      Its what you'd expect if you are thinking linguistically and not mathematically. "Go to the grocery store get beans, ham, eggs". "Oh add to your list soda and water". Final list:
      beans,ham,eggs,soda,water (flat) not
      beans, ham, eggs, [soda,water] (non flat).

      Most computer languages are mathematical. Perl is definitely atypical in its viewpoint in trying to act more like a natural language

    52. Re:My short experience with perl... by Anonymous Coward · · Score: 0

      Do you know of any good coding standards for Lisp that make it easy to understand the flow of your code? I had to learn Lisp for a college AI class and pretty much failed every assignment I was given until we were allowed to use a language of our choice because I couldn't tell what my program was doing at any one point.

      My only Lisp experience is two classes which used Scheme Lisp, so I am no expert.

      But anyway, my advice is to use lots of procedures, and to give them descriptive names. I know people say that same thing about almost any language, but with Lisp it's particularly important to keep each procedure fairly short and simple.

      And, at least in Scheme, you should probably be using let a whole lot. Also, the similar let* and letrec can be great timesavers, provided that you understand what they do. (Of course, for someone taking a class, those may not always be an option.)

    53. Re:My short experience with perl... by Eivind · · Score: 1
      Perl's syntax is based on linguistics, not the last programming language you happened to use.

      Yes. And being different from all others is a minus in itself, unless there are large advantages to it, I've yet to hear the large advantages of the list-sillyness.

      It's something you'd expect if you'd bothered to learn it. Expecting $language_N to behave like $language_N-1 reflects on your expectations, not on $language_N.

      Precisely ! You got it ! Now, in say Python this is different: It's something you'd expect even if you HAVEN'T bothered to learn it. It behaves like most reasonable programmers would expect. Not in a way that is unexpected to everyone, except those who spent time studying it. *ANYTHING* behaves according to expectation for those who have studied the details, that's not a useful measure. Much more useful is the question: what would someone with no prior exposure to the language expect ?

      In Python, you can sit down and pound out whatever dumb stuff you like, and then when you deploy it, it'll throw a nice pretty exception telling you exactly why you're fired. No thanks.

      You can write bad programs in any language. This is well-understood and wasn't the issue here. The issue was if the semantics are inituitive, or if they are strange and only understandable after you've spent time studying them.

    54. Re:My short experience with perl... by Eivind · · Score: 1
      But that's *not* what you are saying. You, in general, make a list by putting it in () and separating the elements by a comma. So in general (object,object,object) will be a list with three elements. Now, what those elements are is a different question, they can be just about anything.

      Only in Perl, if one or more of the objects just so *happens* to be a list, then it's no longer nessecarily a list with three members. It means that answering (seemingly!) trivial questions like how many elements are in: (foo, bar, baz) is not doable, without reading trough the rest of the program and look into what are assigned to those variables.

      The list you mention is something different, and works inituitively also in Python. Adding a list to a list should (well atleast I agree it's quite reasonable) yield a longer list:

      shopping = ["beans", "ham", "eggs"]
      shopping += ["soda", "water"]

      Works like you'd expect, i.e. you get one 5-element flat list.

    55. Re:My short experience with perl... by jbolden · · Score: 1

      I think you are missing the point here. Both Perl and Python have ways of adding lists in both senses. ([foo],[bar],[baz]) or (\$foo,\$bar,\$bar) accomplish what you wanted. The question is which should be the default?

      I'm not trying to argue that Perl is more intuitive than Python, to computer people. Python having come after Perl was popular wouldn't exist at all if it didn't have substantial advantages over Perl. Python works the way people who aren't immersed in Perl culture wish Perl worked. What I am trying to argue is that the default behavior in spoken language is the same as the default of Perl while the default behavior in mathematics is the default behavior of Python. That is mathematics makes a huge deal of the difference between a set as an element taking a union but spoken languages do not.

      BTW figuring out how many elements are in (foo,bar,baz) is easy
      my @a = ($foo,$bar,$baz);
      my $b = scalar(@a);

    56. Re:My short experience with perl... by pimpimpim · · Score: 1
      Thnx, very clear! I figured that the hash form didn't make sense, but couldn't found an intuitive way to do the array (which was my first plan of course). I already figured out the sort thingy (the hard way, trust me ;)), just forgot to copy it to the text.

      Only one question remaining:
      How do I print one-per-time the complete array that is stored in $points[1]?

      --
      molmod.com - computing tips from a molecular modeling
    57. Re:My short experience with perl... by Anonymous Coward · · Score: 0
      Because [] is a reference to a list, and () is a list

      Ha... now I remember why I gave up on Perl...

    58. Re:My short experience with perl... by Eivind · · Score: 1
      I understand what you say, and I'm fully aware you *can* make lists of lists in Perl. I just simply disagree with you. I don't agree that spoken language in general works like Perl.

      In spoken language, you rarely use recurcive lists as *all*. On the rare occasions that you do, they work like in any non-perl language.

      For example, if doing something entails going to 3 shops and buing stuff at each of them, you migth have a list containing 3 elements, each of which is a list containing the stuff to buy in that shop. And that is *not* the same as a single flat list with all elements flattened.

    59. Re:My short experience with perl... by jbolden · · Score: 1

      What you are describing is a hash. Buy bread, milk and cheese at the grocery store; rent underworld, little woman, and solaris at the video store...

      %my_shopping = (
              'grocery' => [bread,milk,cheese],
              'video' => [underworld, little woman, solaris], ....
      );

      See my earlier example about how lists flatten when you don't have different stores. Seriously contstruct sentenes in english in natural ways and you will find they represent Perl not mathematical data structures.

  20. Perl 6 is by Ulrich+Hobelmann · · Score: 2, Interesting

    yet another Virtual Machine nobody needs, that's supposed to be well at executing lots of different languages, but probably won't really.

    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.

    1. Re:Perl 6 is by Anonymous Coward · · Score: 0

      yet another Virtual Machine nobody needs, that's supposed to be well at executing lots of different languages, but probably won't really.

      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.


      Best summary yet, I'm afraid. I don't really see a place for Perl except with those who are already fans. Sysadmins at our job and others who do scripting have started using Python and Ruby because the syntax is cleaner and the code easier to maintain. Large and medium development projects keep using Java, smaller Ruby on Rails.

    2. Re:Perl 6 is by IdLinkAnOinkInvitePl · · Score: 1

      Thats a good point, and shout out if I'm wrong here, but is Perl the only major scripting language with out Java Virtual Machine support? And instead of piggybacking that proven technology like so many others, they choose to reinvent the wheel?

    3. Re:Perl 6 is by TheP0et · · Score: 3, Interesting

      Not just another virtual machine nobody needs. Perl6 is also a consequent implentation of language development paradigms. Java started some of it with its so called "platform independent" VM. Microsoft jumped on that train with DotNet and its intermediate language for the CRL. Perl6 bundles those ideas together, gets rid of hierarchy constraints inherited from the old OO drafts, and adds complete costumizability to syntax and grammar while trying to keep the number of built-in functions as small as possible.

      No other language does make it so easy by now to adapt the language itself to the needs of the special environment. You could for example write a module that forces strict inheritance to all of your objects, or implicitly puts all variables and values into a protected memory range, or dump your current program state onto a disk, everything within the blink of an eye.

      Other implementations of introspection, like Java's Reflection API, provide the needed self-awareness of the code and the means for dynamic object handling up to some point, but that point reached, things tend to get rather ugly. Perl5 provided some "dirty hacks" for a part of that, but couldn't cover everything without breaking compatibility and, most of all, performance.

      Still Perl6 won't be the sole answer to every question - as allways TMTOWTDI. But it's certainly interesting enough to keep an eye on it.

    4. Re:Perl 6 is by Ulrich+Hobelmann · · Score: 1

      Hm, I wish someone would mod you insightful for that. At least it sounds interesting for some uses.

      I still won't like normal Perl syntax, though, and the customizability of syntax is likely to make things even worse, IMHO. It'd be nice to hear some opinions from new Perl6 hackers.

      Anyway, be it from sys-admins or from developers, if it's any good, I guess we'll hear some news about its successful uses.

  21. Python by Schraegstrichpunkt · · Score: 0, Redundant

    I heard Perl 6 was going to be merged with Python. ;)

  22. 10 Years Overdue by dorpus · · Score: 4, Insightful

    People in the mid-1990s spoke of "overnight obsolescence", that Perl 6 would replace everything in a few weeks, and that you had better learn a new programming language every month. Over 10 years later, perl 6 is still in beta mode.

    1. Re:10 Years Overdue by chromatic · · Score: 5, Informative
      Over 10 years later, perl 6 is still in beta mode.

      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.

    2. Re:10 Years Overdue by BadAnalogyGuy · · Score: 1

      He's probably thinking of Chip's Topaz project (1998).

    3. Re:10 Years Overdue by Achromatic1978 · · Score: 1

      So, 6 years, and it's still expected to be at least one, probably two years away? Forgive me for not pondering alternatives in the interim....

    4. Re:10 Years Overdue by RichDice · · Score: 1
      People in the mid-1990s spoke of "overnight obsolescence", that Perl 6 would replace everything in a few weeks, and that you had better learn a new programming language every month. Over 10 years later, perl 6 is still in beta mode.

      The Perl 6 effort was instantiated by Larry in July 2000. So, 5.5 years.

      Perl 6 is not in "beta mode". It's not even really in alpha. (Although the Pugs project could be thought of as a pre-alpha.) The language is still being designed.

      And this posting is +5 informative? WTF. This posting doesn't have a single fact correct. However, I agree with the implication that one needed worry about overnight obsolescence. When Perl 6 is released it won't cause Perl 5 to disappear from the face of the earth. The code will still exist, and the skills will be just as valuable for years to come.

      Cheers,
      Richard

    5. Re:10 Years Overdue by Anonymous Coward · · Score: 0

      Short memory chromatic. :) Chip announced Topaz at OSCON '98 ( see http://www.perl.com/pub/a/1999/09/topaz.html which, you might notice, reads and awful lot like the perl6 article) but as I recall he was working on it before then. Oh, the fun days of watching him post to usenet about rewriting the linux kernel in C++ along with topaz.... Given that he was brought up short in 2000 by those who thought he took too long it seems a bit amusing that those same people now bristle when it is pointed out that, well, maybe it has taken too long and no one cares or believes anymore.

    6. Re:10 Years Overdue by Sentry21 · · Score: 2, Interesting

      His post makes reference to how Perl 5 was released in 1994, and people were expecting Perl 6 to obsolete everything 'overnight'. 'Perl 5 is great, welcome to 1994, but Perl 6 is going to be out soon, and in order to stay up to date in this fast-paced world of technology, you'll need to learn Perl 6 before you're done learning Perl 5' sort of thing.

      The 10 years the OP is referring to is the 10 (now 11, nearing 12) years since the release of Perl 5, without any major updates to the language (other than a sane versioning scheme).

  23. Hiring here. by Tei · · Score: 5, Funny

    Hello.

    We need 5 years experience Perl 6 programmers for 3D game. Reference: P6DNF.

    --

    -Woof woof woof!

    1. Re:Hiring here. by Anonymous Coward · · Score: 0

      hi
      i am smit from india

      i write kernel module in perl 6

    2. Re:Hiring here. by l3v1 · · Score: 1

      Reference: P6DNF.

      LMAO, thumbsup :D

      --
      I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
  24. Alternative to perl6 by barnacle · · Score: 1

    If you were ever frustrated by perl's lack of a sane threading mobel, messy syntax, or lack of clean OO extensions, or needed tighter SQL integration, or TIBCO AE or XML integration (at the expense of a lot of other functionality :-)), you might want to check out a new language called 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-clien t.q/

    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/
    http://sourceforge.net/projects/qore/

    (disclaimer: I am the author of the language :-) ) david

    1. Re:Alternative to perl6 by VGPowerlord · · Score: 1

      Just curious, but what do you mean by "tighter SQL integration?" Perl's DBI is pretty good at what it's supposed to do. Class::DBI, SQL::Abstract, and other similar modules provide tighter integration if so required.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    2. Re:Alternative to perl6 by barnacle · · Score: 1

      I mean that it's easier to work with databases than using perl's DBI modules. perl's DBI is more powerful and has more features, but qore's SQL integration is built-in to the language and therefore (by my definition "tighter").

      There is a Datasource class that abstracts the database drivers from the language (there are currently MySQL 4.* and Oracle drivers). To execute a query and get the results, you just create an instance of the Datasource class (i.e. $ds = new Datasource(SQL::DSOracle); # for example), set the name, password and other login parameters, and then call the ::select() method (i.e. $hash = $ds.select("select * from people");) and (assuming your table exists, etc :-)) you get a hash (the result columns) of lists (the rows) back (there is no binding, etc like with DBI).

      There are also statements such as the "context" statement and expressions such as the "find" expression that make working with query results very easy and which provide the "tighter" SQL integration I was talking about. Additionally serializing and deserializing between XML strings and qore data structures is very easy and a nice feature when writing interfaces that work with XML data.

      Those and other interesting features not found in perl could make it an alternative to programmers who want to check out something new and don't necessarily need the millions of libraries and modules etc that can be found with perl (or other established languages). Also qore programmers have the added benefit of getting their language feature requests implemented very quickly (due to the very small size of the user base! :-) )

      david

    3. Re:Alternative to perl6 by Anonymous Coward · · Score: 0

      How does one use this to select more data than will fit in RAM?

      I regularly use DBI to manipulate several billion rows in a few tables, with statement handles, this is easy, but with a single monolithic structure its impossible without terabytes of RAM.

  25. PDL by LordMyren · · Score: 4, Interesting

    The article talks about some of the defining features for perl. Well, one of the defining features in my perl experience has been Perl Data Language, pdl. PDL _is_ whipitupitude. Its a wonderful wonderful matrix library. And it comes with the best perl shell I know.

    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

    1. Re:PDL by imroy · · Score: 1
      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.

      My understanding is that it's written in Fortran. Which mean's it not as flexible as pure Perl code, but runs so much faster. Perl is pretty dog slow at arithmetic.

    2. Re:PDL by Anonymous Coward · · Score: 0

      Source please? I'm curious. =)

    3. Re:PDL by richteas · · Score: 1

      Not quite, according to http://en.wikipedia.org/wiki/Perl_Data_Language :

      Most of the functionality is written in PP, a PDL-specific metalanguage that handles the vectorization of simple C snippets and interfaces them with the perl host language via Perl's XS compiler. Some modules are written in FORTRAN, with a C/PP interface layer. Many of the supplied functions are written in PDL itself.

    4. Re:PDL by LordMyren · · Score: 1

      And here I thought parent was being sarcastic.

      I have a slightly harder time endorsing PDL now, but eh, waht the hey, it works. ;-]

    5. Re:PDL by imroy · · Score: 1

      Ah, I stand corrected. I guess I remembered seeing Fortran mentioned somewhere when reading about PDL, and it stuck. Still, it's mostly compiled so you're limited to using its data structures. For example, you can't make a matrix of your own complex/vector/quaternion/whatever objects.

  26. Perl 6 - Now only 6 years behind Python by Anonymous Coward · · Score: 0

    I switched from Perl to Python 8 years ago. Haven't looked back since. Of course, perl has some pretty good modules which Python still doesn't, but for 80% of the jobs, Python more than lives up to expectations. Of the remaining 20% tasks it's much easier to implement them yourself in Python, in 80% of the cases.

    Python still has nothing close to what is available at CPAN. There are cheap imitations but nothing too great yet (in terms of quality of modules).

    On the other hand, 80% of the modules you typically need are included with the standard distribution. (Batteries included)

    Barney

    ** Flame war begins **

  27. I have few counter arguments by systems · · Score: 1
    I think Bill Gates had many dreams, and at least one popular and solid vision: "A computer in every house, or Personal Computer". I am not saying that this vision is stricly his, maybe he borrowed it from someone else, or adopted it somehow. But he had one ...

    As for Linux, well, Linux didn't really succeed alone, it succeeded as being part of the GNU thing, and RMS obvioulsy had a vision, so (even thought it doesn't have to be true) I can argue that if it weren't for RMS's vision, Linux would have stayed a just for fun thingie. RMS gave linux caliber.

    As for what someone else said, that this vision->mission->goals, is a strict system, well, there are several arguments against that.
    • First many people do have visions and missions, but they don't state it, maybe they are shy afraid or don't think its important, but no, communication your ideas and goals are importnat so if you got them, plz, say em.
    • The hierarchy is exactly how the strictness is removed, a goals is specific and precise, its one clear thing, that you either achieve it or not, a vision is less specific and more liberal, take Bill Gates vision for example, it didn't say, that a proprietary OS had to be the solution, it was just one way to achieve it. Take RMS vision, people still argue about the definition of free software, what's free what isn't, so you see
    So you see, the strategic system only help people create direction, and decide whether or not they achieved progress
    1. Re:I have few counter arguments by free+space · · Score: 1

      You have a lot of solid points,especially the one about RMS. And no one can deny the importance of a strategy.
      However, my point is that we can't say project X is doomed because they started with the implementation and not the goal. Google's pagerank algorithm started before "To enable searching the world's information". Same for a lot of other things.
      There are many ways a project can succeed:

      goal->plan->implementation cycle( a shorthand for your dream/vision thingie)

      or
      implementation->opportunity->goal cycle

      or a thousand other ways :)

  28. Perl 6 ~= LISP by paulthomas · · Score: 2, Interesting

    The article mentions blocks being closures and the fact that Perl 6 -- much like the new regex system -- is itself really a programmable grammar. It sounds like we now have real macros.

    The question is: is Perl becoming a LISP implementation?

    1. Re:Perl 6 ~= LISP by chromatic · · Score: 1
      The question is: is Perl becoming a LISP implementation?

      No; Perl has syntax.

      (Seriously, Perl 5 supports 7.5 or 8 of the 9 distinguishing features of Lisp, lacking mostly sane macros.)

    2. Re:Perl 6 ~= LISP by Animats · · Score: 1

      Perl 5 has closures, although it's not obvious. They're useful when you have a function that takes a callback, and you want to pass some data along with the callback function.

    3. Re:Perl 6 ~= LISP by stevied · · Score: 1

      All programs evolve until they can read mail. All languages evolve until they approximate LISP (albeit with syntax) ;-)

    4. Re:Perl 6 ~= LISP by I+Like+Pudding · · Score: 1

      I love defining services in IOC:Copland (a dependency injection framework available from CPAN) to return closures that keep a ref to the container. Mini self-contained app nuggetoids ftw!

    5. Re:Perl 6 ~= LISP by jonadab · · Score: 1

      > The question is: is Perl becoming a LISP implementation?

      It depends how you look at it. From one angle, Perl6 looks like an advanced Lisp variant. However, if you walk around to another side, it looks like an improved version of Smalltalk.

      Perl is a multiparadigmatic language. Perl5 supports functional programming in a limited way, and it supports OO in a limited way. Both are sufficiently implemented in Perl5 to be useful, but neither is really complete. In Perl6, both of these paradigms become full-blown entirely implemented first-class paradigms. The contextual paradigm that was pioneered in earlier Perl versions also becomes a full-blown and entirely implemented first-class paradigm, and of course there is still the procedural paradigm for those who want it.

      So with Perl6 you can use the right tool for the right job, without having to entirely switch languages.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    6. Re:Perl 6 ~= LISP by Abcd1234 · · Score: 1

      Umm, in Perl, you create a closure by creating an anonymous sub. That sub is a lexically closed block... what's non-obvious about this?

  29. PUGS by putko · · Score: 3, Informative

    Here http://www.pugscode.org/ is something on the PUGS project, which is making an implementation of Perl 6 in Haskell, conformant to the spec.

    Apparently they are having a lot of fun.

    --
    http://www.thebricktestament.com/the_law/when_to_s tone_your_children/dt21_18a.html
  30. Perl is between awk and C by Pausanias · · Score: 2, Insightful

    I do scientific computing (astronomy). I never met the task that was too cumbersome to write in C, while at the same time too complex to write in awk.

    I keep waiting for a task where it would make sense for me to learn perl... it's never come along.

    1. Re:Perl is between awk and C by pimpimpim · · Score: 1
      In bio- and chemical informatics there are a lot of things depending on names and numbers at the same time. Here is where perl fits in really well, since strings are a pain for a c, but the operations become too complex for awk. I'm not into bioinformatics myself, but you can see for example on http://bio.perl.org/ that it makes sense to use perl here :)

      not to feed any flame wars here: there's also http://www.biopython.org/ and http://www.bioruby.org/ ;)
      But I'm just trying to make a point here for the position of these kind of languages in sciences.

      --
      molmod.com - computing tips from a molecular modeling
    2. Re:Perl is between awk and C by MikeBabcock · · Score: 1

      I've always found PERL to be (not so ironically) to be best at log analysis and other parsing of huge amounts of 'like' data.

      Its so much easier in PERL than in any other language to do something as a result of a regex that iterates over every line of your code; I've written functions to simplify this feature for myself in Python (for example), but it never feels as easy still.

      while () { /^(\d+)\s+(\w+)$/ and $vals{$2} = $1; }
      # do something with $vals

      The really convoluted ones are the ones that make PERL shine, IMHO.

      Personally, using the regex functionality in Python or imported into C, etc. is just painful ... although Python does have the nice dictionary feature for regex matches.

      --
      - Michael T. Babcock (Yes, I blog)
    3. Re:Perl is between awk and C by Pausanias · · Score: 1

      awk '{ val[$2] = $1; # do something with vals}'

      Have you got a better example of why I would need perl instead of awk? Regexps are fully supported just as in perl, so if you needed type checking you could use the same regexp as in perl.

    4. Re:Perl is between awk and C by Pausanias · · Score: 1

      I'm interested in this issue, so I would enjoy hearing a specific example of something perl can do that is too complex for awk to handle.

    5. Re:Perl is between awk and C by pimpimpim · · Score: 1

      Maybe I shouldn't have used "complex", but more "tedious". In perl or other scripting languages you can more intuitively write nested loops, sub programs and the like. You could probably do it in awk, but (depending on you awk skills of course), it might be painful ;)

      --
      molmod.com - computing tips from a molecular modeling
  31. Err? by LordMyren · · Score: 2, Insightful

    Normally you wait until a language is actually released before learning it. Traditionally, you let a couple early adopters build something with it first too. Most smart organizations wait to make sure the langauge actually is somewhat stable before buying into the list of benefits. They wait for books to be released.

    Perl6 is not really here yet. Read the last page. Author doesnt come out and state it directly, but the current best implementation runs on Haskell.

    I dunno, somehow I dont think the take-away was supposed to be "learn this or get fired, parrot is the one vm to rulezor them all!!11," I think it was more "perl6 is still coming and has some really cool new features, as well as being built around a much more solid core." There's mainstream technologies worth reading up on if you feel the heat to stay up to date for your job. Then there's things like Perl6/Parrot; cool technologies to read up on if you're actually fucking interested in computer languages or vm's. Forgive me, I realize you simply werent aware of the status of perl6, but perhaps you should see how many band members are actually on the bandwagon before hoping aboard yourself.

    Myren

    1. Re:Err? by Anonymous Coward · · Score: 0

      Perl6 is not really here yet. Read the last page. Author doesnt come out and state it directly, but the current best implementation runs on Haskell.

      Pugs is actually a full-blown implementation of the language. From what I understand, it currently has a number of backends including Parrot, Javascript, Perl 5, and native C code. It's eventually going to be what people call Perl 6. (At some point, it may be translated into Perl 6 if necessary.)

  32. Meditations on Perl 6 by starX · · Score: 4, Funny

    If the release of Perl 5 was any indication, Perl 6 is the single magic bullet that will kill all of my (Perl) code.

    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 .NET.

    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....

    1. Re:Meditations on Perl 6 by Anonymous Coward · · Score: 0

      If so, is using Perl 5 a sin? How about Perl 6?

      Using ANY version of Perl is a sin. Use csh instead! ;-)

    2. Re:Meditations on Perl 6 by sharkey · · Score: 1
      Do Not Taunt Perl 6

      Perl 6 may stick to certain types of skin.

      Ingredients of Perl 6 include an unknown glowing substance which fell to Earth, presumably from outer space.

      Warning: Pregnant women, the elderly and children under 10 should avoid prolonged exposure to Perl 6

      Do not use Perl 6 on concrete.


      Perl 6
      ACCEPT NO SUBSTITUTES!

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  33. Old and tired Camel by nighty5 · · Score: 0

    No wonder it needed a re-write, its outdated and crufty, compared to more modern scripting languages. Perl has lost its identity, razzle and dazzle from then it was first introduced..

    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 to keep one amused.

    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!

  34. link kills browser by tehwebguy · · Score: 1

    offtopic i know, but is anyone else able to load the article link? my firefox goes nuts and freezes when i try..

    --
    -- lol pwned
    1. Re:link kills browser by Russellkhan · · Score: 1

      Works fine for me, but I have scripts disabled as well as adblock with a pretty thorough blocklist on my Firefox. (Adblock shows subdocuments amd images from doubleclick.net, oreillynet.com and googlesyndication.com blocked, Noscript shows 8 scripts from perl.com and oreillynet.com blocked, but there probably would be more scripts if adblock hadn't prevented the subdocuments from loading)

      --
      Information doesn't want to be anthropomorphized anymore.
  35. Hear me True Gods of Interoperability by LordMyren · · Score: 1

    Interoperbility is a great idea. I'm not sure if I buy unification though. Parrot might make a wonderful VM, but I simply cannot imagine it'll be able to stand alone. dotnet's virtual machine is fine, but it was clearly limited in scope and for all they the alternative dotnet languages just cannot overcome many of the static (v. dynamic) language limits built into the VM. Everything I read about parrot seems to indicate that it'll be a hundred times more dynamic, but I just cant picture anyone making a VM, what was the articles stupid word, oh yes, manipulexitious enough to be everything to everyone. Either the VM is abstract and the languages running on top of it have to start defining additional limitations to build functionality and we loose interopability, or the VM is overly rigid and people have to build something else.

    Look at the modern langauges. Python is wonderful because its a wonderful scripting engine for C code, complete with eight hundred types of glue. Classpath is interoperable java. Dotnet can PInvoke normal libraries. Languages arent converging, they're interacting. Best of luck, please, oh please do your best to try, but I just cant imagine any being, god or man, making a VM so flawlessly unconstrained and yet utterly unifying that it can become everyone to everything.

    More scripting languages built around an interoperable core would be delightful. But already there are far far too many libraries which have to be rewritten for each platform. How many SAX parsers need to be written, how many SOAP libraries, how many SAML parsers? Every language needs it own, and thats a crying shame.

    What now? Do we go web services crazy and a SAML parser in Java as a web service for a dotnet application? Doesnt that seem a bit batty? Or do we break open IKVM and wholesave import the couple dozen of java libraries opensaml requires into dotnet? Every single protocol and xml-namespace faces this same barrier; what language do we build the interpreter in? how many times will we rebuild it?

    My plea? Make Parrot truly interoperable. Not just by trying to bring the joyous miracle of parrot to every existing langauge concievable, but by interopting with the existing language ecosystems.

    Myren

    1. Re:Hear me True Gods of Interoperability by chromatic · · Score: 2, Informative

      That's what Parrot's NCI layer does. It's a foreign function interface to shared libraries. It's much nicer than Perl 5's XS.

    2. Re:Hear me True Gods of Interoperability by LordMyren · · Score: 1

      Thanks Chromatic, you always have a good reply for me.

      This does make me feel a lot better. Evidently the SDL people are all over it, or at least a few active vocal users. Oh wait, in the words of a dear friend, "they is you!" *grin* I'll take your word for it.

      Yeah, I never really deemed perl XS "worthy".

  36. Re:The funny thing is... by SolitaryMan · · Score: 1
    ... that they all spell that "whipituptitude" differently. Look for yourself:

    • In TFA1: whipituptitude
    • In TFA2 referenced from TFA1: whipuptitude
    There must be some disagreement on the concept :)
    --
    May Peace Prevail On Earth
  37. Which book for starting with Perl 6? by CRCulver · · Score: 1

    What is the best book to learn Perl starting from Perl 6? I notice that the latest (3rd) edition of O'Reilly's Programming Perl is from over five years ago, and the latest (4th) edition of Learning Perl seems to still be about Perl 5.

    1. Re:Which book for starting with Perl 6? by iggymanz · · Score: 1

      Hah! The truth is that Perl 6 is still under development, and what you can run today is a subset of what MIGHT be in Perl 6. There really is no Perl 6, just Larry and folk trying out new ideas (some very cool sure) and floating trial balloons. And its virtual machine, Parrot, which is about 40% complete. So a book about Perl 6 is impossible, but if you're a huge Perl fan, you can jump into the fun and get into the creation of the next generation of Perl (test, debug, design, critique)

  38. About 3 years too late by Colonel+Panic · · Score: 3, Interesting

    Ok, Perl6 does indeed look cool. Lots of interesting things there. Sure, you can apparently write Perl6 code today and run it on PUGS (a Haskell implementation of Perl 6; that's gotta be speedy, eh?). But as is mentioned in the article, Perl6 was announced at OSCON 2000; that's 5.5 years ago. It's now become the posterchild for vaporware in the open source world, hence this article to keep the faithful hopeful (and to keep'em from sneaking off to Ruby, Python or even Io). Really, it just looks like the purpose of the article is to say "yes, we're still here working on Perl 6. We're working hard, we really are. Please, don't lose hope. This is hard work. It'll be here one day and it'll be great", while a lot of Perl folks who yearned for something better have already moved on to Ruby or Python.

    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. 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.

    1. Re:About 3 years too late by BerntB · · Score: 1
      Perl6 was announced at OSCON 2000
      Are you a troll?! The start of the public design process was announced, then -- not the language!

      Without Googling, I think public reviews of other really complex languages, like C, has taken as long...

      (And for any sleep deprived (and/or idiots) that might be reading the above -- yes, C is a relatively simple language. That was irony.)

      --
      Karma: Excellent (My Karma? I wish...:-( )
    2. Re:About 3 years too late by Mopatop · · Score: 1

      News just in: France announces new search engine to be written in Perl 6.

    3. Re:About 3 years too late by IpalindromeI · · Score: 2, Insightful

      PUGS (a Haskell implementation of Perl 6; that's gotta be speedy, eh?)

      I keep seeing statements like this, but I don't understand them. A Haskell implementation of a Perl interpreter is no different than a C implementation, which is what Perl 5 uses. The interpreter has to be written in something. Why not choose a high level language that will allow high productivity?

      My guess is that you, and the others who make these remarks, don't know anything about Haskell and think it is Yet Another Scripting Language. Haskell is a statically-typed language, and can be compiled to machine code. In terms of speed, it's quite competitive when written correctly.

      --

      --
      Promoting critical thinking since 1994.
    4. Re:About 3 years too late by Anonymous Coward · · Score: 0

      Hear hear! Mod parent up.

      Haskell is an ideal language for just this sort of thing, and as to performance: have a look at the recent shootout results:

      http://shootout.alioth.debian.org/gp4/benchmark.ph p?test=all&lang=all

      GHC Haskell is currently second, right after gcc.

    5. Re:About 3 years too late by Apathetic1 · · Score: 1

      A lot of people said similar things about the Mozilla project.

      I'm looking forward to Perl 6. In the meantime, I'm amusing myself by learning Ruby.

      --

      My username does not make me Apathetic. It's irony, get it?

    6. Re:About 3 years too late by Colonel+Panic · · Score: 1


      GHC Haskell is currently second, right after gcc.


      But this message at the top of the linked page makes me a little suspicious:

      " Create your own Overall Scores

      What fun! April Fool's Day all year long! Can you manipulate the multipliers and weights to make your favourite language the fastest programming language in the Shootout?"

    7. Re:About 3 years too late by Anonymous Coward · · Score: 0

      Yeah, that's with the default settings though. If you actually look at how it's getting those scores, it does quite well at the tests.

  39. Is this the last revision? by VGPowerlord · · Score: 2, Insightful
    QFE: "Perl 5 isn't perfect, though, and some of its flaws are more apparent the closer Perl 6 comes to completion." Bolded for emphasis.

    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.

    --
    GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  40. Perl What? by mcrbids · · Score: 1

    Just checked my new, freshly installed, CentOS 4.2 X86/64 Opteron server to see what flavor of PERL it's running - and....

    perl 5.8.

    Come on now, how long as Perl 6 been in beta? According to this page, 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.

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
    1. Re:Perl What? by shotgunefx · · Score: 1

      You could take a look at Pugs, a Perl 6 inprogress implementation in Haskell.

      --

      -William Shatner can be neither created nor destroyed.
  41. Rewrite by PhotoGuy · · Score: 1, Funny

    I hear Duke Nukem Forever is being rewritten in Perl 6.

    --
    Love many, trust a few, do harm to none.
    1. Re:Rewrite by VGPowerlord · · Score: 1

      What's the current release date on that now, anyway? 2038?

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  42. Some much better... by AVee · · Score: 2, Interesting

    ...it's more consistent and easier to use than Perl 5

    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?

    1. Re:Some much better... by Russellkhan · · Score: 1

      Ahh, you want Malbolge!

      I was going to post the Malbolge "Hello world" for entertainment value, but there was no way to get it past the lameness filter. It's on the linked wikipedia page.

      --
      Information doesn't want to be anthropomorphized anymore.
    2. Re:Some much better... by Squid · · Score: 1

      Malbolge looks like INTERCAL after a Tool concert.

    3. Re:Some much better... by BigZaphod · · Score: 1

      Mmm.. harder to read than Perl... Now you're speaking my language(s)!

  43. No , Perl taught you data structures. by Viol8 · · Score: 2, Insightful

    I hope you're sitting down since this might come as a shock but ... theres
    more to C++ than the STL! Yes , I know , its amazing isn't it that a language
    thats only been around 20 years and is based on C which has been around for
    over 30 is more complex than this , but, well son , its true. Until you
    understand not just all the cool trendy OO and generic side but also understand
    pointer arithmetic, indirection , word boundary alignment issues and 101 other
    low level topics inherited from C then you DO NOT "know" C++ at all.

    1. Re:No , Perl taught you data structures. by base_chakra · · Score: 1

      Nurse, get this man some punctuation!

    2. Re:No , Perl taught you data structures. by Panaflex · · Score: 1

      Sir, I knew Bjorn ...

      and YOUR no Bjorn!

      (yes, no apostrophe)
      ~pan

      --
      I said no... but I missed and it came out yes.
    3. Re:No , Perl taught you data structures. by jbolden · · Score: 1

      I think you missed the point of the thread. He wasn't claiming to know C++ as much as explaining that C++ is a really lousey language for teaching data structures.

      As an aside I'm not sure that's true I think it makes much more sense to do data structures in a very low level language but regardless ...

  44. Hey , lets leverage some pro-active synergy here! by Viol8 · · Score: 1, Troll

    "My problem I see"

    Your problem is you talk bullshit. Period. Go and relearn to speak
    english like a human and not a marketing droid and we might listen to you.

  45. Duke Nukem Forever! by vuzman · · Score: 0

    I heard Duke Nukem Forever is written in Perl 6 and runs on Parrot

  46. I really find it funny... by BerntB · · Score: 0, Offtopic
    I really find it funny that even I have better karma on slashdot than chromatic, with a 4 digit user ID.

    It doesn't say anything about me. :-)

    Maybe it says something about /., since he both posted the story -- and wrote the article it comments on. And what I comments on is both true and informative (-: I don't care for the dig at lisp :-).

    --
    Karma: Excellent (My Karma? I wish...:-( )
    1. Re:I really find it funny... by Anonymous Coward · · Score: 0

      I have to admit - I abuse the mod system by throwing chromatic karma whenever I see his posts. Sorry chromatic, my mod points expired yesterday! (I have good karma becaus I post OT things anonymously ;)

  47. The real question is: who cares? by Anonymous Coward · · Score: 1, Interesting

    I've still never understood the popularity of perl: it's a horrible looking and very obfuscated language which sits in the middle of the programming arena, i.e. where it servers no purpose. If you want fast complicated code, use C; if you want a script use ksh, awk or python - faster and cleaner.

    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!

    1. Re:The real question is: who cares? by Anonymous Coward · · Score: 0

      From that stance I take it you're not a webserver admin, nor never have been.

    2. Re:The real question is: who cares? by emilper · · Score: 1
      it's a horrible looking and very obfuscated language which sits in the middle of the programming arena, i.e. where it servers no purpose
      as they say ... beauty lies in the eyes of the beholder ...

      ... law:

      There is not now, and never will be, a language in which it is the least bit difficult to write bad programs.
      and the corrolary:
      There is not now, and never will be, a natural language in which it is the least bit difficult to complain about how difficult programming languages are
  48. Not as good as python 2? by Boss+Sauce · · Score: 0, Offtopic

    if rateMe(points=-1, reason=troll): whoCares()

  49. Nope. by hummassa · · Score: 1

    You hate perl because you don't know it very well...
    The right answer is:

    $ perl -l -MData::Dumper
    $a = [[1,2],[3,4],5,[6,7,8]];
    print Dumper $a

    which yields:

    $VAR1 = [ [ 1, 2 ], [ 3, 4 ], 5, [ 6, 7, 8 ] ];

    (spaces trimmed to please slash's "postercomment" compression filter.)

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  50. Re:The funny thing is... by LarsWestergren · · Score: 3, Funny

    ... that they all spell that "whipituptitude" differently. Look for yourself:

            * In TFA1: whipituptitude
            * In TFA2 referenced from TFA1: whipuptitude


    With Perl, there is always more than one way to spell it.

    --

    Being bitter is drinking poison and hoping someone else will die

  51. Perl6's direction by I+Like+Pudding · · Score: 2, Interesting

    From the examples I've seen, I'm worried. Perl5 already has too much syntax for my liking (see the subthread on nested refs. yuck), and Perl6 seems to be going much, much furthur in that direction. Will it be powerful? You bet! The problem is that Larry thinks power is the sort of subtle change of inflection that can alter your meaning from "Greetings!" to "Greetings, shithead!", but only when the moon is in the third house. I'll hold off my judgement until it ships; I certainly owe Larry that much for how much use I get out of 5. In the meantime, though, I will be using Ruby as much as I can and wondering how anything else can be more fun to write in.

  52. Obligatory Muppets Quote by cheezemonkhai · · Score: 2, Funny

    The question is "What is Perl 6"?

    The Question is "Who Cares"

  53. One important question by Derleth · · Score: 1

    Does it have its own CPAN equivalent?

    If it doesn't, it isn't a replacement for Perl. It might be a replacement for PHP or Python or Ruby, but not Perl.

    Perl's biggest advantage over everything else is that it has one huge repository of 99.9% of the modules you'll ever need. In fact, it's probably most useful to define Perl's domains of competence by listing what the modules in CPAN are capable of doing.

    Perl has some interesting semantic and syntactic features. It probably brought regexes out of obscurity and neglect. But CPAN is its single killer feature.

    Without CPAN, Perl isn't Perl. Without a CPAN equivalent, your language isn't a Perl alternative.

    --
    How can you use my intestines as a gift? -Actual Hong Kong subtitle.
  54. Amber for Parrot by ribuck · · Score: 2, Informative
    For instance I very much like the look of Amber as a scripting language with maintainability in mind

    Thanks for your interest in Amber. I'm the author of Amber for Parrot which, although in the early stages of development, will hopefully become sufficiently complete to be really useful, sometime this year.

    Although Perl 6 is a nice cleanup and enhancement, the Parrot Virtual Machine is going to be far more important to the computing world than Perl 6. Parrot will do for scripting languages what the JVM and .NET are doing for compiled languages.

    Parrot is not yet functionally complete, but it's genuinely usable. It has been a delight to to target Parrot, because most things just work - and when they don't, the Parrot developers have gone out of their way to help.

    Parrot development has been pretty rapid recently - although you can't always tell from the documentation which often lags behind.

    1. Re:Amber for Parrot by ChrisDolan · · Score: 1

      If I can make a recommendation, I suggest you refer to Amber, Perl, Python, etc. as "dynamic" languages rather than "scripting" languages. Python, for example, is bytecode-compiled like Java, not scripted like csh. Scripting implies a class of solutions rather than a syntax or implementation.

      A primary distingusher between languages like Java, C, etc and Perl, PHP, Ruby, JS, etc is that the former are statically typed at compile time while the latter are dynamically typed at runtime. Additionally, the former have static code while the later is dynamic via eval() and the like. This runtime morphability of code and variables helps the languages achieve a rapidity of development that often compensates for the performance penalty often incurred by the dynamicism.

  55. Re:The funny thing is... by Anonymous Coward · · Score: 0

    No, there's just more than one way to do it.

  56. Perl 6 = COBOL 9x by scottsk · · Score: 3, Interesting

    Perl 6 reminds me of the super-revamped, object-oriented COBOL that came out in the 90s -- by the time this perfect language was created (and it was a decent upgrade, although the OO stuff was so verbose it wasn't funny), COBOL 85 had such a huge installed base that COBOL 9x was irrelevant. The amount of code written to the COBOL 85 standard was immense, and most new development had moved on to other languages. Maybe Perl 6 can escape the Fortran 9x and COBOL 9x trap of being really great languages about a decade too late. The biggest hurdle Perl 6 is going to face is its own installed base. It will have to be 100% compatible with Perl 5 to get people with a code base of Perl 5 code to even think about using it. Plus, it needs to have a compelling story to tell. I was excited about Perl 6 five or six years ago.

  57. hand waves a lot... by hachete · · Score: 0

    ...there you go, that's perl 6. Next...

    --
    Patriotism is a virtue of the vicious
  58. Try scheme by amightywind · · Score: 1

    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++.

    You should give scheme a try. It has builtin lists, association lists (maps), vectors, tuples, complex numbers, and much more. You'll wonder what all of the fuss about C++ templates and STL is. As for Perl, it is useful to process text files, but I wouldn't use it for much else. The syntax is somewhat baroque and gets in the way.

    --
    an ill wind that blows no good
  59. One-word answer by jalefkowit · · Score: 1
    What is Perl 6?

    Late.

    1. Re:One-word answer by clintp · · Score: 1
      What is Perl 6?
      Late.
      I'm going to answer "Urban Legend". Any day now Perl 6 will pop up on Snopes.com as a rather shabby hoax in the Computers category.

      [The fact that the target engine for Perl is named for a hoax, just makes this all ooze with irony.]
      --
      Get off my lawn.
  60. Too many changes all at once by Junks+Jerzey · · Score: 1

    The developers made the classic mistake with Perl 6: they threw out what they had and started over. And they started over on too many levels: do-it-all VM, regular expressions, core language. At the same time, the language designers have been throwing in every feature under the sun, to where experienced Perl 5 programmers get dizzy reading the apocalypses. This is the language that makes C++ seem straightforward. In fact, we wouldn't even have a Perl 6 prototype at all--even after five years of work--if it hadn't been for a plucky programmer who took it upon himself to write one (Pugs) in Haskell. To a great extent that saved the P6 project.

    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.

    1. Re:Too many changes all at once by Lost+Found · · Score: 3, Insightful

      Whenever I hear people saying things like this I think that they really lack visibility or understanding into the language's design process. Granted, the coming-to-life of Perl 6 hasn't been the quickest miracle we've seen, but I'm a hundred thousand percent positive that its being done in the best possible manner.

      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.

    2. Re:Too many changes all at once by Junks+Jerzey · · Score: 2, Insightful

      Did I say everyone should drop Perl 6? To the contrary, I said I was looking forward to it.

      I think you're in denial of what's gone wrong with the P6 process, regardless of how great a language it may be five years from now. You don't develop a language by soliciting opinions and letting things pile up for years without prototyping anything. You certainly don't throw out everything on every level all at once and start up an independent project to develop a virtual machine for an undefined language. Mr. Tang has done things the right way. He wrote a very simple, very straightforward prototype and has been iterating it ever since. Were it not for him--arguably a random hacker--there STILL wouldn't be any kind of P6 prototype.

      The P6 process should have started with a simple, high-level testbed for Perl ideas.

  61. Late and vaporware by Anonymous Coward · · Score: 0

    Perl6 is late. No wait, it's vaporware!

    Don't argue kids- It's both!!!!!!

    Thanks Taco for yet another pre pre pre release announcement. Any news on my Mr. Fusion powered flying Delorean yet?

    The Applachians will wash into the Atlantic by the time Perl6 is released. Unfortunately, Windows will still be insecure, however.

  62. Easy things easy and hard things possible by TheLink · · Score: 1

    Uh wasn't it "Make easy things easy, and hard things possible"?

    That's as close to "management speak" as possible without losing meaning and usefulness.

    And to me that statement shows a great insight in the part of the Perl people.

    Just as you can't compress everything well, you can't make everything easy.

    You would like to make the easy and common stuff easy. But not make the hard things impossible (gzip works on everything even though it makes some files bigger).

    So far Perl has been a good match to solving very many problems.

    In contrast Python's favourite motto appears to be "one obvious way". I suppose if the one obvious way is rarely hard then it'll be fine, but I don't find that concept as reassuring.

    PHP seems to be "Make it extremely easy to do common things, even if not correctly" (examples: addslashes, magic quotes, track vars etc).

    --
  63. The better question by poot_rootbeer · · Score: 1


    A better question would be: WHY is Perl 6?

    (and don't say "because 7 8 9", because that's the wrong answer.)

    1. Re:The better question by chromatic · · Score: 1

      Fortunately, the article answers that question.

    2. Re:The better question by Anonymous Coward · · Score: 0

      you shoulda got some funny points for that.... oh well

  64. I for one... by Billy+the+Mountain · · Score: 1

    ...welcome our new hash overloads!

    BTM

    --
    That was the turning point of my life--I went from negative zero to positive zero.
  65. you've got it a bit wrong... by YesIAmAScript · · Score: 1

    The problem here isn't that Perl defines arrays or lists funny. The problem is in evaluation. In perl, ((1,2),(3,4)) isn't really equivalent to (1,2,3,4); but when the first is evaluated it becomes the second.

    It was done to simplify passing arguments. If a function takes a variable number of arguments (like join or for the C folks, printf) you can pass a list and the members of the list will be expanded automatically as parameters.

    Is it a good idea? Well, like many things in Perl that were done as convenience in one spot, it comes back to get you in other places sometimes.

    As to it being intuitive, that's a strange argument. Computer programming isn't intuitive in any case.

    --
    http://lkml.org/lkml/2005/8/20/95
    1. Re:you've got it a bit wrong... by Eivind · · Score: 1
      It was done to simplify passing arguments. If a function takes a variable number of arguments (like join or for the C folks, printf) you can pass a list and the members of the list will be expanded automatically as parameters.

      Yes. And this again means you need special trickery if you want to *avoid* that happening (i.e. if the first parameter should really be a list. So again you get a special case: passing lists as parameteres require trickery that is not needed for passing other types of parameters. Adding tons of "special cases" makes a langauge significantly complexer.

      Is it a good idea? Well, like many things in Perl that were done as convenience in one spot, it comes back to get you in other places sometimes.

      Indeed.

      As to it being intuitive, that's a strange argument. Computer programming isn't intuitive in any case.

      I disagree. It's not a matter of is or is not, it's a matter of is more or is less. Less "gotschas" is in general a good thing. Perl has more "gotschas" than any other language I know of. This thing -- where a programmer trying to do something reasonable, something that'd work like he expected it to in Python, Ruby, C++, Java, C, bash, Pascal, or basically 95%+ of all high-level languages, but blew up in a unexpected way under Perl is but one example.

  66. Perl is a bag of hacks by JackDW · · Score: 1
    Similar story here. I even had the same difficulty understanding the difference between lists and arrays in Perl - the documentation really doesn't make it clear! I don't think it's in the camel book: if it is, it's certainly not in an obvious place. The article says that the specification for Perl 5 was the Perl 5 interpreter... well, that's not a surprise really!

    Once, I used Perl regularly for little scripting tasks, things that were too much for Bash but too simple to require a C++ program. Then I discovered Python, which was so powerful that it replaced not only Bash and Perl, but also C and C++. It did the same thing as Perl, but without quirky syntax, and soon turned out to be even more powerful. Perl appears to have been designed to replace Bash, and then hackers have added more features to try to make it more powerful (e.g. OO support). Whereas Python appears to have been designed as a general-purpose OO language, that just happens to be lightweight enough to be used as a scripting language. I think that anyone who has tried both Perl and Python will be left in no doubt about which language is superior. Good design speaks for itself.

    --
    You're an immobile computer, remember?
  67. What is Perl 6? by metamatic · · Score: 1

    A recruiting tool for the Python and Ruby communities.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  68. Just one question by Dasher42 · · Score: 2, Interesting

    Will Perl 6 finally end the sheer madness of allowing a function to use loop control statements like next and last to meddle with the loops in their calling functions?

    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.

    1. Re:Just one question by argent · · Score: 1

      A bit of protection from the madness of others, that's all I'm asking for.

      Fair enough, but what does that have to do with Perl?

      If you want a sane language, ECMAscript (nee Javascript nee Livescript) is probably the sanest language in general use today. Yes, yes, I know web browsers are terribly unsane environments, but poor old *script does a man's work in that sewer... it's got a lovely template-based class model, and if the class libraries it has to deal with are bloody awful that's not its fault.

      Give us a command-line ECMAscript with a sane texthacking class library, and call it Perl 7. You know it's the right thing to do. :)

    2. Re:Just one question by jbolden · · Score: 1

      I use last all the time inside of functions. The function is often single purpose and while I'm busy doing all sorts of computations its nice to catch error conditions. So you end up with code like

      foreach $i
      .....

            my $state = status($aux{$i})

      with a nice breakout if the auxilary hash has an invalid value. The status function is often written by the guy and at the time the %aux is understood.

    3. Re:Just one question by Abcd1234 · · Score: 1

      Good lord... I've used Perl for a long time, and consider myself reasonable versed in the language, and I had *no* idea this was possible.

      OTOH, I'm as likely to blame the idiot programmer who *used* this feature as I am to blame the language designer for providing it.

    4. Re:Just one question by KnightStalker · · Score: 1

      At least it throws a warning... although the kind of programmers who will use this are unlikely to have warnings turned on, or even know that they can turn warnings on.

      --
      * And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
    5. Re:Just one question by KnightStalker · · Score: 1

      Well, if code is well-understood (or you think it is) at the time it's written, that's all you really need, right?

      No one will ever need to look at it again.

      --
      * And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
    6. Re:Just one question by jbolden · · Score: 1

      I think you miss the point. The person making corrections is more likely to be looking at the function than the main body if he needs to correct stuff involved in the function.

    7. Re:Just one question by KnightStalker · · Score: 1

      Well, maybe. But using this sort of out-of-scope control flow to accomplish what is essentially an exception is bizarre. What if someone else, looking at the loop, puts status() in a new routine that *doesn't* use a loop? Are you going to fix that by writing "for (1) { $state = status($aux) }" ?

      Eval/die is the standard way to "handle" this. One, if the exception is not handled, the program blows up and doesn't exhibit heisenbugs. Two, it works when there aren't any loops. Three, perhaps most importantly, other Perl programmers are familiar with it. Or should be.

      This sort of programming can only lead to unmaintainable spaghetticode.

      --
      * And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
  69. Target the CLR by Dr.+Sp0ng · · Score: 1

    Perl 6 is so late that, unless they do something to really make the language attractive (and language features on their own won't do it), nobody is going to use it. What I would do if I were them would be to target the .NET/Mono CLR instead of their own proprietary VM. That would instantly give it interoperability with (almost) every language that actually matters, a high-performance and well-tested runtime environment, and a very complete and well thought-out class library (not to mention the piles of 3rd party libraries that are built on .NET).

    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)

    1. Re:Target the CLR by Doomatic · · Score: 1

      What Parrot is to Perl/Python is absolutely NOT what .NET is to C#, neither JRE to Java.

    2. Re:Target the CLR by Dr.+Sp0ng · · Score: 1

      Then enlighten me. What's the difference?

    3. Re:Target the CLR by cuerty · · Score: 1

      The funny it's that all the arguments apply to Perl.

      A well tested VM, many third party libraries... I found Perl more complete that .NET in many aspects.

      BTW: I'm a .NET coder, not a Perl one, but I use both languajes, and belive me, Perl it's more fast.

      --
      >Linux is not user-friendly.
      It _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    4. Re:Target the CLR by Dr.+Sp0ng · · Score: 1

      Sure, that's true - they do apply to Perl. Well, Perl 5 anyway - and that's my point. They're trying to start fresh, and I just don't see it happening.

    5. Re:Target the CLR by cuerty · · Score: 1

      So what it's this: http://www.pugscode.org/.

      --
      >Linux is not user-friendly.
      It _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
  70. The truth about multidimensional arrays by shadow_slicer · · Score: 1
    In most languages multidimensional arrays are actually made with arrays of arrays (of arrays of arrays...) with one set of arrays for each dimension.
    This works out to use arrays of pointers to arrays for all but the last dimension. So the code
    @A = ( ["Hello", "Good Evening", "I can't let you do that"], ["Dave", "HAL", "Bob", "shadow_slicer"]);
    actually creates @A as an array of pointers to the other arrays (which perl calls references) The [ tell perl to return a reference. The ( tells perl to return a list. For a 3 dimensional array
    @B = ( [ ["Help", "Me"], ["I'm" ,"Trapped"] ] , [ [ "In", "3" ], [ "Dimensions", "!!" ] ] );
    so
    print $B[0][0][0]
    prints "Help"
    The first index tells it to select the array containing references to the arrays containing "Help" and "I'm". The second index selects the array containing "Help". The final dimension selects the string "Help" from the array. For me at least it helps to visualize it as a tree:
    ^^^^^ _B__ ^^^^
    ^^ __/ ^^ \_ ^^B[]
    ^ / ^\ ^^ / \ ^B[][]
    ^/\ ^/\ ^/\ /\ B[][][]
    H M I T I 3 D !
    With the first letter of each entry showing where it is on the tree. (^ added to preserve formatting through slashdot lameness filter...) So in summary you have the list @D = ("Help", "Me");. you grab a pointer to it and put it in another array as the first entry $C[0] = \@D;. Then you take a pointer to that and put it in the main array as the first entry $B[0] = \@C;. Then you repeat this for each element you want to add, putting them in the appropriate entry in each array. Voila you have a multidimensional array.
    (Note that I have not tested any of this with perl5 since I don't have it on my work PC, so I may have some small typos, but the theory is correct)

    Of course statically dimensioned arrays (in C anyway) are usually optimized by the compiler into a single array that use an index calculated by multiplying one of the dimensions size by the other dimensions index and then adding this result to the other index. This is actually faster in some cases (especially on x86 machines which support this via a single instruction) and avoids keeping the extra arrays of pointers.
  71. Not seeing the forest for the trees by 5n3ak3rp1mp · · Score: 1

    Wow. You must be a Pythonista, with that kind of pedantry.

    Imperfect lexical scoping is hardly a showstopper. Definitely a nice-to-have, though.

    You know what? I'll take this (known, and will possibly be fixed) oversight, over looking at fugly code (all day, every day) ...any day. /disclaimer: quit my job to do ruby/rails after looking at the competition out there, needed a switch from ASP/SQL Server, very happy so far

    1. Re:Not seeing the forest for the trees by brpr · · Score: 1

      Bit of a false dichtomy there -- you could use a language that wasn't Ruby and still avoid looking at fugly code.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
  72. Actually, I found an example of what you mention by 5n3ak3rp1mp · · Score: 2, Informative

    I believe that this is what you are slandering on about, and this is one possible workaround.

    I asked around in #ruby-lang about this, and this is not only the #1 bug in Ruby, it will be fixed in 2.0.

    If you had a more concrete broken-lexical-scoping example, please feel free to provide.

    In the meantime, if this is the biggest Ruby bug, I'm planning on sticking around for sure ;) The readability alone is a huge win over other languages (IMHO).

  73. Re:Perl is between awk and C? by ChaosDiscord · · Score: 1

    Perl is between awk and C? By what strange measure? Some spectrum where "complex" is on one end and "cumbersome" is on the other? A strange measure indeed.

    Perl is hardly "lower level" than awk. Indeed, Perl comes with a richer language, piles of useful support libraries, and the CPAN archive for even more useful libraries. All of these taken as a whole should make Perl a good fit for problems that are "too cumbersome to write in C" while being even more efficient to write than awk.

    If awk's solving your problems, great. There is always more than one way to do it, and awk's a fine way. Indeed, I occasionally run into places where Perl seems overkill and break out awk myself. But for anything but simple tools I can whip up Perl solutions faster that I can write an awk or awk-and-other-shell-programs solution.

  74. What is Perl 6? by Anonymous Coward · · Score: 0

    Ruby's ugly second cousin, twice removed.

    See Nitro web framework for a better framework than RubyonRails. Also see the Og project on the page, a competitor to ActiveRecord.

    Long live opensource!

  75. Perl won't regain the web server crown by Julian+Morrison · · Score: 1

    PHP is just too perfectly adapted. Perl 6's dialect programming flexibility could match PHP's specialized design, but not its simplicity. It might displace Java which was always a bit of an expedient rough fit (as witness the innumerable layers of Struts/Hibernate/servlets/blah that basically amount to smoothing the corners).

    On the other hand, Perl 6 is likely to take some other niches nobody might have expected. It's probably the first language to surpass Lisp in the ability to be metaprogrammed.

  76. PL/I all over again by Anonymous Coward · · Score: 0

    P 6 seems to have every single feature it's implementors could think of. I wonder if this will end like PL/I. They'll have a language that never gets fully implemented.

  77. Re:Actually, I found an example of what you mentio by brpr · · Score: 1

    It's not only that, it's the fact that there's no way of explicitly declaring local variables in Ruby. So if I declare a variable i within some scope, I have no way of knowing whether or not I'm overwriting a variable 'i' in a higher scope, or creating a new variable. In Perl all local variables are declared with 'my', so this problem doesn't arise.

    --
    Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
  78. Perl / Slash code by Anonymous+Brave+Guy · · Score: 1

    I guess it depends what you mean by "large scale" programs. If you're talking about web development then maybe the Slash codebase is large. In general, it's pretty small. It seems common to define a large codebase as one with over a million lines of code, and tens of millions aren't unusual.

    In fact, if you look at the history of Slashdot and the comments by the guys who developed and maintain the code, it's quite an interesting catalogue of the good and the bad of Perl. The devs took some neat ideas, and have implemented them effectively and from what I can tell reasonably quickly. OTOH, any non-trivial changes seem to be rather hard work for the dev team, and there have been some apparently simple (to the user) bugs that have gone unfixed for months.

    If we take this as representative of Perl code in general (which may or may not be fair) then it seems Perl is good for quick prototyping jobs and mostly write-only code, but not so good for long-term maintenance of larger developments. But I guess most people here already knew that. :-)

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.