Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Exegesis 7 Released (Perl 6 Text Formatting)

Posted by michael on Thu Mar 04, 2004 07:36 PM
from the folding-spindling-mutilating dept.
chromatic writes "Perl.com has just published Exegesis 7, Damian Conway's explanation of how text formatting will work Perl 6 (and now, Perl 5, thanks to his Perl6::Form module) will work. Think of it as Perl 1 for the 21st century. Also, Parrot 0.1.0, the virtual machine for Perl 6 and several other dynamic languages, released on Leap Day -- ever wanted to program in an object oriented assembly language?"
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • I 3 Perl (Score:1)

    by poptix@work (79063) * on Thursday March 04 2004, @07:36PM (#8470740)
    (http://www.poptix.net/)
    This was an excellent read.. glad to see perl is keeping up with the times!
    • Re:I 3 Perl by D'Sphitz (Score:1) Friday March 05 2004, @03:25AM
      • Re:I 3 Perl by typobox43 (Score:2) Friday March 05 2004, @03:32AM
        • Re:I 3 Perl by D'Sphitz (Score:2) Friday March 05 2004, @03:35AM
      • Re:I 3 Perl by poptix@work (Score:1) Friday March 05 2004, @09:59PM
      • 1 reply beneath your current threshold.
  • The best thing about Perl (Score:5, Interesting)

    One thing that you really have to love about the people who write Perl is that they have a sense of humor. This kind of document could be extremely boring and bland, but Damian had the good sense to liven it up by using humorous examples, mostly drawn from Shakespeare. He's doing some great work, but he's also obviously having fun doing it.

    • Re:The best thing about Perl (Score:5, Informative)

      by Saven Marek (739395) on Thursday March 04 2004, @07:44PM (#8470813)
      The long lost art of Good Documentation. There's been quite a case made lately (read ESR's CUPS rant for an example) for software that doesn't need documentation, when its method of use is made obvious merely by it's design. I think for consumer software that's just meant to be used one or two ways sure that's a good idea.

      But for something like Perl, it's all in the documentation. Here's to writers like Damian Conway not only providing summaries for new releases, but writing the original documentation!. If only it paid well!

      That been said O'Reilly would sell a good deal less books if the original docos were all they should be cracked up to be. Guess it doesn't have to be that good! There's nothing like getting a new fresh O'Reilly title in the mail.

      Mac desktops, OSX hints, scripts and more [67.160.223.119]
      [ Parent ]
    • Re:The best thing about Perl (Score:5, Interesting)

      by Anonymous Coward on Thursday March 04 2004, @08:02PM (#8470965)
      I was lucky enough to be lectured by Damain Conway on the fundamentals of programming in C. Easily the best lecturer I have ever met. Of all the lectures in Computer Science he was the only one who managed to pack out the theatre everytime. I swear people came in just for the show.

      A great combination of humour, intensity and analogies created an enthusiasm to listen and in turn learn. He even spent long hours writing applications to demonstrate principles (think virtual C intepreter with GUI).

      Whats more he loved to teach, he wasnt just there to complete his hours required like most lecturers.

      I wish we could find more people as talented as Damian to teach us. The world would be much smarter if we could.
      [ Parent ]
    • Re:The best thing about Perl by MrP- (Score:1) Thursday March 04 2004, @09:22PM
    • Re:The best thing about Perl by aled (Score:2) Friday March 05 2004, @12:00AM
    • 2 replies beneath your current threshold.
  • I tried, but I failed (Score:1, Insightful)

    by (1337) God (653941) on Thursday March 04 2004, @07:37PM (#8470749)
    I just couldn't wrap my brain around Perl.

    I ended up giving up and learning Python instead.
  • Uh... (Score:5, Funny)

    by double-oh three (688874) on Thursday March 04 2004, @07:39PM (#8470769)
    "ever wanted to program in an object oriented assembly language?"

    Uh... I gotta say... No.
    • Re:Uh... (Score:5, Funny)

      by Brandybuck (704397) on Thursday March 04 2004, @08:10PM (#8471016)
      (http://www.usermode.org/ | Last Journal: Tuesday April 17 2007, @09:13PM)
      I thought about this for five seconds in pseudo assembler, then my brain started leaking...

      register cx public inherit register ax
      push bx
      push dx
      ax::pop cx
      bx.mov ax
      shl bx->shr
      [ Parent ]
      • Re:Uh... (Score:5, Informative)

        by orthogonal (588627) on Thursday March 04 2004, @10:52PM (#8472171)
        (Last Journal: Sunday April 16 2006, @10:03PM)
        I thought about this for five seconds in pseudo assembler, then my brain started leaking...

        Leaking is especially apropos, because you should be thinking about encapsulation -- keeping implementation details from leaking --, not inheritance.

        I actually did a toy program or two -- very toy, class assignments -- in assembly after I knew C++, and consciously employed an Object Oriented outlook in designing the programs.

        This really is easier than it might seem at first: the second biggest hurdle -- and the most important first step -- to OO design is to always think of the entities in your program as objects with responsibilities.

        (The biggest hurdle is discovering -- and I use the word "discovering" intentionally, because it's a iterative process of exploring your problem domain -- where to "carve nature at the joints", or where one object ends and the next starts. Alas, a further discussion of this hurdle is beyond the scope of this comment.)

        Given that you keep in mind that you're dealing with objects, and that OO requires you to do so polymorphically, -- that is, you want to be able to do the same sorts of things with objects of different sizes and shapes -- you'll quickly find that you need a level of indirection, some stand-in for the actual object, a proxy that is itself the same size and shape for every kind of different object. In C (and C++ and Java) that "same-ness" proxy is a pointer; in perl, it's a hash, which the language conveniently handles the pointing to; in assembly it's a pointer too, or given assembly's inherent weak typing, a memory address.

        Just as the real first parameter to every C++ member function is the (hidden and implicit) this pointer, any object-oriented assembly is going to have to pass an object pointer to any functions called on that object. The object pointer will be the address of the actual object, and the object's state, instead of residing in numerous functions -- as you'd do in non-OO structural programming -- will reside in the object, at that pointed to memory.

        Finally, and most tedious, is the need for one function called on the object to access other member functions of the object. Essentially, we need a way to determine which of several possible functions foos should be the foo called for a particular object. C++ generally implements this as an array of pointers to function, perl by means of a hash map. Implementation details are implementation details, but essentially you need to specify some ordered list of (address of) functions when the object is created. A naive (and inefficient) implementation that would look like very late binding (and weak typing) to a C++ programmer would be simply to have each object include in its state an array of address; better solution would, as usual in computer science, involve a few more levels of indirection.

        The point I'm trying to make is this: Object Orientation isn't so much a property of one language or another -- although some languages support it far better than do others --, as it is a property of the way you think about the problem domain and about programming in general. It's an outlook, a mindset, a world-view, and it's maintaining that world-view, much more than worrying about the implementation details, that matters.

        Good Object Oriented programmers can -- and do -- write OO code regardless of the language they're writing in. Programmers who still don't get OO will write bad, pointless OO even in languages that support OO the best. And really good programmers know when to use OO, what parts of it to use, and when not to use OO.
        [ Parent ]
        • Re:Uh... by onash (Score:1) Friday March 05 2004, @07:40AM
    • Me either ... (Score:5, Interesting)

      by pavon (30274) on Thursday March 04 2004, @08:12PM (#8471028)
      but Parrot is really starting to excite me.

      The main reason being it's potential use as a generic high level "ABI" of sorts. Look at GTK/GNOME for example. The developers choose to use C as the base language, largely because it was the easiest language to create bindings for - everything can link to C. But the problem is that C only implements procedural concepts. Anything else must be crafted from hand, like gObject. So you end up reimplementing all the features of a high-level object oriented language, in C, and often this implementation isn't even as efficent as the high level language's implementation. On top of that, when create bindings for a high level language, you wrap all of these gObjects inside of a native language object, and end up with double the overhead. So what it comes down to is that you worked four times as hard, and came up with something twice as slow, just to be able to have an object oriented library that many languages can link to.

      Parrot has the oportunity to be for object oriented languages, what the C ABI has become for procudural languages - a common interface for programs of different languages to communicate. Imagine having high level libraries, that can be efficiently used by python, perl, ruby, befunge. Or having scriptable applications that are not just scriptable by one language, but by anything that targets parrot.

      When you add to that they fact that it will be cross-platform, and more efficent then most of these high level languages were to begin with, it's hard not to get excited.
      [ Parent ]
      • Re:Me either ... (Score:5, Insightful)

        by pbox (146337) on Thursday March 04 2004, @08:32PM (#8471175)
        (Last Journal: Wednesday August 25 2004, @05:55PM)
        Those are the promises of Parrot developers. It is however not that hard (but less wise) to get excited about promised values. It is better to get excited about delivered promises...

        Parrot is not the first try at this "execution machine" model, and I suspect not the last one either. The only ones that survived (so far) are the ones that target a single language. Python, Java comes to mind, while mono and .net is barely limping along. Maybe there is more to this high failure rate...

        At the same time it would be really exciting to see the birth of the first SUCCESSFUL cross-platform execution machine...
        [ Parent ]
      • Re:Me either ... by highwindarea (Score:1) Thursday March 04 2004, @09:39PM
      • Re:Me either ... by timeOday (Score:2) Thursday March 04 2004, @09:47PM
      • Re:Me either ... by MourningBlade (Score:2) Thursday March 04 2004, @11:05PM
    • Yeah, back when Assembler was all we had by ynotds (Score:2) Friday March 05 2004, @12:35AM
    • 1 reply beneath your current threshold.
  • I predict... (Score:3, Insightful)

    by rokzy (687636) on Thursday March 04 2004, @07:40PM (#8470775)
    lots of lame jokes about Perl code being incomprehensible despite the fact it can be the most readable.
  • by Shut the fuck up! (572058) on Thursday March 04 2004, @07:40PM (#8470784)
    The screen is covered with what looks like a still shot
    of a copy of "The Matrix" screen saver.

    He looks at it a minute, and realizes that the coworker
    is reading it, so it can't be a screen saver.

    He thinks about it a second, and then asks "Do you always
    ready your email fully encrypted with PGP like that?
    Decoding PGP in you head like that is _really_ impressive!".

    "No," says the coworker, "that's just a Perl script I'm
    working on".
  • by Tackhead (54550) on Thursday March 04 2004, @07:42PM (#8470789)
    > ever wanted to program in an object oriented assembly language?"

    Y'know, that couldn't be ANY MORE WRONG than an HTML rendering of a .GIF of a psychotic nun in a bondage outfit clubbing a baby seal to death with an Al Gore doll.

    (With apologies to the denizen of the Monastery, from whom I stole the idea.)

    • 1 reply beneath your current threshold.
  • ruby! ruby! (Score:3, Interesting)

    by Anonymous Coward on Thursday March 04 2004, @07:43PM (#8470799)
    I'm sure Perl 6 will just be the bee's knees, but I have long since switched to Ruby (or Python if I need certain libraries). As I get older, the philosophy behind Perl (more than one way to do it) really gets on my nerves.

    So, I'm interested to see Perl 6 when it comes out, but I sure as hell won't be using it for anything.

    Also I'm looking forward to a common runtime between the three languages so I can use Perl modules from Ruby. Now *that's* the best of all possible worlds, eh?
    • Re:ruby! ruby! by geniusj (Score:3) Thursday March 04 2004, @08:20PM
      • Re:ruby! ruby! by davegaramond (Score:1) Friday March 05 2004, @01:00AM
    • Re:ruby! ruby! by metamatic (Score:2) Thursday March 04 2004, @10:14PM
    • Re:ruby! ruby! by chipace (Score:1) Thursday March 04 2004, @10:55PM
    • 1 reply beneath your current threshold.
  • Finally, a good update. (Score:4, Interesting)

    by Fiona Winger (758088) on Thursday March 04 2004, @07:46PM (#8470830)
    (Last Journal: Thursday March 04 2004, @08:03PM)
    I have been using Perl for years now, and I have to say, its not been the best language to use.

    Being one who's never gone along with the best methods of coding, I've stuck with Perl for the past few years. I deem myself pretty proficient in it, and I find a new plethora of exploration available to me now that Perl6 is out.

    The fact that Perl6 is now a subroutine rather than hardcoded allows me to directly stream the formatting through the test. This is immensely helpful, for it allows me to organize the code more efficiently and get more out of my hard worked code.

    Sure, some parts may seem like a step back, but this new versions is much simpler to use, and has some huge advantages that all coders should get use from. /me nods his hat to Perl6.
    • Re:Finally, a good update. (Score:5, Insightful)

      by Saven Marek (739395) on Thursday March 04 2004, @07:53PM (#8470904)
      You know, I'm not very big on perl coding, but I do really like the language. Your point about never having gone with the best methods of coding is something I noticed however.

      I too wouldn't put perl as a "technically" best way to code ANYTHING, but it is however an intensely easy and powerful set of hacks, joined together quite well, and with a consistency that matches my own disorganised brain!.

      I'm good for that. Getting something technically 'correct' in the coding world seems to me to be revolved around far more efficient use of resources and cpu speed than perl does. In my job however we have thousands of fast PCs, and only so many good coders. I go for whatever supports the coders, and for many of us that's perl

      webalizer stats. thousands served monthly [67.160.223.119]
      [ Parent ]
    • WTF? by dash2 (Score:2) Friday March 05 2004, @12:24PM
      • Re:WTF? by e-Motion (Score:2) Friday March 05 2004, @04:25PM
    • Ugh, just to clarify... by Fiona Winger (Score:1) Thursday March 04 2004, @08:00PM
      • 1 reply beneath your current threshold.
    • 1 reply beneath your current threshold.
  • It's Not Assembly Language (Score:1, Informative)

    by Anonymous Coward on Thursday March 04 2004, @07:46PM (#8470834)
    Programming in assembler allows the programmer to create machine instructions tailored to a specific processor. This allows her to do things that are beyond the capabilities of any JIT optimizer or bytecode interpreter. If it assembles to VM bytecode, it's not assembler.
  • by Anonymous Coward on Thursday March 04 2004, @07:48PM (#8470854)
    I have always thought of C as high level assembler, and C++ as object oriented high level assembler.

  • VM's (Score:2, Interesting)

    by beware1000 (678753) on Thursday March 04 2004, @07:49PM (#8470861)
    Virtual Machines really seem to be the way of the future. But I am really not sure how I feel about them yet.. Parrot will have to prove itself yet, especially with the aftertaste .net and java have left in my mouth. Sounds like an interesting idea though even if only for a neatly compiling language
    • Re:VM's (Score:4, Informative)

      by erikharrison (633719) on Thursday March 04 2004, @08:01PM (#8470960)
      Well, actually VMs are the way of the past - in research circles the VM has been around forever.

      However, for what it's worth, Parrot's relationship to the JVM and the .Net VM is rather small. JVM/.Net are designed from the ground up to support systems languages (like Java and C#). They optimize for static typing and languages where most complexity happens at compile time. Parrot is a VM for languages like Perl, Python, and Ruby, (and TCL, and Lisp etc) whose typing is weaker, and where a runtime eval is a moderately common occurance.

      What specifically about the JVM puts you off? Or is it the host language that bothers you?
      [ Parent ]
      • Re:VM's by beware1000 (Score:1) Thursday March 04 2004, @08:17PM
      • Re:VM's by voodoo1man (Score:3) Thursday March 04 2004, @09:30PM
        • 'Weak vs. Dynamic': Type Systems (Score:5, Informative)

          by jstarr (164989) * on Thursday March 04 2004, @10:06PM (#8471832)
          Not quite. Weak is not the opposite of dynamic, but the opposite of strong. Type systems may be either weak or strong, and may be either dynamic or static.

          A weak type system will allow implicit type conversions, even those that are 'lossy' or improper. For example, converting a float to an int without requiring a cast. Or, more importantly, treating memory references (pointers) identically to integers. Pointer arithmetic is an abuse of a weak typing system.

          Strong typing requires explicit casts and will throw errors where casts do not appear. Java, Lisp, Python are all strongly typed. Haskell is _really_ strongly typed. When you cast a object to type Object in Java, you are losing type information, but you are doing it _explicitly_.

          C, Pascal, and Java are statically typed. Variables are created with a specific type in the code, not on demand. Python and Lisp are dynamically typed -- a variable's type is determined at run-time.

          For example, in C:

          int foo( int a, int b );

          declares a function that returns type 'int' and takes two arguments a, b, both of types 'int'.

          In Python:

          def foo( a, b ):

          declares a function that may or may not return a value (and whose type is known only at run-time) and takes two arguments, which may be of any type (although, internally, the program likely assumes a type).

          There are some quirks in the type systems of many languages. In Java, for example, "str" + 3 doesn't have any normal meaning, but the developers have defined any operation using a string as concatenation. In Python, and in most languages, such an expression will either return an error on compilation (static) or when running (dynamic).

          However, all combinations are possible and type systems are a fertile area of research.
          [ Parent ]
  • One of the reasons I love Perl (cut my teeth with Perl 4, now write a lot of Perl 5 code) is that it is a virtual swiss army knife of programming languages. There is a lot of power in there, but you can choose to use only as much as you might need. The "TMTOWTDI" ethos also appeals to me. And, in reading the updates on Perl.com, I see that this exact same spirit is going into the creation of Perl 6.

    So why am I worried? Well, it feels like Larry saw Microsoft's .NET announcements and said, "Hmmm...multiple programming languages that all compile down to the same bytecode and execute in the same virtual machine...sounds like a reasonable idea to me!" The Parrot VM is a neat idea, that goes even further than .NET since it's multi-platform, and definitely will be very nice when it's finished. But I feel like it's going to delay Perl 6. And as nice as Perl 5 is, languages like Python and PHP are beginning to surpass it in feature set and ease of use. I don't want Perl 6 to be irrelevant when it finally shows up.

    Also, like a very impatient, immature kid on December 23, I want my Perl 6 now, damnit!

    But, I trust the Perl 6 team. They're smart people. Read the newsgroups and the forums, and you'll agree. When Perl 6 and Parrot are ready for prime-time, I am pretty sure that I won't be looking over at Python and PHP and feeling guilty anymore.

    Ah well, back to coding...
    • by Ars-Fartsica (166957) on Thursday March 04 2004, @08:03PM (#8470977)
      Perl 6 is by all accounts a new language. Yes it will detect and parse Perl 5, but we can already do that now. How many coders will follow the new syntax and features? This is no small task, I have read all of the Apocalypse/Exegesis articles end-to-end multiple times and a lot of it still hasn't sunk in. This is a major change.

      Then there are the practical issues - will Parrot be fast enough and mostly bugless in time for Perl 6 to sit on top of it? I am concerned that we will need eighteen months of point releases and we haven't even had an alpha yet. Meanwhile people are looking at Ruby, Python, Mono/C# etc.

      I recommend they just wrap up whatever concepts they have now and start moving toward an alpha. If we don't see one in 2004 I think most people will have moved on.

      [ Parent ]
    • Re:Perl 6 is hugely ambitious, and that worries me by Dalcius (Score:3) Thursday March 04 2004, @08:23PM
    • Re:Perl 6 is hugely ambitious, and that worries me by ask (Score:1) Thursday March 04 2004, @08:37PM
    • Re:Perl 6 is hugely ambitious, and that worries me by Joff_NZ (Score:1) Thursday March 04 2004, @10:12PM
      • 1 reply beneath your current threshold.
    • The Parrot VM is a neat idea, that goes even further than .NET since it's multi-platform, and definitely will be very nice when it's finished. But I feel like it's going to delay Perl 6.

      Nah, Parrot isn't the bottleneck. Parrot development has actually moved pretty fast: they quickly came up with a raw-functionality virtual machine, and at this point the Parrot engine seems to meet the basic runtime needs of Perl5, Perl6 [as specced out to date], Python, and PHP.

      Parrot isn't done yet to be sure, but it's already complete enough that, for example, the employer of one of Parrot's main developers is already using Parrot as the runtime engine for their corporate software. [I'd get in to details, but I forget the details -- Dan Sugalski talked about it for the Boston Perl Mongers a month or two ago.] Likewise, there's already a mod_parrot Apache module under development that will allow Parrot targeted code to run, and run very quickly, while embedded in the web server. Longer term, one of the target languages for Parrot is Z-code, so that Parrot will be able to run old text games like Zork and Hitchhiker's Guide To The Galaxy -- with luck, this could lead to Parrot being the embedded virtual machine for portable game machines.

      Parrot is, in other words, being actively developed, and there are big plans for it.

      Parrot is hardly holding Perl6 back.

      The bottleneck with Perl6 seems like the actual design work. Once Larry Wall puts out one of his Apocalypses, it never seems to be long before Damian Conway comes out with an explanation, including working code that can often be experimented with today under Perl5, with his Exegeses. There seems to be a ready pool of people eager to implement this stuff as it becomes available, it's just that the project is so *big* that it's taking a while for people to get anywhere with it in their spare time.

      [ Parent ]
    • Re:Perl 6 is hugely ambitious, and that worries me by Junks Jerzey (Score:2) Friday March 05 2004, @09:35AM
    • 1 reply beneath your current threshold.
  • Yeah, but... (Score:5, Funny)

    by Tailhook (98486) on Thursday March 04 2004, @07:54PM (#8470913)
    ever wanted to program in an object oriented assembly language?

    Yes. However, some nights when I drive home from work I eye a bridge abutment thinking I'd like to bury my car in it at 140mph. So I'm not certain that whether I'd like to do something is a great way to evaluate it. What's your point?

    BTW, is there a simple way to disable an airbag? Isn't there supposed to be a switch someplace? Thanks.
    • Re:Yeah, but... (Score:4, Funny)

      by Thing 1 (178996) on Thursday March 04 2004, @08:08PM (#8471003)
      (Last Journal: Wednesday May 11 2005, @11:01PM)
      BTW, is there a simple way to disable an airbag? Isn't there supposed to be a switch someplace? Thanks.

      Well, sure, it's a three-step process (and I'm sure there's MTOWTDI):

      *Click* remove seatbelt.

      *Clunk* open door.

      *Splat* roll out.

      [ Parent ]
    • Re:Yeah, but... by bunnyman (Score:1) Thursday March 04 2004, @10:54PM
    • 2 replies beneath your current threshold.
  • We need an alpha in 2004 (Score:4, Insightful)

    by Ars-Fartsica (166957) on Thursday March 04 2004, @07:55PM (#8470924)
    I appreciate Damian's work in clarifying Larry's writings, but the perl 6 project has three years (timed from Larry's first Apocalypse) behind it with nary an alpha in sight.

    I am sure something is coming down the pike, but making a huge announcement like a major rearchitect puts a lot of developers in suspended animation - unwilling to invest more time mastering and extending the "end-of-life'd" perl 5. Many of those people are now looking at other options.

    As an aside, I'm not sure where the consensus is coming from for the new language proposals - the code samples in Larry and Damian's writings are becoming more and more cryptic. I wonder if they are making perl 6 to unapproachable by new coders.

    • Re:We need an alpha in 2004 by Anonymous Coward (Score:2) Thursday March 04 2004, @08:00PM
    • Re:We need an alpha in 2004 by d00ber (Score:2) Thursday March 04 2004, @08:33PM
    • We HAD an alpha IN 2003 !! by hummassa (Score:1) Thursday March 04 2004, @08:36PM
    • "end-of-life'd" perl 5? by Ender Ryan (Score:2) Thursday March 04 2004, @10:57PM
    • Re:We need an alpha in 2004 (Score:5, Informative)

      by ajs (35943) <ajs.ajs@com> on Friday March 05 2004, @12:31AM (#8472747)
      (http://www.ajs.com/~ajs/)
      I asked the same thing recently on the p6l mailing list [google.com]. Larry responded [google.com] with some interesting news. First off, I had not realized that he had taken a lot of time off last year for health reasons.

      Second, he posted (as you can see from the link above) a full outline of Perl 6's specifications-to-be and explained that he's been spending a lot of time on A12. That's right, he's skipping over A7 (delegated to Damian) and A8-A11 (which he'll return to later) and doing the chapter on objects. This is an important part of the language, and really did need to be covered before the rest could be fleshed out. It seems that he expects most of the rest of the spec to be about as much work as A12 is alone, and he claims that's just a few days or weeks at most away from being finished.

      That said, keep in mind that the cryptic things you see on p6l are the result of reading code snippits written in a language that doesn't exist yet. Every time Larry steps in and explains things, the picture gets a bit clearer (partly because Larry is a great communicator but partly because he's quite capable of and willing to cut away a lot of noise and render some signal from its remains).

      Perl 6 is, as far as I can tell a lovely evolution of Perl... it's perhaps more orders of magnitude more evolved than I would have suggested as the next step, but looking at the good work it has resulted in for Parrot, I'm not sure I'd turn back.
      [ Parent ]
  • Python/PERL users unite! (Score:2, Interesting)

    by ShatteredDream (636520) on Thursday March 04 2004, @07:57PM (#8470937)
    (http://www.blindmindseye.com/)
    It's too bad that the teams had been only joking about joining forces. If the teams had worked together to create a conceptual clone of .NET wherein Python and PERL could be used interchangeably in the same runtime, the OSS developer base would be very well off right now.

    Think about the possibility. First port PyQT and wxPython to parrot. You write your GUI code with Python and byte compile it to a neutral Parrot format. You need to do complex substring matching so you write some good reusable functions that take advantage of PERL's string handling capabilities and then byte compile them. Load them into the event handling code and you've got a great hybrid.

    What would be really cool would be to see Java and a form of OO BASIC ported to Parrot.
  • Ewwwww (Score:4, Insightful)

    by unfies (754694) on Thursday March 04 2004, @08:03PM (#8470980)
    (http://www.gamesavants.com/)
    ... ever wanted to program in an object oriented assembly language? ...

    God no. It's bad enough when a high level compiler attemps to guess what you want (C++, etc)... it'd be horrid if ya had to have something supposedly machine level guess...

    • Re:Ewwwww by malloc (Score:1) Friday March 05 2004, @12:54PM
  • I did RTFA (Score:2)

    by SharpFang (651121) on Thursday March 04 2004, @08:08PM (#8471005)
    (http://sharpy.xox.pl/ | Last Journal: Wednesday September 14 2005, @02:12PM)
    and I can say I love the new stuff. No less powerful than regex, and no less obscure, easy to learn, use and abuse. Slightly easier to read and understand, though still tricky. Eh, if we had that in the pre-ncurses times! :)

    And for those who hate Perl, it's still worth reading, for great texts used in the "text formatting examples" like a recipe for 2 doomed souls or 10 reasons why you didn't do your English Lit. homework.
  • Conclusion/Highlights (Score:3, Informative)

    by No_Weak_Heart (444982) on Thursday March 04 2004, @08:14PM (#8471044)
    (http://shoesfullofdust.f2o.org/)
    Form follows format. From the end of this Exegis, some hightlights:
    "Report generation was one of Perl's original raisons d'etre. Over the years we've found out what
    format does well, and where its limitations lurk. The new Perl 6 form function aims to preserve format's simple approach to report generation and build on its strengths by adding:
    • independence from the I/O system;
    • run-time specifiable format strings;
    • a wider range of useful field types, including fully justified, verbatim, and overflow fields;
    • the ability to define new field types;
    • sophisticated formatting of numeric/currency data;
    • declarative, imperative, distributive, and extensible field widths;
    • more flexible control of headers, footers, and page layout;
    • control over line-breaking, whitespace squeezing, and filling of empty fields; and
    • support for creating plaintext lists, tables, and graphs.

    And because it's now part of a module, rather than a core component, form will be able to evolve more easily to meet the needs of its community. For example, we are currently investigating how we might add facilities for specifying numerical bullets, for formatting text using variable-width fonts, and for outputting HTML instead of plaintext."

    'cause i'm lazy, that's why
  • Aw geez... (Score:2)

    by bersl2 (689221) on Thursday March 04 2004, @08:31PM (#8471167)
    (Last Journal: Tuesday September 25, @04:26AM)
    And I just started learning Perl 5...
  • Perl remains beautiful (Score:5, Insightful)

    by Dr. Zowie (109983) <slashdot AT deforest DOT org> on Thursday March 04 2004, @09:02PM (#8471410)
    Perl is the most beautiful language I've had the pleasure of learning. Lots of folks complain that perl must be ugly since it's so easy to write really butt-ugly code in it; but it's also very easy to write mindblowingly powerful, clear code. Enough thought has been put into the language design that you can abuse most aspects of the language and still get what you wanted.

    It's easy to forget, when using perl, just how, well, tedious, it is to work in C (let alone C++) or shell or Java or even, yes, Python.

    The exegeses so far have been full of fabulous goodies to use and abuse. The main problem, as others have pointed out, is that perl6 is still largely vaporware.

  • OO Assembly? (Score:4, Informative)

    by gidds (56397) <slashdot&gidds,me,uk> on Thursday March 04 2004, @09:06PM (#8471430)
    (http://www.gidds.me.uk/)
    ever wanted to program in an object oriented assembly language?

    No, but if I wanted to, I could already [sun.com], thanks.

  • Is text formatting relevant (Score:4, Insightful)

    by jfdawes (254678) on Thursday March 04 2004, @09:22PM (#8471531)
    After reading through a lot of this article and being blown away by the genuinely powerful and, dare I say it, awesome abilities that have been given to the form function, I'm left asking myself:

    "Who gives a crap?"

    Most the projects I've worked on for the last few years have predominately displayed text in web pages. Almost all the reports produced have been generated as HTML and then printed as necessary. The only text output done has been generally into log files, where you really don't need a lot of formatting.
    While this is obviously a really great, well thought out piece of coding, ... that's all it is, some geek's personal project that doesn't really seem to have much relevance to the real world.

    Maybe I'm just missing a huge community of people who spend most of their time looking at command lines and printing out reports in fixed width fonts.
  • "ever wanted to program in an object oriented assembly language?"

    No.
  • Deja vu all over again .... (Score:1, Insightful)

    by Anonymous Coward on Thursday March 04 2004, @09:47PM (#8471680)
    The new Perl "form" stuff sure seemed familiar for some reason, but I couldn't figure out why. Then I figured it out .... anyone else remember the "print using" statement in BASIC ????
  • Object assembler goes back to ~ 1985 (Score:1, Interesting)

    by Anonymous Coward on Thursday March 04 2004, @09:53PM (#8471705)
    Real object assembler is almost twenty years old:

    Object Assembler


    Object Assembler is a set of macros for the Motorola 68000 assembly language that provides easy access to the MacApp class library and to class-definition facilities. It is built on top of the macro assembly language provided by the Macintosh Programmer's Workshop assembler. Object Assembler was developed by Apple expressly for the Macintosh and it will be officially shipped late in 1986. The Object Assembler macros let you define new classes, define method bodies, instantiate objects, easily reference instance variables by name, and invoke methods, incl uding inherited ones.


    See more [byte.com].
    • 1 reply beneath your current threshold.
  • by imnoteddy (568836) on Thursday March 04 2004, @11:32PM (#8472384)
    Downloaded the Parrot source code. No README or INSTALL in the top-level directory, but there is Configure.pl, with comments that seem to indicate that you run this first. OK, run it but it barfs on line 405:

    use Parrot::BuildUtil;

    there's no file with 'BuildUtil*' name in the source distro.

    Conclusion: not ready for prime time.

  • An object-oriented assembly language -- what, you mean like zasm?
  • by aled (228417) on Thursday March 04 2004, @11:56PM (#8472543)
    How does Perl templating mechanism to other templating implementation like Velocity [apache.org]? I would like to know what pro/cons has each one or others that /.ers may have used.
  • by Ragica (552891) on Friday March 05 2004, @01:14AM (#8472931)
    (http://www.vex.net/)
    Am i missing something, or is what people are so excited about in this thread just a slightly improved plain text formatting engine?

    Is it just my imagination or are the two tops of this article linking perls extended new plain text rendering capabilities with perl 6 and the parrot vm? Is that what Larry has been working towards all this time? Better faster plain text reports?

    Ouch. (-:

  • Best things about Perl are... (Score:1, Interesting)

    by Anonymous Coward on Friday March 05 2004, @02:47AM (#8473264)
    Perl made us productive and inspired new languages like Ruby which took some great features from Perl and made a language actually a pure joy to use. http://www.ruby-lang.org

    Perl6 will finally cleanup a lot of baggage to make it more competitive with newer/cleaner/easier languages (like Ruby). If done right, it will recapture the former Perl users who migrated to Python and/or Ruby.

    Parrot will give us an alternative to the single-language Java VM and the multi-language Microsoft CLR. We can only hope that it leverages the mistakes and successes of both JVM and CLR to provide something that is better than both.

    While it shouldn't be limited in a particular CPU, it should take reality into consideration and make it easy to aggressively optimize for AMD/Intel (98% of desktops) and IBM PPC97x (Macs, XBox 2, Playstation 3, future IBM Linux workstations).
  • Exegesis (Score:2)

    by mabu (178417) on Friday March 05 2004, @07:06AM (#8473939)
    I wish I had something inciteful to say, but I don't. However, I have to jump at the chance to type, "exegesis". It's just such a cool word. I wonder how long it will be before Fox News claims they own it.

    You couldn't pick a better name for such a utility.
  • by pkphilip (6861) on Friday March 05 2004, @07:19AM (#8473978)
    (Last Journal: Monday November 07 2005, @04:35AM)
    Turbo Assembler (later versions) from Borland did support a level of object orientation. It actually shipped with examples of object oriented assembly code.

    OOPs in TASM [mujweb.cz]

  • Unicode operators! (Score:1)

    by PhilK (20847) on Friday March 05 2004, @08:14AM (#8474162)
    (http://www.rotfl.com.au/)
    I was prepared to keep an open mind about Perl6 until this choice quote:
    Note that each ellipsis is a single, one-column wide Unicode HORIZONTAL ELLIPSIS character (\c[2026]), not three separate dots.

    Sure, lets add operators that can't even by !@#$% typed. Yes, you can add :is ASCII(!@#$%) but that kind of misses the point.

    Not only does Larry get the colon, he gets the entire unicode set!

  • Why Perl reports are *so* important ? (Score:3, Informative)

    by master_p (608214) on Friday March 05 2004, @09:41AM (#8474782)
    I don't get it, since I have never worked with Perl, so I am asking the perl programmers out there: what is so special about plain-text reporting ? there are fine tools out there that can produce beautiful html reports that plain text will never be comparable to. I understand that text reports may have their uses in the back office, but that accounts for a small percentage of overall reporting.

    Furthermore, 'reporting' is a not a feature of a programming language. The same report package could be done with C++, for example. Will Perl 6 bring something *really new* in the programming languages department ?
    • 1 reply beneath your current threshold.
  • by Anonymous Coward on Thursday March 04 2004, @07:51PM (#8470880)
    #!/usr/bin/perl

    ($e,$x,$y,$v,@m)=(shift,0,0,1,1 ,1,0,0);unshift@s,$_,$_ for 1..$e-1;unshift@s,$e;
    @p=(1,0);for(@s){push@m,$d= shift@m;push@p,$a=shift@p;$d?$a?++$x:++$y:$a?--$x: --$
    y,$l[$y][$x]=($e=>10?$v<10?'00':$v<100?0:'':$ e<10?$v<10?0:'':'').$v++,for 1..$_}
    warn"@$_\n"for@l
    [ Parent ]
  • Re:Parrot progress (Score:2)

    by metamatic (202216) on Thursday March 04 2004, @10:30PM (#8472014)
    (http://www.pobox.com/~meta/ | Last Journal: Sunday February 29 2004, @09:19AM)
    Parrot will perpetually be 6 months from doing anything useful. [...] Parrot is too complex and bloated for what little it does. It already has over a thousand opcodes - talk about simplicity! What moron designed this thing?

    There's this CPU that has clearly been designed by a complete bunch of morons... can you believe the documentation listing the opcodes is 566 pages long [intel.com]?

    Obviously this x86 thing will perpetually be 6 months from doing anything useful.
    [ Parent ]
  • Re:Meanwhile PHP surges ahead (Score:2, Interesting)

    by daperdan (446613) * on Thursday March 04 2004, @11:00PM (#8472225)
    Check out Amazon. [amazon.com] The net's largest retail site seems to put a heavy emphasis on Perl. You don't see a whole lot a php in the job requirements there do you? There may not be big growth in Perl but it's still in big demand.

    Judging by the number of sites that depend heavily on Perl I can assure you that it's not going to be sidelined soon.

    It's true that PHP is a fantastic language for small sites. Mod_perl is a hog when it comes to memory but memory is cheap and mod_perl is tried and tested. There's a reason slashdot uses mod_perl to power its site.
    [ Parent ]
  • by chipace (671930) on Thursday March 04 2004, @11:11PM (#8472284)
    You are comparing a specialized tool to a general one. I wouldn't use PHP to parse my log files and do heavy file comparisons. I believe that web professionals using Perl are a minority of the total user base.
    [ Parent ]
  • 19 replies beneath your current threshold.