Slashdot Mirror


Searching for the Best Scripting Language

prostoalex writes "Folks at the Scriptometer conducted a practical survey of which scripting language is the best. While question like that is bound to generate flamewars between the usual Perl vs PHP, Python vs Perl, VBScript vs everything crowds, the Scriptometer survey is practical: if I have to write a script, I have to write it fast, it has to be small (less typing), it should allow me to either debug itself via a debugger or just verbose output mode. sh, Perl and Ruby won the competition, and with the difference of 1-2 points they were essentially tied for first place. Smalltalk, tcc, C# and Java are the last ones, with Java being completely unusable in scripting environment (part of that could be the fact that neither Java nor C# are scripting languages). See the 'Hello world' examples and the smallest code examples. Interesting that ICFP contests lately pronounced OCaml as the winner for rapid development."

673 comments

  1. Slashdot Code Auto Answer by Anonymous Coward · · Score: 5, Funny

    Hello, I am the Slashdot Source Code. The answer is Perl. This question is now answered.

    Thank you for visiting Slashdot.

    1. Re:Slashdot Code Auto Answer by Anonymous Coward · · Score: 0

      Then I suppose HTML 3.2 is the "winning" web markup language?

    2. Re:Slashdot Code Auto Answer by Anonymous Coward · · Score: 0

      Perl is the answer if you had to chose a single language. But there is no reason to limit one's self to a single language. Each one has their strengths and weaknesses and a good developer will chose the one that does the task the best.

  2. The eternal quest... by Anonymous Coward · · Score: 5, Insightful

    ... for a difinitive answer to a subjective question.

    1. Re:The eternal quest... by LBArrettAnderson · · Score: 4, Insightful

      What they should have done was make a survey where they ask what peoples needs and wants are. I use perl because I think it's the best solution for my website and it does everything that I need it to do. Other people use PHP because it's easier in certain ways. Someone make a points survey which asks questions about the persons' intelligence, personality, and needs, and that MIGHT tell them what language they should be writing in.

    2. Re:The eternal quest... by Anonymous Coward · · Score: 0

      Hey Bozo!
      Bug Report!
      Run SpellCheck on your own messages!
      analyzyer should be spelled analyzer.

    3. Re:The eternal quest... by TastyWords · · Score: 3, Funny

      Hmmm.
      Good Point.
      We'll incorporate it into our next build.

    4. Re:The eternal quest... by mystran · · Score: 1
      Indeed.

      There used to be a time, when you'd laugh the first few times someone asked a question about 'best' something (which can be almost anything after all), and finally threw him out of the BBS if he didn't learn, to avoid introducing nazis so often.

      These days the best thing to do would be to ignore such questions altogether, for if you don't you just end up crying, like I do right now.

      --
      Software should be free as in speech, but if we also get some free beer, all the better.
    5. Re:The eternal quest... by DavidNWelton · · Score: 5, Informative

      My friend Salvatore and I did a similar site, although we haven't added so many languages and tests, and are more focused on benchmarking. It's available at: scutigena.sf.net

    6. Re:The eternal quest... by Mycroft_VIII · · Score: 1

      NOT claiming it's best, just prety good, and rather obscure. Well at least I like it.
      Not even totaly shure it counts as a scripting language, interpreted yes, scripting I'll leave each person to judge for themselves.
      It's called Euphoria. Runs under dos, windows, and Linux. And as you might guess from the url it runs pretty quick, and can be learned and written in fairly quick.
      Data types are simple and flexible. It's also easy to create specific data types.
      There are also converter programs that translate the code to equivalant C (forget wich flavor) for several compilesr including GCC.
      It's only downside is that while you can get it free(beer), the source itself is currently closed.
      However you can get the source if you pay for it, and the liscense that comes with the source seems halfway decent for it's type.
      Anyway I thought I'd through that out in case someone else finds it useable. Give it a look, it's so easy to learn and code in while remaing fairly powerfull and flexible. There is also quite a sizeable base of free(both) user suplied code and programs it's worth checking out.

      Mycroft

      --
      https://signup.leagueoflegends.com/?ref=4c3ed6600b6ea
    7. Re:The eternal quest... by Phillup · · Score: 1

      What they should have done was make a survey...

      Well, If they had done that, you'd have a bunch of dumbasses that don't actually understand the problem space all answering:

      VisualBasic

      Enough idiots can wreck even the best designed survey.

      --

      --Phillip

      Can you say BIRTH TAX
    8. Re:The eternal quest... by Anonymous Coward · · Score: 0

      I thought that was abandon ware. You're using little outdated sw and it seem the ML has been quiet for long time, nice to hear people are still working on it.

    9. Re:The eternal quest... by mtsv01 · · Score: 4, Informative
      Another interesting comparison of programming languages is "An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl"
      The interesting conclusions are:
      • Designing and writing the program in Perl, Python, Rexx, or Tcl takes no more than half as much time as writing it in C, C++, or Java and the resulting program is only half as long.
      • No unambiguous differences in program reliability between the language groups were observed.
      • The typical memory consumption of a script program is about twice that of a C or C++ program. For Java it is another factor of two higher.
      • For the initialization phase of the phonecode program (reading the 1 MB dictionary file and creating the 70k- entry internal data structure), the C and C++ programs have a strong run time advantage of about factor 3 to 4 compared to Java and about 5 to 10 compared to the script languages.
      • For the main phase of the phonecode program (search through the internal data structure), the advantage in run time of C or C++ versus Java is only about factor 2 and the script programs even tend to be faster than the Java programs.
      • Within the script languages, Python and in particular Perl are faster than Tcl for both phases.
      • For all program aspects investigated, the performance variability due to different programmers (as described by the bad/good ratios) is on average about as large or even larger than the variability due to different languages.
    10. Re:The eternal quest... by angel'o'sphere · · Score: 1

      Yeah,

      but the paper is done by Lutz Prechelt in year 2000. Meanwhile Java is as fast as C ...

      I guess for "language shoot outs" and benchmarks like this there should be an update every year with the newest language versions used.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    11. Re:The eternal quest... by dasmegabyte · · Score: 2, Interesting

      True, true. Over the past five years or so I've used about a dozen scripting languages, and none of them has really stood out and said, "pick me, I'm the best." For starters, some of the fastest languages to write in are also the most esoteric. And some of the most forgiving languages are among the slowest. Here's a brief breakdown of when *I* use which language.

      Oh, and I do not use PERL online, as PERL is WAY too powerful a scripting langauge to allow web visitors to access. Sure, you can tie it down pretty heavily, but why worry about the hassle? JSP has a great security model and I'm used to it, and PHP, being DESIGNED for the web rather than ADAPTED to it, is a nice compromise. These are personal biases and preferences based on my own experiences, please don't flame me because your biases, preferences and experiences WILL be different.

      On the web server, when I want to give it to other people: JSP / JScript (under ASP).
      On the web server, when I just want to get it done: PHP
      On the web server, when money isn't an option and I want to give it to a web designer and never worry about it again: ColdFusion

      On a UN*X machine, when I want to give it to other people: Python
      On a UN*X machine, when I just want to get it done: Perl
      On a UN*X machine, when I just might have to contact a Java object: Python

      On a Windows machine, when I don't care about accessing COM objects: Perl under WSH
      On a Windows machine, when I need good drag and drop support, pretty menus, use COM objects, use Windows networking resources, etc: JScript under WSH (I am more comfortable ending likes with semicolons);
      On a Windows machine, when I might give the code to somebody else who's mind is hopelessly stuck in ASP/VB land: VBScript

      Oh, and don't overlook the usefulness of combining these guys! Marshalling output between scripting languages with UNIX shell scripts or WSH containers is not a black art...if you don't have the time, and you know how to do function XX in Perl and function YY in Python, why NOT pipe XX to YY? I have scripts on my webserver that use three or four different scripting languages, merely because adapting pre-existing code was quicker than porting it.

      --
      Hey freaks: now you're ju
    12. Re:The eternal quest... by ManoMarks · · Score: 1

      If you weren't already moded 5, I'd mod you up. What I love are the "objective" ways to definitively answer a subjective question. This is a good case in point. The answer to the question uses a point system. But the point system is, of course, a subjective weight.

      --

      That's gotta fit into your schema somewhere

    13. Re:The eternal quest... by Dasher42 · · Score: 1

      You're very convincing IMHO until the very end, there. "Why not pipe XX to YY" conjured up visions of some of the most horribly broken and unmaintainable software I have ever witnessed.

      We're talking cobbled-together abominations of compiled C, bash scripts, and Perl, with no coherent division of responsibility. The requirements for the underlying system become so fixed and detailed that transporting it to a new system was difficult at best (we had to leave it on a Redhat 5.1 server). There were all kinds of undocumented points of configuration, even embedded in the source code.

      If I ever find the author of that package, I should like to superglue their fingers together!

      It's better to know one language well, and to know what it's good for, than to use a little bit of everything in a way that just barely works! I for my part truly prefer Python and C++ for their respective goodies, and perhaps Perl for some quick and dirty regular expression work. Whatever your preference, there's no excuse for any software of importance not being designed for easy maintainability.

    14. Re:The eternal quest... by killjoe · · Score: 1

      "True, true. Over the past five years or so I've used about a dozen scripting languages, and none of them has really stood out and said, "pick me, I'm the best.""

      Have you tried Ruby?

      --
      evil is as evil does
    15. Re:The eternal quest... by Anonymous Coward · · Score: 0
      a semantic analyzyer of "bozo posts".
      bozo posts for bozo articles...
  3. flamewar volley 1 by nocomment · · Score: 4, Funny

    where's php?
    print "hello world";

    --
    /* oops I accidentally made a comment, sorry */
    /* http://allyourbasearebelongto.us */
    1. Re:flamewar volley 1 by kfg · · Score: 4, Insightful

      Scriptometer survey is practical

      Well, for my money, I'm more inclined to start a flamewar over just how they go about defining "practical."

      KFG

    2. Re:flamewar volley 1 by TheRealMindChild · · Score: 3, Interesting

      VBScript is mentioned, but I dont see it anywhere on that page

      MsgBox "Hello World"

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    3. Re:flamewar volley 1 by prockcore · · Score: 4, Insightful

      Actually, php has the smallest hello world. Anything not wrapped in php tags is passed right through, so "Hello World" in php is literally the length of the string.

      Plus PHP supports everything they checked for.. so why wasn't it included?

    4. Re:flamewar volley 1 by JWSmythe · · Score: 4, Informative

      But they probably would want it at least in the language, so it would be:

      <? print "Hello World" ?>

      or

      <? echo "Hello World" ?>

      They probably should have included it, but that would add quite a few other "web" scripting languages, as long as they have a way to run them locally. Off the top of my head, I'm thinking ColdFusion, I'm sure there are more.

      I think a fun game would be to find the longest way to print "Hello World", without unnecessary filler functions or comments. My first attempt would be to have the Base64 encoded string as a variable, then decode it, then print it, and have all that in an encoded eval.

      I found a script someone had that did their "protection" that way. Without the registration key, you couldn't run it, and they had this beautiful set of encoded strings in evals that did the checking. Took me a good 20 minutes to figure the whole thing out. Then I rewrote that part, so I could try the software without a working key. :)

      The software was otherwise crap, except for all the work they had put into requiring the key. I tried it, and proceeded to delete it. It would have been nice if they had a shareware version to try first. I'm really glad I didn't spend the $200 they wanted for it.

      --
      Serious? Seriousness is well above my pay grade.
    5. Re:flamewar volley 1 by NanoGator · · Score: 1

      "But they probably would want it at least in the language, so it would be:

      "


      Hah, got you all beat!

      ?> Hello World. <?

      --
      "Derp de derp."
    6. Re:flamewar volley 1 by Anonymous Coward · · Score: 0

      .. so why wasn't it included?

      I just have to say it... :-)

      because PHP sucks?

    7. Re:flamewar volley 1 by JWSmythe · · Score: 1

      Again, that's not inside what's actually parsed in the language.

      But hey, people lie about what they do all the time. :) I've known people do write out HTML pages, stick an extension as if it's a parsed page, and call it programming.

      You've proven PHP, ASP, CF, shtml, and I'm sure plenty of others, with effectively the same statement.

      --
      Serious? Seriousness is well above my pay grade.
    8. Re:flamewar volley 1 by Anonymous Coward · · Score: 0

      I think a fun game would be to find the longest way to print "Hello World", without unnecessary filler functions or comments. My first attempt would be to have the Base64 encoded string as a variable, then decode it, then print it, and have all that in an encoded eval.

      Only Base64 encoded? I'd write it out in 1s and 0s...

    9. Re:flamewar volley 1 by Decaff · · Score: 1

      Not Just PHP. Its the same in JSP, ASP or any web page scripting language.

    10. Re:flamewar volley 1 by JWSmythe · · Score: 2, Funny


      I'm playing with a script now, to see the most obnoxious way to do it. :) Hmmm, converting it to binary may end up really obnoxious.. Right now, it's just convering characters to their ASCII numbers, binary numbers would make it huge.

      Thanks for the idea!

      --
      Serious? Seriousness is well above my pay grade.
    11. Re:flamewar volley 1 by Anonymous Coward · · Score: 0
    12. Re:flamewar volley 1 by dieScheisse · · Score: 2, Informative

      True, except the latest versions of php 4.x have a 'CLI', non-web version.

      As a matter of fact, the older versions had a CGI version which could be run from the console as well.

      So, yes, it should have been included.

    13. Re:flamewar volley 1 by wamcfield · · Score: 0

      how about:

    14. Re:flamewar volley 1 by wamcfield · · Score: 0

      that should be:

    15. Re:flamewar volley 1 by opello · · Score: 1

      huffman encode the string, and write a huffman decode function... or huffman encode, decode, display...

      echo(huffmanize(dehuffmanize("Hello World!")

      or, even more inventive: Hello World![insert thousands more exclamation points]

    16. Re:flamewar volley 1 by meta_gorn · · Score: 1

      I agree whole-heartedly. I've been using PHP stand-alone in lieu of shell scripting for quite some time now, for administrative tasks like cron jobs, ssh agent management, etc. It's just too damn simple and convenient. Why not include it in the rankings?

      --
      --- When I grow up, I want to be a legislator of scientific laws.
    17. Re:flamewar volley 1 by Anonymous Coward · · Score: 0

      What about:

      <?="Hello World"?>

    18. Re:flamewar volley 1 by Piaskal · · Score: 1

      I don't fully agree that it's not parsed in the language, beacouse you can do something like this in PHP: Hello World! Goodbye world! and the result will depend on the value of $hello.

    19. Re:flamewar volley 1 by Piaskal · · Score: 1
      I meant:
      <? if ( $hello==1 ) { ?>
      Hello World!
      <? } else { ?>
      Goodbye world!
      <? } ?>
    20. Re:flamewar volley 1 by Anonymous Coward · · Score: 0

      is the correct way to do it. I'm not saying that PHP isn't crap. I'm just saying that there's a shorter way to do it.

    21. Re:flamewar volley 1 by babbage · · Score: 1
      I think a fun game would be to find the longest way to print "Hello World", without unnecessary filler functions or comments.

      Welcome to the world of the JAPH, or "Just Another Perl Hacker" game, in which frighteningly talented peoplee try to come up with the most convoluted possible ways they can think of to output the string 'just another perl hacker'.

      Part of me is impressed by how expressive this language is, that it allows people all these inventive ways to do the same simple task.

      Part of me has no trouble seeing way games like this scare a lot of people away from what really is a very nice language.

      In any case, I don't think Perl is the only language where this meme has taken hold, but it certainly seems to have taken it farther than any other language I know of. If you really want to play this game of yours, jump right in -- you're hardly alone...

    22. Re:flamewar volley 1 by 1110110001 · · Score: 1

      Looking at the perl examples it would could also be

      php -r 'echo "hello world\n";'

      Just to be sure everything is parsed. Sorry if a one-liner is not what you thought of when thinking of php as a web-scripting language. But hey .. Javascript is included too ...

      b4n

    23. Re:flamewar volley 1 by Bert64 · · Score: 1

      Yeah, it's sad to see how commercial developers spend far more time and money on their copy-protection mechanisms than they do on the actual program. Some of the buggiest programs i've ever used had very sophisticated mechanisms for copy protection. If only they had spent more time fixing the program instead of trying to stop people pirating it, maybe it would actually be worth the money they demand.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    24. Re:flamewar volley 1 by jonadab · · Score: 1

      Actually, HQ9+ has an even shorter Hello, World.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    25. Re:flamewar volley 1 by Anonymous Coward · · Score: 0

      actually the recommended way is:
      echo "hello world";

    26. Re:flamewar volley 1 by Anonymous Coward · · Score: 0

      if it isn't in tags it doesn't get sent to the php parser, therefore hello world barewords would not be processed at all by php so you can't quite say that this is all there is to a php hello world.

    27. Re:flamewar volley 1 by Anonymous Coward · · Score: 0

      Actually, php has the smallest hello world. Anything not wrapped in php tags is passed right through, so "Hello World" in php is literally the length of the string.

      That's not the smallest possible hello world program! My unique "HelloScript" language prints "Hello world" when passed an empty file. Beat that, PHP suckas!

  4. vbscript by badriram · · Score: 1

    Is it just me or where the hell is vbscript on there. I know most people here would rather wipe someones butt than use it, but it is one of popular scripting languages out there.

    1. Re:vbscript by TastyWords · · Score: 2, Interesting

      There are a couple of reasons for this. One is that Microsoft squashed NN through a number of maneuvers and sort of knocked it out of first place, right or wrong.
      Second, when the web needed to grow wings and move beyond static HTML and client-side code started coming into play, you ended up with EMCAScript. Netscape owned the keys. Netscape and Microsoft weren't able to come to terms, so Microsoft reverse-engineered it (why can't we do that with their code?) and put it into play with their browsers. That kept them on par with NN. Next, they needed to find something a little less "C-like" for the non-programmers who were HTML-literate to jump to server-side scripted pages. Visual Basic is easy. Let's castrate it a bit and mold it into a scripted language. That stays in their VB-like world. Granted, they support server-side JScript (a better term than JavaScript as they aren't really running JavaScript), PERLScript (why do people not spell it like an acronym any more?), PHP, and practically anything else which has been ported to run under IIS.

    2. Re:vbscript by chromatic · · Score: 5, Informative
      PERLScript (why do people not spell it like an acronym any more?)

      It never was an acronym. See an explanation of Perl's name for an explanation of the backronym.

    3. Re:vbscript by eipipuz · · Score: 1

      It seems to me that the guy runs a linux box.

    4. Re:vbscript by Anonymous Coward · · Score: 1, Insightful
      I was utterly disappointed that Microsoft discarded VBScript when .NET was introduced. The ASP VBScript model under IIS was the only truly innovative product that Microsoft has ever introduced . The ASP VBScript model served it's purpose remarkably well by putting Microsoft on the WWW; without VBScript there would be no Microsoft presence whatsoever (even today, .NET code is 1/10 as common as VBScript on IIS sites).

      But Microsoft refused to add those capabilities to VBScript (binary file I/O, associative arrays, throw/catch, etc.) that would have made it a superior scripting language. [Some of these capabilities are currently available through the use of COM components, but COM overhead makes such implementation costly performance-wise - they should instead be part of the VBScript language.] Instead Microsoft developed .NET as a new set of languages that were at once

      • an order of magnitude more complex than VBScript and
      • that would require the purchase of Microsoft's .NET IDE (veteran VBScript programmers commonly use NotePad as their IDE).

      This is an unfortunate but compelling example of a corporation shooting itself in the foot by discontinuing enhancement of a successful product.

    5. Re:vbscript by whmac33 · · Score: 1

      Last time I checked you could write, run, and compile .Net code with the free SDK download. No needed for Visual Studio.

      Granted I agree with your other stuff but I have played with .Net and not used Visual Studio.

    6. Re:vbscript by Yath · · Score: 3, Informative

      You may not be aware of this, but the article you linked to is a copy of this one. In the interest of giving credit where it's due, you might want to give Wikipedia more exposure in the future.

      --
      I always mod up spelling trolls.
    7. Re:vbscript by Sique · · Score: 1

      I guess, .NET was just a result of the attempt to enhance VBscript in the suggested way. Microsoft noticed then that they had to generate a completely new sandbox concept to add at least a little security to VBscript, and when they were pondering about the sandbox, they surely also thought about what else the sandbox could do.

      So in the end they came to .NET. Because this is basicly the container for all the scriptings, objects and programs, which talk via a defined interface to the underlying system. Basicly it is like a HAL as WinNT introduced to have an abstract access to the underlying machine (Hardware Abstraction Layer), it is a OSAL (Operating System Abstraction Layer). This became necessary because until then the Abstraction Layer laid on the operating system, the Microsoft Foundation Classes, proved to become more and more unmaintainable for Microsoft, and the different small abstraction layers by the different dialects of VBA were screaming for unification. .NET is more or less the result of trying to revamp the whole development environment on Microsoft's operating systems. It was probably born out of the problems arising in further developing and maintaining MFC, enhancing VBscript, securing the Windows Scripting Host, advancing VBA and countering Java (which for the first time proved to be a successfull abstraction model for the underlying operating system, all other attempts before were limited in their reach).

      --
      .sig: Sique *sigh*
    8. Re:vbscript by chromatic · · Score: 1

      Ahh, I merely linked the first likely Google result. The entry read surprisingly well, so I thought it might have been from the dictionary that recently added the term Perl. Thanks for the reference.

  5. its no surprise by Anonymous Coward · · Score: 0

    everyone loves perl.

  6. Biased by javabsp · · Score: 4, Insightful

    I think the author is pretty biased away from Java, at least when compared to C#. If you look at the sample code, the class name for C# is always one letter, but for Java it's always spelled out.

    1. Re:Biased by jelle · · Score: 5, Informative

      One-letter class names? Is he nuts? That guy never had to maintain code I guess...

      --
      --- Hindsight is 20/20, but walking backwards is not the answer.
    2. Re:Biased by badriram · · Score: 1

      Did not notice, java & C# lacked a debugger etc.... Dont exactly think they even belong there, but i agree that the author does seem biased.

    3. Re:Biased by EvanED · · Score: 1

      Yeah, I must have been hallucinating while using the C# debugger in Visual Studio or something...

    4. Re:Biased by p2sam · · Score: 2, Insightful

      for sure! Notice he put in the "public" keyword when declaring the class. That keyword was TOTALLY unnecessary in an allegged quick and dirty script that he claims he was testing.

    5. Re:Biased by Anonymous Coward · · Score: 0

      No, in order to make a class self executable, you have to have it declared public.

    6. Re:Biased by EvanED · · Score: 1

      Ah, I see... they're talking about Mono.

    7. Re:Biased by p2sam · · Score: 2, Funny

      psam@einstein ~ $ java qwer
      public keyword is not needed for execution
      psam@einstein ~ $ cat qwer.java
      class qwer {
      public static void main( String[] args ) {
      System.out.println( "public keyword is not needed for execution" );
      }
      }

    8. Re:Biased by Bill_the_Engineer · · Score: 1

      Wow. I wonder what I was using to debug my Java programs in JGrasp????

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    9. Re:Biased by notsoclever · · Score: 5, Insightful
      There's lots of other subtle biases. For example, in the "grep" example, the sh code simply called grep. If he wanted to be pure about the scripting he'd not have had any way of doing a RE in sh (since it doesn't have true RE handling builtin, it only has globs through 'case') and if he was going to use external calls then why didn't he just do 'exec grep "$@"' or otherwise afford the use of external command execution to the other languages too?

      Also, in a lot of the Tcl scripts he added in a bunch of "good practice" verbosity which he didn't afford to, say, Perl (similar to the C# vs Java disparities you noticed). For example, in tclsh you don't have to explicitly call 'exec' to call an external function since tclsh provides that as an unknown function handler, and he also used the longhand form of checking for a successful execution (namely 'catch') rather than just doing an if on its result.

      Personally, I just use the right tool for the job. I mostly use sh, PHP, and Tcl, depending on which sorts of things I'm scripting, though sometimes I'll also use perl and awk as appropriate (of course, I do often use awk as an external tool from sh).

      --
      There are 10 kinds of people: ones who understand ternary, ones who don't, and ones who think this joke is about binary
    10. Re:Biased by Martin+Blank · · Score: 4, Funny

      No, no... He values maintaining a job. With one-character class names, he's the only one that can really trace the workings. Ergo, he's the only one who can maintain it, and thus unfireable.

      --
      You can never go home again... but I guess you can shop there.
    11. Re:Biased by Dachannien · · Score: 1

      He probably restricts himself to 8.3 filenames, too.

    12. Re:Biased by pseudochaotic · · Score: 1

      I think, that with Java in your username, you're pretty biased TOWARDS java. But that's just me.

      Disclaimer: I actually rather like java.

      --
      And the l33t shall inherit the 34r7h.
    13. Re:Biased by Anonymous Coward · · Score: 2, Funny

      As the old saying goes:

      "Do you have job security?"

      "Yes? Do you have code to prove it?"

    14. Re:Biased by Anonymous Coward · · Score: 0

      Not only is that untrue, but the main() method doesn't need to be public either! For kicks you could also use a name like "a" instead of "args".

    15. Re:Biased by Anonymous Coward · · Score: 0

      Not bad. I still restrict myself to 6 characters, but find anything more than 3 annoying. If you can't do it without awk, sed, ed (sometimes even wizards have to edit files--if they wanted to read the file they'd use cat or dd), cc, perl (4 letters, argh!), tcl, or ld, then perhaps it shouldn't be done.

    16. Re:Biased by The_Dougster · · Score: 4, Insightful

      That job security through code obscurity thing really doesn't work because the ones who do the hiring and firing probably have no idea what it is you do other than "some computer stuff" and they probably don't have any clue that the whole system is going to crash a couple months after you're gone.

      --
      Clickety Click ...
    17. Re:Biased by Anonymous Coward · · Score: 1, Informative
    18. Re:Biased by AndyElf · · Score: 1

      Well, arguably he is just as much biased away from Tcl, in favor of Perl: in a few eamples he resorts to Perl modules, while coding the same example entirely in Tcl...

      --

      --AP
    19. Re:Biased by the+gnat · · Score: 4, Interesting

      Also, in a lot of the Tcl scripts he added in a bunch of "good practice" verbosity which he didn't afford to, say, Perl

      Interesting - I hadn't noticed this. Personally, I ALWAYS code Perl with 'use strict', because I've had so many bad experiences with larger scripts that were undecipherable and/or had nasty bugs due to variable mispellings. I avoid using shortcuts whenever possible.

      I think these comparisons are largely bullshit anyway. Many of these programming languages have their own tics or methodologies that appeal to subsets of people. Quite a few people I've talked to (and quite a few posters here, from past experience) are annoyed by Python's syntactical indentation. Since I think everyone should be indenting their code perfectly and consistently anyway, even C or Perl, I love this feature. On the other hand, Python is too slow for some of the simple tasks I need done.

      I don't think you can apply these comparisons broadly either; the code I write in scripting languages includes everything from cleaning up files and batch scripts, to text parsing, sequence alignment, and protein structure calculations. Since at least half of the code I write will never be seen or used by anyone else, I use whatever I think will get the job done fastest AND be the most fun to code in. And if I ever make someone maintain my AWK code, I'll fully expect to be thrown off the roof.

    20. Re:Biased by notsoclever · · Score: 4, Interesting
      On the subject of syntactic indentation, there is one very specific place where Python's syntactic indentation can easily burn you, and that place is Slashdot. Or any web-based forum which makes formatting a simple chunk of text difficult, for that matter.

      One time a few years ago on some webboard I was debating with someone about the merits about syntactic formatting and so on, and he whipped out the usual strawman about "well, which is more understandable, this or this?" and of course, the (whatever the other language was) version would still run just fine (and the formatting could be easily recovered by anyone who cared to), while the Python version was totally worthless specifically because even a human couldn't recover the control structures without the formatting!

      Decent code editors like Emacs and XCode and so on make the indentation easy to maintain, and easy to recover on most languages. But there is no way in hell that you can automatically recover the formatting on a language where the formatting itself is *part* of the language.

      Anyway, yeah, 'use strict' (or its equivalent) is a must. Tcl enforces that by default (is it obvious that I have a thing for Tcl yet?), and it's easy enough to do in PHP as well (with ErrorReporting(E_ALL) or whatever). I have no idea why any programmer in their right mind would deploy a web application which makes assumptions about the default values of variables; many times I've been working on other peoples' PHP scripts which played fast and loose with global variables and automatic registration and so on and they were so full of security holes and REALLY difficult to debug. Like, it's happened way too often that I've been unable to figure out why a variable wasn't getting set only to discover that it was misspelled in its assignment or something.

      --
      There are 10 kinds of people: ones who understand ternary, ones who don't, and ones who think this joke is about binary
    21. Re:Biased by Mad+Marlin · · Score: 2, Funny
      That job security through code obscurity thing really doesn't work because the ones who do the hiring and firing probably have no idea what it is you do other than "some computer stuff" and they probably don't have any clue that the whole system is going to crash a couple months after you're gone.

      Which is when they realize how good of a programmer you are, and hire you back for twice your previous salary.

    22. Re:Biased by p2sam · · Score: 1

      not quite ... if you want the main() function to execute when you invoke "java", main() must have the following signature:

      public static void main( String[] args )

    23. Re:Biased by djeca · · Score: 2, Informative

      sh doesn't have true RE handling builtin, it only has globs through 'case'

      Note that this isn't true in bash - bash scripting has extended globs feature equivalent to POSIX REs except for lacking backreferences. And you don't have to use case, you can use the [[ builtin.

    24. Re:Biased by RovingSlug · · Score: 2, Insightful
      There's lots of other subtle biases. For example, in the "grep" example, the sh code simply called grep. If he wanted to be pure about the scripting he'd not have had any way of doing a RE in sh ...

      "Pure"? What the ... does that mean? The comparison is "how do you solve a problem in a given scripting environment". The comparison is not "what are the precise language features of each scripting language".

      In shell, to find a substring in a file, you use grep, not some jackass case statements.

      If you must, consider it as comparing the standard libraries between languages. In shell, the standard library is the canonical unix toolset.

    25. Re:Biased by Daath · · Score: 1
      ob security through code obscurity
      And it doesn't work if you got a decent refactoring tool ;)
      --
      Any technology distinguishable from magic, is insufficiently advanced.
    26. Re:Biased by irgu · · Score: 1

      One-letter class names? Is he nuts? That guy never had to maintain code I guess...

      Pixel works for MandrakeSoft and responsible for many important modules, for example installation. IMHO it's one of the best Linux installs.

      Anyway I agree with you and I'm sure Pixel too. He's pretty busy with many things and it seems this comparison was written "quickly" and mostly for himself to help designing his own language, merd in his free time.

      Nevertheless the page is quite interesting, it would be nice to see more on this topic, especially from those people who are actually working on this area, not just as a free time hobby.

    27. Re:Biased by rollingcalf · · Score: 2, Interesting

      Agree 100%. Having consistent indentation is good. But that indentation is much better achieved with a code reformatting utility than by forcing the programmer to constantly indent while typing.

      It becomes especially annoying when refactoring piece of a large method out into a smaller method, which forces you to manually readjust the indentation. With other languages I could just cut-and-paste the segment of code, reformat the code, and everything is indented nicely again.

      I am looking for a tool that will enable me to use curly braces when typing a Python program, then when you're done it would indent the code accordingly and strip out the curly braces to produce a program that the Python interpreter would accept. If I can't find one I may just write one.

      --
      ---------
      There is inferior bacteria on the interior of your posterior.
    28. Re:Biased by nwbvt · · Score: 1

      Indent lengths are also inconsistent. Some use indent lengths of 2, some 3, some 4, some even longer. Even if length of code were a valid way to measure the quality of a scripting language, these guys do a piss poor job of doing it.

      --
      Mathematics is made of 50 percent formulas, 50 percent proofs, and 50 percent imagination.
    29. Re:Biased by TheGavster · · Score: 1

      Its interesting that a lot of the automatically generated code in C# uses 1 letter class and argument names. This is also for short scripts, where maintainability shouldn't really be an issue (if its broke, you should be able to write a new one fast enough)

      --
      "Because Science" is one step from "Because old book". Try "Because of my experiment testing my falsifiable assertion".
    30. Re:Biased by Turing+Machine · · Score: 1

      You could use Runtime.exec() to call grep from Java. A simiilar observation applies for the other languages.

      I think the original poster has a point.

    31. Re:Biased by DissidentHere · · Score: 3, Insightful

      This is certainly true, and not just with obscure code. In a previous job I wrote a number of reporting and work flow applications that saved the company hundreds of thousands of dollars a month. I was the only one in the company who could code (which was not my primary role), so when I got sick of thier shitty treatment I found another job. The COO didn't want to put together a support contract, or even have me come in once in a while for changes and enhancements - he wanted me to maintain the applications for free! Naturally I told them to piss off. It wasn't two weeks before I started getting calls and emails - "how does this work", "We need to change this report" etc. Last I heard they were back to letting a few hundred Gs slip away every month.

      The people who make decisions rarely have the background or understanding of technology to make good business decisions. They are perfectly happy to lose a million a year rather than give you a $5K raise. The trick is to find a company with people who appreciate your skills and knowledge.

      --
      "None of us are as dumb as all of us." - meeting mantra
    32. Re:Biased by Anonymous Coward · · Score: 0

      The python code for "compile if necessary" could have used os.path.walk, which does the recursion and handels links properly.

      I know both perl and python, and I often have to write scripts that non-techies have to use, guess which language I prefer, hint, it has a lower score in the scriptometer because of it's "verbosity".

    33. Re:Biased by jeremyp · · Score: 1

      Any language that depends on white space as part of its syntactic structure is evil (except as a delimiter for tokens). Languages that use the line ending as a statement separator are just about acceptable although they encourage people to write stupidly long lines of code.

      If I can't trust a programmer to indent properly on a voluntary basis, how can I trust them to always check their return codes etc?

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    34. Re:Biased by mebob · · Score: 1

      Some times true but if other repectable employees make it know that your the only one knows what the hell the code does they are likely to atleast think twice. Hiring some one that is knowledgeable enough, speaks enlish and they can trust to come in and start working on your code is most likely going to cost them more then paying you.

      Even so somone should always be prepared to complete lose all the hard work they put into someone elses product.

      --
      =1000101
    35. Re:Biased by radish · · Score: 1

      If I produced code like that I'd be out the door faster than you can say "failed code review". I keep my job because I'm good at it and I produce good software and good documentation, not because of stupid tricks.

      Besides, I've been at the same company for 5 years. I've worked on a bunch of different systems. I would _hate_ to be stuck on the same one for that whole time because I am the only person who knows it. I know friends in that situation and it drives them to despair (or more commonly, quitting). To keep your career interesting _and_ moving forward you need to do the job, leave it in a good state for others to take over from you, and move on to the next, greater, challenge.

      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    36. Re:Biased by notsoclever · · Score: 1
      My point was that he allowed for external tool execution in sh but not in the other languages, and tclsh supports the grep commandline tool just as directly as sh does. So, the tester either should have allowed external process execution in all languages, or in no languages.

      Really, "implementing grep" is such a useless test of a scripting language. Using the results of the grep is what's important.

      --
      There are 10 kinds of people: ones who understand ternary, ones who don't, and ones who think this joke is about binary
    37. Re:Biased by grahamlee · · Score: 1
      merd
      horizontal layout: 1+2 * 3 is (1+2) * 3 (merd innovation!)

      Merde, more like.

    38. Re:Biased by SeanAhern · · Score: 1

      While your comment might have been meant in jest, I disagree. I would fire someone like that in a heartbeat. It's cheaper for me to fire him, hire someone new, and rewrite the code than it is for me to retain a crappy programmer who intentionally obfuscates code.

    39. Re:Biased by Jerf · · Score: 1
      if Slashdot:
      print "use the ecode tag"
    40. Re:Biased by Jerf · · Score: 1

      I am looking for a tool that will enable me to use curly braces when typing a Python program, then when you're done it would indent the code accordingly and strip out the curly braces to produce a program that the Python interpreter would accept. If I can't find one I may just write one.

      The traditional answer to this is to use # { and # }, and if you are then foolish enough to mis-match indentation and blocks, Python merely punishes you more quickly then C. C will still punish you for it.

      Some people have seriously used this; eventually you start feeling kind of silly and give it up.

      If this still isn't enough, you probably shouldn't use Python. All languages require a little adaptation, because computers are still to dumb to understand humans.

    41. Re:Biased by balubk · · Score: 1

      May be you should just use the autoindent feature in vim while typing. If indenting other non-indented code, just select all text and press = key and the whole code is indented!

    42. Re:Biased by RyuuzakiTetsuya · · Score: 1

      wrong

      you just need anything when defining main.

      example

      public static void main(String[] foo)

      --
      Non impediti ratione cogitationus.
    43. Re:Biased by jelle · · Score: 1

      Actually, since the thing crashed, they will realize how bad you were and rejoice the firing, while hiring somebody else to do it right this time, or at the very least... do it again.

      --
      --- Hindsight is 20/20, but walking backwards is not the answer.
    44. Re:Biased by jelle · · Score: 1

      "This is also for short scripts, where maintainability shouldn't really be an issue"

      Maintainability is always an issue.

      "(if its broke, you should be able to write a new one fast enough)"

      For example if something else went wrong (a compounded failure on a higher level in the system) and you're trying to figure out if that 'small script' was (part of) the culprit.

      --
      --- Hindsight is 20/20, but walking backwards is not the answer.
    45. Re:Biased by jelle · · Score: 1

      "Some times true but if other repectable employees make it know that your the only one knows what the hell the code does they are likely to atleast think twice."

      Yes, it will then focus on getting you off the project and letting somebody more capable take over before they lose you when you quit or die.

      --
      --- Hindsight is 20/20, but walking backwards is not the answer.
    46. Re:Biased by Martin+Blank · · Score: 1

      Someone here doesn't read Dilbert, it would seem, or else you would remember the Holy Grail of programming: two million lines of undocumented spaghetti code for one of the systems.

      And you would fire someone like that in a heartbeat because you know what it means. If it can be snuck in...

      I'm not a coder by trade myself (I just don't have the patience for it), but what I do write is pretty clearly written with meaningful variables and occasionally comments where something isn't obvious, if only that I can come back later and look it over and figure out WTH I was thinking.

      --
      You can never go home again... but I guess you can shop there.
    47. Re:Biased by mrroach · · Score: 1
      Here's an extremely naive one. Just don't expect to be able to mix styles, or use {'s or }'s as anything but indentation markers :-)
      import os, sys

      if not len(sys.argv) == 2:
      print "usage: ./evilparser evilfile.py"
      sys.exit(0)

      e = open(sys.argv[1])
      indentlevel = 0

      for line in e:
      line = line.replace(';', '\n')
      line = line.replace('{', '{\n')
      line = line.replace('}', '\n}')
      lines = line.split('\n')
      for l in lines:
      l = l.strip()
      if not l:
      continue
      if l[-1] == '{':
      l = l[:-1].strip()
      if not l:
      sys.stdout.write(':\n')
      else:
      sys.stdout.write('\n' + (' ' * indentlevel) + l + ':')
      indentlevel += 1
      elif l[-1] == '}':
      indentlevel = indentlevel - 1
      else:
      sys.stdout.write( '\n' + (' ' * indentlevel) + l)
      -Mark
    48. Re:Biased by Lodragandraoidh · · Score: 1

      It all stems from the business imperative - mostly driven by marketing: we have to have it now and it has to work.

      If a developer has the authority to do these kinds of jobs, then the company is at fault for either A) not giving him the time and resources to do the job right, B) not paying him a justifiable salary for jumping through the flaming hoops , and C) not accounting for the inevitable burn-out that will be the end result.

      As one of my cohorts is fond of quoting, "if it wasn't easy to build, it shouldn't be easy to understand."

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
  7. Nobody ever looks at Io or REXX... by Dimwit · · Score: 5, Informative

    Two languages missing are:

    Io, which is an awesome, prototype-based scripting language that's super-easy to embed in C applications, and has an incredibly simple and consistent syntax.

    REXX (Regina's just one implementation). REXX makes it incredibly easy to do system scripting, with powerful string-manipulation and I/O redirection.

    Another one's ficl, which is basically an embedable Forth interpreter. (To all you young geeks out there - LEARN FORTH. You may never need to write a line of it ever in your life, but you'll learn a hell of a lot about how computers work. Trust me on this.)

    --
    ...but it's being eaten...by some...Linux or something...
    1. Re:Nobody ever looks at Io or REXX... by BlueCup · · Score: 1

      Aww come on, post a link to more about Forth =( I had to go to wikipedia, and pull this up. It hurts to type. =(

      --
      WANNAWIKI Wannawiki WannaWiki WANNAWIKI!
    2. Re:Nobody ever looks at Io or REXX... by Bill_the_Engineer · · Score: 1

      Man I loved Forth!! I still have that blue book from the 80's "Starting Forth". But like all the things I did in the 80's, I think to myself "WTF?"

      I'm surprised no one mentioned Scheme or Haskell.

      -Bill

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    3. Re:Nobody ever looks at Io or REXX... by quantum+bit · · Score: 4, Interesting

      Another one's ficl, which is basically an embedable Forth interpreter.

      Random bit of trivia: The FreeBSD boot loader has a slightly cut-down version of ficl embedded (and all the boot/kernel loading logic is written in Forth).

    4. Re:Nobody ever looks at Io or REXX... by Almost-Retired · · Score: 4, Interesting



      I haven't coded any job in anything but bash recently, but the most productive code I ever wrote or helped write was in ARexx on an amiga. FWIW, nearly 10 years later, that machine is still doing its job at WDTV-5, running an ARexx script I helped write, which itself is being run by a Cron Jim and I also wrote in ARexx, then compiled to standalone binary with rexxplus. You can see its output on the web page at http://www.wdtv.com under the news category. Its converting the rather laughably formatted teleprompter scripts to news stories you can read, as best it can with limited source information.

      Surely it (REXX) deserved at least an honorable mention.

      Cheers, Gene

    5. Re:Nobody ever looks at Io or REXX... by Ray+Radlein · · Score: 1

      Amen! I loved REXX, and ARexx as well. They were tramendously powerful, tremendously simple, and tremendously useful. To this day I wish that programs like OpenOffice or AbiWord (or Mozilla, for that matter) had REXX ports the way that most Amiga programs eventually did.

      I've downloaded Regina and various other REXX utilities over the years, but it's just not quite the same...

    6. Re:Nobody ever looks at Io or REXX... by RevAaron · · Score: 2, Interesting

      Last I looked at it, Io wasn't quite ready for the prime time. It looks like it has moved forward some since then, but in the way of being useful, libraries and the like, it still lags behind a lot of the medium- and big-languages.

      Beyond Io, what would be the scripting language with a primarily prototype-based OOP system with the most usage and libraries? I know of a handful of similar languages, but not sure which one would make the most sense from the standpoint most potential scripters are coming from.

      My favorite is Dialect. It is OSS/FS, but AFAIK, still only on Windows and WinCE. I use it mostly on WinCE, and it is great to use there. Completely source portable between desktop Windows OSes and PocketPC/WinCE. Compiles to an EXE, with everything you need in one file. Unlike some proto-OOP languages, you don't just have prototypes- you have both the structure of a class-based system and the flexibility and power of prototypes, cloning, changing/adding methods or data members on individual objects, etc etc.

      Dialect kind of bills itself as a BASIC-like RAD language, but *do not* be scared away by that. It is a lot more like Python than Dialect in its syntax, and I like it a lot more than Python and especially VB myself. It has some really neet functions- one that comes to mind is like tie() in Perl, but even more powerful!- and is incredibly useful. Best way for writing GUI apps on WinCE hands down, and you can write, test, compile, run and deploy as EXE *everything* on the device itself, no need to use a desktop to write your app.

      A shame no one has ported it to Linux, etc yet- the source is there. Having spoken with the devs some, it sounds like the Win32 GUI, ADO/ActiveX and other stuff will be bound to Windows, but the rest shouldn't be too hard to port. Would make a great VB-like language for Linux, though now with RealBasic, we finally have that.

      Another language that is *really* overlooked is REBOL. It is often overlooked by the OSS community because it is closed source. A darn shame if you ask me, but as a pragmatic programmer (not one driven solely by ideology) I use REBOL and enjoy doing so. At first, it looked kind of gimmicky, a "network" scripting language. But after using it more, I am sometimes caught singing its praises. It is very poweful but the built-in libraries provide a lot of baseline power to programmers and even users. You can write web apps, text console apps or GUI apps- using its own cross-platform GUI toolkit. I have written apps on Mac OS 9 to distribute them to Linux, Windows and OS X and elsewhere to have them run perfectly. I think it is supported on 40-some platforms, though the GUI component- REBOL/View is on fewer, and still lacking on important platforms like WinCE/PPC and Mac OS X.

      REBOL rules- it is a lot like Scheme/Lisp, but without parens- in other words, a great language. It has really nice network protocol support, writing an email client can take a handful of lines of script.

      But... there is hope! A pretty new and slow going project, R-sharp (but nothing to do with .NET!) was released some time back, the start of an OSS REBOL implementation.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    7. Re:Nobody ever looks at Io or REXX... by Daath · · Score: 2, Informative

      Also Small.
      Lisp.
      Scheme.
      Actually just pick one ;)

      --
      Any technology distinguishable from magic, is insufficiently advanced.
    8. Re:Nobody ever looks at Io or REXX... by bwy · · Score: 1

      Is it really a good idea to run production code on an Amiga in 2004? Not that it isn't capable, but if the box has a hardware crash, where do you get replacement parts? Will a Commodore on-site service representitive come out to make repairs?

      Or, is it not a 24-7 HA type environment? Just curious.

    9. Re:Nobody ever looks at Io or REXX... by Almost-Retired · · Score: 2, Informative

      It is a 24/7/365 environment. The box itself usually gets uptimes measured in months, and if we discover its gone away, we have catchup scripts that can bring things back uptodate in just a few minutes.

      We've considered redoing that script in php so we could run it on one of the linux boxes there, but haven't managed to find a round "tuit" yet :)

      Thats the only machine in the place thats still stuck with a bnc type 10BaseT card. Its an elderly 2k, with an FF40 card for brains, a picasso-II video and 32 megs of ram. For all the hoorah about the FF40 card being made without some of the system bus signals, with the version 3.4 Plug-n-go roms for use with os3.1, its been very very bulletproof, for a "migi".

      Usually, when we have to reboot it to get thigs back among the living, we have to reboot the NT server its getting its data from because something in the NT networking has a tummy ache too. The news room clients can access it, but the migi can't until the NT box has been rebooted too. :-)

    10. Re:Nobody ever looks at Io or REXX... by Quinn · · Score: 1

      WDTV Clarksburg?? 'Sup hillbilly brother? :)

      --
      #19845
    11. Re:Nobody ever looks at Io or REXX... by Wargames · · Score: 1

      Rexx is an awesome scripting language. Running under Kedit as KEXX, REXX is simply a powerful programming tool. I use it for convertion of data, and writing programs to write programs. I once generated a Kexx program that generated all the server side C and javascript with embedded SQL statements for accessing (add,update,delete,view,browse) an OBDC database using HTML. 5 lines of input could generate over 1200 lines of useable, commented code in 3 distinct languages. Kedit

      Incidentally, Rexx now runs on a Palm Pilot:
      Jaxo Rexx
      It is really cool to instantly calculate 2**1000 on my palm and have all the digits print: 10715...page of digits omitted...069376 as a result on my PALM!

      --
      -- Each tock of the Planck clock is a new world and here we are still life. --
    12. Re:Nobody ever looks at Io or REXX... by Mostly+a+lurker · · Score: 1

      I really like REXX also and, coming from the VM world, adopted Kedit and KEXX when I started doing work with PCs. Realistically, though, the Kedit/KEXX stuff is on its last legs now. It is sad, but Mansfield stopped developing it years ago and I cannot justify US$159 for an editor that is no longer state of the art.

    13. Re:Nobody ever looks at Io or REXX... by Wargames · · Score: 1

      Incidentally, what did you find that was better? I think Kedit has stood the test of time with me.

      --
      -- Each tock of the Planck clock is a new world and here we are still life. --
  8. good but recognized? by 2057 · · Score: 3, Interesting

    Ruby came in second, now lets say i put Ruby on my resume....how much respect will that get? while it was useful to rank the scripts to the author for whatever purpose(prove his point). It is still useless because there is a lack of implentation of 90% of these scripting languages...ergo this changes nothing..my resume is still filled with useless knowledge which won't help me win on jeopardy

    --
    For The Best Jazz/Hip-hop fusion > COlD DUCK
    1. Re:good but recognized? by archen · · Score: 5, Interesting

      That depends. I've heard that Ruby is already more popular in Japan than Python. Much of the ports system in FreeBSD (like portupgrade) is written in Ruby. The fact that Ruby is a pretty young language and has already gained so much support tells much of how good it is. While it might not be quite so useful for a resume, it is good for getting results. I know where I work they don't care about the details, they just want results. Right now I write things in perl, but I have the feeling that once perl 6 comes into the mainstream, I'll be moving to Ruby. You don't have to get very far into the language to realize it's very powerful for writing quick scripts, and can scale VERY well. Aside from that it has taint checking which is also a plus - it's certainly worth it just for doing your own tasks if nothing else.

    2. Re:good but recognized? by Copid · · Score: 4, Insightful

      As somebody who spends quite a bit of time coding in ruby, I can honestly say that it never got me a job. However, there are times when what you can do with a tool is more important than what other people think you can do with it. I like to think that actual results still matter more than promised results every once in a while.

      --
      An interesting anagram of "BANACH TARSKI" is "BANACH TARSKI BANACH TARSKI"
    3. Re:good but recognized? by JamesOfTheDesert · · Score: 4, Insightful
      There are few Ruby jobs, but having it on my resumes almost always leads to a discussion of what it is, why I learned it, and why I use it. It gives me a chance to let the interviewer know more about me, see that I have a genuine interest in CS and software development, beyond simply wanting to know only the marketecture languages and APIs.

      Showing that you are self-motivated, and more interested in using the right tool than the "cool" tool, makes an impression

      --

      Java is the blue pill
      Choose the red pill
    4. Re:good but recognized? by Anonymous Coward · · Score: 0

      While I don't share your obvious distaste for Perl6 (I'm really looking forward to it), and do share a love of Ruby, I would point out that Perl5 will continue to be supported long after Perl6 is established. There's a huge amount of code written in Perl5 that's been well tested by time. No one wants to throw it out.

      Larry Wall and company recognize that and there are three ways in which Perl5 will persist. The current codebase will be maintained, and perhaps even have features added. The Perl6 interpreter will have a Perl5 compatibility mode. And there will be a Perl5 compiler targetting Parrot called "Ponie". The "compatibility mode" for Perl6 may well leverage the work on Ponie to accomplish what it must.

    5. Re:good but recognized? by Inda · · Score: 1

      I put Visual Basic Script and Javascript on my CV. My boss said in the interview "Oh, you do Visual Basic and Java. Great! We use that here!". He is an engineering manager with little IT skills.

      While it doesn't impress you lot on /. it sure impresses other people.

      --
      This post contains benzene, nitrosamines, formaldehyde and hydrogen cyanide.
    6. Re:good but recognized? by Dog+and+Pony · · Score: 1

      Ruby and Perl are my favourite languages - both really lets you be productive without getting in the way, and I think that Ruby probably is the better language - what makes me still stick to Perl is CPAN and the fantastic community - Ruby is nowhere close on either, though some tries are made, they need to pick up the pace.

    7. Re:good but recognized? by Anonymous Coward · · Score: 0

      "The fact that Ruby is a pretty young language and has already gained so much support tells much of how good it is."

      Oh, really, just like C#? Ruby may or may not be good at getting results, but this is a ridiculous argument.

    8. Re:good but recognized? by bcrowell · · Score: 1
      Much of the ports system in FreeBSD (like portupgrade) is written in Ruby.
      Actually, I believe portupgrade is the only part of the ports system written in Ruby, and portupgrade is an optional part of the system. Historically, I get the impression that FreeBSD is just a lot more agnostic about languages than GNU. (As another poster mentioned, part of the boot loader is written in Forth.)

      Ruby seems nice in many ways, but compared to Perl,

      • it's less mature
      • UTF-8 support isn't as clean and pervasive (i.e., to do non-ascii characters, you have to do just as much extra work as in C)
      • there isn't a selection of libraries as good as CPAN.

      I'm also really looking forward to the convergence of Parrot, Perl 6, and Python, which is a love story that Ruby doesn't seem to play a role in. (This is all assuming Parrot and Perl 6 get completed during my lifetime :-)

    9. Re:good but recognized? by Anonymous Coward · · Score: 0

      Parrot specifically has 3 target languages in mind: Perl 6, Python, and Ruby. For instance, if Ruby requires a particular feature from the VM, that means it is a requirement for Parrot.

  9. What about readability? by BlueCup · · Score: 5, Insightful

    Perl can do a lot, but nothing is more painful than having to look at a perl source code. While a program can be written semi readable, when compared to some others, like PHP or python, they typically make me want to stick very large needles in my eyes.

    --
    WANNAWIKI Wannawiki WannaWiki WANNAWIKI!
    1. Re:What about readability? by iserlohn · · Score: 0

      Bah.. Perl doesn't even have an interactive interpreter..

    2. Re:What about readability? by outZider · · Score: 1

      Perl and PHP are about even on unreadable code. I can read other developers' perl code where I'm employed, and it's about the same syntax and layout in PHP.

      --
      - oZ
      // i am here.
    3. Re:What about readability? by DAldredge · · Score: 5, Insightful

      I have seen php code that makes me cry it was so badly written, I have also seen perl code that bad but don't blame the language, blame the idiot who is writing the unreadable code.

    4. Re:What about readability? by abulafia · · Score: 1
      Exactly.(PHPGroupware, anyone?) And anyone who has had the pleasure of picking up others' C or VB knows how well those languages enforce readability...

      I produce line-noise scripts in perl, I must admit. The beauty of Perl is that if you know the language, it is extremely capable and fast to write. That doesn't mean the result is readable, but one-off task specific code doesn't need to be.

      If code is at risk of going into production, it is rewritten to be clear, to adhere to internal standards, and is reviewed.

      People like ragging on Perl for using variables (and references to) that indicate what they are, and for the wonderful regex handling. It can be horribly ugly, but it doesn't have to be.

      I'm wondering if an elegant-Perl contest should be held...

      --
      I forget what 8 was for.
    5. Re:What about readability? by Anonymous Coward · · Score: 0

      perl -pe '$_=eval'

    6. Re:What about readability? by shimpei · · Score: 4, Informative
      Bah.. Perl doesn't even have an interactive interpreter..
      perl -de 0
    7. Re:What about readability? by Camel+Pilot · · Score: 5, Insightful

      When you press people on perl and readability they usually quote some exacerbating regular expression. Reg exp are often used in perl since they are are handy and built in. And yes, reg exp tend to be a little cryptic. However taking a little time to figure out something like

      $str =~ /(.*?)\&(\w+)\((.*?)\)/gis

      is a lot easier than understand the 100 lines of code that would be required to accomplish the same task if you where not using a reg exp.

      I would be very interested in hearing what you think PHP provides that enhances readablity over perl.

    8. Re:What about readability? by kinema · · Score: 1

      Bah! Who actually goes back and reads code they have written?

    9. Re:What about readability? by Nasarius · · Score: 4, Insightful

      Better yet, why not just write a short sentence or two of comments describing what the regex does? This makes it vastly easier to read your code and catch mistakes.

      --
      LOAD "SIG",8,1
    10. Re:What about readability? by Our+Man+In+Redmond · · Score: 1, Insightful

      Especially since the first P in PHP stands for Perl (well, it used to anyway, PHP started life as Perl Header Pages).

      Readability is a matter of choosing the proper variable names, the proper coding style (e.g. proper indentation) and of commenting properly. Regular expressions have little to do with it. If you have to write a regex that looks like you buy your punctuation at Costco, you should tell the world what it does to make it easier for the next guy down the pike to maintain your code.

      --
      Someone you trust is one of us.
    11. Re:What about readability? by Heywood+Jablonski · · Score: 1, Informative

      I thought the first P stood for "Personal" originally ("Personal Home Pages"). Now it's supposed to stand for "PHP" ("PHP: Hypertext Processor").

    12. Re:What about readability? by Hungus · · Score: 4, Informative
      I don't know where you got your info on the origin of PHP but the official history found at PHP.net states this:
      PHP succeeds an older product, named PHP/FI. PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scripts for tracking accesses to his online resume. He named this set of scripts 'Personal Home Page Tools'. As more functionality was required, Rasmus wrote a much larger C implementation, which was able to communicate with databases, and enabled users to develop simple dynamic Web applications. Rasmus chose to release the source code for PHP/FI for everybody to see, so that anybody can use it, as well as fix bugs in it and improve the code.

      PHP/FI, which stood for Personal Home Page / Forms Interpreter, included some of the basic functionality of PHP as we know it today. It had Perl-like variables, automatic interpretation of form variables and HTML embedded syntax. The syntax itself was similar to that of Perl, albeit much more limited, simple, and somewhat inconsistent.
      So while its origins lie directly in PERL it was not names Perl Header Pages. So 5 points for effort, -27 points for accuracy
      --
      Bad Panda! No Bamboo for you! In matters of importance ACs will not be responded to. Want to say something critical,OK
    13. Re:What about readability? by Anonymous Coward · · Score: 0

      Score:5, Insightful??

      How about Score:-1, Fucking Troll?
      Or at least mod it redundant because it comes up every fucking time someone mentions Perl.

    14. Re:What about readability? by Anonymous Coward · · Score: 2, Interesting
      $str =~ /(.*?)\&(\w+)\((.*?)\)/gis

      is a lot easier than understand the 100 lines of code that would be required to accomplish the same task if you where not using a reg exp.

      I think this is a Hacker call of arms. :)

      Presumably, what you want is: Anything but ampersand, followed by ampersand, followed by anything alphanumeric, followed by anything in parenthesis.

      In C:

      int doit(char *in, int limit) {
      char x[256], y[256], z[256];
      char *a;
      a = x;
      while(*in != '&' && limit > 0) { *(a++) = *(in++); limit--; }
      in++; a = y;
      while(((*in >= '0' && *in <= '9') ||
      (*in >= 'a' && *in <= 'z') ||
      (*in >= 'A' && *in <= 'Z')) && limit > 0) {
      *(a++) = *(in++); limit--; }
      if(*in != '(') { return 0; }
      a = z;
      while(*in != ')' && limit > 0) { *(a++) = *(in++); limit--; }
      if(limit > 0) {
      return strcat(x,strcat(y,z)); }
      }

      That's about 20-30 lines of C code. Of course, the comments is what makes something like this readable.

    15. Re:What about readability? by rsheridan6 · · Score: 1
      I'm not a big perl fan, but the most of the code I saw in my month-long foray into perl was pretty readable, probably because it was written by excellent programmers. The code I wrote, OTOH, was horrifically unreadable, because I don't really like perl (for personal quirk reasons, not that it's not a useful or powerful language) and just wanted to get it done as soon as possible.

      Since a semi-literate monkey could write useful perl scripts while only knowing a tenth of the language (that's what I did), I can see that perl scripts would tend to be unreadable.

      --
      Don't drop the soap, Tommy!
    16. Re:What about readability? by RedWizzard · · Score: 4, Informative

      You're assuming 'limit' is less than or equal to 256 without checking. You're assuming that x, y, and z are set to nulls. You're not handling regional text (i.e. accented alphabetics) or unicode. You also haven't accounted for the fact that the Perl code returns the three bracketed sections of the match in variables.

    17. Re:What about readability? by goon+america · · Score: 4, Insightful
      I personally would much rather somebody came up with a longhand way to do real regexps. The current way (ie, just one string with some special characters) made sense until people started making much more complicated regexp parsers... now we have to re-use special characters, like the ? can mean 0 or 1 or it can mean non-greedy, or it can mean four other different things depending on where it's used...

      I'd much rather have it written out for me in the code what a particular thing is doing, rather than trying to figure out which of the eight different meanings a particular ? could be, much less any of the other pantheon of single-character meaningful regexp modifiers. It's difficult to look up a single character somethingorother like that in a manual. On the other hand, a function name I can look up easily (in the case of php, just type in php.net/function_name and you've got complete documentation in two seconds).

      The same finding holds for much of the perl language. The thought in mind for a lot of perl's syntax design is to omit as writing much as possible. The implicit $_, the unless rather than if not, abbreviated versions of everything, like q//, qq//, qx//, etc. The problem is you can't look up something that's been omitted because you don't know what to look for. When exactly can I use the $_ variable? When a program says "shift;", I can't just look up "shift" in the perl manual somewhere, I have to already know about how @_ works in order to understand what the program is doing. I mean, sure, if you already know perl backwards and forwards, and you're the only one that's ever going to see its internals, then I guess it makes sense for you, but for everything else it doesn't.

    18. Re:What about readability? by Anonymous Coward · · Score: 0

      First we put the source string into a MySQL table field, then we call get_array_from_mysql() and parse the return value via a non-validating HTML parser into structured XML. From there we can do almost anything with the string. Who needs Perl? Use PHP::Not;

    19. Re:What about readability? by brer_rabbit · · Score: 1

      wouldn't "([^&]*)\&" be a little more portable/readable than "(.*?)\&" ?

    20. Re:What about readability? by Anonymous Coward · · Score: 0

      Regexps or not problem - one would use same thing in PHP. But compare small class created in Perl and PHP.
      Anyway, it's a matter of preference, there is nothing "wrong" with perl, but neither is with php (except authors are extremely modest).

      {This is first hit for OO perl in google:
      http://earth.prohosting.com/foreach/perl/ oo.html}

    21. Re:What about readability? by Lord+Javac · · Score: 1

      While the first might be more readable, it's not equivelant. The original regex would match all of "abc&def&foo(something1234)" whereas your suggested regex would ignore the initial "abc&". This does point out the need to comment your regexes so that others can know what they're supposed to do, despite what they actually do. Perl 6 will hopefully aid in this as it will have extended regular expressions as the default, meaning that whitespace is ignored and you can have comments within the expression itself.

      --

      End of Line
    22. Re:What about readability? by Anonymous Coward · · Score: 0

      This is why the /x option is so wonderful.

    23. Re:What about readability? by RovingSlug · · Score: 2, Funny
      int doit(char *in, int limit) {
      char x[256], y[256], z[256];
      // ...
      if(limit > 0) {
      return strcat(x,strcat(y,z)); }
      }

      Jesus christ. Did you just return a pointer to a stack allocated buffer? Oh. My. God. Please burn this C code and forget you ever wrote it.

    24. Re:What about readability? by wolverian · · Score: 1

      And there is no such thing as PERL; the language is Perl and the program is perl. It is not an acronym.

      --
      -- wolverian
    25. Re:What about readability? by JWSmythe · · Score: 1

      Exactly.

      I write my stuff so I should be able to go back to it in a year (or several years), and understand what I was thinking without comments.

      I've read lots of people's code who is simply .. well, for a lack of a better term, fucked.

      I was so happy the other day, I needed to fix a perl script on someone elses machine (as a favor), and opened it up in `vi`, and it was all plain and obvious. He had lots of comments, but his style and indention were beautiful. Then I looked at some of his HTML, and it was the same way. That's one guy's code I'll never mind working on again.

      I've had a few occasions to rewrite scripts into PHP and Perl, and some of them just give me a huge headache. I hate it when their variables look like they ran it through an obfuscater (even if they didn't).

      There are a few "webmasters" I've worked with that their HTML is that much worse. They use WYSIWYG editors, and I usually have to spend time formatting it to even start making sense of what they've done. Without even changing a single tag, putting in decent line breaks and spacing make a world of difference.

      But then there are the "what were you thinking" chunks of code. I'll admit, some of my really old stuff (like, when I was first learning Perl) is rough, and I'll laugh at some of what I wrote, but there are "professionals" now that write worse.

      --
      Serious? Seriousness is well above my pay grade.
    26. Re:What about readability? by Some+Bitch · · Score: 1

      But while it's possible to write bad code in any language, perl can be made to look like TECO commands (i.e. "vaguely pronouncable line noise" (can't remember the origin of that quote)). Most other languages don't let you do that (or at least don't make it so easy).

    27. Re:What about readability? by Anonymous Coward · · Score: 1, Funny

      Fixing all that (except for the Unicode bit) is left as an exercise for the reader.

    28. Re:What about readability? by Anonymous Coward · · Score: 2, Interesting

      Perl is an acronym, Larry Wall says so - "Pathalogically Eclectic Rubbish Lister"/"Practical Extraction and Report Language".

    29. Re:What about readability? by Cato · · Score: 2, Informative
      Perl is definitely more capable in regexes than most languages, and having regexes in the language makes it easier to do regex-heavy tasks, or use them where most languages would support imperative code. Since Perl's regex support is so strong, it enables commented multi-line regexes using the '/x' modifier at the end of the regex, e.g. (with broken indentation and comment alignment due to Slash/HTML...):
      $str =~ /
      (.*?) \& # Match zero or more characters up to '&', non-greedy
      (\w+) \( # Match one or more word characters up to '('
      (.*?) \) # Match zero or more characters up to '(', non-greedy
      /gisx;
      This is not so quick to type, but still less than the equivalent non-regex code typically, and makes it easier to see what is going on a year later. Perl also has great regex debugging available. Perl is a sharp tool - it enables you to write very concise and unreadable code, just as it enables you to write slightly more verbose and more readable code. With Perl 6 and its Parrot virtual machine implementation, users of Python and other languages should also be able to access the thousands of CPAN modules, bringing the amazing reach of CPAN to a wider audience that doesn't necessarily want the Perl syntax.
    30. Re:What about readability? by Cato · · Score: 1

      Perl already supports spaced-out multi-line regular expressions including comments - see my earlier comment in this thread

    31. Re:What about readability? by VGPowerlord · · Score: 1
      And there is no such thing as PERL; the language is Perl and the program is perl. It is not an acronym.

      Errr, go to your system and type

      perldoc perl

      Here, I'll post it for those of you who don't have access to it:

      NAME

      perl - Practical Extraction and Report Language

      (additional emphasis mine)

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    32. Re:What about readability? by mrjb · · Score: 1

      If you would have RTFA, you would have known that it does.

      --
      Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
    33. Re:What about readability? by csirac · · Score: 1
      You make some valid points, but regexps are designed to be readable and commented, spread over multiple lines. Here's an excerpt, perhaps not a good example out of context, from a real program (bytewise):

      if ($line =~ m/
      ^[[:space:]]*block\ \#[0]+[^[:xdigit:]].* #eg: block #0000000...
      0x([[:xdigit:]]+) #$1: addr0 ("0x" then >=1 hex digits)
      \.\.0x([[:xdigit:]]+)\, #$2: addr1 ("..0x", >=1 hex digits, ',')
      /x) #example for above:
      #block #000, object at 0x82ce8a4, 2 syms/buckets in 0x8000..0x826e, compiled with gcc2
      (had a better example, 10 line regexp, but it had "too many junk characters"..)
    34. Re:What about readability? by brewt · · Score: 3, Informative

      When a program says "shift;", I can't just look up "shift" in the perl manual somewhere,

      You mean, "perldoc -f shift"? wow that was hard!

      I have to already know about how @_ works in order to understand what the program is doing.

      That's just fairly basic Perl.

    35. Re:What about readability? by Anonymous Coward · · Score: 0

      How is that more readable than calling a function like sscanf?

    36. Re:What about readability? by horza · · Score: 1

      I have seen php code that makes me cry it was so badly written, I have also seen perl code that bad but don't blame the language, blame the idiot who is writing the unreadable code.

      Not true. The constraints of the language makes a significant difference in its readability and maintainability. Equally important is a generally adhered-to style-guide, which covers indenting, capitalisation of variables, aligning braces etc.

      Phillip.

    37. Re:What about readability? by Karellen · · Score: 2, Informative

      Heh. Not only did he do that, he returned the pointer into an int (which isn't guaranteed to work), and then failed to return any value at all if limit = 0 (which is always fun for the caller).

      Burn your keyboard. And your C manuals. Take up Visual Basic or something :)

      --
      Why doesn't the gene pool have a life guard?
    38. Re:What about readability? by rollingcalf · · Score: 1

      "I have seen php code that makes me cry it was so badly written, I have also seen perl code that bad but don't blame the language, blame the idiot who is writing the unreadable code."

      That idiot already left the company and I have to deal with his code.

      Like it or not, some languages do have more of a propensity for unreadable code than others. A Perl program written by an idiot will very likely be much more unreadable than a similar Java program written by an idiot.

      --
      ---------
      There is inferior bacteria on the interior of your posterior.
    39. Re:What about readability? by louzerr · · Score: 4, Insightful

      I've been slowly drifting from perl to java (completely different, I know), and on those days when I do go back to my perl code, I quite often end up scratching my head, trying to remember what exactly my code is trying to do. So perl fails - no wait! I fail! I tried to be too clever with my code, and did not provide enough documentation.

      Then, there's my coworker Steve, who's perl code could be printed out and used for documentation! But then, he starts by writing the documentation as his "plan of attack", and then adds the code.

      Long and short, you can't blame the program language for readability, it's really up to the programmer.

      --
      "The large print giveth, and the small print taketh away" -- "Step Right Up", Tom Waits
    40. Re:What about readability? by menkhaura · · Score: 2, Informative

      The function signature is 'int', whereas at this point it is returning a char *... Yeah, burn it!

      --
      Stupidity is an equal opportunity striker.
      Fellow slashdotter Bill Dog
    41. Re:What about readability? by jacoby · · Score: 1

      First time I got sample code in Python to start playing with, it had a line that started with a tab, which was followed by a line that started with a space and a tab. By everything I knew about the language and everything I could see about the code, it should run, and once I figured out the white space mess, it did, but I felt badly burned by Python, because something you can't read kept me banging my head on the desk for hours.

      Of course, I primarily script for webby stuff, and Python's abilities with that in 2000, to the extent I understood them, were like stone knives and bearskins compared to Perl's LWP.

    42. Re:What about readability? by Pengo · · Score: 1


      I agree 100%. I find that silly wizardry in code often points to a insecure person who feels that by dumping 10 lines of code into 1 line makes them more of a man, when in essense more self documenting code could of been expressed a little more clear in a couple more lines.

      Perl seems like a nice language, but the fact they have conventions for things like $_ or @_ is a bit odd. Isn't that the sort of practice that drives any practical programmer nuts? I am a java and python programmer and the concept of perl seems quite odd.

      Even Pythons soft-typed language seems to squishy now, readable as it is. I am finding as I get more and more projects behind me, I appreciate the strict language structure of a language like java, and spend a little more time programming, but a LOT less time debugging.

      Cheers

    43. Re:What about readability? by Fweeky · · Score: 1
      Ok, now go to perldoc perlfaq1:
      What's the difference between "perl" and "Perl"?

      One bit. Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to
      signify the language proper and "perl" the implementation of it, i.e.
      the current interpreter. Hence Tom's quip that "Nothing but perl can
      parse Perl." You may or may not choose to follow this usage. For
      example, parallelism means "awk and perl" and "Python and Perl" look
      OK, while "awk and Perl" and "Python and perl" do not. But never write
      "PERL", because perl isn't really an acronym, apocryphal folklore and
      post-facto expansions notwithstanding.
    44. Re:What about readability? by JohnBaleshiski · · Score: 1

      Are you serious? Perl and PHP are pretty close. Very close, in fact.

      [-------]
      for($i=0; $i<100; $i++) { doSomething(); }
      [-------]

      So what language was that written in? If you answered PHP, you are right. If you said Perl you are right. Get the point? Granted, you can do a lot of wierd things with Perl. But that is where the power comes in. There is more than one way to do everything.

      How did that post get modded informative?

    45. Re:What about readability? by daniel_yokomiso · · Score: 2, Informative

      You can do this in Haskell:

      match-all $ case-insensitive $
      do {
      many (not '&');
      char '&';
      many whitespace;
      char '(';
      many (not ')');
      char ')'
      }

      Not one-hundred lines, descriptive and do, IIUC, what your one-liner does. Functional programming languages (specially Haskell and Scheme) can be both concise and clear. BTW we can easily abstract common regexes away, for example the parenthesis thing above:

      parenthesis pattern =
      do {
      char '(';
      pattern;
      char ')'
      }

      match-all $ case-insensitive $
      do {
      many (not '&');
      char '&';
      many whitespace;
      parenthesis $ many (not ')')
      }

      --
      Disclaimer: If I disagree with you I'm probably trolling...
    46. Re:What about readability? by drinkypoo · · Score: 1

      Just for the record, there are "wysiwyg" (more like what you don't get) HTML editors that produce easily readable HTML which is more or less clean and correct. Primary among them is Dreamweaver. Even it makes mistakes, though, which is why one uses the split code/html view. That way you can see what it's doing, and more importantly, what it's screwing up.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    47. Re:What about readability? by Anonymous Coward · · Score: 0

      It sure would help if you would use a valid regexp.

    48. Re:What about readability? by brer_rabbit · · Score: 1

      ah, you're right, of course. Thanks for pointing it out, I hadn't considered that case.

    49. Re:What about readability? by daBass · · Score: 1

      PHP and Perl are as bad as each other when it comes to having dozens of different ways to do _almost_ the same thing. Have you ever looked at the PHP reference?

      I prefer Tcl, it has much fewer commands, which makes it easier to read other people's code as they have to use the exact same commands as you do so it's easy to intimately know each and every one of them.

      And that's an advantage, even if it requires you sometimes to write a bit more code rather than using an obscure convenience command to, say, open, read and close a file in one go.

    50. Re:What about readability? by Camel+Pilot · · Score: 1

      And would probably increase you lines of code to 100 :(.

      But good quick hack nonetheless.

    51. Re:What about readability? by Anonymous Coward · · Score: 1, Funny

      Because no one writes comments you insensitive clod!

    52. Re:What about readability? by duncanmacvicar · · Score: 1

      what about? # This regexp does blah blah blah blah $str =~ /(.*?)\&(\w+)\((.*?)\)/gis

    53. Re:What about readability? by chromatic · · Score: 3, Informative
      I personally would much rather somebody came up with a longhand way to do real regexps.

      How about Regexp::English in Perl 5 or Perl6::Rules in Perls 5 and 6?

    54. Re:What about readability? by weinford · · Score: 1

      Perl really looks like the curses in Asterix comic books.

      --

      This sig is stolen from someone who had a much better idea than I had.
    55. Re:What about readability? by chromatic · · Score: 1
      Perl seems like a nice language, but the fact they have conventions for things like $_ or @_ is a bit odd. Isn't that the sort of practice that drives any practical programmer nuts?

      They're pronouns. Think of $_ as "it" and @_ as "them".

    56. Re:What about readability? by Peter+Cooper · · Score: 1

      That's like arguing Italian is a better language than English because it has consistent pronunciation and less words. Or, better, Turkish.. which only has several thousand words. It's not as if Perl is as large as a language as English.. you can learn to read and write it fluently within a few years.

    57. Re:What about readability? by RevAaron · · Score: 1

      Re: shift and @_ - indeed, that is just basic perl. Both things you should know if you intend to write a function. It's like whining about C because you don't know what int, void or the stuff after the "(" means. Like you should have to know what those things mean!

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    58. Re:What about readability? by p3d0 · · Score: 1

      That's a good point. If people are trying to write a parser, the code should probably look like productions rather than line noise.

      --
      Patrick Doyle
      I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
    59. Re:What about readability? by csirac · · Score: 1

      As I said, it's not the best example I have. sscanf() is great when you're dealing with text that is fairly consistent. You'll notice this is part of an if block; it tests if the whole regexp matches and also extracts parts of it into variables to be used later. The hex digits are of variable length.

      Perl regexps deal with unicode/internationalised text seamlessly. The weak typing allows you to push data onto variables with no allocation/error checking issues. You can build quite complex, flexible regexps. It may seem less readable than sscanf() (this isn't a good example), but somebody versed in building regexps can easily read and adapt somebody else's regexp code, especially if it's been commented piece by piece.

    60. Re:What about readability? by bishop's+farewell · · Score: 1
      ...nothing is more painful than having to look at a perl source code

      (Looked (at any (Lisp code) (lately?)))

    61. Re:What about readability? by Magius_AR · · Score: 1
      The same finding holds for much of the perl language. The thought in mind for a lot of perl's syntax design is to omit as writing much as possible. The implicit $_, the unless rather than if not, abbreviated versions of everything, like q//, qq//, qx//, etc. The problem is you can't look up something that's been omitted because you don't know what to look for. When exactly can I use the $_ variable? When a program says "shift;", I can't just look up "shift" in the perl manual somewhere, I have to already know about how @_ works in order to understand what the program is doing. I mean, sure, if you already know perl backwards and forwards, and you're the only one that's ever going to see its internals, then I guess it makes sense for you, but for everything else it doesn't.
      That doesn't make any sense. You're saying "a person needs to understand the language to understand the code, why can't you just make it so I understand the code without knowing the language?" I mean, given the examples you stated, I can make similar parallels about looking up "volatile" or "virtual" in C/C++ or looking up Java attributes for a given class. The anonymous variables in Perl (@_, $_, etc) are a basic concept...If you've taken the time to learn the language (be it class, camel book, or otherwise), you'd know of them.

      Admittably, it does make indexing a bitch (ala looking up a symbol), but the camel book does a decent job, and that's what we have a Cookbook for anyways.

    62. Re:What about readability? by dasmegabyte · · Score: 1

      UH, PHP could be bad, if it was formatted incorrectly, variables named poorly, etc. These are all easy things to clean up.

      However, Perl can be bad simply because the syntax allows for so many shortcuts that it's impossible to keep them straight unless you are a full time Perl hacker. And I do mean hacker..."programming" in perl is like "taking a leisurely drive" through the demoliton derby. Besides the shortened syntax for everything from instantiation and object to loading and parsing files, there's always a bunch of different ways to do things and no cogent way of telling when one of these synctactical shortcuts is performing a side effect operation that is essential to the rest of the code.

      Surely there is GREAT code written in Perl, but all of it ignores this foolish micronization of syntax. In fact, one could just as easily fault the writers of GOOD perl code for doing everything wrong and not using the shortest, most efficient way of performing operations (thus running up the interpretation time). I know it's kind of a dumb argument, but lanugages like Perl are EXACTLY why I prefer to work in C# and Java. I'd rather take the time to do it self-explanatory, rather than find out I did it wrong and have to remember what -p does again.

      --
      Hey freaks: now you're ju
    63. Re:What about readability? by Our+Man+In+Redmond · · Score: 1

      I don't know where you got your info on the origin of PHP

      Slashdot, of course.

      --
      Someone you trust is one of us.
  10. Duh by Beek · · Score: 5, Insightful

    How about the best language for the task you are trying to accomplish?

    I've been using AppleScript for a bunch of stuff lately, but when I hit something that wasn't really intuitive in AppleScript that could easily be done in Perl, then I did it in Perl. Obvious, yesno?

    1. Re:Duh by IrresponsibleUseOfFr · · Score: 2, Interesting

      Yeah, seriously, I wish the "what is the best programming language contests" would come to an end. A programming language is just a tool, and in the big scheme of things, it isn't even the most important tool for the task you are trying to accomplish.

      Things that are likely to have a bigger impact are your ability to aquire quality libraries, documentation for them, and your ability to get help if you hit a roadblock.

      Saying that you choose a programming language is a misnomer, because you don't choose a programming language much like you don't choose a religion. You usually just stick with the ones that you are taught. You might change programming languages, but you usually do so because you wish to join a community and you need to speak their language (i.e. you want to become a kernel hacker so you learn C). Communities are unlikely to pick up new languages (too much history), instead they die and people disperse.

      But really, programming languages nowadays don't really differentiate themselves by what they do, but instead the tradeoffs they make (is this feature in a library or in the language, do we support operator overloading? how? What is our dependence on the run-time system? Do we have a garbage collector?). So I find it hard to argue that one is quanitatively better then another unless you do a study of expert programmers, performance of resulting system, time that it took, and defect rates. We need real apps, comparing "Hello World" programs is a farce and tells you nothing.

      Something like they did in "The Practice of Programming" but with a larger study of people and more controlled.

      --
      Facts are meaningless. You could use facts to prove anything that's even remotely true! -Homer Simpson
    2. Re:Duh by Graff · · Score: 1
      I've been using AppleScript for a bunch of stuff lately, but when I hit something that wasn't really intuitive in AppleScript that could easily be done in Perl, then I did it in Perl.

      Yep, I'm constantly using the "do shell script" command in AppleScript to use a shell tool that is far more convenient to use than the equivalent plain-vanilla AppleScript. For example, a substring search-and-replace is simple using sed so I call it like this:
      set theText to quoted form of "some text string"
      do shell script "echo " & theText & " | sed s/some/another/"
    3. Re:Duh by belmolis · · Score: 2, Informative

      I can't speak for other people, but I know that my decisions about what language to use haven't been based just on what I already know and what community I want to join. For instance, my first language was Fortran. After that I learned Basic and assembly language (Mix, just on paper, and the language of a Japanese laboratory minicomputer the model of which I no longer remember. The only documentation I had was in Japanese, which at the time I was just learning. And people complain about man pages!). When I first learned C, it was in a situation in which I could also have used Fortran. I learned C because it looked like it would be a better language and I was interested in trying something new.

      For scripting languages, for many years I used either a shell (sh or csh) or awk. When Perl came along, I read the book and twice made stabs at writing something non-trivial in it, but just couldn't bring myself to do it. I attribute this to my innate sense of good taste. Both the language itself (through non-orthogonality, excessive overloading, and lots of little tricks) and the Perl community (through typical practices and valuing short, cryptic code) encourage unreadable code. At the same time, I knew that AWK was not ideal for some kinds of programs (and I"ve written 500 line AWK scripts, and AWK scripts that write and then execute other AWK scripts) so when Python came along, I was interested. I still use AWK for some things since I know it well and the automatic parsing is handy, but more and more I am using Python. I find that Python encourages good programming practice and provides everything that I would get from Perl. I've also tried Tcl, to the extent of writing a moderately complex (1500 line) program. For some things it is fine, but I don't think it scales up as well as Python.

      So I think that my choices, and probably other people's, aren't just a matter of inertia and general type of programming.

      For me, by the way, in a lot of cases, Unicode support is important. That's a nice feature of Python. Ruby looks interesting, but as far as I can tell doesn't support Unicode. Anybody know if Ruby does, or will soon, support Unicode?

    4. Re:Duh by evilviper · · Score: 2, Insightful

      I don't find it as obvious as you seem to...

      Personally, I spend a bit more time trying to prevent wasting resources... Having a bunch of different scripts, all needing a different interpreter, is a nightmare to me.

      If you are going to write hundreds of perl scripts, stick with perl if at all possible. And what's more, if it's not possible, I strongly recomend using a compiled language instead of using something else that's going to need an interpreter.

      Not only does it waste resources, but it's an absolute nightmare when you need to modify things... Changing something like the file a dozen scripts read isn't too difficult when you are dealing with a single language, but it's quite a mess when 1/4 are bourne, 1/4 are python, 1/4 are perl, and 1/4 are something else that's rather obscure...

      You'd be quite surprised by the long and healthy life of some of the simple programs that you write... In the event that your scripts continue to live on for a few years, it becomes more and more likely that they will be needed on strange platforms, or in unusual environments. Maybe the scripts you are writing will be wanted on the CEO's mobile phone, where there is a perl interpreter. If even 1 of those programs that gets called upon is something that can't be used on the device, it will have to be written from scratch at great expense, and all the while probably with people cursing your name for not sticking with one single language...

      Perhaps I'm just ranting, but you look at your scripts differently when one simple 5-minute script is in use many years later, and installed on thousands of different machines, where it is called by other programs, from a Windows GUI program, to scripts on a webserver.

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    5. Re:Duh by Anonymous Coward · · Score: 0

      Damn spoiled AppleScript programmers today ... In my day to do that we had to try and drive BBEdit, which didn't even expose its grep capability, so you had to iterate character by character, keep track of prior positions ... I basically wrote a mini regex language from scratch ... don't ask my why ... Made my way to perl very quickly

    6. Re:Duh by versus · · Score: 1
      Maybe the scripts you are writing will be wanted on the CEO's mobile phone, where there is a perl interpreter.
      There is no such thing as a perl interpreter in mobile phone. Nokia ported Python to Series 60 instead.
      --
      Brain is my second favorite organ.
    7. Re:Duh by damium · · Score: 1

      That all depends. At my work I wrote a network traffic analizer for our internet connection. Initially this was a simple perl script that collected and aggragated data, was run from a command line, and generated a report for the time run. The the project requirements were later canged to be able to run the collector from a cron job to generate files that could have a reporting tool ran on. Shortly after the code went into production there was a problem of scailabilty - perl wasn't up to the task of keeping real-time data on the acent equiptment. I had to recode the collector in C. Later my manager wanted the ability to view results from a webpage, by then I had developed an API of sorts and recoded most of the perl report generators into C for speed. Since with PHP it is much eiser to grab HTML forms input than in C I went ahead and coded the front end in PHP. Sometime in the future I plan on looking over the code to add some small bits of functionality that could be inserted but as it stands because of the backend/frontend seperation I can make drastic changes to one without changing the other.

    8. Re:Duh by joib · · Score: 4, Insightful


      How about the best language for the task you are trying to accomplish?


      Not necessarily. The problem is that, presuming every problem has a language best suited for solving it, I don't have the time to learn a huge number of languages.

      Now, I'm not saying that you should take the only language Real Programmers use, FORTRAN IV, and do absolutely everything with it. What I'm saying is that e.g. if you know python fairly well, I don't think it's worth learning perl just because some simple regexp matching program can be a few lines shorter.

      For another example, if doing web stuff is 99 % of what you do and you haven chosen php (because every friggin' webhost supports it, there's lots of ready-made code out there, or whatever else makes people chose such an abomination as php), then using php for some simple non-web stuff is probably a better choice than wasting time learning yet another scripting language.

    9. Re:Duh by Decaff · · Score: 1

      Not necessarily. The problem is that, presuming every problem has a language best suited for solving it, I don't have the time to learn a huge number of languages.

      Very true. There is also the matter of having to spend time evaluating which language is best for a task.

      A good developer will build up a repository of useful libraries and re-usable code. It makes no sense to try and keep this code around in several different languages. Its best to stick with one general purpose language and do the best you can.

    10. Re:Duh by Anonymous Coward · · Score: 0

      Anybody know if Ruby does, or will soon, support Unicode?

      Unfortunately its author shares the view, common among Japanese but utterly incorrect, that the CJK unification in Unicode renders Unicode useless for representing Japanese text. The possibility that, even were that the case, it would still be rather useful for the rest of the world, appears not to have crossed his mind...

    11. Re:Duh by Anonymous Coward · · Score: 0

      For people how applescript looks like, here... a random paste for a script does IMAP size checking. (comes default with mail.app)

      Tell application "Mail" to set theVersion to get version
      -- Much of this script relies on new terminology that
      -- was not available in earlier versions of Mail
      if (theVersion 1.2) then
      display dialog "This script will only run with Mail version 1.2"
      else
      tell application "Mail" to set everyIMAPAccount to every imap account
      -- While quota is a concern for POP users, your POP inbox may not
      -- accurately reflect what is stored on the server.
      if ((count of everyIMAPAccount) is equal to 0) then
      display dialog "This script is only for use with IMAP accounts (which includes .Mac accounts)"
      else
      set accountNameList to {}
      repeat with eachAccount in everyIMAPAccount
      set accountNameList to accountNameList & name of eachAccount
      end repeat
      set theResult to choose from list accountNameList with prompt "Choose an account:" without multiple selections allowed
      if (theResult is not equal to false) then
      display dialog "In order to check the quota for this account, we need to first synchronize the account with the server." & return & return &
      "This may lead to a lot of network activity if you have never synchronized this account before."
      display dialog "Depending on the speed of your network connection, the synchronization may take some time." & return & return &
      "After synchonization is done, your quota will be calculated."

    12. Re:Duh by nuckin+futs · · Score: 1

      here is where the simplicity of applescript shows.
      drag an app to the script editor, and it will list the available commands for that app. the scripting language itself is very simple, it uses plain english like syntax like run, open, tell, and others.

    13. Re:Duh by Anonymous Coward · · Score: 0

      "the only language Real Programmers use, FORTRAN IV, and do absolutely everything with it."

      Isn't this one of the fundemantal tenets of computer science ?

    14. Re:Duh by Anonymous Coward · · Score: 0

      Yep, I'm constantly using the "do shell script" command in AppleScript to use a shell tool that is far more convenient to use than the equivalent plain-vanilla AppleScript. For example, a substring search-and-replace is simple using sed so I call it like this:

      set theText to quoted form of "some text string"
      do shell script "echo " & theText & " | sed s/some/another/"


      Wow, that's quite anotherthing! I need to perform tireanother tasks like that too anothertimes, so I'm glad you've shown me how. Allow me to offer you my fulanother praise.

    15. Re:Duh by N1KO · · Score: 1

      Doesn't COBOL use plain english syntax? :D

    16. Re:Duh by Anonymous Coward · · Score: 0

      Now, if someone made a scripting/programming language that used plain whatever-local-language-the-programmer-wishes-to-u se (and seamlessly translates the code between different language versions of the IDE), then THAT would be the programming language of choice for many people.

    17. Re:Duh by IrresponsibleUseOfFr · · Score: 1

      I do think a useful way of thinking about programs is to think of them in terms of products from communities. Those communities hold values which they embody in the code.

      Physicists, System Programmers, Application Programmers, Business Programmers, System Administrators each write code, and each have their own set of values about what makes code good. Of course, I'm biased. When I was talking about staying with a particular language/community I was thinking more in terms of 10,000-1,000,000 LOC projects and where programming is your profession.

      Scripting definitely lends itself to sampling a variety of different languages, because scripting languages do offer a wide range of trade-offs between host integration and portability. But the scripting language itself was produced by a bunch of programmers with their own idea of what makes code good and which the language they produced embodies.

      When you work on something large, you actually become part of the community. With small projects you are really just trying it out.

      Of course, you are free to consider such observations as trite or meaningless. But I have fun trying to figure out why certain people dislike a particular idea, and I find placing a person in a communtity/group then reasoning about the group's values to be a useful way to approach the problem.

      As an example: why do Unix programmers hate Win32 so much? I'd argue that it is because Unix programmers value having a small orthogonal API. The Win32 API is definitely not small or orthogonal. Why don't Win32 programmers mind so much? Win32 programmers value features to sell their app. So they expect a rich API to accomplish that. Orthogonality is something they'd gladly give up to get features into their app more quickly.

      Just my $.02.

      --
      Facts are meaningless. You could use facts to prove anything that's even remotely true! -Homer Simpson
    18. Re:Duh by Taladar · · Score: 1

      Since Ruby was 'invented' by a Japanese Programmer it had Unicode Support right from the beginning AFAIK. I've seen Ruby-Scripts with Japanese variables, functions,etc.

    19. Re:Duh by belmolis · · Score: 1

      No, Ruby has had support from the outset for some of the Japanese encoding systems but not Unicode. Unicode is not used that much in Japan since there are encoding systems for Japanese that were already established when Unicode came along and that are arguably better, for Japanese, than Unicode.

    20. Re:Duh by evilviper · · Score: 1

      That was just an example. I was not implying that perl currently exists on mobile phones.

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    21. Re:Duh by Anonymous Coward · · Score: 0
      How about the best language for the task you are trying to accomplish?
      Perl vs. Python is not a good counterexample for this statement since they both have been designed for very similar tasks. Furthermore, I'm pretty sure Python uses Perl regular expressions so they're very close when it comes to text parsing. When they both address the the problem you're trying to solve, and you have the freedom to choose (which you may not in all cases), then it just boils down to a matter of taste and still doesn't contradict the statement put forth (no pun intended).
  11. no PHP? by Anonymous Coward · · Score: 1

    no PHP???

    1. Re:no PHP? by Anonymous Coward · · Score: 0

      That's right you loser, learn Ruby.

    2. Re:no PHP? by Anonymous Coward · · Score: 0

      PHP sucks my hairy ass. Is type-safety too much to ask for? And wtf is up with this magic-quotes bullshit. Who needs magic? I want the friggin computer to do what i ask it to.

  12. What about batch files?! by Anonymous Coward · · Score: 1, Funny

    You can do dozens, literally dozens, of things with batch files!

    Only partially joking, though, as batch files using 4DOS/4NT are really quite powerful.

    1. Re:What about batch files?! by JWSmythe · · Score: 1

      Oh, I miss batch files. (not)

      I used to run BBS's that absolutely depended on batch files to do various things. Now working with better languages, I laugh remembering some of the old stuff..

      Does anyone still use FrontDoor, or BBS's in general for that matter?

      --
      Serious? Seriousness is well above my pay grade.
    2. Re:What about batch files?! by VGPowerlord · · Score: 1

      Well, they tested the UNIX style equivalent... (That's what .sh files are)

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  13. "shebang aware" by PhrostyMcByte · · Score: 0, Offtopic

    I guess we won't be seeing any of this then?

  14. VB by Anonymous Coward · · Score: 0

    Need something highly functional, fast? Use VB. All the Windows functions at the click of a button and none of the low-level crap you have to deal with when programming using a real language like C++. It's amazing that anyone uses a low level programming language like C++ any more for general programming.

    1. Re:VB by Mycroft_VIII · · Score: 1

      As a complete aside. I still find it wierd to hear people refer to C and C++ as LOW level languages. When I was in colledge they were HIGH level languages (actually C++ wasn't even taught till my second year, it was to new).
      And if you've ever had to program in crude assembly just shy of plain machine language, NOT symbolic assymbler with nice lables and variables, just opcode memonics such as lda and so on , you wouldn't call C a low level language as easily.
      I wonder if this shift in perception has anything to do with code bloat craptisms(personal word, means what it sound likes).

      Mycroft

      --
      https://signup.leagueoflegends.com/?ref=4c3ed6600b6ea
  15. A kindness by dedazo · · Score: 1, Insightful
    Perhaps a note along the lines of "for Linux" or "on *nix systems" would have been nice, especially for the thousands of people who read this website, run Windows and couldn't care less about whether or not a language supports "shebang".

    So, I RTFA, but I really didn't have to.

    --
    Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    1. Re:A kindness by SillyNickName4me · · Score: 1

      And for as far as my webserver logs tell me, most slashdotters run windows.. and most run firefox/mozilla.

    2. Re:A kindness by dedazo · · Score: 1

      That's probably why I'm a troll.

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
  16. What's the best scripting language? by Nimey · · Score: 1

    Mine, of course.

    --
    Hail Eris, full of mischief...

    E pluribus sanguinem
  17. VBScript definitely by vijaya_chandra · · Score: 1

    combined with outlook (+express), office and Internet explorer

    considering the amount of code vbscript that systems on the internet exchange daily

    (Karma be damned; I am no better than AC anyway)

    1. Re:VBScript definitely by geminidomino · · Score: 0, Troll

      combined with outlook (+express), office and Internet explorer

      considering the amount of code vbscript that systems on the internet exchange daily


      Sure, especially if you count all those lovely .jpg.vbs files out there.

    2. Re:VBScript definitely by geminidomino · · Score: 1

      LOL. Grandparent sings the praises of VBScript by naming the two worst virus propagation vectors out there, and *I'M* the troll. Talk about the inmates running the asylum.

  18. BASH! by Anonymous Coward · · Score: 0

    bash pwns j00

  19. I just had my first encounder with a C# program by the_2nd_coming · · Score: 1

    why anyone would use VB after C# was created is beyond me.

    mmmm....it looks so nice :-)

    --



    I am the Alpha and the Omega-3
    1. Re:I just had my first encounder with a C# program by Frnknstn · · Score: 1

      If you are talking about VB.NET, then you are right. But the real VB, v3 and up, remains the pinnacle of GUI RAD.

      --
      If it's in you sig, it's in your post.
    2. Re:I just had my first encounder with a C# program by the_2nd_coming · · Score: 1

      what!! dude, C# has the exact same GUI RAD tools as VB v3 and up.

      --



      I am the Alpha and the Omega-3
    3. Re:I just had my first encounder with a C# program by Frnknstn · · Score: 1

      Yeah, but for the few lines of code you need to write for the app, VB is easier than C# by several degrees.

      --
      If it's in you sig, it's in your post.
    4. Re:I just had my first encounder with a C# program by Anonymous Coward · · Score: 0

      Delphi is easier/quicker than VB. It's also more powerful.

      For that matter, I'd challenge you to a race at making a nice, usable app in VB vs. Python/Glade any day.

      VB is only more popular because MS told you that it was and you never bothered to explore anything else.

    5. Re:I just had my first encounder with a C# program by Frnknstn · · Score: 1

      On the contrary, I am a big fan of Python. However, since Glade isn't actually an official part of Python, it kind of doesn't belong in this argument.

      Even if it did, I still contend that it is much faster to write a small app (especially a database frontend) in VB.

      --
      If it's in you sig, it's in your post.
    6. Re:I just had my first encounder with a C# program by sevinkey · · Score: 2, Interesting

      I've done both Microsoft coding from back in the day (Win32 API through COM and ASP) and Linux with perl, c, php... and both platforms with Java

      Recently I took a job with a company implementing Microsoft DRM, and selected C# for the new toolsets.

      It was a good choice for Microsoft technologies... basically they took the old Win32 API, and wrote wrapper classes to babysit their crappy code underneith (something I used to do in C++) and it works exceptionally well.

      And I ASP.Net WebMatrix is a good enough free tool to do effective development (if you don't mind command line compiles or just sticking with C# asp.net pages) if you don't want to spend the cash on VisualStudio.

    7. Re:I just had my first encounder with a C# program by the_2nd_coming · · Score: 1

      VB is a lump of crap!!!!

      the syntax looks hacked together. the hoops you have to jump through to get real OO development done are atrocious. C# has great syntax, is very expressive (rather than using subclasses for inheritance, you can use boxing to give the class you are boxing the methods of the class you are making it a member of FOR THAT INSTANCE, none other.) my favorite thing about C# is that variables, basic data types, are objects with attributes. you can build Complex data types in C++ that offer the same thing, but this is built in and very nice. it is OO at its best.

      add to that the GUI RAD tools C# has, and I think VB developers will be very scarce.

      --



      I am the Alpha and the Omega-3
    8. Re:I just had my first encounder with a C# program by Frnknstn · · Score: 1

      Thank you for agreeing with me, even if you didn't think you were. I never said VB was better than C#. If you would recall, this is a discussion attached to the story titled "Searching for the Best Scripting Language."

      Should you want to develop a middleweight app, then C#'s syntax is far more suitable. It is, however, an atrocious scripting language.

      I repeat my point: If you want do some lightweight GUI app in a quick, simple, maintainable fashion, then VB is a better choice than C#.

      --
      If it's in you sig, it's in your post.
    9. Re:I just had my first encounder with a C# program by the_2nd_coming · · Score: 1

      VB blows for that as well. I would choose Python over that any day, and with the .Net Bindings, I can use the GUIO RAD tools for creating the GUI and then make the logic in Python.

      --



      I am the Alpha and the Omega-3
    10. Re:I just had my first encounder with a C# program by Frnknstn · · Score: 1

      Why can't people like you admit when you are wrong? Yes, good idea, BUT YOU STILL WOULDN'T CHOOSE C#, which is what this thread is about.

      --
      If it's in you sig, it's in your post.
  20. it depends upon the application by humankind · · Score: 2, Insightful

    php for real-time multiuser applications on the high level, C for real performance

    perl for non-real-time application (unless you're slashdot and have oodles of resources at your disposal, even then, it's still inefficient)

    Everything else: you work for Intel, Dell or Kingston

    1. Re:it depends upon the application by KingOfBLASH · · Score: 4, Informative
      php for real-time multiuser applications on the high level, C for real performance

      perl for non-real-time application (unless you're slashdot and have oodles of resources at your disposal, even then, it's still inefficient)

      Most copies of PHP use the equivalent of mod_perl -- i.e. they cache the compilation. Use mod_perl, cache your compilations, and you will find performance is as good if not better than PHP.

    2. Re:it depends upon the application by outZider · · Score: 1

      Thank you so much. It irks me when people scream "PHP is faster" when if you know how to set up a perl web server, Perl is the same speed, if not faster.

      --
      - oZ
      // i am here.
    3. Re:it depends upon the application by onlyjoking · · Score: 0

      Unfortunately the Perl community has a marketing problem. Stas Beckman in "Practical mod_perl" specifically advises against using mod_perl in a shared hosting environment so that means Perl with decent performance is only available in the more expensive hosting deals. Hence PHP is what newbie web developers learn simply because it's available.

    4. Re:it depends upon the application by consumer · · Score: 1

      INterestingly, PHP has the same problems in hosting environments, i.e. other users can mess with your stuff.

  21. Discrepancy... by Polo · · Score: 2, Interesting

    The slashdot descripton mentions that OCaml is the best. ...But when you follow the link, and look at the bottom of the page regarding the first prize winner, This is the proclamation.

    It's not OCaml.

    1. Re:Discrepancy... by E_elven · · Score: 1

      Haha. Funny.

      I can't understand why this person took in Haskell and OCaml anyway* -the question was scripting languages and most scripting tasks are text processing and process control, neither of which any functional language is particularly suited for. I'm surprised Prolog wasn't there..

      That aside, OCaml really is nice. I tend to use Haskell whenever I go functional, though.

      * I'm not even going to bother wondering about C# and Java.

      --
      Marxist evolution is just N generations away!
    2. Re:Discrepancy... by warrax_666 · · Score: 1
      and most scripting tasks are text processing and process control, neither of which any functional language is particularly suited for

      Actually, if you think about it, sh is actually a lazily evaluated somewhat functional language (esp. the pipe syntax). However, very few functional languages have process management and pipes as a built-in part of the syntax, although one could probably quite easily whip something up using the Shell module (from the Equeue package) and a small preprocessor extension to make the syntax more sh-like. I haven't done so because, frankly, the OCaml environment is rich enough, and development fast enough that I usually don't actually need to drive preexisting command-line tools from within OCaml.
      --
      HAND.
  22. C++ by daserver · · Score: 2, Funny

    C++ was also praised: "C++ is a fine programming tool for many applications."

  23. Scripting with Java by los+furtive · · Score: 2, Informative

    If you'd like to try scripting with Java, then I suggest looking into Mozilla Rhino, which allows one to script Java via JavaScript.

    --

    I'm a writer, a poet, a genius, I know it. I don't buy software, I grow it.

    1. Re:Scripting with Java by Teckla · · Score: 2, Informative

      If you'd like to try scripting with Java, then I suggest looking into Mozilla Rhino, which allows one to script Java via JavaScript.

      Rhino is a JavaScript interpreter written in Java, it's not a Java interpreter.

    2. Re:Scripting with Java by Anonymous Coward · · Score: 0

      Yes, the correct technology to use would have been BeanShell.

    3. Re:Scripting with Java by KingOfBLASH · · Score: 1

      Javascript is not java. It was loosely based on java, but you could say PHP was loosely based on Perl. Scripting with java involves JSP and servlets. So you're way off base...

    4. Re:Scripting with Java by Anonymous Coward · · Score: 0

      You don't know what you are speaking about. With Rhino, you can write business logic in javascript that will be executed on the server side of your web application, you can even embed it into a standalone application. No need for JSPs or servlets for that.

    5. Re:Scripting with Java by Anonymous Coward · · Score: 0

      It's exactly what he said : you can script java via javascript. you can write javascript that can access your java objects. and this javascript can be sort of called by your java objects too. you use a script to execute java.

    6. Re:Scripting with Java by KingOfBLASH · · Score: 1

      I'm a computer programmer and work with this stuff for a living. And the fact remains that Javascript is not Java (it's technical name is ECMA Script). So you see it doesn't matter what you can do with Javascript, it's not Java.

    7. Re:Scripting with Java by los+furtive · · Score: 1
      Did you even check out the link? Its a JavaScript API for Java, which allows you to do JavaScript like scripting using Java objects. Everyone who works with this stuff is already well aware that Java != JavaScript. Its aimed at people like you who works with this stuff for a living and realizes that its quite easy to whip stuff together with JavaScript, but that there is no file access with JS, while there is file access with Java but its not always easy to whip something together quickly.

      I simply did a bad job explaining Rhino in the first post (yes, I had been drinking).

      --

      I'm a writer, a poet, a genius, I know it. I don't buy software, I grow it.

    8. Re:Scripting with Java by julesh · · Score: 1

      I've been able to script Java via JavaScript via LiveConnect, which was part of Netscape 4, and was implemented in Internet Explorer 4 also.

      It also allows you to execute JavaScript from Java, which is tricky, but allows for very cool control of the browser.

    9. Re:Scripting with Java by Baby+Duck · · Score: 2, Informative

      los furtive was correct in his statement.

      Rhino is a JavaScript interpretter written in Java, but it is also a JavaScript-Java bridge. So it de facto does indeed allow you to script Java via JavaScript. I do it all the time. The Rhino site even suggests using Rhino for exactly this purpose.

      Beanshell lets you script Java, as well. Those scripts just like Java, with some additional console-friendly global commands thrown in the mix.

      --

      "Love heals scars love left." -- Henry Rollins

    10. Re:Scripting with Java by KingOfBLASH · · Score: 1

      Ahhh, ok. Don't you know not to drink and post to /.? As soon as I thought I saw Java equated to Javascript, which as you realize isn't the same thing, I tuned you out and assumed you were just another troll. Apologies...

  24. PHP by mfh · · Score: 4, Insightful

    I like the ease of PHP and the fact I fully understand it helps. I've wanted to learn Perl, but lack the motivation except to perhaps code some patches for /.

    Anyone feel the same way about either PHP or another scripting language? When you fully learn one, is there a need to switch?

    Remember, when you have more experience with a scripting language, you can pretty much create anything you'll need at a rapid rate. I think that the level of your knowledge determines the effectiveness of the language.

    --
    The dangers of knowledge trigger emotional distress in human beings.
    1. Re:PHP by octavian755 · · Score: 4, Insightful

      Yeah I feel the same way about PHP.

      There are many parts about the language that make it work well for web applications, but there is a time and place for other languages too. For most projects there is no need to use anything else but one language, but if a customer's server only has perl installed and they won't install anything else, then your stuck. So it's a good idea to atleast get to know a couple languages (don't have to master them all) for certain situations like that.

    2. Re:PHP by blair1q · · Score: 1

      You learn a new language whenever it is already being used on a project you didn't initiate.

      If you initiate the project, you likely set its requirements based on your understanding of (or predicted improvement in) a language you already know.

      If this isn't you, you're no hacker.

    3. Re:PHP by imroy · · Score: 2, Interesting

      It's been a number of years since I've programmed heavily in PHP. I had learned Perl first, and it eventually took over. If you do learn Perl I think you'll discover the language that PHP is trying to be. Which isn't surprising, considering that PHP originally started off as a perl CGI script. The problem with PHP is that there doesn't seem to have been a lot of thought put into the design of the language. A prime example is the way that Perl has seperate numrical and string comparitors (==/!= and eq/ne) whereas PHP has only the one (==). This recently came up in the story about the Perl periodic table of elements and I even gave my own answer on this problem. Just to rehash: Perl and PHP are loosely-typed languages so the programmer really needs to tell the interpreter how to compare the mixed numerical/string "scalar" type that both Perl and PHP use. But PHP tries to simplify at the expense of introducing ambiguity.

      There are lots of other problems with PHP as well. Not to dwell on them too much, but this includes things like no namespaces (all variables are global? WTF?), modules have to be compiled into the interpreter (is this right? not even dlls/shared libs?), and using associative arrays all the time (leading to more ambiguity). The thing with compiled-in extensions is a big problem since PHP is so popular on cheap hosted web servers. You're entirely at the mercy of the host admin. I mentioned it in my previous post, and this is a very good web page about PHP's problems. PHP is a mess of a language. It really is.

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

      I suppose I am the opposite, I learned perl first, like many others, but now anything that I ever think of doing in perl I create in PHP. PHP is elegant and I've never had any problems with it, the issues you have with it aren't really issue for me since I have my own server running whichever modules I need and the problems stated on that website are mostly the fault of the people doing the actual development. Seriously, since when does anyone incorperate PHP and HTML by force? I like to keep my content and my coding seperate. anyway, PHP works for me and I'm going to keep using it as well as whatever other languages I need to use for each different project.

    5. Re:PHP by Tarantolato · · Score: 3, Interesting

      PHP is a mess of a language. It really is.

      PHP: Free Software's answer to Visual Basic.

      (Not a troll, seriously: they're both mind-bendingly hideous, oversimplified hacks that just happen to be ubiquitous because they make life easier for a lot of people.)

    6. Re:PHP by blackmonday · · Score: 1

      I'll share something that was told to me here on slashdot: When all you have is a hammer, everything starts to look like a nail.

    7. Re:PHP by davidsturnbull · · Score: 2, Insightful

      Type-specific comparisons, when needed (rarely), can be made using ===/!==, or you can cast variables c-style.
      Global variables is complete nonsense, it's true that POST/GET variables can be made global in php.ini, but it's not there by default. Function/class/method scoped variables act as they should.

      As to the whinge about modules.. what sort of peon doesn't have their own colocated box these days? They're like $60/mo.

      Of course there are real problems with PHP.
      The only reason to use PHP is that it's sort of like a loosely-typed C clone, with awesome arrays.

      Sometimes you can add $ to all the variables in a C program and it works in php, and mostly you just update a few tiny differences (most of php's unix functions don't have a place for a reference, which sucks btw).

      The arrays are nothing short of elite. I haven't seen any more useful array implementation in any other language (although I'd like to find some!)

    8. Re:PHP by jpkunst · · Score: 2, Informative

      A prime example is the way that Perl has seperate numrical and string comparitors (==/!= and eq/ne) whereas PHP has only the one (==). This recently came up in the story about the Perl periodic table of elements and I even gave my own answer on this problem. Just to rehash: Perl and PHP are loosely-typed languages so the programmer really needs to tell the interpreter how to compare the mixed numerical/string "scalar" type that both Perl and PHP use. But PHP tries to simplify at the expense of introducing ambiguity.

      PHP has == and != for simple comparison, and === and !== for enforcing that the comparants (is that a word?) are also of the same type.

      See http://nl3.php.net/manual/en/language.operators.co mparison.php.

      JP

    9. Re:PHP by imroy · · Score: 1

      You obviously didn't read the web page I pointed to.

      PHP 4 has a === operator. It works the same way as ==, except that it additionally requires both sides to have the same type. This sounds initially like the perfect solution -- just use === wherever you would otherwise have used ==. Unfortunately, you lose the convenience of being able to treat numbers and strings interchangeably: it is no longer the case that 3 === "3".

      About modules. So paying more is a solution? Meanwhile in Perl I just use the use statement to pull in any module I want. Even compiled modules (check out PDL, a whole bunch of matrix code written in FORTRAN). And I don't have to be administrator. I can install modules in my home directory, and/or make my own:

      use lib "$ENV{'HOME'}/Perl";
      use MyModule;

      I can't see why you think PHP's all-associative arrays are so great. To me it sounds like another attempt to simplify without thinking of the consequences and instead making the result complex and ambiguous. What happens when you mix up normal indexed array operations (e.g $a[1] = 20) with associative operations (e.g $a['george'] = 5) ? I thought PHP was meant to be a simple language that everyone can dive into and start using. But things like this are not obvious, even to a seasoned (although now unemployed) Perl professional such as myself. Perl seperates lists from hashes. I see no reason why PHP should combine them. All I can imagine is some half-wit thinking Hey! What if all arrays are associative? That'd make everything so much simpler! Um, no mate. It doesn't.

    10. Re:PHP by imroy · · Score: 2, Insightful
      PHP: Free Software's answer to Visual Basic.

      I think you've got a point there. Both PHP and VB are both languages that us elitists can frown upon and opine things like why do people use such garbage when there are better alternatives? Yes, I'll admit I'm an elitist. But I try not to stray into zealot territory. Zealotry is about emotion and irrational cheerleading. I have (what I consider to be) good reasons for my opinions. And I'm trying to express them here in this thread.

      Perhaps the common thread to a lot of these sub-par pieces of software (VB, PHP, MySQL, Windows, etc) is this: Most people appear to be tolerant of software problems if they understand the software (or think they do). Thus the dominance of simple but horid software for the masses. While I'm fiddling about with infrastructure and obsessing over making the perfect framework, some kid is banging out Yet Another PHP/MySQL web site. *sigh*....

    11. Re:PHP by Anonymous Coward · · Score: 0

      I can at least say that python's arrays make PHP's arrays look primitive. Python is a good example, because for someone who's familiar w/ php and has "been looking for a better array implementation" it's hard to imagine you'd have missed python. Python excels particularly when it comes to working with those arrays.

      1) Populate an array with values 1 - 10 cubed.

      PHP:
      $a = range(1,11);
      $b = array();
      foreach ($n in range(1, 11))
      $b[] = pow($n, 3);

      Python:
      b = [x**2 for x in range(11)]

      2) Build an array that holds sub arrays

      PHP:
      $a = array(array('a','b','c'), array('d', 'e', 'f'), array('g', 'h', 'i');

      Python:
      a = [['a','b','c']['d','e','f']['g', 'h', 'i']]

      etc. etc.

      PHP's arrays are little better than JavaScript's arrays. If you look further you will find that *most* if not all scripting languages (not including MS's sorry excuses) provide an array or list implementation that is equal to if not better than PHP.

    12. Re:PHP by Some+Bitch · · Score: 1

      I disagree. I'm currently working on some J2ME (i.e. mobile phone/PDA) stuff for a Free content management system. System status reports, blog posting etc. I started this knowing nothing whatsoever about Java and am having to learn as I go along. Why am I doing this? Because it's more interesting than manipulating databases in strange ways and displaying the output (i.e. 90% of all web programming). I get to play with cool stuff and I learn something new along the way. I submit that makes me more of a hacker than just sticking to what I already know.

    13. Re:PHP by JWSmythe · · Score: 1


      I use both PERL and PHP.

      I like PHP for doing stuff embedded into web pages. It works nicely there. I use PERL for "real" work. I don't think there's anything that's impossible for PERL.

      Really, if you know PHP very well, you should have no problem picking up PERL. I was a PERL programmer first, and then started playing with PHP and it all fell into place, with a few exceptions.

      --
      Serious? Seriousness is well above my pay grade.
    14. Re:PHP by VGPowerlord · · Score: 1
      It might just be easier for them to move to Perl. Perl is PHP's older (and more experienced) sibling.

      Here are 1 and 2 written in short form in Perl:

      1) Populate an array with values 1 - 10 cubed.

      Perl:

      $b[$_] = $_**3 for 1..10;

      2) Build an array that holds sub arrays

      Perl

      @a = (qw(a b c), qw(d e f), qw(g h i));

      qw significantly cuts down on the typing time, as you don't have to put in quotes or commas between items.

      if you need variable interpolation mixed in, you have to do it the long way, though:

      @a = (['a',$b,'c'], [$d,'e',$f], ['g',$h,'i']);

      Although () may work for the inner declaration, the perl "Manipulating Arrays of Arrays in Perl" (perldoc perllol) page recommends using () for the outer array and [] for the inner arrays.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    15. Re:PHP by jpkunst · · Score: 1

      can't see why you think PHP's all-associative arrays are so great. To me it sounds like another attempt to simplify without thinking of the consequences and instead making the result complex and ambiguous. What happens when you mix up normal indexed array operations (e.g $a[1] = 20) with associative operations (e.g $a['george'] = 5) ?

      $a[1] = 20;
      $a['george'] = 5;
      print_r($a);

      This is what happens:

      Array
      (
      [1] => 20
      [george] => 5
      )

      Just as you would expect. Not complex or ambiguous, in my opinion.

      JP

    16. Re:PHP by julesh · · Score: 1

      PHP has == and != for simple comparison, and === and !== for enforcing that the comparants (is that a word?) are also of the same type.

      Not to mention strcmp() for performing comparisons based on string value, regardless of the types of the variables, which I believe is what PERL does when you use the 'eq' operator mentioned in the GP post. So, far from PERL being superior because it offers two ways to do the comparison, PHP is superior because it offers 3! ;)

    17. Re:PHP by imroy · · Score: 1

      Just a minor point - That's still not the same thing as Perl's split operators. These tripled operators (=== and !==) still focus on the supposed type of the variables, even though PHP is a loosely-typed language. With perl you can still do 3 == "3" to do a numerical comparison, or 3 eq "3" to do a string comparison. In PHP, 3 == "3" would always match, not matter which comparison it decided to use, and 3 === "3" would never match because they're not the same type. I still think Perl does it the right way, because of the whole loosely-typed language thing. As to whether it makes a big difference, I don't know. It's been several years since I've done much PHP coding.

    18. Re:PHP by imroy · · Score: 1

      Sorry, I was thinking of one of the sections this web page and got mixed up. I'll quote some of it here just to be clear:

      ...However, you can also do things like this:

      $a1 = Array(10, 'Anne' => 32, 11, 'Bob' => 28, 12);
      $a2 = Array(1 => 21, 2 => 22, 3 => 23);
      $a2[0] = 20;


      Questions to consider:
      • What index do we have to consult to get the value 11 out of $a1?
      • What's the iteration order for $a2? Is it numerically-indexed or hash-style?
      • What happens if you use PHP's $a2[] = ... construct to add a new element to the 'end' of the array?
      • Can numerically-indexed arrays have elements missing? If so, can you still trivially iterate over the values in index order?
      While these questions can be answered (by careful reading of the manual and not a little experimentation), the answers aren't entirely obvious. Programmers with a reasonable understanding of basic data structures would be well advised to program as if a given PHP array can be indexed by either contiguous integers or by strings, but not both.
    19. Re:PHP by jpkunst · · Score: 1

      With perl you can still do 3 == "3" to do a numerical comparison, or 3 eq "3" to do a string comparison. In PHP, 3 == "3" would always match, not matter which comparison it decided to use, and 3 === "3" would never match because they're not the same type.

      You're right. But you can get the same behaviour out of PHP with a little more verbosity: Perl's 3 == "3" (numerical comparison) would be 3 == (int) "3" in PHP (cast string "3" to integer before comparing); Perl's 3 eq "3" (string comparison) would be (string) 3 == "3" (cast integer 3 to string "3" before comparing).

      JP

    20. Re:PHP by Peridriga · · Score: 1

      Well... The answer would be 'why the fuck would you do that anyhow?'

      So my car can "drive on the road" and "drive over grass" tell me why I can do 60mph on the highway safely but, I can't do it safely off road?

      Look, at this point your asking a language to figure out what some crazed programmer found as a "limitation" of a language.

    21. Re:PHP by imroy · · Score: 1

      You can do type casting in PHP? Wow, what a confused language PHP is. Is it loosely or strongly typed?

      So to use examples that are a little more realistic -
      In Perl ($a == 5) becomes ((int)$a == 5) in PHP.
      And ($s eq 'name') becomes ((string)$s == 'name').
      The type casting effectively forces the == (or !=) operator to do what you want it to do.

      Would you need two casts when comparing two variables? Like ((int)$a == (int)$b). Or is it just necessary to cast one? I'm thinking you need both casts, unless you know the type of one (e.g a loop variable). In which case you only need to cast the unknown variable (e.g some input).

    22. Re:PHP by imroy · · Score: 1

      Yes, I agree most of those examples are a bit out there. But I think questions #3 and #4 interesting. Just where is then of an associative array? When you add to the end, does it find the greatest (integer) key and add 1 to it? And what happens when you try to iterate over the elements in an array (treating it like a regular indexed array) and it has gaps?

      These are very important questions. PHP is meant to be a simple and easy language for non-programmers to pick up. But it has many issues such as this one, where intended simplicity has in fact resulted in complexity and ambiguity.

    23. Re:PHP by blair1q · · Score: 1

      Read it again. You may be starting with Java from scratch, but you clearly knew something about it, or you might as well have tried Snobol.

    24. Re:PHP by jpkunst · · Score: 1

      So to to use examples that are a little more realistic -
      In Perl ($a == 5) becomes ((int)$a == 5) in PHP.
      And ($s eq 'name') becomes ((string)$s == 'name').

      After brooding over this a little longer, I think it should actuallly be this:

      In Perl ($a == 5) becomes ((int)$a === 5) in PHP.
      In Perl ($s eq 'name') becomes ((string) $a === 'name').

      The typecasting would make no difference to the 'loose' == operator, but it does make a difference to the 'strict' === operator.

      JP

  25. Sounds like a job for... by Anonymous Coward · · Score: 0
  26. Seriously by Anonymous Coward · · Score: 0

    Zero to a fully-functional Hello World program in 4 clicks.

    But VC++ can also do that. So perhaps they are even?

    1. Re:Seriously by vijaya_chandra · · Score: 1

      But VC++ can also do that. So perhaps they are even?

      But what about the case with more-advanced-than-helloworld programs??

  27. From an ocaml convert: by rsidd · · Score: 4, Informative
    It's an incredible language. I'm writing programs now that are more concise than the Python equivalent and about as fast as C. It's really the holy grail I was looking for. (According to a more thorough shootout, ocaml is competitive in speed with C and often faster than C++, and well ahead of all other competition in speed.)

    The flip side is that before becoming productive one has to get used to a whole new way of thinking about problems: immutable data, everything is a function evaluation, no sequential statements, no side-effects, rely on recursion as much as possible, especially tail-recursion. But ocaml isn't religious about it: it has imperative features, including for and while loops, sequential statements (essentially successive function calls with side-effects and null output), and so on. After a while, though, you find you hardly need any of that. Maybe it's just me, but the sort of work I do is well suited to the functional approach. Also, it has a rich set of data structures and is pretty much agnostic about them: you can use linked lists, hashes, mutable arrays or records, sets, whatever suits your purposes.

    The other drawback is the libraries (modules) aren't as complete as the Perl and Python equivalents (though far ahead of most other competition). I imagine that will get cured with time.

    1. Re:From an ocaml convert: by stevesliva · · Score: 1
      So, for you the real question is, "Can we make Perl imitate ML syntax also?" (Speed and elegance be damned, I just want it to work off the top of my head: Perl)

      Wouldn't want ML to feel left out of the Perl mimicry fest...

      --
      Who do you get to be an expert to tell you something's not obvious? The least insightful person you can find? -J Roberts
    2. Re:From an ocaml convert: by pikine · · Score: 3, Interesting

      I use O'Caml for about two years now, and I like it immensely. I also know Perl. When I compare the two, I'd say the problem with O'Caml for scripting is that it's more cumbersome to write regular expression matches in O'Caml than in Perl. And I have to say being able to write regular expression matching easily really is the key to many scripting tasks that I'm aware of (not necessarily what I do).

      There is a remedy though. O'Caml comes with camlp4, a Pre-Processor-Pretty-Printer, which basically lets you customize the syntax of your program and add syntactic sugar. I imagine a variant of O'Caml language based on camlp4 that puts regular expression matching in syntactic sugar will make it very suitable for scripting.

      In fact, I itch over this idea badly that I might do it. If I have the time. ;-)

      For the issue of libraries, O'Caml actually has an OpenGL binding before PHP does! Haha.

      --
      I once had a signature.
    3. Re:From an ocaml convert: by gauchopuro · · Score: 5, Interesting
      I suggest you also take a look at Haskell, if you have not done so already. Haskell completely does away with side effects, performing IO operations in a controlled manner through the use of a mathematical concept known as monads. It also adds lazy evaluation. This has some nice capabilities, such as being able to express concepts as infinite lists, which are then only evaluated as far as necessary.

      I have used OCaml a bit, and one of the things that most irritated me about it was its complete lack of operator overloading; having to use "+" for integer addition, and ".+" for floating point addition, just seems so wrong to me. Haskell uses type classes to allow ad-hoc polymorphism in a controlled manner.

      One advantage that OCaml has over Haskell is speed; current Haskell implementations produce code somewhere between imperitive compiled languages and interpreted languages. However, there is another language, called Clean, that is nearly identical to Haskell in many ways, but claims to have speed comparable to C.

      Back to the topic of the discussion, Haskell is probably not the best choice for quick and dirty one time scripting uses. The use of monads for doing IO adds a constant cost that is burdensome for very small programs, and gets payed back only with larger programs where the controlled approach to IO increases robustness.

    4. Re:From an ocaml convert: by rsidd · · Score: 1
      One advantage that OCaml has over Haskell is speed

      Yes, that's the main reason I chose to dig deep into ocaml in the first place. I'd also messed around a bit with lisp (cmucl); it's faster than perl/python but not as fast as C or ocaml. There are some applications for which python is just too slow for me, while C is too tedious, and I never learned C++ or Java.

    5. Re:From an ocaml convert: by Anonymous Coward · · Score: 0

      If ocaml is so easy to use, then why its library is so limited? I mean the python library was not exactly written by the community. Most of python's libaries were written by the language authors.

      I'd say ocaml is not suitable for general programming as evidented by its lack of general purpose libraries.

    6. Re:From an ocaml convert: by Estanislao+Mart�nez · · Score: 1
      Haskell is nifty, but I can't see myself using a language with absolute functional purity and pervasive laziness. I think the ML approach is better-- it's functional by default, but allows "functions" with side effects and explicit reference values. And while ML is strict, nearly all implementations include features for lazy evaluation.

      In my mind the killer features in Haskell are the type classes and the "functors" (in quotes because the word means something very different in ML and Haskell). It would be really cool to have an ML variant with those.

    7. Re:From an ocaml convert: by wirelessbuzzers · · Score: 4, Informative

      I suggest you also take a look at Haskell, if you have not done so already. Haskell completely does away with side effects, performing IO operations in a controlled manner through the use of a mathematical concept known as monads. It also adds lazy evaluation. This has some nice capabilities, such as being able to express concepts as infinite lists, which are then only evaluated as far as necessary.

      Yes, lazy evaluation can be done in OCaml too, but the syntax is uglier. You use the lazy module.

      I have used OCaml a bit, and one of the things that most irritated me about it was its complete lack of operator overloading; having to use "+" for integer addition, and ".+" for floating point addition, just seems so wrong to me. Haskell uses type classes to allow ad-hoc polymorphism in a controlled manner.

      Haskell's solution to the problem is ingenius, but unfortunately very often requires tagging of those classes, which is slow.

      One advantage that OCaml has over Haskell is speed; current Haskell implementations produce code somewhere between imperitive compiled languages and interpreted languages. However, there is another language, called Clean, that is nearly identical to Haskell in many ways, but claims to have speed comparable to C.

      Looks like Clean has a more powerful set generator than Haskell (it's basically SQL queries), a different class system, and rather different syntax. But it could be useful, I'll check it out.

      --
      I hereby place the above post in the public domain.
    8. Re:From an ocaml convert: by Fourier · · Score: 1

      I imagine a variant of O'Caml language based on camlp4 that puts regular expression matching in syntactic sugar will make it very suitable for scripting.

      In fact, I itch over this idea badly that I might do it. If I have the time. ;-)


      Please do. I really like coding in Ocaml, but the constant double-escaping in regexps makes them a whole lot less useful than they could be. Having something similar to Python's raw strings might be helpful.

    9. Re:From an ocaml convert: by chgros · · Score: 1

      I also like OCaml (learned it in school), although it has a missing feature: you can't for instance define a union type with a member that would have a set of the same type e.g.:

      type t =
      A of a |
      B of t Set
      won't work...

      Also the lack of any kind of overload is very annoying.
      I actually use it for scripting (too lazy to learn Perl when I already have this), while doing "serious" programs in C++.

    10. Re:From an ocaml convert: by Fourier · · Score: 1

      Ocaml does support recursive variant types:

      $ ocaml
      Objective Caml version 3.07+2

      # type t = A of int | B of t list;;
      type t = A of int | B of t list
      # let test = B [A 1; A 2; A 3];;
      val test : t = B [A 1; A 2; A 3]
      #

    11. Re:From an ocaml convert: by RPoet · · Score: 1

      I agree the ugly imperative features like the loops can be done without (I've never had a use for them, or at least I've avoided them to feel "clean" :), but sequential expressions are surely useful nonetheless? If nothing else, then just for 'print_endline "debug"; foo' and the like. Hell, even the print functions and all other IO functions compute by side-effect, I wouldn't want to be without them either :)

      There are few things as beautiful as a useful, purely functional function, free of side-effects though.

      --
      "Oppression and harassment is a small price to pay to live in the land of the free." -- Montgomery Burns.
    12. Re:From an ocaml convert: by Vengie · · Score: 1

      how much is pauk hudak paying you ;-)

      --
      When in doubt, parenthesize. At the very least it will let some poor schmuck bounce on the % key in vi. (Larry Wall)
    13. Re:From an ocaml convert: by sfogarty · · Score: 1

      As a note, OCaml has lazy evaluation (and it is easy enough to build in once you have side effects anyway).

    14. Re:From an ocaml convert: by RPoet · · Score: 1

      There are projects that write more extensive general-purpose libraries than the one that comes with ocaml, for example OCaml ExtLib. I think the core OCaml group is plagued by an inclination towards using OCaml for research and academic purposes like proof tools etc, which takes away from the effort of writing large libraries for real-world use.

      --
      "Oppression and harassment is a small price to pay to live in the land of the free." -- Montgomery Burns.
    15. Re:From an ocaml convert: by Haeleth · · Score: 2, Informative
      I also like OCaml (learned it in school), although it has a missing feature: you can't for instance define a union type with a member that would have a set of the same type e.g.:

      type t =
      A of a |
      B of t Set
      won't work...


      That's because Set is a module, not a type. Sets are done with functors, you need to instantiate Set.Make with a module whose signature matches Set.OrderedType.

      It's possible to do exactly what you want using recursive modules - in fact, this is the example the OCaml Reference Manual gives for recursive modules:
      module A:
      sig
      type t = Leaf of string | Node of ASet.t
      val compare: t -> t -> int
      end
      = struct
      type t = Leaf of string | Node of ASet.t
      let compare t1 t2 =
      match (t1, t2) with
      (Leaf s1, Leaf s2) -> Pervasives.compare s1 s2
      | (Leaf _, Node _) -> 1
      | (Node _, Leaf _) -> -1
      | (Node n1, Node n2) -> ASet.compare n1 n2
      end
      and ASet: Set.S with type elt = A.t = Set.Make(A)
      As for the lack of overloading, in the few cases where it's actually useful you can normally achieve the same effect by wrapping your types in objects, since OCaml conveniently separates object typing from inheritance.
    16. Re:From an ocaml convert: by Anonymous Coward · · Score: 0

      I'd say ocaml is not suitable for general programming as evidented by its lack of general purpose libraries.

      If that's your only issue, you can get round it rather easily by interfacing with another language famous for its extensive libraries but hideous syntax...

    17. Re:From an ocaml convert: by srussell · · Score: 3, Informative
      This is not flaimbait: I'm honestly curious.

      About six months ago, I decided I needed to re-learn functional programming, so I did a project in Haskell and learned that. More or less. I still find Modads awkward, and IO is a total pain in the ass, but all in all, I really like Haskell. However, at some point, I noticed the performance issues; Haskell is pretty slow -- slower than some scripting languages, like Ruby, for a lot of tasks.

      So then I looked at OCaml, because OCaml has a reputation for being fast, and it is also a functional programming language that compiles to native executables.

      I have to say, my first (and lasting) impression was: WTF? Look at this:

      1 + 1 (* Add two ints *)
      1. +. 1. (* Add two floats. WTF? Why?
      Is the compiler so stupid that it
      can't recognise floats? *)
      1 + 1.0 (* Error! *)
      1 +. 1.0 (* Error! *)
      let f x y = x + y (* Define a function *)
      let rec f x y = f (x-1) y (* Define a recursive
      function. Again, why? *)

      Why do I have to *tell* the compiler that the function is recursive? The compiler is able to do inferrence type checking; why can't it tell that a function is going to recurse? In fact, why is there "let" anyway? Seriously, the compiler should be able to figure these things out. Haskell's compilers do. And did they decide to end lines with two semi-colons just to add keystrokes? Why? Why? Why?

      The simple fact is that Ocaml requires the programmer to do a lot of the compiler's work for it. I find this to be the most annoying feature of any programming language. Ocaml gets rid of some stupidities, like variable type declarations, but it adds all of this other stupid syntactic cruft that shouldn't be necessary.

      OCaml is popular. It is efficient (lines of code), and it creates fast executables (second only to C). There are a lot of reasons to love it, and I feel obligated to learn it, but I'm having a hard time getting over what superficially appear to be poor language design decisions. So, is there a good reason for the extra syntactic oddness in OCaml, or is it just there because it always has been?

    18. Re:From an ocaml convert: by rsidd · · Score: 2, Informative
      Actually, the infix operators + and +. are themselves syntactic sugar for the prefix operators ( + ) and ( +. ). (Try it.) As for why different operators are needed for floats and ints, it's to make type inference easier for the compiler, I think. In an expression like "let triple x = 3 * x", you don't have to tell the compiler the type of x or triple: it assumes both are ints. If you instead use a float, you get a compile error; if you want floats, you have to write the expression differently. The nice thing is that once you get rid of all these compile warnings/errors, the program usually runs correctly first time.

      As to the double semicolon, it's because the single semicolon is a statement separator (like in other languages, except you don't use it often in ocaml), while the double semicolon is a function terminator. You don't need the double semicolon all that much: using the interactive toploop, you may need it once in a large block (basically to let the toploop know you're done), and when compiling from a file, often even that can be omitted (for example, if the next statement is a "let"). So you could write rather large programs without any double semicolons.

    19. Re:From an ocaml convert: by chgros · · Score: 1

      Interesting... I had found a workaround somewhere but it involved modifying the Set module, which I didn't want to do. I'll check this out...

    20. Re:From an ocaml convert: by Rubidium · · Score: 2, Informative

      The use of + versus +. is necessary in OCaml so that the compiler knows what types to properly infer in an expression. Otherwise, if there are nothing else that provides fixed types in the expression which could help limit the types of other parameters and the result of the expression, then explicit types have to be used to force types to those wanted, which is a major problem in SML, which doesn't use + versus +.

      As for the use of let versus let rec, this is necessary as the two scope differently. With let the scope in the function or binding is that before it, whereas with let rec the scope in the function or binding includes the new function or binding. You imply above that let should always have let rec semantics, but this would have the problem that functions could not use previous functions of the same name, and bindings could not refer to previous bindings of the same name, as they would already have themselves in their own scope, which would mask any previous functions or bindings of the same name.

    21. Re:From an ocaml convert: by srussell · · Score: 1
      if you want floats, you have to write the expression differently.

      What if I want a polymorphic function, that will accept either floats or integers? What if I have n methods that do some operations on numbers... how many methods do I have to write to support both ints and floats? Do I have to copy and paste the contents of the methods, even if they're practically identical?

    22. Re:From an ocaml convert: by srussell · · Score: 1
      You imply above that let should always have let rec semantics

      Actually, no... I imply that the compiler should be smart enough to see that a function recurses, and automatically flag it as such. I'm saying that the programmer is having to do work the compiler should be able to do.

      Can a function be recursive without being defined as "let rec"? If so, then "let rec" is indeed purely a scoping mechanism, and although I still don't understand how the scoping rules affects the code, I can accept that it may be useful. However, if recursive functions, and only recursive functions, are defined as "let rec", then I propose that the compiler should be able to determine this from the code itself.

    23. Re:From an ocaml convert: by hding · · Score: 1

      The problem is that if there is already a function of the same name, how does the compiler know what you intend?

      let f x = 1

      let f x = if x = 0 then 0 else 4 + f (x - 1)

      Now, should f 4 be 5 or 16?

      That's why there's let rec, and what a previous poster was talking about regarding scoping.

  28. The future of scripting by Anonymous Coward · · Score: 0

    I think that scripting languages like Perl/Python might become the future of programming for admins. With faster machines and so much RAM these days, future systems will be able to quickly compile larger scripts on the fly and will store the compiled program in memory. And scripted programs are certainly easier to edit on the fly than C programs.

  29. Its never the programming language.... by deadmongrel · · Score: 1

    Its never the programming language. True, you can write obscure code with perl but the same could be down with C. Having said that, its the right tools for the right job. Perl would be good for certain situations, PHP would be good for certain other situations.

  30. My dear lord, by dotz · · Score: 5, Insightful
    If you want to choose your scripting language by measures like "Program Lengths by Language", "the smallest running program", "access environment variable", "grep with -F -i -h handling, usage, grep'ing many files", then yes, go for it, that report was done for you.

    Me? I'd rather choose my scripting *and* programming language by some other measures, which mainly involve:

    • portability
    • object model
    • ease of writing C/asm extensions (for speed!)
    • extension modules available in default installation
    I have my own choice (not the winner, it's my *choice* - I haven't compared and/or used other ones mentioned too extensivley). I have as portable interpreter, as Java (except it does work, not only claims that), with much smaller footprint; I can code extensions in C using simple syntax (it's very easy); I have already thousands of available modules in the base installation.

    I am pretty sure, that other tools, mentioned in the report, also allow pretty much the same, some of them do that better, some of them are worse, some are not worth using (as we seen, network stack can be written in PHP) - that's not the point. In my opinion, that report seems like comparing pneumatic hammers, ordinary hammers, sledgehammers and hamsters (mainly because "hammer" sounds similar to "hamster", so what the heck, let's compare them) - by something like color or shape, not by the things they can do.

    You shouldn't compare tools like this (well, except for purely academical purposes), it's not useful at all for me. And, if you want to choose your tools basing on such reports, well then, good luck.

    1. Re:My dear lord, by mabinogi · · Score: 1

      > extension modules available in default installation

      NONONONO oh god NO!!

      Unless you mean extension modules that follow a clearly defined framework, that are well separated from the main language interepreter, allowing you to compile some, all, or none when you compile the language, and easily add more later - with no inherent difference between a bundled and a third party extension.

      --
      Advanced users are users too!
    2. Re:My dear lord, by Umrick · · Score: 1

      Bingo. Some of those examples are rather bad as well. The "search for .c and compile to .o" script for example.

      I can't speak to the others, but coding it with os.path.walk in 2.2 python or os.walk in 2.3 is significantly more concise than the sample program used.

      I hazard a guess that others are the same. Problem with knowing so many languages at a shallow level, you don't necessarily know the best way to do something.

  31. Ruby is first post. by Anonymous Coward · · Score: 0

    Exactly that and more.

  32. hmmm by Anonymous Coward · · Score: 0

    I would have thought the best scripting language would be the one a person feels best scripting with. Rather than what some "scientific" study tells me is the best scripting language.

  33. Being small is overrated by smallpaul · · Score: 4, Insightful

    if I have to write a script, I have to write it fast, it has to be small (less typing), it should allow me to either debug itself via a debugger or just verbose output mode.

    A big part of being a scripting language is being quick to code. But it seldom happens that you can tell how quick it was to code by how many characters it was. For instance for some tasks (even some scripting tasks), IDEs can help you go faster. Proper, clear error messages and exceptions can help you go faster. etc. The scriptometer didn't measure time to code at all, even though it is much more important than what they actually do measure.

    Also, the definition of "scripting" is totally biased towards sh-based languages. Which language is best for driving a GUI word processor? Which one is best at scraping data from a web site or web service? Which one can tweak an XML configuration file? Which one can transcode from UTF-16 to UTF-8 quickly? Scripting is not just about files and regex filters.

    Of course I probably wouldn't bother to post if my favourite language had won...

    1. Re:Being small is overrated by Anonymous Coward · · Score: 0

      Except for those rare cases where you just want a script to compile and do nothing. As the report shows, with sh or perl you're done before you started (0 characters in a minimal working script). For C# or Java you've got to type a dozen characters or so with ample time to make mistakes. so just remember the next time you want a script that does nothing, sh is your man.

    2. Re:Being small is overrated by fireboy1919 · · Score: 2, Insightful

      Another thing along those lines is what you get to use from other people. If you can use other peoples code, you don't have to worry about your own.

      This is where perl is a big winner over everything else. Nothing else even comes close as far as number of available packages.

      I think one of my old professors said it best:
      "Nobody likes to write in perl, but it gets the job done."

      I'm all geared up to make python and ruby my top picks just as soon as they have something like CPAN I can take code from, or until I start doing stuff that doesn't benefit from other people's code.

      --
      Mod me down and I will become more powerful than you can possibly imagine!
    3. Re:Being small is overrated by Anonymous Coward · · Score: 0

      Another thing along those lines is what you get to use from other people. If you can use other peoples code, you don't have to worry about your own.
      This is where perl is a big winner over everything else. Nothing else even comes close as far as number of available packages.


      Except for languages like OCaml which can use Perl libraries as well as their own... and therefore have more available packages by definition. :p

    4. Re:Being small is overrated by dasmegabyte · · Score: 1

      If nobody likes to write in perl, then why write in it?

      I guarantee you: there is not a THING you do in perl you can't also do in Java. Meaning that you could easily use Jython.

      There's probably also not a thing you can do in perl under Windows that isn't already exposed via COM. So use JScript under WSH!

      I mean, who cares how MANY packages there are that do the same thing in fewer/more lines, with more/fewer functions, and better/worse documentation, when you don't like the language in the first place?

      Perl is an elitist's tool, the programmatic equivalent of a Ford F150. If all you need is an efficient commuter, STOP USING PERL.

      --
      Hey freaks: now you're ju
    5. Re:Being small is overrated by fireboy1919 · · Score: 1

      Yes...I could use COM, but since I very much dislike Windows and it's programming, that's out of the question. Plus, it's not portable. I actually have used jscript under wsh before, but COM objects aren't free. Effectively, they can't do as much unless I buy the associated programs.

      Who cares when you don't like the language? Who cares about the language! It takes like a week to switch to a new one given a sufficiently large set of previously known ones; languages are a dime a dozen.

      I'd much prefer to use a language I don't find clean and awesome and save myself hours of coding time than use one that's beautiful but takes forever. To me, beauty in the extreme means fast and neat, which means coding slowly in C or Fortran and using nobody else's code. What takes minutes in perl can take days that way.

      Ironic choice of metaphor you picked. For my purposes, perl is usually the fastest way to get from point A (a plan) to point B (a finished prototype), though I'm not doing it in luxury - in style - like I would be in some more elegantly written languages.
      I would consider that to be the opposite of elitist, but that's just me.

      --
      Mod me down and I will become more powerful than you can possibly imagine!
  34. Can't wait for Perl6! by Anonymous Coward · · Score: 0

    n/t

  35. Personally I prefer Perl by Anonymous Coward · · Score: 0

    I was suprised the Perl language wasnt offered at my University, yet found it also wasnt too hard to learn. One thing I'll never understand is why University Computer Science departments prefer to offer Java as an introductory language when C really isnt that much harder and compared to Perl, Java really isnt that much more usefull.

  36. knowing the language by kaisyain · · Score: 1

    I always wonder how well the people actually know the various languages when something like this comes up. For instance they say python has no "verbose execution" but I don't see how sys.settrace doesn't give you verbose execution.

  37. They forgot PHP... by Anonymous Coward · · Score: 0

    I did not see PHP in the comparison list. Is thhat because they do not know it or have resources to test major scripting languages. Probably because it is not used for scripting a lot, mostly homepage design.

  38. no brainer by Anonymous Coward · · Score: 0

    perl won .. well duh

  39. MS Conspiracy against Sun/Java by vijaya_chandra · · Score: 2, Insightful

    The article says the smallest java program is 68 chars long just to make it seem double that of C#
    public class smallest { public static void main(String[] args) { } }

    But this would be the smallest Java program. only 56 chars

    public class A{public static void main(String[] args){}}


    (Karma be damned; I am no better than an AC anyway)

    1. Re:MS Conspiracy against Sun/Java by Anonymous Coward · · Score: 0

      public class A{public static void main(String[] a){}}

      That'll save you 3 more - how exciting!

    2. Re:MS Conspiracy against Sun/Java by Anonymous Coward · · Score: 0

      Oooh, missed the 'public'. Let's drop it too!

      class A{public static void main(String[] a){}}

    3. Re:MS Conspiracy against Sun/Java by Anonymous Coward · · Score: 0

      How about

      class A{static void main(String[]a){}}

  40. Perl, obiously. by Anonymous Coward · · Score: 0

    Note the extension on comments.pl ;)

  41. seems like a crock by wooby · · Score: 1

    Each of these languages was designed to meet someone's needs. None of them would be popular if someone, somewhere, didn't have a problem that for whatever reason any of these scripts remedied. Voting "the best" doesn't seem to have any meaning when you don't define the circumstances or the problem to be solved.

    For instance, when I look at ways to make a website dynamic, I like PHP. I'm familiar with the syntax and my web host supports it. Someone with a slightly different background or web host might choose Perl. Apples and oranges.

  42. Huh? by Anonymous Coward · · Score: 0

    Since when were script languages all supposed to be cryptic languages for shell scripting?

  43. Hello World by hypermike · · Score: 0
    Personally I prefer Python due to its simplicity.

    'Hello World'

    --
  44. I used to think Python was great for _everything_ by krumms · · Score: 2, Informative

    But it really does depend. I'd use Perl over Python for web development any day of the week (exception: Zope seems pretty cool, but I've not fooled with it enough. The 'everything is an object' metaphor is heaps cool though :)). Perl is faster to write and more expressive, Python is easier to read and - IMHO - often better structured.

    PHP is great for hacking web stuff together, but ... yeah ... the language itself seems a little hacked together - PHP5 fixes a lot of things, mind you so my opinion might change in a few months time after I've used it a little more.

    It worries me that a "feature complete" version of PHP instantly becomes a release candidate, rather than stewing in Beta for a while.

  45. Who cares by Anonymous Coward · · Score: 0

    Who cares ... it's all bits and bytes in the end. A real study would measure relative maintenace.

  46. Python by Frnknstn · · Score: 1

    I am a big fan of Python, and I think this 'search' represented Python pretty well. It isn't great at hacking out short scripts, so it doesn't deserve to win this pointed competition, but its verbose yet pretty syntax makes solid scripts and maintainable, extendable code a joy to program.

    --
    If it's in you sig, it's in your post.
  47. Yeah about that... by Anonymous Coward · · Score: 0

    "While question like that is bound to generate flamewars between the usual Perl vs PHP..."

    Yeah that's really likely when PHP isn't even listed in the results...

  48. pulling a Tcl boner by Anonymous Coward · · Score: 4, Informative
    His Tcl example is not written fairly. The dude should know that that Tcl supports getopts:

    package require GetOpts 1.1

  49. No PHP? by Anonymous Coward · · Score: 3, Informative

    I don't see PHP listed. It's possition on the list is arguable, but it certainly belongs there.

  50. You're right... by rsilvergun · · Score: 2, Funny

    ...I mean, look at all those clear, concise Brainf**k programs out there.

    Seriously, there's something to be said about a programing language that forces good practices (read: python). I indent and comment my code pretty well/consistantly, but a lot of people don't. And while I don't program professionally, I could certainly empathize with people who do debugging Perl code.

    --
    Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
    1. Re:You're right... by Bodhidharma · · Score: 1

      I'm a recent convert to Python but do most of my development in Perl (mainly because of its ubiquity). I work really hard at writing clean code but it can still be a nightmare to come back to six months or a year down the road.

      --
      A dyslexic man walks into a bra.
    2. Re:You're right... by Anonymous Coward · · Score: 0
      I indent and comment my code pretty well/consistantly, but a lot of people don't

      why don't you kill them ?

    3. Re:You're right... by rsilvergun · · Score: 2, Funny

      Because then I've got to take over maintaining their code.

      --
      Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
  51. yattayattayatta by Anonymous Coward · · Score: 0

    Whole thing seems sorta silly to me.

  52. Merd? by darkat · · Score: 1

    > conflict of interest warning: the author of this page is also the author of merd, so some things may be unintentionally subconsciously biased.

    > merd is still in planning stage, only half of the programs work, the interactive interpreter is vaporware, and more generally merd is currently unusable.

    Dear merd author, plese, use another name for your new scripting language.
    I couldn't use "merd" as a programming lauguage. This name sounds awful in italian.

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

      Well, I wouldn't worry about this language being around too long. Each and every year a half dozen youngsters reinvent yet another scripting language. Sourceforge is full of 'em.

    2. Re:Merd? by SillyNickName4me · · Score: 1

      > I couldn't use "merd" as a programming lauguage. This name sounds awful in italian.

      *lol*

      I think the French will agree with you on that.

    3. Re:Merd? by craXORjack · · Score: 1

      The funniest thing is that the author is probably fully aware of the word's meaning since he uses a fly for his icon.

      --
      Liberals call everyone Nazis yet they are the closest thing to it.
    4. Re:Merd? by Anonymous Coward · · Score: 0

      the author is french ( he is the guy that wrote urpmi and much of mandrake's tools).

      Yes, he knows what the name means and said that he choose that so he could blame the name if the language does not succeed :)

  53. Best Script by Anonymous Coward · · Score: 0


    Folks at the Scriptometer conducted a practical survey of which scripting language is the best.


    The best scripting language is Bourne shell script. :)

    C Shell script would be second
    and PERL third.

    Screw VB Script

    Anyone care to argue about that?
    Who needs Objects for scripting anyways?

    Now if we could only get DOS Batch language to work in a Unix/Linux shell...

  54. VBscript seems great... by rsilvergun · · Score: 1

    if you're on Windows, but that's because nothing in the OS was ever really meant to be scriptable, so you had to have Microsoft bolt on a proper scripting language. Imagine using Emacs for you're shell; you'd wanna use Lisp as your scripting language, right?

    --
    Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
    1. Re:VBscript seems great... by stevesliva · · Score: 1
      you'd wanna use Lisp as your scripting language
      Perish the thought.

      But that reminds me of the Scheme Shell Acknowledgements and I have to smile...

      If I thought anyone cared, if I thought anyone would even be reading this, I'd probably make an effort to keep up appearances until the last possible moment. But no one does, and no one will. So I can pretty much say exactly what I think.

      Oh, yes, the acknowledgements. I think not. I did it. I did it all, by myself.

      --
      Who do you get to be an expert to tell you something's not obvious? The least insightful person you can find? -J Roberts
    2. Re:VBscript seems great... by Anonymous Coward · · Score: 0

      that systems on the internet exchange daily

      does emacs really support those many viruses ?!!?

      may be it really does

      switch to vi dude
      ( you'd atleast be able to make out the difference between Funny and Informative in the time you save which you'd otherwise spend pressing ctl+alt+p+q+r+s..)

    3. Re:VBscript seems great... by davegust · · Score: 3, Informative

      nothing in the OS was ever really meant to be scriptable

      That's not really true. Most OS functions are available through COM interfaces. VBScript and JScript interact with any COM interface through the Windows Scripting Host, either in a windowed enviornment (wscript) or a command line environment (cscript). You can manage users, files, ACLs, the registry, network configurations, IIS, application deployment (MSI), multimedia, services, etc. And's it's all done with a nice component paradigm of methods, collections, and properties. Those same COM interfaces are also available for application development to VB6 (native), C++ and .NET.

      We've had this COM environment for 10 years with Windows. In my opinion it's more powerful than the "everything's a pipe" approach.

    4. Re:VBscript seems great... by warrax_666 · · Score: 1
      In my opinion it's more powerful than the "everything's a pipe" approach.

      If anything it's actually a subset of the "everything's a pipe" approach. One problem with COM is that the data representation is fixed, whereas the pipe model allows arbitrary data (i.e. is more flexible with respect to the data representation) -- you just have to be able to parse the output of a program to the extent that you actually need to be able to interface with it. Example: wc doesn't actually need to know what the output of a program means to be able to count words/lines. Contrast this with COM where you actually need a full interface declaration to the able to interface with a "program". And you need to have such a declaration for every single program even though you don't actually need to understand very much of its data representation.
      --
      HAND.
    5. Re:VBscript seems great... by Anonymous Coward · · Score: 1, Informative

      okay. you are completely playing an apples and oranges game here comparing command-line piping to a heavy component architecture. (COM vs. CORBA would have been more appropriate.) But I'll bite.

      COM as it compares to Common Unix CLI Utils:

      - it's much slower

      - requires a huge amount of effort and code bloat to create your own.

      - requires a messy register/unregister process to distribute or use

      - even with the huge amount of COM objects MS offers, they still can't match the functionality of common unix tools.

      - generally COM objects are either undocumented, or suffer from poor documentation compared to unix command-line equivalents.

      - as was pointed out by another...COM requires a full implementation/interface to be loaded and exposed even when the client needs very limited functionality 99% of the time.

      - COM collections are awful. Particularly since most of MS's languages do not know how to box a primitive into an object. (IE, try putting a few ints into a collection and pulling them back out in a foreach. better hope you are in VB and can grab that 16byte(!!!) variant object.)

      - 10 years. Wow. I can't think of one common unix tool that hasn't been around for at least ten years.

      - COM sucks. Even MS knows it. Why do you think they ditched it?

    6. Re:VBscript seems great... by Anonymous Coward · · Score: 0

      You know, citing a program that does something as trivial as what wc does probably isn't the best way to make the point you're trying to make.

    7. Re:VBscript seems great... by Tony-A · · Score: 1

      We've had this COM environment for 10 years with Windows. In my opinion it's more powerful than the "everything's a pipe" approach.

      Pardon a stupid question, but is that why Windows get the worms and viruses and Linux does not?

    8. Re:VBscript seems great... by dasmegabyte · · Score: 1

      And I'll bite back.

      it's much slower

      In my experience, it's not that easy. Yes, if you take something from your CLI like "start program A, pipe output to program B, continue," it'll be slower. But the advantage of COM is that if you commonly interoperate the functions of two programs, you DO NOT have to start a new program each time. Instead, you "instantiate" the object, and then just call the function of the other. Oh, and piping can be a bit faster for string ops...but if the COM programmer understood streams at all, it should be faster overall for large operations to use COM.

      requires a huge amount of effort and code bloat to create your own.

      Now, this simply isn't true. COM has been INVISIBLE to programmers writing in VC since...well, it's been invisible for so long I don't even know when it started. Just write your damned program and compile it, and there is your COM stuff, right there.

      requires a messy register/unregister process to distribute or use

      COM doesn't REQUIRE that everything be registered or unregistered...the registry allows you to install the object wherever you like without having to update all of the associated programs to tell them where it is. If all of the COM objects you use are in the same directory as your code, you can just reference them by name. This is no different from maintaining a path or references in config files...except that COM's registration is a bit more apocryphal thanks to GUIDs.

      even with the huge amount of COM objects MS offers, they still can't match the functionality of common unix tools.

      This simply isn't true, and it shows a massive lack of knowledge of how things work in Windows. Just about anything you can do in a program that runs on Windows can be replicated in COM...and it works wonders for hierarchical documents, something I've never had an easy time of in UNIX. Working with Excel documents under COM is easy stuff.

      as was pointed out by another...COM requires a full implementation/interface to be loaded and exposed even when the client needs very limited functionality 99% of the time.

      But that's really what Windows is about -- doing tasks ALL DAY. Starting a program up and keeping it running until you leave at the end of the day. To to that, you want to speed up execution at the expense of start up. If you want a program to do nothing more than what you want to do with NO outside work, move to Haskell or Ocaml.

      COM collections are awful. Particularly since most of MS's languages do not know how to box a primitive into an object.

      This is just wild. Collections in COM implement a VERY basic interface which allows you to iterate through them and handle them as strictly typed objects (thus enabling you to do complex hierarchical operations without removing the objects from their context). It doesn't "box primitives to objects" because primitives aren't supposed to be used that way (it would require overhead for recording the type of the primitive, and thus a good deal more memory, a premium when COM was invented, so nobody wanted an extra byte with every byte just to tell the program it's a Byte). If you want to pass an array over COM, you pass it AS an array (which would work fine), or you implement your own Collection interface to box them properly. This should take you about ten minutes, and is the way to do things.

      Variants, BTW, are amazingly useful things for people who don't know how to program. They help these people to LEARN how to program syntactically before slapping them with classes and types and primitives and instantiation and pointers. Anybody who writes with variants for more than a year needs to be smacked...unless, of course, they are using them ironically.

      COM sucks. Even MS knows it. Why do you think they ditched it?

      Well, I think they ditched it because they realized .NET's way of strongly typing EVERYTHING, even primitives, and acc

      --
      Hey freaks: now you're ju
  55. Java is completely unusable for scripting... by Dr.+Bent · · Score: 1

    ...but Groovy isn't.

    Groovy is a Python/Ruby style scripting language that runs anywhere Java runs, and it works and plays well with existing Java libraries, including the JDK. There's even a JSR for it.

  56. Why I like perl by Anonymous Coward · · Score: 5, Insightful

    I'm going to stick my neck out and say I like Perl -- so I think this is good news. However, I've always thought of Perl as a text-processing language, and In My Limited Experience, mobile phones can only fit about ten words on the screen. {on the other hand, this could simply lead to phones with bigger screens.}

    There's no denying that you can write really ugly code in Perl, but you can also write beautiul code in Perl. I think some of the people who knock Perl are confusing "undisciplined" with "not anal retentive". Perl was always based around the idea of serving the end rather than the means -- it's about where you're at, rather than how you got there. It does not impose a particular style on the programmer. Thus, for any given task, there could be many, many ways to accomplish it in Perl.

    They're all right.

    Some will be faster than others, some will use fewer resources than others, some will look prettier then others when viewed as source. But if you don't care enough about those things to mention them in the design spec, then they don't matter.

    Now, you can have your fancy object-oriented stuff, but in many ways it's overkill. For instance, if you needed to write a programme involving geometry, you could create an Angle object which would have a value assumed to be in radians and properties for its sine, cosine, tangent and representation in degrees; a Distance object which would have properties for its representation in different measuring units; and assigning a value to any property would affect the object and therefore its other properties. It might be beautiful if you like the OO concept, but it's a bit overkill if you just want to find the missing side of a triangle.

    And does a "disposable" programme -- one that you will run only a few times before forgetting it forever -- really need to look pretty anyway?

    As for PHP, well, it really isn't much different from Perl -- apart from always needing to put brackets around function parameters, the fact that all variables start with a $ sign whether scalar, array or hash and there is no $_. {I happen to love $_. It goes nicely with the concept of an accumulator. If you never did any assembly language, you probably won't know what I'm talking about, though}. That is hardly surprising, because the original PHP was actually written in Perl to be like a kind of subset of Perl.

    Also, one of my little niggles -- and I freely admit that this is just my own opinion -- is the inability to get on with any language that uses the plus sign as the string concatenation operator while letting you freely mix string and numberic variables. {*cough* ruby *cough*} I expect "2" + 2 to equal 4, not 22. Hell, if I have to do something to my variables before I can add them, that just nullified the advantage of having freely-mixable scalar types! It might as well be a strict-typed language and barf on an expression such as "2" + 2!

    As for Python - well, it's not my cup of tea {I guess you like either Perl or Python} but other people seem to have written some pretty good stuff in it, so I shan't knock it.

    1. Re:Why I like perl by davegaramond · · Score: 4, Informative

      Before you cough on Ruby and said "2" + 2 in Ruby will equal 4, have you even tried it? Ruby (and Python) are _strongly-typed_ languages, unlike Perl (and PHP) which are weakly-typed. Ruby protects you from mixing string and numbers in operations like +. You'll have to say "2".to_i + 2.

      And having used all four of those for projects large and small, I can say with confidence that I prefer strongly typed language. Weakly typed language is more dangerous and error-prone.

    2. Re:Why I like perl by JamesKPolk · · Score: 2, Informative

      irb(main):001:0> 2 + "2" TypeError: String can't be coerced into Fixnum from (irb):1:in `+' from (irb):1

    3. Re:Why I like perl by Anonymous Coward · · Score: 0

      OO is not an overkill. OO in languages such as java is an overkill, but in ruby, say you want the third side of a triangle you can write:

      >> include Math
      => Object
      >> c=sqrt(1**2 + 3**4)
      => 9.05538513813742

      guess what? it's pure OO and you don't have to write an Angle class.

      Plus, ruby is strongly typed, you can't write '2'+2 without an exception.

      Ruby may not be the best langauge for you, and OO may not be the final solution, but it may use FP style and procedural style without problems, it's not Java.

    4. Re:Why I like perl by bigusputicus · · Score: 1

      Well... I like Perl too! What I like so much about Perl is all of its flexibility. When I'm prototyping, my code style is completely different than when I'm delivering code that someone else will maintain. Perl provides me with the ability to be as terse or verbose as the requirements demand. I think that allowing the programmer or team define their coding style is more valuable than a language defining it.

      In regards to strong-vs-weak type languages, I've always thought in my experiences strong type languages are needed more by teams than individuals... for quite a few applications I've seen or built.

      I think programmer and qa efficiency are very valuable, much more costly than hardware. Depending on the individuals/teams discipline, some languages may be better than others (i.e rules imposed by the language, compiler)

    5. Re:Why I like perl by KnightStalker · · Score: 1

      Perl is strongly typed. However, 2 and "2" and \$x are all the same type. This is not just semantics -- 2 and (2) and { 2 => 2 } are different types and they are not interchangeable. Values of Perl's "scalar" type can be expressed and used as strings, numbers, references. You can't cast an list to a hash or a scalar. You can't treat a scalar reference as a list reference. You can assign a list to a hash, but that is just synactic sugar ("keys (a => 1, b => 2)" does not work -- even though that looks like a hash, it's a list).

      --
      * And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
    6. Re:Why I like perl by dasmegabyte · · Score: 1

      Oh. You just discovered yet another problem with your average scripting language: absolutly inscruitable error messages.

      Say what you will about Java...you can't beat a nice stack trace for PURE context. Except maybe a dotnet app in debug mode.

      --
      Hey freaks: now you're ju
  57. Wow that's one wacky grading system. by Retric · · Score: 2, Insightful

    under Tools:
    compilation and execution in one command (20 points) vs
    debugger (5 points)

    Ok, mabe it's just me but the author finds it 4x more important to be able to compile and execute the comand than having a debugger of some sort I mean wow if it's that important maby he should write some sort of script to handle that for him.

    And wow that's a lot of TD's out there maby under Program Lengths by Language. Then again maby when we find somone who can figure out that the "ease of converting between numbers and strings" is less important than say noticing that your string doe not contain a number. "10l0" is realy the same as "RED" so who cares right.

    PS: If you want to compare scripting lanuages try writing somethign that does a grep search for "GET A CLUE" with files of the format USEFULL*INFO## and then sort's the output by the number of ocurances of "FuncoLand" instead of writing hello world is as few chariters as posible.

  58. Read essays by Paul Graham by linuxbaby · · Score: 4, Informative
    Anyone interested in the benefits of different programming languages should read some of the great well-thought-out essays by Paul Graham:
  59. I put Ruby in my resume by Estanislao+Mart�nez · · Score: 2, Informative

    And it made a good impression in one of my job applications, where the contact person knows it pretty well. It won't impress most people, sure, but (a) people who don't know Ruby will understand that means you could do Python, PHP or Perl; (b) people who do know Ruby will think better of you.

  60. These guys aren't fluent in Java... by arch_helmet · · Score: 2, Insightful
    ...Coz you can do this:
    public class A{
    static{
    System.out.println("Hello world");
    System.exit(0);
    }
    }
    (How come <ecode> doesn't preserve whitespace?!)

    ...Which is 95 chars including whitespace and Win$ EOLs.

    Not that it makes any difference, Java was never gonna do well and is totally inappropriate for scripting, but there ya go.

    --Tim
    1. Re:These guys aren't fluent in Java... by Kytakh · · Score: 1

      How does that run from the command line?

    2. Re:These guys aren't fluent in Java... by Anonymous Coward · · Score: 0

      who said it would?

    3. Re:These guys aren't fluent in Java... by furball · · Score: 1, Interesting

      It works like this.

      The static block says "Execute whatever is in this block when the class is loaded by the classloader." Now, the standard execution for command line Java apps is JVM a) locates the class file b) loads the class with the appropriate classloader c) runs the main(String[]) method if it exists.

      The program from the grand parent post hits right at stage b. Basically it achieves the purpose of printing out "Hello world".

    4. Re:These guys aren't fluent in Java... by Kytakh · · Score: 1

      I see how it could work, but an app needs to start before it will load the class doesnt it? How does this example do this?

    5. Re:These guys aren't fluent in Java... by furball · · Score: 0

      See that's just it. The app *is* the class in Java.

    6. Re:These guys aren't fluent in Java... by Kytakh · · Score: 1

      Err. You still need an entry point into the application. The code for the "hello world" example in the article gave this as a Main method, the static loading in this example wont be reached in the same way and would require more code to complete would it not? Thats what it is in relation to as far as the article is concerned?

      Just bored and curious really...

    7. Re:These guys aren't fluent in Java... by furball · · Score: 0

      No, you don't need an entry point into the application. It's like writing a code for the linker. "When this executable is linked, execute this chunk of code." The application's entry point is never reached.

  61. There's a deeper problem by Estanislao+Mart�nez · · Score: 3, Insightful

    Measuring program size in bytes is stupid. Lines of code, though still rife with problems, is a much better measure.

    1. Re:There's a deeper problem by Mind+Booster+Noori · · Score: 1

      Both are good...
      Size in bytes can be very important when, for instance, you're programming something to run in, let's say, a printer.
      With that kind of space limitation, the smaller the better (even if heavier to run).

  62. they left out applescript by Anonymous Coward · · Score: 0

    The OS X scripting model is very powerful, it lets you call other languages and control scriptable programs from any OSA language (Perl, python, Ruby, tcl, JavaScript, AppleScript.) AppleScript can also be used within the XCode/AppleScript Studio framework to write regular programs.

  63. It's not the language it's the library. by killjoe · · Score: 4, Insightful

    You know what language does not matter. I can write a preforking server in perl in one line of code. How? Because somebody else has already done it for me, documented the code, posted in a central library that's available for everybody and is searchable. Not only that I can type "perl -MCPAN -e shell" and "install Whatever::Whatnot" and have it in under 5 minutes. Try that with python, ruby, ocaml or java.

    Maybe python is easier to read, maybe ruby is more object oriented, maybe ocaml is faster, maybe lisp is better then all of them, but I don't care. When I want to get something done I can always get it done faster in perl and it's all because of CPAN.

    Until another language offers what CPAN does I don't care that much about it.

    --
    evil is as evil does
    1. Re:It's not the language it's the library. by endx7 · · Score: 1

      Until another language offers what CPAN does I don't care that much about it.

      ack! I was going to mention CPAN, but someone got to it first. But perl isn't the only one with something like that. php has something called pear, which from what I hear it is basically be the CPAN for php.

      CPAN is probably still way better than pear though. (And I have used CPAN, and CPAN is pretty cool).

      (and yes, PHP can double as a REAL scripting language if you break out of mod_php and use the cli binary. I've never really used it as such though)

    2. Re:It's not the language it's the library. by killjoe · · Score: 1

      PHP does indeed have PEAR. It too is object oriented, searchable and well documented. The only thing it lacks is the ability of php itself to install modules and any dependent modules. PHP folks need the equavalent of -MCPAN

      --
      evil is as evil does
    3. Re:It's not the language it's the library. by OmniVector · · Score: 4, Insightful

      if that were true, all us linux and mac users should just go ahead and switch to windows. i mean after all it has the largest user based, the greatest number of software titles, the most support, and the most development libraries.

      sometimes we prefer to use languages because they are actually easy to code in and read. neither of which perl is good at. and for that reason, it will forever be off my list of languages to consider.

      --
      - tristan
    4. Re:It's not the language it's the library. by kwerle · · Score: 0

      You know what language does not matter.

      Gotta disagree with you, there.

      Unless a language is object oriented and supports reflection [someobject.findMethodNamed("someMethod").execute( )], and some form of GC (though I don't require it be automated, so that is largely a library issue), I won't bother learning it.

      That doesn't go for scripting languages (as far as I'm concerned), which I don't generally feel are appropriate for large projects.

      install Whatever::Whatnot" and have it in under 5 minutes

      There is nothing magic about perl that makes this work. There is something magic about the maintainers and founders (I have the utmost respect for Mr. Wall) that makes this work. Java's webstart is SUN's half-baked attempt at this kinda thing. The PHP folks should do this - as should all the other scripting languages. Hell, all the other languages should do this kinda thing as much as possible.

      Food for thought.

    5. Re:It's not the language it's the library. by killjoe · · Score: 4, Insightful

      "That doesn't go for scripting languages (as far as I'm concerned), which I don't generally feel are appropriate for large projects."

      The topic was about scripting languages.

      "There is nothing magic about perl that makes this work."

      I used to think that too but I have changed my mind. If there was nothing magical about perl then all languages would have a centralized library of objects and a easy way to download and install them (including dependency resolving). I agree with you that all languages should have this none of them do and there must be a reason for it.

      For example. Python and ruby are both MoreObjectOriented then perl. They both have large and active communities. They both have extremely smart and dedicated communities and yet neither one has the equavalent of CPAN. Ruby has an archive at least and python has a half assed repository but all of it poorly documented and can't be installed without manual downloading.

      There must be something magical about perl. Don't know what it is but if it was otherwise all other languages would have done it by now. Think about it. This kind of thing is Ideal for java right? It has objects, beans, EJBs etc. Where is big searchable repository of java beans I can download and deploy in under a minute?

      --
      evil is as evil does
    6. Re:It's not the language it's the library. by prockcore · · Score: 1

      Not only that I can type "perl -MCPAN -e shell" and "install Whatever::Whatnot" and have it in under 5 minutes. Try that with python, ruby, ocaml or java.

      Sure that works on Linux, but try doing that on solaris. Installing perl modules on solaris is a chore and a half.. mainly because every perl module you run into assumes you have a GNU environment.

    7. Re:It's not the language it's the library. by pablodiazgutierrez · · Score: 0
      I can write a preforking server in perl in one line of code. How? Because somebody else has already done it for me, documented the code

      Or you can also not hit RETURN.

    8. Re:It's not the language it's the library. by Fujisawa+Sensei · · Score: 1

      What about all the broken CPAN modules out there?

      Then there's connecting to CPAN from systems that are not on the internet. Yes, I know you can maintain a local CPAN mirror, but that kind of defeats the purpose doesn't it.

      --
      If someone is passing you on the right, you are an asshole for driving in the wrong lane.
    9. Re:It's not the language it's the library. by john_smith_45678 · · Score: 1

      People say the same thing about .Net.

    10. Re:It's not the language it's the library. by kwerle · · Score: 1

      I used to think that too but I have changed my mind. If there was nothing magical about perl then all languages would have a centralized library of objects and a easy way to download and install them (including dependency resolving). I agree with you that all languages should have this none of them do and there must be a reason for it.

      I believe that the only reasons are:
      1. It was the first good scripting language (tm)
      (yeah, folks will disagree with first, and good, but there ya go).
      2. The folks at the top are really smart, and realize how important good libraries are.
      3. The whole purpose of perl was to make things easier to do*

      * This is an important driving force, and it shows up all over the place. Note: easier to DO, not maintain. It is easy to install CPAN modules, use them, etc. It turns out that maintaining them isn't as easy as installing them (or so I've found). There are reasons for this, I'm sure, but one of the big ones (I think) is that perl is mostly a write-only language (hard to read/maintain, and that wasn't a goal). Other languages that have come later (or even earlier) had other goals (be better than perl, be more OO, be names after a gemstone, whatever). The fact that perl is slacker-oriented is great, and CPAN is part of what makes it great for slackers. (and by slackers, I mostly mean sysadmins who have better things to do than mess around with scripting language libraries, and I include myself amoung those).

      This kind of thing is Ideal for java right?

      Yup. SUN sucks.
      (yeah, folks will disagree with that, but there ya go)

    11. Re:It's not the language it's the library. by Anonymous Coward · · Score: 0

      Not only that I can type "perl -MCPAN -e shell" and "install Whatever::Whatnot" and have it in under 5 minutes. Try that with ruby.

      gem -i Whatever

      It will also automatically resolve any dependencies that Whatever has, generate documentation and more. (Like running Unit Tests to verify that the installation worked correctly.)

    12. Re:It's not the language it's the library. by Anonymous Coward · · Score: 0

      For example. Python and ruby are both MoreObjectOriented then perl. They both have large and active communities. They both have extremely smart and dedicated communities and yet neither one has the equavalent of CPAN.

      We're working on having something better instead of copying old ideas. See the RPA Base Wiki and the RubyGems Wiki.

    13. Re:It's not the language it's the library. by Per+Wigren · · Score: 1

      PHP has the command "pear" which does exactly that. I even think it's installed by default in recent PHP-distributions.

      --
      My other account has a 3-digit UID.
    14. Re:It's not the language it's the library. by eMilkshake · · Score: 1

      And then CPAN needs to install a dozen other components. All that goes well until number 11. At that point, it fails for your platform (if you're not using a one version old version of RedHat on Intel). So you pull down the code by hand and tinker, or go through various versions of the module until you find one that works. Then you force install the module you needed because it won't work with the version of the dependency you had to install.

      yay, cpan

    15. Re:It's not the language it's the library. by Anonymous Coward · · Score: 0

      Does Perl have the equivalent of Python's eval()? mystring=argv[1] #argv[1] is a mathematical expression in x x=5 eval(mystring) # Note that argv[1] is a command-line argument

    16. Re:It's not the language it's the library. by T-Ranger · · Score: 1

      That being the case, why wouldnt you install the "GNU enviroment" on Solaris? It even comes with recent versions of Solaris.. Not to mention sunfreeware.com and pkg-get.

    17. Re:It's not the language it's the library. by rreyelts · · Score: 1
      Where is big searchable repository of java beans I can download and deploy in under a minute?
      Check out jakarta.apache.org. Then check out SourceForge. There are literally thousands of free, open-source class libraries (not just single "beans") for Java. They range across bytecode manipulation, aspecting systems, plugabble servlet and ejb containers, distributed computing, transparent persistence engines, GIS processing and mapping, physics libraries, gaming libraries, etc... Just about everything you could possibly imagine.

      I wouldn't be surprised if Java has the largest base of reusable code compared to any other language, and it's only been around for 10 years or so.

    18. Re:It's not the language it's the library. by killjoe · · Score: 1

      Jakarta is a loose compilation of libraries, fameworks, and applications. It is not a library of ready to use objects like CPAN is. Also java has no way to automatically download and install jakarta projects and resolve any dependencies.

      --
      evil is as evil does
    19. Re:It's not the language it's the library. by colinrichardday · · Score: 1

      OOPS, could have actually tried Perl first. Yes, Perl's eval() can also do this. Why is there no Perl preview option? :-( Well, there goes my karma :-(.

    20. Re:It's not the language it's the library. by rffrff · · Score: 1
      I can run a multithreaded webserver in ruby in one line too, and In python too. Cause even if the've not got CPAN they have lots of libraries anyway.

      download ruby >= 1.8 and you'll be able to do this out of the box:
      ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot =>".").start'


      CPAN has lots of useful stuff, in a good format, but ruby and python hav modules for almost anything anyway, and they have great beatteries included.
    21. Re:It's not the language it's the library. by rreyelts · · Score: 1
      It is not a library of ready to use objects like CPAN is.

      How is a library not a collection of "ready to use" objects?

      Also java has no way to automatically download and install jakarta projects and resolve any dependencies.

      Yes there is - it's called Maven. Though, many people just bundle their dependencies with their libraries. Sorry, there's nothing special about Perl in this regard.

    22. Re:It's not the language it's the library. by killjoe · · Score: 2, Informative

      It's apparent by now you haven't used perl or CPAN. If you had you would know how much jakarta and CPAN differ.

      You seem to confuse a build system like Maven and a package installer system like CPAN. CPAN is more like apt-get and maven is more like make on steroids.

      --
      evil is as evil does
    23. Re:It's not the language it's the library. by killjoe · · Score: 1

      Solaris is a commercial product made by a company worth billions of dollars. If you have any gripes with it you should contact that company and demand to get your money's worth. If they don't satisfy you as a customer you should probably consider switching to a competing product or an open source one.

      I for one have been very happy with both freebsd and linux so far so I would not hesitate to reccomend them.

      --
      evil is as evil does
    24. Re:It's not the language it's the library. by killjoe · · Score: 1

      neither ruby nor python have as large a library. Neither of them have an automated way to install the library components. Python does not even have a centralized repository. Also neither the python or ruby libraries have much of a documentation.

      --
      evil is as evil does
    25. Re:It's not the language it's the library. by rreyelts · · Score: 1
      It's apparent...
      It's apparent you know little to nothing about Java development. Anybody who refers to downloading "Java beans" has no idea what he's talking about.
    26. Re:It's not the language it's the library. by drgnvale · · Score: 3, Informative
      Until another language offers what CPAN does I don't care that much about it

      I know it probably doesn't matter to most of you, but even lisp has something like CPAN. Its called ASDF, and there is a library called ASDF-Install. Of course common lisp lacks the huge number of libraries that more popular languages have, but (I have to admit) its getting better (getting better all the time).

      ASDF on cliki

    27. Re:It's not the language it's the library. by SewersOfRivendell · · Score: 2, Informative
      For example. Python and ruby are both MoreObjectOriented then perl. They both have large and active communities. They both have extremely smart and dedicated communities and yet neither one has the equavalent of CPAN. Ruby has an archive at least and python has a half assed repository but all of it poorly documented and can't be installed without manual downloading.

      The answer is that perl came first. Building sophisticated infrastructure like CPAN takes time, and requires a certain critical mass of contributing developers to be effective and useful. As it happens, the Ruby folks are rapidly building a solution of their own devising, already quite usable.

    28. Re:It's not the language it's the library. by Coventry · · Score: 1

      (Mostly) Wrongo on python...
      The central repository used to be starship - but now PyPi is the favored repository. Has been for quite some time. _Much_ documentation exists for these modules.

      http://www.python.org/pypi

      No automated install system exists, like the cpan shell, but then again, the python standard library modules include a _lot_ of things you'd go hunting in CPAN for... the original poster mentioned writing a preforking server - its in the standard library with Python. In fact, you can change from the forking version to the threading version by simply changing which mixin class is used at server creation time - the rest of the API remains the same.

      Here are some other _standard_ python modules you wouldn't need to go get a CPAN equivalent for:

      pydoc - a python module documentation generator, it even includes a built in webserver and can allow you to browse documentation it generates (from your code and comments) live - including all modules currently available in the standard lib, installed for your site, and locally (in the directory where you are)

      email - email and mime parsing, including reading and creating complex messages.

      browser - find and launch a URL in a browser on the current machine, regardless of platform. The same code will launch a browser to the specified URL on windows, *nix and Apple machines, using the default browser the user has chosen, or will attempt to find one of a 'family' you choose for them, and fallback to what it can find otherwise. It will even launch a mail client if the URL begins with mailto:

      DocXMLRPCServer - a fully functional, CGI and XMLRPC capable web server.

      nntplib - nntp client library for implementing a nntp client, including posting capabilities.

      Did I mention the standard library has very good documentation?
      ------------
      Now, having said all of that: CPAN does _rock_, and I wish python had a PyPi shell utility - I even considered writing one, but current PyPi allows module authors to host their own downloads, and the 'download link' from PyPi can goto a html page with links to download a package instead of the actual install files - thus its a hairy problem. I may write a PEP dealing with that issue.

      Cheers.

      --
      man is machine
    29. Re:It's not the language it's the library. by killjoe · · Score: 1

      Excuse for saying this but I find pypi unimpressive. Go type IMAP into the keyword field and you get twisted and nothing else. Go type Jabber and all you get is a xml-rpc over jabber. Go type proxy and you get two projects neither of which is a module to help you write proxy servers.

      Also it's simply a pointer to packages not a repository itself.

      --
      evil is as evil does
    30. Re:It's not the language it's the library. by rffrff · · Score: 2, Informative

      You're right about docs and the fact that CPAN is more mature.

      You're wrong about the large library: what do you really need and could not find in ruby or python? Ask for it and probably you'll find that it exists.

      db access, pdf/xsl/OOo docs/svg creation, numerical stuff, GUI stuff, ssh/ssl/tsl stuff, smtp/imap/pop/nntp, web libs/templating, csv handling, xml/xsl/Schema/Relax-ng,YAML, SOAP,xmlrpc, Linda/tuplespace/remote objects access, TestUnit, optparse/getopt/GO::Declare.. I really don't have need for something else.

      And ruby has a way to install stuff automatically, it's called rubygems, and it interacts with rubyforge.org. It's a young project, but it's fully functional.

    31. Re:It's not the language it's the library. by Crayon+Kid · · Score: 1

      I used to think that too but I have changed my mind. If there was nothing magical about perl then all languages would have a centralized library of objects and a easy way to download and install them (including dependency resolving). I agree with you that all languages should have this none of them do and there must be a reason for it.

      PHP has PEAR. Examples:

      pear list
      pear install MODULE
      pear upgrade MODULE
      pear upgrade-all
      --
      i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
    32. Re:It's not the language it's the library. by killjoe · · Score: 1

      I don't argue that there is not a large python library. I am arguing that it's not centrally located, searchable, well documented and easy to install and update using a built in mechanism.

      CPAN provides all that and more. No other language comes close and I think it's about time they figured out why.

      Why does perl have CPAN but python does not have piPAN (a great name for it too!). Have you ever tried searching for a python module to do something specific? Say you wanted to write a jabber proxy in python that examined each message, logged it to a database, and cleaned up dirty words. How long would it take you to hunt down a class to build proxy servers, class to parse jabber messages, class to write to the database, a class to filter out dirty words? How long would it take to search for the same classes in PERL?

      And once you found those classes how well are they documented? DO they have sample code? Is each function and method documented? Take a look at the documentation here

      Is there anything on the python sites like this?

      --
      evil is as evil does
  64. 53 by Anonymous Coward · · Score: 0

    public class A{public static void main(String[] v){}}

  65. What? where? by Anonymous Coward · · Score: 0

    Where was vbscript? and where was the proclomation that OCamel was best. I must be missing something.

  66. Bizarro scoring by Just+Some+Guy · · Score: 1
    They certainly have some weird tests. Examples:
    the smallest running program

    sh : <empty>
    Perl : <empty>

    access environment variable

    sh : echo $HOME
    Perl : % perl -le 'print /home/pixel'

    So, these languages get graded partly on how small a null program can be. I particularly like the Perl example of printing an environmental variable; you can pretty well figure out how they messed that one up, but it's still sloppy.

    To say that one language is better than another based on a score assigned to these tests is not very defensible.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Bizarro scoring by NickFortune · · Score: 1
      for that matter why do the perl examples all include command line prompt and invocation? He doesn't consider

      % sh -c 'echo $HOME'

      for the bash case, so why do it (only) for perl?


      It looks to me like he got a bunch of people to write the scripts for him. It would explain the stylistic variations, if nothing else

      --
      Don't let THEM immanentize the Eschaton!
  67. Re:I used to think Python was great for _everythin by drgroove · · Score: 1

    PHP5 RC3 /is/ their (Zend/PHP's) public beta. Very minimal portions of the language will be modified prior to the final release of PHP5.

    I agree that PHP4 seems a bit hacked together; PHP5's OO language construct additions, try/catch, et al should improve code reuse, design pattern implementation, etc.

  68. Ocaml VS Dylan. by killjoe · · Score: 1

    Anybody have experience with both ocaml and dylan and willing to write a quickie comparison. I have been reading about them and right now I'm at a tossup as to which one I am going to learn next.

    --
    evil is as evil does
    1. Re:Ocaml VS Dylan. by Estanislao+Mart�nez · · Score: 1

      I had a look at Dylan, and I concluded that I would never choose it over Common Lisp. It's really Lisp with a more conventional (and verbose) syntax. I'd go for O'Caml family-- it's more different to the languages that you probably know already. Take a look at Standard ML too-- if you know O'Caml, SML differs mainly in the syntax and libraries, and there's more books (at least in English) for SML, whose code translates trivially to O'Caml.

  69. No CF as usual by mdinowitz · · Score: 1

    And as usual, ColdFusion is ignored. Doesn't matter that it's been around for 9 years and going strong. Doesn't matter how fast and easy it is to write a web app in it. It's not free, so ignore it. It's Macromedia, so ignore it. It's not open source, so ignore it. Damn, but this bias is getting real old.

    --
    Michael Dinowitz House of Fusion http://www.houseoffusion.com
    1. Re:No CF as usual by Anonymous Coward · · Score: 0

      I completely agree, CF is by far the fastest to learn too. It has very good error reporting/debugging unlike PHP...
      But somehow it's never good enough.

    2. Re:No CF as usual by Anonymous Coward · · Score: 0

      (-1, Whiny)

    3. Re:No CF as usual by mdinowitz · · Score: 1

      Yes, I whine about the injustice of it and I'm sure enough of the righteousness of my complaints that I can whine with my name on the post rather than hiding. To Quote an open source guru "Why would I want ColdFusion when I have Zope". He, like many in the open source world look down on and ignore ColdFusion because it's a product that goes against the open source religion. Doesn't matter how good it is. Doesn't matter how many are using it. Doesn't matter that it supports many open source ideals. It's 'for pay' and 'closed' so it sucks. This is why I do not put my effort into the open source community in general. I dedicate my energy to the community of users that use the language that I do. The community ignored on Slashdot. A community that you should embrace rather than reject. Yes, I'm whiny and I have every right to be.

      --
      Michael Dinowitz House of Fusion http://www.houseoffusion.com
  70. OCaml Rocks by thepr0fess0r · · Score: 1

    I love OCaml! I suppose it depends on what you're rapidly developing, but it is quite a nifty language. Man I'm drunk.

    1. Re:OCaml Rocks by Anonymous Coward · · Score: 0

      Mod Parent up!
      You have to be drunk to like Ocaml!

  71. How come JS has no debugger? by Begemot · · Score: 1

    It seems like a commercial comparative grid designed to make your product look good.

    JS has debuggers and full featured interpreters at least on MS (try 'cscript /x foo.js').

    Also what about OOP/COM? Is it too much to ask? JS supports XPCOM and ActiveX on MS.

  72. Why does one have to be the best? by Anonymous Coward · · Score: 0

    I'm lazy and like languages that all look (can be written) using generally the same syntax. For me that's C, C++, C#, PERL, & JScript. Semicolons, braces, etc.

  73. /Nick 1337h4x0r by violent.ed · · Score: 1

    MIRC r00lz!!! it EEZ the b3st3st skript0ring language around!! 3y3 CaN 0Wn0rz j00 with 1 lineof code #%!%!@ (disregarding the fact | is ;'s cousin(the one without the erectile dysfunction)) #%!%@#%^!

    On a semi-serious note, my own lil mental definition of a "scripting language" is a set list of syntaxies' (or whatever the hell the plural of "syntax" is) for a human readable "language" that a computer can use to control the actions of an existing program per-user input. So i mention mIRC's scripting language becuase of the amazing versatility it has in customizing such a solid (solid as in STABLE, it has had many "IRC virus" scripts due to the effect of combining malicious/fun-seeking bastards with newbie/total-idiot/naieve (heretofore & nevermore known as "The Innocent") end users (the ones you have to write instructions down on a sheet of paper at as to how to download/install/run/connect/Join #JimbozWarez .... AND FOR GOD SAKES FORGET TRYING TO TELL THEM HOW TO USE AN XDCC!!!)

    --
    - You're not paranoid, they really are after you.
    1. Re:/Nick 1337h4x0r by Ray+Radlein · · Score: 2, Funny

      I never really thought about it before now, but damn, l337-speak can look like exceptionally grotty perl code when it wants to...

  74. Are #include's fair? by Anonymous Coward · · Score: 0

    I see that in the C "Hello World" test, they allow an "#include ", which of course is obviously required, but is it "fair" in this test? I'm sure there are includes for Perl, for example, that allow one to print "Hello World" with a simple "use" as well.

  75. I heard someone is looking for Ruby? :-) by rolling_bits · · Score: 5, Informative

    Check out my site for some Ruby GUI stuff:
    (the gotcha is it's mostly in Portuguese. So jump to the "Exemplos Meus" (My Examples) section. Or use babelfish: http://babelfish.altavista.com)
    http://geocities.com/canalruby

    Hey, web stuff is easy with Ruby as well. But I don't have such examples for you. You have to get a taste of Ruby to find about its web capabilities. I Know IOWA has an example:
    http://enigo.com/projects/iowa/index.html

    Further enlightening at:
    http://www.ruby-doc.com
    http://www.rubyforge.org
    http://raa.ruby-lang.org

    You know, once you get addicted, there is no going back! :-)

    1. Re:I heard someone is looking for Ruby? :-) by Anonymous Coward · · Score: 0
      Hey, web stuff is easy with Ruby as well. But I don't have such examples for you.

      I have:

      There's more like web engines that use Continuations to create a sequential application metapher, great templating engines and even multiple ways of making Ruby very performant in Web Applications.

    2. Re:I heard someone is looking for Ruby? :-) by acoustiq · · Score: 1

      Being a fan of Ruby (although I haven't used it in a couple years) and a student of Portuguese, I'd like to try translating your site. Do you want an English version of it?

      --

      --
      I romp with joy in the bookish dark
    3. Re:I heard someone is looking for Ruby? :-) by rolling_bits · · Score: 1

      Of course, I would love to.

    4. Re:I heard someone is looking for Ruby? :-) by acoustiq · · Score: 1

      Great. You can email me at rtarpine (at) andrew (dot) cmu (dot) edu.

      --

      --
      I romp with joy in the bookish dark
  76. PHP growing new legs? by SkiifGeek · · Score: 1

    One thing that I have noticed recently is the apparent explosion in the number of people using PHP for more than a simple MySQL / dynamic-when-it-should-be-static web page implementation. I'm too lazy to provide the clicky links, but OpenGL and dynamic image generation is being done in PHP now. I think that once the associated stigma of it 'just being a web scripting language' passes, then PHP will be set for some very interesting future uses (much the same as BASIC has evolved through various implementations such as QuickBasic, VB [shudder], etc).

    I think that it might follow Perl, and find more implementation at the CLI. To a non-technical user, Perl and PHP are only seen through CGI / web-scripting, and they don't care or need to see the CLI usage, even though it may be doing everything they are relying on. Once it gets past the 'just a n00b language' I think that it might get very interesting.

    1. Re:PHP growing new legs? by Anonymous Coward · · Score: 0

      So php was a girl?

  77. Which Language? by TastyWords · · Score: 4, Insightful

    I've collected a paycheck, one way or another, in almost twenty-five languages (in almost as many years) - the ability to learn new things quickly comes in handy when it comes when someone's got obscure code which needs to be rewritten, fixed, or updated.

    Big Tip: It's not the language. It's the coder. If you know several languages and can apply the best one for a particular language, it's that much easier. If a language is best-suited for libraries, use it for libraries, then use other languages which are better for GUIs to do that and call the libraries as needed. 95% of the people in the industry really don't belong in the industry and their code basically sucks when you get a good look at it. The problem is people like it and think they're good at it. Because there are so many requests and so few people who can fill the slots, no filtering is really needed compared to what should be done. It may appear things are better now than they were twenty years ago, but the bottom line isn't all that different.

    The truly sad part is if you grabbed a large quantity of people who code for a living and put them in a room and said, "All of the good coders go to this side and all of the bad ones go to that side." Which side do you think all of them will go to?

    "You don't have to be good, just good enough." (and that's not good enough)

    1. Re:Which Language? by dmaxwell · · Score: 2, Interesting

      I'd just go to the bad side and be done with it. I've coded some small things in php because we needed them and weren't going to get them any other way. I pretty much learned what html and SQL I know at the same time. I have no trouble admitting this because I'm an admin who occaisionally codes rather than the other way around.

      I've tried to avoid pulling obvious boners but I'm glad none of the machines running these things are exposed to the public net.

    2. Re:Which Language? by BroncoInCalifornia · · Score: 1
      if you grabbed a large quantity of people who code for a living and put them in a room and said, "All of the good coders go to this side and all of the bad ones go to that side."

      I would go to the bad side of the room! But I am a hardware engineer who sometimes writes code.

      In my defense, I have seen a lot of code that is much uglier even than the stuff I write!

      --

      Religion is the main cause of atheism.

  78. Hmm by Bullet-Dodger · · Score: 1

    Well, this isn't really much of a practical survey of which scripting language is the best. Part one is a few checkbox features. Part two is program length, and is worth about twice the score of part one. It's really just a terseness survey and IMHO, even in a scripting language, it's a lot more complex then fewer-characters=better.

  79. Dumbest topic ever by Anonymous Coward · · Score: 0

    The measures that are used to evaluate languages are absolutely absurd - you should pick what comes naturally - not what is "best" according to his stupid chart. It is obvious to me, that the author of this article is the type of person that gets off on knowing lots of languages (very poorly).

    If you just want to learn languages go to a trade school or pick up a "learn X in 21 days book". If you want to actually solve problems, then pick up a book, study at the library, enter some coding contests, and/or go to college.

    Give me a break. The author of the article is a wannabe.

  80. Just hired a Ruby programmer by CatGrep · · Score: 4, Informative

    now lets say i put Ruby on my resume....how much respect will that get?

    I just hired my replacement for a contract I was doing (I accepted another offer that was more in line with my field). One of the requirements was that the person hired would have to know Ruby because much of the code base was in Ruby. They hired someone from our local Ruby User's Group.

    So to answer your question: for this particular job if you didn't have Ruby on your resume it wouldn't get a second look. If you had Ruby on your resume, but it became apparent in the interview that you didn't know Ruby... well, the interview was over.

    1. Re:Just hired a Ruby programmer by Hugo+Graffiti · · Score: 1
      So to answer your question: for this particular job if you didn't have Ruby on your resume it wouldn't get a second look. If you had Ruby on your resume, but it became apparent in the interview that you didn't know Ruby... well, the interview was over.

      Well I wouldn't want to work for a company so blinkered as not to be aware that a good programmer can be up and running in a language such as Ruby in days if not hours.

      And if you can't be programming in Ruby within days then I'd have to question whether it's the right language to be using.

    2. Re:Just hired a Ruby programmer by CatGrep · · Score: 1

      Well I wouldn't want to work for a company so blinkered as not to be aware that a good programmer can be up and running in a language such as Ruby in days if not hours.

      This being a contract position coupled with the fact that a new release needed to happen in a couple of weeks meant that someone was needed who could hit the ground running.

      You're right, if you're a good programmer you can learn Ruby in a day or two and you can reasonably productive. But to be an expert who can come in and completely take over a project generally requires at least a year of experience regardless of which language is being used. Of course, a language like Ruby requires a lot less time to master than a language like C++ (for a C++ project, I'd probably want someone with about 3 to 5 years experience and some C experience before that).

  81. Finally, Rightful Recognition by Anonymous Coward · · Score: 0

    Finally! The rightful recognition that the shell
    (Bash and Korn) deserve and have earned. I am
    constantly amazed at how these shells seemed to
    be overlooked by todays generation of Linux
    user's. Extremely powerful, and immanently more
    sane, and readable than PERL. Do yourself a favor,
    *learn* Korn (or Bash), you won't regret it.

    Shell... it's more than a command line interface!

  82. ICFP contest winner *NOT* OCaml by Univac_1004 · · Score: 1

    Since ICFP = "International Conference on Functional Programming" one wouldn't be surprised that they like a functional language such as OCaml best, however the 2003 2nd place winner received this judge's proclamation:

    "C++ is a fine programming tool for many applications."

    And the 1st place winner landed:

    "C++ is the programming tool of choice for discriminating hackers!" 2003 ICFP results here

    ...just FYI

    [but Perl 6 is really where it's at]

  83. I think I know why. by Estanislao+Mart�nez · · Score: 1

    I can't understand why this person took in Haskell and OCaml anyway* The comparison is being hosted under the pages for merd, a language which aims to be kind of a hybrid of Ruby and ML/Haskell. * I'm not even going to bother wondering about C# and Java. I think they are control cases.

  84. WebScript? (ObjC WebObjects Scripting Lang.) by tyrione · · Score: 1

    Okay, I'll admit most people won't have heard about it, unless they were around in the days when WebObjects 2.0 and 3.x were changing the landscape for eCommerce, dynamic publishing, so on and so forth.

    Apple should release WebObjects 6 in a choice of Java or Cocoa/ObjC and really show the world how powerful such an application server solution they have sitting and collecting dust can be.

    WOF Java is fine but doesn't touch the Cocoa version.

  85. It's what works that counts by rfc1394 · · Score: 4, Insightful
    Every programming languages has its strengths and its weaknesses. PHP is just another (interpreted) version of the C language which is why it's popular (and because it has a module which can be statically linked into Apache.) I presume Perl is popular because it provides fairly complex pattern matching. And there are other scripting languages out there. People will use what they know and what is available to them.

    Every job has its requirements; being a good programmer is being able to use the tools you have to solve the problem in a way that fits the requirements. Being a great programmer is knowing which tool is right for the job - and which isn't - and when they may have to look for something else.

    --
    The lessons of history teach us - if they teach us anything - that nobody learns the lessons that history teaches us.
    1. Re:It's what works that counts by JazzXP · · Score: 1

      I was thinking exactly the same thing... Test like this are fairly useless... you need the right tool for the right job.

    2. Re:It's what works that counts by khuber · · Score: 1
      Being a great programmer is knowing which tool is right for the job

      I never bought that line. It's a nice sentiment, but companies or projects tend to limit themselves to a small number of languages, or a primary development language and a scripting language. Often the choice has more to do with perceived popularity in the marketplace.

      Some tools are obviously the wrong tool for the job, and there you may want to do something, but other times it's not so clear. Do we really need to install Python everywhere, or can admin scripts be done with Perl?

      I think it's better in the long term to keep down the number of skill sets needed and the amount of third party software that has to be maintained. Thus it's not just about "the job", but about the entire lifetime of that software.

    3. Re:It's what works that counts by julesh · · Score: 1

      PHP is just another (interpreted) version of the C language

      Huh? PHP is very dissimilar to C. It is weakly typed, has variable substitution into strings, is object oriented, uses garbage collected memory allocation, and has a syntax that is designed to be embedded into webpages. About the only thing they have in common is the syntax of a few basic statements, which is just superficial.

    4. Re:It's what works that counts by rfc1394 · · Score: 1
      PHP is just another (interpreted) version of the C language

      Huh? PHP is very dissimilar to C.

      I didn't say it was a clone of C, I said it was "just another version." Yes there are some differences but it's heavily based upon it.
      It is weakly typed, has variable substitution into strings, is object oriented, uses garbage collected memory allocation, and has a syntax that is designed to be embedded into webpages.
      If it looks like C despite some differences, I'm going to call it as I see it.
      About the only thing they have in common is the syntax of a few basic statements, which is just superficial.
      Well, let's see:
      • the if statement is the same, using () to surround the arguments
      • the for statement is the same, including using ; to separate parameters
      • uses { and } for statement blocks
      • uses ; for statement terminator
      • break statement to exit loops
      • use of = for assignment and == for equality testing

      I can go on for some time, but the fact is that a large percentage of the control structures and syntax for PHP is derived from C. It may not be exactly the same - Turbo Pascal is quite different from Standard Pascal, and Visual Basic is radically different from the original BASIC - but the similarities are close enough.

      --
      The lessons of history teach us - if they teach us anything - that nobody learns the lessons that history teaches us.
    5. Re:It's what works that counts by Anonymous Coward · · Score: 0

      The similarities you list are really, really superficial. I hope you aren't a programmer.

  86. Learning how CPUs work by SSpade · · Score: 4, Informative

    Forth? No.

    Learning forth will help you learn reverse polish notation, one specific trick for building high-performance interpreted languages and a very lightweight, easily extensible and embeddable scripting language.

    It won't, though, teach you anything about computers work beyond the small amount you'll pick up by learning any new language. Including French.

    If you want to learn how computers work there are far better things to play with. Assembly language, obviously, whether it be a synthetic assembly language such as DLX or a real architecture. x86 isn't the most enlightening assembly language to start with (6502 is excellent, MIPS or for a really nice architecture, Alpha) but it'll run on your PC.

    Books. Patterson and Hennesey, Computer Organization and Design, The Hardware/Software Interface is pretty good for a programmers intro, but Hennesey and Patterson, Computer Architecture, A Quantative Approach will teach you a lot more, as will most texts with Superscalar in the title

    Learn a hardware description language. Verilog is better, but VHDL is OK. Compilers and simulators are freely available for both.

    Get an FPGA development kit. Compile yourself some hardware. You can put full CPUs on a fairly cheap FPGA development board.

    Design your own CPU. It's possible for an individual or a small group to design a CPU and have it fabricated as a tinychip. I've seen individuals design a full, if tiny, CPU at mask level in a couple of months, and a small group put together a fairly decent gate level design in a few more. Commonly done as part of a college course, but an individual can have a tinychip fabricated for around $1000. Not cheap, but cheaper than some hobbies.

    You can do full circuit level design and simulate it using either gate level or spice transistor level simulators and see just why addition or multiplication takes as long as it does.

    As a general rule I've found that some of the best software engineers have some hardware design background, and a good understanding of computer architecture, so even if you never plan to do any hardware design, understanding how it all works is a good idea.

    Of course, I've also found that a large fraction of good software engineers have also spent time working as theatre technicians, so who knows what the correlations are...

    1. Re:Learning how CPUs work by bwalzer · · Score: 3, Insightful
      The original poster said that learning Forth would help you understand how computers work, not just the CPU bit.

      Since doing stuff with the Forth environment involves lots of interaction with bits you tend to learn a whole lot about binary math/logic quickly. Since the virtual machine is understandably simple and different from traditional computer architectures you end up at a place to start thinking about computer architectures. Since Forth is a reasonably productive programming environment you learn that a lot of the stuff they teach you in Computer Science is probably wrong...

      You were talking about the "what" of computers. Exposure to non-traditional environments like Forth gives you a start on the "why" which is a hard thing to come by in the somewhat dogmatic world of computers.

  87. Now by LittleLebowskiUrbanA · · Score: 1, Funny

    Begun the great scripting languarge holy war has.

  88. Not really a fair test. by Temporal · · Score: 5, Insightful

    First of all, a pure character-based size count seems unfair. I do not believe that the number of characters in a chunk of source code is directly correlated to the amount of time it takes to write. Most of a programmer's time is usually spent thinking, not typing, and you can thinking just as fast with verbose naming conventions as you can with terse ones, as long as the constructs are the same. And then, if the constructs are different, it's even harder to judge, because if the constructs in one language are more natural, corresponding closely to human thought patterns, then coding in that language will tend to be much faster than coding in more cryptic languages, even if the cryptic language requires fewer keypresses.

    For example, I tend to find that writing in functional languages is easier for me. My functional-language just tends to come out faster and contain far fewer bugs. I'm not entirely sure why, but I suspect it has something to do with the thought-pattern-correspondence idea I mentioned above.

    Second thought... some of these comparisons are clearly unfair. For example, one of the test cases is implementing "grep". The sh version of this case simply calls grep (after validating the arguments, I guess), which seems like a really big cop-out. Any language could just as easily run grep in a separate process. Meanwhile, the OCaml version seems to implement the main loop of grep manually in terms of library functions that are not identical to grep. That is to say, the main thing the OCaml code is doing is translating grep-specific options and semantics to the options and semantics used by its own library functions. To make this comparison fair, one would have to write a library function in OCaml which is identical to grep, then allow that function to be called without counting the library as part of its code.

    I think the only fair and useful way to make comparisons like this would be to hold a contest of some sort. Get an expect Perl programmer, an expert Python programmer, etc., together, then give them a program of some sort to implement. Avoid defining the program to be too similar to one language's library calls. In the end, judge the languages both on how fast the contestant completed the code and on how useful and robust the resulting code turns out to be.

    Probably not going to happen, of course.

    1. Re:Not really a fair test. by sapped · · Score: 1

      For example, one of the test cases is implementing "grep". The sh version of this case simply calls grep (after validating the arguments, I guess), which seems like a really big cop-out.

      Maybe that's why it is called a Scripting language?

    2. Re:Not really a fair test. by brauwerman · · Score: 1
      Probably not going to happen, of course.


      Are you joking? It happened last week, as it does every year:

      icfpcontest.org

      It's the most duplicated story on Slashdot: slashdot.org
    3. Re:Not really a fair test. by BoneFlower · · Score: 1

      ACtually, there will automatically be some bias... intentional or otherwise.

      Have each language expert come with a program spec. It will obviously be biased towards the experts own language, but with all languages having a program biased towards them you can eliminate the bias by stacking opposing biases against each other. Rather than trying to avoid the bias, use the bias itself to reduce its impact.

    4. Re:Not really a fair test. by domestos · · Score: 1

      They seem to have put 20 points on
      "compilation and execution in one command"
      - which is meaningless. They only languages that misses out aren't scripting languages.

      Then they put 15 points on being "shebang aware (#!)", which penalises VBScript quite heavily when you consider that in its natural environment, file name extensions are used for that purpose.

      Somebody had a (not very well) hidden agenda.

  89. Well... by Anonymous Coward · · Score: 0

    Glancing at that page is five minutes of my life I'll never get back.

  90. Best? by Axel2001 · · Score: 1

    Asking about the "best" scripting language is kind of like asking what the best motor vehicle is... it all depends on the application and your personal preferences.

    Personally, I have to say that I like JavaScript for browser scripting (DHTML) and I use it on a daily basis. It's easy to learn and is perfect for what it was intended to do.

    I've used VBScript w/classic ASP quite a bit as well. There's nothing really impressive about the language, it's just easy to learn and read. Unfortunatley, classic ASP tends to automatically encourage "Spaghetti Code," so dealing with VBScript isn't always fun.

    I like Perl quite a bit, but as far as I am concerned, Perl is a language I use when I am the only person who is going to be reading my scripts.

    One other language I used frequently is PL/SQL. The syntax for Oracle stored procedures is kind of ugly - not hard to understand, just ugly. Unnecessarily so, if you ask me. The MS SQL Server stored procedure syntax is much nicer. ... Just my 2 cents.

  91. Now Java *smaller* than C# by vijaya_chandra · · Score: 3, Interesting

    This is cheating; nevertheless it compiles and runs with sun jdk without any problems

    class A{static{System.exit(0);}}

    Only 32 chars. yay!!

    1. Re:Now Java *smaller* than C# by julesh · · Score: 1

      Valid according to the java language spec, too.

      Well done :)

    2. Re:Now Java *smaller* than C# by dasmegabyte · · Score: 1

      I especially like his abuse of the static class instantiator to execute code while the interpretter is still searching for a void Main(string[]) method. Very sneaky.

      --
      Hey freaks: now you're ju
  92. Rapid Development != Scripting by Vector7 · · Score: 5, Insightful

    > Interesting that ICFP contests lately pronounced OCaml as the winner for rapid development.

    Certainly that is interesting, but it has absolutely nothing to do with the subject of the article. "Rapid Development" (or development in general) is not comparable to scripting, and the ICFP contest tasks (which this year was to develop AI code governing ants in a colony) contrast sharply with the sort of scriping tasks in this shootout (compile a file if .o absent, invoke grep on some files, etc).

    [aside]

    This is not intended to rag on scripting or scripting languages, just to note that scripting embodies a largely distinct set of tasks from development in general (and a comparison involving OCaml or the ICFP contest is inappropriate). These sort of tasks that historically have been the domain of shell scripting, although perl seems to have taken over a lot of these things.

    As a lot of what perl is best at is simplifying things that you could almost do from the unix shell (or might be able to do with a script, but would be a pain in the ass..), it always struck me as logical that perl should evolve toward becoming a viable replacement for the unix shell.

    Sadly this doesn't seem to be on the agenda of the perl gods. Instead of evolving to better fill this niche, they seem to be gravitating toward becoming a sort of second-rate Java/Python immitator. I suspect that the underlying technologies they build with Parrot and the Perl 6 redesign will largely fail to convince many folks who aren't already perl users that perl is a useful substrate for developing real systems on top of. At the same time they will have neglected to improve in their original niche of quick and dirty sysadmin hacklets, while other languages will have continued to improve and build momentum.

    Then again, I'm quite possibly wrong. We'll see what happens. Should be interesting..

    1. Re:Rapid Development != Scripting by Anonymous Coward · · Score: 0

      Certainly that is interesting, but it has absolutely nothing to do with the subject of the article. "Rapid Development" (or development in general) is not comparable to scripting, and the ICFP contest tasks (which this year was to develop AI code governing ants in a colony) contrast sharply with the sort of scriping tasks in this shootout (compile a file if .o absent, invoke grep on some files, etc).

      More to the point, the ICFP contest is dependent on the performance of particular coders, on a task selected to be hard in the technical sense, over a very limited period. This is a rather different scenario from someone sitting down to try and work out the absolute shortest programs possible in each language, and it's not the slightest bit surprising that the results are different.

  93. The successful candidate... by john_smith_45678 · · Score: 1

    Should be able to accomodate all evolution levels of a programmer!

    http://www.cse.ogi.edu/~diatchki/jokes/programmer. html

  94. Re:I used to think Python was great for _everythin by rpbailey1642 · · Score: 3, Funny

    Speaking of web stuff and perl, my (former) boss always said "Perl is great. In fact, if you smash your hands down on the keyboard, you're halfway to having a working web server." Not trolling here, attempting humor.

  95. Perl??? by TwoBit · · Score: 1, Troll

    The fact that Perl was recognized as good by this system proves that the metrics are broken. Perl is impossible to read and is unscalable. We have banned it because it results in unmaintainable code.

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

      Good for you. Otherwise, your programmers might have had to exercise some modicum of restraint and discipline and we all know how much that brings down code quality!

  96. What I don't like in Python by rolling_bits · · Score: 1

    Python and Ruby are sometimes so similar, that today I want to take the chance and say what I don't like in Python:
    - public instance variables and auto-creation of said variables (In Ruby, instance variables are private by default).
    - indentation with spaces and tabs used as block delimiter. (I actually indent all my Ruby codes properly. The Python way buys me nothing).
    - capitalization of classes, modules, variables. Only by looking at a word you can't make the difference whether it's a class or a variable (In Ruby, methods and variables start with lower case, and modules and classes start with upper case).
    - use of functions, or what appears to be functions, instead of appearing as a method. ex: str(10), instead of 10.str. (In Ruby you use the later: 10.str).
    - lambda is just too ugly. (In Ruby, you have nice blocks and closures).
    - self isn't hidden. Sometimes you don't even want to use it, then why declare it and create unnecessary noise? (In Ruby, self is hidden for your pleasure).
    No language is perfect. I could have made one or two wrong points, but the fact is that those points are just the tip of the iceberg. Ruby is much better than just that. And I am betting at that.

  97. Isn't that an ill-formed regexp? by Estanislao+Mart�nez · · Score: 0

    $str =~ /(.*?)\&(\w+)\((.*?)\)/gis You can certainly have .* or .?, but .*? is surely ill-formed.

    1. Re:Isn't that an ill-formed regexp? by jwkane · · Score: 2, Informative

      .*? = snag all chars in non-greedy mode

  98. So in summary, by NorthWoodsman · · Score: 4, Insightful

    Sh is the best at doing tasks common in Sh, whereas languages not designed for shell scripting do them less well than sh. Furthermore, languages that aren't even scripting languages are terrible at being sh.

    --
    1p}{ 1 sp34k |33+ +|-|e|\| p30p13 \/\/il| 8e i/\/\pr3553|)
  99. Ocaml isn't a scripting language either! by bhurt · · Score: 3, Insightful

    While it does moderately well on this test (finishing near the middle), you might be surprised at it's weak finish compared to it's reputation as a concise language. Well, as a committed Ocaml advocate, Ocaml isn't a scripting language. I freely admit that it has so-so string handling, no built-in regular expressions, so-so process handling, etc. But this is because it isn't a scripting language- it's an applications language, like C++, Java, and C#. And the only reason it does as well as it does is because it's a signifigantly better language than it's competition.

    If you're writting a quick script to grep through the log files looking for port scanners, Ocaml is the wrong language.

    Brian

    1. Re:Ocaml isn't a scripting language either! by BarryNorton · · Score: 1

      Well what is a scripting language?

      Our favourite languages (mine's Haskell) not only have typing (unlike what I consider scripting languages), not only strong static typing (unlike Java), but actually have type features younger than me! ;)

      I agree that practical scripting languages need the kind of features you mentioned (string manipulation and at least regular expression matching - apparently that's also state of the art for Industry types, despite being under-powered for the very text structures we're using these days!), but I'd speculated previously that it's an untyped interpreted language that's called a scripting language...

      What do you think?

  100. By features instead of by language by Tablizer · · Score: 5, Informative

    In a similar vain, I wrote up a scripting language comparison document, but focused more on features rather than particular languages. Comparison Link. I describe the various feature options, and then weigh the pro's and con's of each.

    After years of debating language features, I generally conclude that a lot of it is subjective. No language will ever satisfy everybody.

    1. Re:By features instead of by language by Anonymous Coward · · Score: 0

      With stuff like "we propose Unicode be represented as such: Unistring = "1301,802,12101,10012,3321,etc.", this surely is informative.

    2. Re:By features instead of by language by EvilTwinSkippy · · Score: 1
      It could be said that each language is designed to solve a different problem. As such each partison in the flame war is correct in thinking their language is the best ... at something at least.

      All except for Perl. That's just executable line noise... /ducks

      --
      "Learning is not compulsory... neither is survival."
      --Dr.W.Edwards Deming
    3. Re:By features instead of by language by Tablizer · · Score: 1

      With stuff like "we propose Unicode be represented as such: Unistring = "1301,802,12101,10012,3321,etc.", this surely is informative.

      Good point, perhaps. I shall reconsider that. I've had bad experiences with Java's Unicode munging up ASCII-based protocols, and that is partly what lead to that conclusion. But perhaps there are other approaches. Back to the Ponder Board....

  101. PHP is the best by Anonymous Coward · · Score: 0

    for all time.

  102. Ah. by Estanislao+Mart�nez · · Score: 3, Funny

    So perl regexps are cryptic and hard to read even if you know regexps already. Thank you.

    1. Re:Ah. by Anonymous Coward · · Score: 0

      If you don't know about greedy versus non-greedy, then you don't "know regexps already".

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

      Sure he does. Tell me, does egrep have greedy vs. non-greedy matching?

    3. Re:Ah. by Cato · · Score: 1

      Perl regexps are just more powerful than most - that's why many other languages have Perl-compatible regex support available as libraries or in the language (e.g. PCRE). To you it's cryptic; to people who know Perl, it's more powerful and more readable. See regex.info for Jeffrey Friedl's great book on regexes which covers many languages including Perl.

    4. Re:Ah. by Cato · · Score: 1

      egrep is rather old in regex terms, being invented perhaps 20+ years ago. Should regexes remain forever with a 1970s feature set, or is it OK to advance this? I vote for enhanced regexes, in which case Perl is one of the most powerful, though Java, Python and .NET have some nice features too. See http://regex.info for more info on a useful book.

    5. Re:Ah. by Anonymous Coward · · Score: 0

      I agree with you. :) Of course, I think regexes are limited, since they can only represent FSAs. There are a lot of interesting grammers in the Chompsky Hierarchy that regexes can't do at all.

      I only use Regexes for "quick and dirty" myself.

    6. Re:Ah. by julesh · · Score: 1

      A regular expression is a mathematical concept. The choice of greedy or non-greedy matching is an implementation level detail which has no effect on the mathematics that define regular expressions, which are based entirely around determining whether or not the string passed matches the expression.

      While PCREs are useful, calling them regular expressions is a misnomer, because they are providing features and distinctions that are not part of the formally accepted definition of what a regular expression is.

    7. Re:Ah. by Cato · · Score: 1

      Non-greediness is not just an implementation detail, it is regex language feature (so to speak) that lets you write simpler regexes even if the implementation is greedy. You may well say that regexes are a mathematical concept, but in the real world it's useful to be able to write more expressive regexes.

  103. FORTRAN vs Altair basic vs Basic for the C64... by MSDos-486 · · Score: 1

    now were that punch tape. Ah right next to the acoustic coupler.

  104. Where is prolog? by seguso · · Score: 1

    A test about prototyping languages which doesn't take Prolog into account is simply not serious. Due to backtracking and unification, Prolog can't be beat in terms of both readability and compact code.

  105. You're missing the point. by Estanislao+Mart�nez · · Score: 4, Insightful

    The measure that the comparison is applying is the size of the source code in bytes. If we're talking about the size of the executable, (e.g. bytecode in Java, C# or Python), bytes is the natural measure.

    1. Re:You're missing the point. by Mind+Booster+Noori · · Score: 1
      Hmm, you're right.

      Although that raises another question... Why the hell should number of lines be more important than number of bytes? After all in C you can type everything on a line and Python makes you have the need to have identation. Is it bad? No! You can have a smaller program (in bytes) on Python, and one a lot bigger written in C but with less lines.

    2. Re:You're missing the point. by Estanislao+Mart�nez · · Score: 1
      Why the hell should number of lines be more important than number of bytes? After all in C you can type everything on a line and Python makes you have the need to have identation.

      You need to assume that the programs are written in a readable style. You could put all your C code in one line, yes-- but who would really do that? It's really a pathological case that should be ignored.

      Of course, there are still some possible sources of discrepancies-- a C programmer who puts their opening brackets in a line by themselves will generate more lines than one who puts them at the end of lines. Likewise, Python doesn't have end-of-block tokens, which means that blocks in Python often have one line less than the equivalent in other languages.

      Lines of code is a better measure than bytes of source because (a) it's blind to differences in identifier length (like the ones that motivated the criticism of the Java vs. C# comparison in this thread); (b) a language which requires fewer lines packs more functionality in each screenful of code, which might make a program easier to understand without jumping back and forth. Perhaps another way of putting it: number of bytes might be a better measure of how much you need to type, but number of lines is probably a good measure of how much code you need to read. And I think the second is more important.

    3. Re:You're missing the point. by redJag · · Score: 1

      No, you're talking about a line of text when everyone else means a line of code. In C, a semi-colon signifies the end of a line of code.

    4. Re:You're missing the point. by EsbenMoseHansen · · Score: 1

      While I find the line-metric amazingly stupid, I would point out the that the most important reason to use lines over bytes is that the line count is independent of whitespace. Especially important for the indent-8 guys :)

      Oh yeah, the perl -le '=1; =2; print " + = ", + ' program doesn't compile. And why must it be specified on the command line? The best I can do is:$a=1;$b=2;print "$a+$b=".$a+$b."\n";

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
    5. Re:You're missing the point. by docbombay · · Score: 1

      In addition, I'd argue that most true scripting languages are interpreted rather than compiled, so executable size may not be an applicable metric.

    6. Re:You're missing the point. by slickepott · · Score: 1

      A semicolons marks the end of a statement, not the end of a line.

    7. Re:You're missing the point. by Dan+Ost · · Score: 1

      I'd argue that most true scripting languages are interpreted rather than compiled

      That might have been true at one point, but just in time compilers are becoming
      more common among languages that have traditionally been called scripting
      languages. For example, psyco for python.

      --

      *sigh* back to work...
  106. Practical, but not useful by arevos · · Score: 1

    There is far more to programming than brevity.

  107. Missing something? by sqrt(2) · · Score: 1

    Where is Qbasic?

    --
    If you build it, nerds will come. Soylentnews.org
  108. I check my taint hourly. by Ohreally_factor · · Score: 1

    it has taint checking which is also a plus

    You mean if I use Ruby, I can stop reaching behind my sack?

    --
    It's not offtopic, dumbass. It's orthogonal.
  109. Bugs in Vbscript and ass pain by danger+ian · · Score: 1

    1. If you use the split function inside a loop you can not access an array element directly; you have to use the iterator of the loop. 2 you can not add directly to a dictionary object/hash through a record set oDic.add rs("field1").value, "Hi there" Will not add this to the data structure. 3 The RegEx expressions are limited ie no backwards look up. Jscript has a richer reg syntax implemented. 4 The Variant data type is a pain the ass.

  110. In the eye of the beholder... by sleepingsquirrel · · Score: 1
    I coded this perl one-liner not but 5 minutes before I started reading this thread.
    #!/usr/bin/perl
    #reduces a file to a sorted list of unique words

    print "$_\n" for sort keys %{{map {$_,1} grep /^[a-z]+$/, (split /\s/, join(" ",<>))}};
    1. Re:In the eye of the beholder... by JWSmythe · · Score: 1

      In a shell would be a lot easier to read.

      $ cat filename | tr " " "\n" | sort | uniq

      or, to get it into PERL (for us lazy people)

      #!/usr/bin/perl
      @array = `cat filename | tr " " "\\n" | sort | uniq`;

      (That should get some purists freaking out)

      --
      Serious? Seriousness is well above my pay grade.
    2. Re:In the eye of the beholder... by mrjb · · Score: 1

      Not only easier to read, also more straight-forward to write if you don't use perl on a daily basis. Talk about best tool for the job-- the optimal solution, as usual, is somewhere in the middle, rather than at the extremes.

      --
      Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
  111. javascript by dtfinch · · Score: 1

    rabble! rabble! rabble!

    I think JavaScript got a low score because the author didn't fully understand the depth of its functionality (the todo's in the score table), only very simple tasks were tested, and the only measure was size.

    rabble!
    rabble! rabble!

  112. Best Script Language. by DougReed · · Score: 1

    For Pure debugging, my favorite was REXX. You could Trace anything and everything. It was also a "nice" little language... if a bit odd.

    Today I use PERL for almost everything, however, and not for its debugging, which I don't care for. You can program almost anything in a single line of code however, and have no idea what it does ever again. Plus you can download a module to do almost from CPAN. Want to know if OJ did it? Download the DID_OJ_DO_IT module from CPAN.

  113. Java? What about Groovy? by SuperKendall · · Score: 2, Interesting

    WHy compare with Java when there is Groovy, the JVM scripting language?

    Here's a simple sample script:

    #!/usr/bin/env groovy
    println("Hello world")
    for (a in this.args) {
    println("Argument: " + a)
    }

    Note that you can run this from a command line, no compiling required.

    Groovy is not just some random basement project either, it's actually a JSR and so will probably become a standard before too long.

    If you want a C3 equivilent, I'm sure some well-meaning but mistaken soul will copy this project as they have tried to do with every other Java project. "C# - only a year behind Java since 2003!".

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  114. Perl experience by Anonymous Coward · · Score: 0

    While perl is demanding (IMO) much more self-discipline to keep code clean, it is unbelievably easy to use HASHes everywhere to write small and extremely efficient utility scipts. Great.

  115. Java as a scripting language by _pruegel_ · · Score: 2, Informative

    The BeanShell lets you use pure Java as a scripting language and it's almost trivial to include the BeanShell in your Java application.
    See http://www.beanshell.org/.

  116. Point being? by warrax_666 · · Score: 2, Insightful

    What's your point? The program is shorter shorter when written in sh, more natural and more readable. (Not to mention that it uses lazy evaluation, so that the full input doesn't need to be in memory, just the full list of words).

    --
    HAND.
  117. write it fast... by anshil · · Score: 1

    """I have to write it fast, it has to be small (less typing)"""

    Why can't programmers just learn 10-finger typing like every secretary can, I don't see why they also don't teach it as a subject on informatic schools or studies, it is a core skill of what you're doing everyday.

    And when you once learned to write using more than 4 fingers in an eagle-search-system you won't mind if a programming language is a bit more explizit, in favour of readability and maintance

    Just to quote Linux Torvalds on his perception:

    """Saving on typing
    is not a good reason - if your typing speed is the main issue when you're
    coding, you're doing something seriously wrong. """

    --

    --
    Karma 50, and all I got was this lousy T-Shirt.
    1. Re:write it fast... by joib · · Score: 2, Interesting

      In a sense you're right in that readability is more important than saving as many charachters as possible when typing. Code is typically read a lot more than written, so readability and hence maintainability are certainly very important.

      However, verbosity can also hurt readability. If the syntax contains too much clutter, you have to concentrate on understanding what all the clutter does, and thus you can't focus as much on what the code is actually supposed to do.

      As an example, take the typical scripting task of reading a text file line by line, and do something with the line. Code in python is like:

      for line in file("filename"):
      do_something(line)

      Compare this with the abomination that is file i/o manipulation in Java.

    2. Re:write it fast... by BoneFlower · · Score: 1
      Verbosity can indeed be a royal pain in the ass.
      ADD BONUS-PAY TO BASE-PAY GIVING TOTAL-PAY
      Is a tame example of the horror which is COBOL. Thats almost a fucking comment, not program code. Typing COBOL is like typing up a novel.

      How about this simple structured variable declaration?
      01 EMPLOYEE-RECORD.
      05 EMPLOYEE-NAME PIC X(20) VALUE SPACE.
      05 EMPLOYEE-DEP PIC X(10) VALUE SPACE.
      05 PAY-RATE PIC 9V99 VALUE ZERO.
      This is just too much. Oh, if you need more than one of these? You have to type the whole thing out again. And if you(or a team member) used EMPLOYEE-NAME for a field elsewhere? The syntax to disambiguate that gives me nightmares.

      Granted there are a few high points in COBOL, it's built in facilities for handling flat files aren't bad, and its case structure is incredibly flexible. But on the whole, the language is so painfully verbose as to sap the motivation from your blood to do any more than enough work to not fail the class.
    3. Re:write it fast... by dasmegabyte · · Score: 1

      Eh, java's not so bad. It's wordy, but you have a lot more linear control over what's going on. Scripting languages are great for common tasks, but the second you get into the wierd, you start to get inefficient.

      For example, I had to reformat email piped in from one process before sending it through a very twitchy server. So I wrote an EmailFilterStream that would do the checking, and "piped" the data through that before writing it to the disc. The code looked something like this:

      void writeMail(InputStream is){
      EmailFilterStream efs = new EmailFilterStream(new FileOutputStream("filename");
      int charIn;
      while((charIn = is.read()) != -1) efs.write(charIn);
      efs.close();
      }

      Now, if I wanted to read that in by line, I could wrap the input with a Reader and the output with a Writer. If I wanted to buffer the input, I could wrap the InputStream in a BufferedInputStream. There's all sorts of stuff I could do that would be kind of cumbersome in Python. Best of all, I got a multipurpose stream I could pipe ANY output through and wind up with a valid email.

      Yeah, there are about a hundred thousand ways to do this. I like mine.

      --
      Hey freaks: now you're ju
  118. Large Projects disagreement by Tablizer · · Score: 1

    That doesn't go for scripting languages (as far as I'm concerned), which I don't generally feel are appropriate for large projects.

    I suppose it may depend on what your definition of "scripting language" is, but what is wrong with dynamic languages for large projects? Generally one should target an event-driven architecture if they are going to use dynamic languages for larger projects IMO. Each event is more or less treated independently, but changes state in the database and/or framework, which is the primary method for communicating across events or tasks.

    However, event-driven architectures are not in style right now for whatever reason. Thus, the current style perhaps does not favor scripting in the large.

  119. Re:You're missing the point. (not again) by MoonChildCY · · Score: 4, Informative

    If you bothered to read the article...

    The lines of code needed to achieve a task are measured, as they serve as an indicator on how fast one can create a script.

    If you need 20 lines of C# to check if a file exists, but only one in Perl, then according to the study, Perl should receive a better weighted score for ease of implementation.

    Read the articles people! They are interesting (at least most of the time).

  120. Oh? by kuzb · · Score: 1

    ...While question like that is bound to generate flamewars between the usual Perl vs PHP, Python vs Perl, VBScript vs everything crowds...

    -- snip

    Unlikely, since Perl is the only of all those scripting languages mentioned which is actually covered. You can't argue with results that aren't there.

    --
    BeauHD. Worst editor since kdawson.
  121. Practical? Bah, humbug. (Pythonic bias warning.) by AlexLibman · · Score: 2, Insightful

    As much as I love programming language comparo's, this one just doesn't hit the spot. Do people actually think a scripting language should only be used for tiny write-only stand-alone scripts? TOOLS: If this section was meant to cover the tools / features that enhance the versatility and convenience of a language, it isn't complete. What about machine code compiler availability / VM support, Web options (CGI, Apache plug-in, Server Pages, etc), editor / IDE support, profiling, RAD features like unit testing, and docstrings, multiplatform support for threading and other features that immature languages might leave POSIX-centered, etc? License openness and multiplatform range should also be considered. And why is shebang awareness, working without which would just require one extra word on the command line, three times more important than an interactive interpreter, debugger, or passing program in command line, which open up some serious time-saving habits. SPEED: Unlike compiled / system programming languages, interpreted speed isn't the most important feature of a higher-level / scripting language. For most tasks on a modern computer, development time is infinitely more precious than execution time. Algorithms matter more than the overhead language speed. For example, since many scripts spend much of their time waiting for file I/O, network response, or user input, a Perl programmer who understands multithreading might end up writing faster apps than a C programmer who doesn't. Another important point is how a language fits into a large modular system. For example, Tcl is easier to embed / extend with C than many of the languages compared, so the real-world apps that are implemented in a combination of C/C++ and Tcl can be optimized as much as is needed. Python has superior profiling, JIT machine code compilation, and VM (IronPython, Jython) implementation than most / all of those scripting languages. Final speed note: the Python version 2.2 used in those benchmarks is ~30% slower than the latest version. L.O.C. COUNT: Program briefness shouldn't be the only measurement of sample code: productivity and readability are each at least equally as important. Like, even though Perl is more compact, I'd bet those sample Python scripts would take less time programmers to write, and far less time to read for a non-Perl-centered programmer. The benchmark should also define a common policy for abbreviation-vs-readability in sample code: many of those examples could be made briefer or more readable regardless of the language. The comparison was missing a number of essential sections: LANGUAGE QUALITIES: how the fundamental language features impact its abilities as a scripting language. This would include language agility, dynamic typing system, garbage collection, high-level non-scalar objects (arrays, hashes, tables, relational features, etc), OO / multi-paradigm abilities, etc. How easy is the language to learn? (Will your non-programmer users be able to make trivial changes themselves?) Does it have any unavoidable annoyances (ex. as much as I love Python's use of whitespace, lack of an alternative block syntax would be a minus here). SCALABILITY: Can it be used for very large applications? Does it break if running more than X instances / threads / CGI hits / etc at the same time? Does it break when asked to allocate 20 gigs of memory for some fancy chemistry simulation with lots of large numbers? AVAILABILITY: How frequently is a language available on a typical shared Web host? How many add-on packages / libraries are available? Does it have any gaps in its library offerings: well-rounded RDBMS support, GUI, regex, multithreading, etc. How easy is it to find related published books, online tutorials / references, and community help? Is there a quality-assured version (like ActiveState), without which a language may not be usable in some commercial situations? Are there many popular / killer-app projects that use the language (ex. Zope). Finally, the comparison was missing PHP, which has full

  122. Re:Java? What about Groovy? by struberg · · Score: 1

    groovy is really cool. It is a mixture between Java and Ruby! You can use all Java JAR libraries and if you take care it is completely OS- and platform-independant.

  123. Perl: If it would JUST STOP CHANGING!! by Banner · · Score: 1

    I really used to like Perl, programed in it all the time. But until Randy drops dead, Perl is going to continue to change, making it really worthless as a scripting language. How many times have you had old scripts stop working because they 'improved' Perl and a particular feature isn't there anymore? Or works differently? I've had to re-write entire test harnesses and tool sets.

    Plus everyone is trying to make Perl into a language! We have enough languages. Lets take all the dumb stuff back out of Perl (Does object oriented scripting really make sense to anyone out there?) and let it be what it was supposed to be: A good Scripting language. Not Bloatware!

    1. Re:Perl: If it would JUST STOP CHANGING!! by Iamnoone · · Score: 1

      How many times have you had old scripts stop working because they 'improved' Perl and a particular feature isn't there anymore?

      I am not at the level of you or Randy or Larry, but I would guess for most people that it has been basically once perl 4 -> perl 5.
      And it will be twice when perl 6 comes out.

      Even if it has been more, it seems like alot less deprecated crap than many other languages...

  124. there is no "best" one by dekeji · · Score: 1

    If you are on VMS, the "best" scripting language may be DCL (or whatever it was called). On Windows, it may be VBscript or Perl. If you write numerical code, it may be Matlab. If you write visualization code, it may be Python with VTK libraries. Etc.

    The whole point of scripting languages is that they are well-adapted to their application domain--different domain, different winner.

    If you try to develop "general purpose scripting languages", all you are doing is developing a poor implementation of a general-purpose dynamic language (Lisp, Smalltalk, etc.).

  125. Hello, 'Best tool...'? by soccerisgod · · Score: 2, Insightful

    What ever happened to the engineer's motto "The right tool for the right job"? I'm not a scripts person, but indubitably, all scripting languages have their specific advantages for specific applications. Imho, this whole thing is made for trolling and flaiming and not for anything else. It's just stupid.

    --
    If a train station is a place where a train stops, what's a workstation?
    1. Re:Hello, 'Best tool...'? by bender647 · · Score: 1

      How about, "the tool in your toolbox is better than the tool you have to make a trip to the store and buy?" What I'm talking about is how if you code in Ruby or Python, many people would not use it because most boxes don't have those languages installed. There's something to be said for scripting in a language that is the most widespread, instead of asking the userbase to install 15 scripting languages to suit the whim of 15 coders.

  126. someone's already done it by Fourier · · Score: 2, Informative

    I searched around a bit, and found that someone's already done it. It uses the PCRE library along with a camlp4 macro that provides an elegant "match ____ with" construct tailored specifically to regexps. I'm impressed.

    1. Re:someone's already done it by pikine · · Score: 1

      That's pretty cool. I actually have two orthogonal approaches in my mind. One is to use the Str module (using emacs regexp) that comes with O'Caml with a syntax that remains fairly elegant. The other one is to use Pcre and a syntax that resembles more of Perl.

      One of the difficulty with designing this syntactic sugar is actually deciding how much syntactic sugar you need. In the project you pointed out, he put type coersion into the syntactic sugar. I tend to disagree both with that design decision and the way he uses "adhoc rules" to carry it out.

      If you have some ideas and wanna help, let's keep in touch.

      --
      I once had a signature.
  127. From a pragmatic point of view... by Not_Wiggins · · Score: 2, Insightful

    the "correct" answer is easy: the one you know best.

    Unless you have other considerations like maintainability, reuse by coworkers, etc. But those considerations are external to any language you might choose.

    --
    Diplomacy is the art of saying, "Nice doggie!" until you can find a rock.
  128. Re:Java? What about Groovy? by tug · · Score: 1

    Or even Groovier

    #!/usr/bin/env groovy
    println "Hello world"
    args.each {println "Argument: ${in}"}

  129. Speed of development! by ultrabot · · Score: 2, Interesting

    Measuring program size in bytes is stupid. Lines of code, though still rife with problems, is a much better measure.

    Where program size counts in a scripting language is the time taken to write the program. As someone said recently, "typing is cheap, thinking is expensive". For me it requires 0 seconds of thought and 0.8 seconds of typing to write "import os" in Python if I use something from the os module.

    Likewise, using things like regexps from a library necessarily implies some typing (function re.search instead of m//), it doesn't require any thought so the path chosen doesn't impact production time. It does impact the readability which counts too.

    I think the referenced "shootout" was a poor idea. Measure things that don't matter, and pretend that they do. A better idea was what was done a while back - measure the size of gzipped source code, which measures the semantic complexity of the code . Python kicked other languages' arses there.

    --
    Save your wrists today - switch to Dvorak
    1. Re:Speed of development! by iserlohn · · Score: 1

      You're right, readability is everything, even if your working on your own work. People do forget things about their own code after a while so readability really aids maintainability. It also helps introducing new developers to the project as they can get up to speed really fast.

      The main reason why python is so much eaiser to read I believe is whitespace. The clean indentation makes the code look much more like an outline, making much easier to follow when there are nested blocks.

    2. Re:Speed of development! by bishop's+farewell · · Score: 1
      Where program size counts in a scripting language is the time taken to write the program.

      We would like to estimate the time it would take write a program, as this is a measure of productivity. The problem is that the time it takes to write a program in a given language is very dependent on the skill and experience of the programmer, in relation to the language being tested. Also, some languages tend to be better than others at different tasks.

      Perl has many syntactical tricks to allow common tasks to be written in a very terse form, provided you know the magic words. Python has a more regular syntax than Perl, so you do not need so much knowledge to describe a task, but you may need more words than Perl would use.

      Most programmers prefer to work in the language they know best, as they can generate working code more quickly than in an unfamiliar language, even if the other language offers major advantages. However, it is always worth spending some time investigating alternatives. I started scripting in Perl, but later switched to Python, as it is easier for me to say what I want in Python. Other people may have a different experience.

      I try to assess languages by applying them to real tasks that come up at work. If the language suits my way of thinking, and has the required features (e.g. modules or libraries), I will get the job done fairly easily. I might find some features of the language attractive, if they solve parts of the problem that would be awkward in other languages.

      My point here is that a simple benchmark based on code size is almost certain to be useless for deciding which language to employ for real work.
    3. Re:Speed of development! by Jon+Erikson · · Score: 1
      A better idea was what was done a while back - measure the size of gzipped source code, which measures the semantic complexity of the code. Python kicked other languages' arses there.

      Do you have a link for that?

      --

      Jon Erikson, IT guru

    4. Re:Speed of development! by 4of12 · · Score: 1

      Where program size counts in a scripting language is the time taken to write the program.

      and in the time taken to grok the program 6 months from now.

      As a language, Python does well here.

      However, more than language, the author or programmer matters in creating decipherable elegant code that can be understood 6 months later by someone random.

      --
      "Provided by the management for your protection."
    5. Re:Speed of development! by ultrabot · · Score: 1

      Do you have a link for that?

      Nope, quick googling didn't bring it up. ISTR it was discussed on slashdot.

      --
      Save your wrists today - switch to Dvorak
    6. Re:Speed of development! by Jon+Erikson · · Score: 1

      Arse. I couldn't find it either. But hey, it confirms my existing prejudices in favour of Python so it's all good ;)

      --

      Jon Erikson, IT guru

  130. News ? by Krunch · · Score: 1
    Release: $Id: index.html.pl,v 1.39 2003/09/15 15:40:02 pixel Exp $
    How is this news ? It's interesting sure but it's not news.
    --
    No GNU has been Hurd during the making of this comment.
  131. CMD.EXE you insensitive clod! by prandal · · Score: 1

    In the Windows environment there are a host of different OS-specific needs which are best served by Windows-specific scripting programs.

    Two which come to mind are KiXtart which I use to do clever things in our users' login scripts and Winbatch.

    Phil

  132. Cold Fusion by cruachan · · Score: 1

    So what happened to Cold Fusion? I've scripted in Perl, PHP, Python, Javascript, VB and many others and I'd still say Cold Fusion is the simplest/quickest to build a small to medium sized system in.

    Sure it lacks the geek factor because it's not open source, and it's not as widely available as perl/php, but it's certainly a lot more common on ISP servers than ruby.

  133. Ocaml with the backstepping debugger by dan_sylveste · · Score: 2, Interesting

    I love the debugger of ocaml. You can backstep, you UNDO the execution of the previous 1, 10, 100, 1000, ... steps. Wonderful if you like me fill the code with asserts. If an assert occurs, just run in the debugger, then backstep until you know why the unthinkable happened and then you fix the bug.

  134. VBScript, although not part of .NET, thrives by Anonymous Coward · · Score: 0

    I was disappointed when Microsoft failed to include VBScript as one of the languages in .NET. The ASP VBScript model was the first innovative product that Microsoft introduced. And that model served it's purpose remarkably well - ASP VBScript put Microsoft on the WWW. Without ASP VBScript there would be no significant Microsoft presence whatsoever on the WWW. Yet today, 5 years after the introduction of .NET, ASP VBScript pages on the WWW outnumber .NET ASPX pages by 10 to 1. And ASP VBScript usage continues to grow faster than .NET.

    But Microsoft refused to add those features(binary file I/O, associative arrays, throw/catch, etc.) to VBScript that could have made it a superior scripting language. [Some of these features can be implemented with COM, but COM overhead makes such implementation costly performance-wise - those features should instead be part of the VBScript language.] Microsoft instead developed a new set of languages for .NET that were

    • Completely unlike VBScript,
    • an order of magnitude more complex than VBScript and that
    • require the use of Microsoft's IDE.

    In contrast, veteran ASP VBScript programmers pride themselves on their use of NotePad as an IDE.

    This is an unfortunate but compelling example of a corporation shooting itself in the foot by discontinuing enhancement of it's most successful product.

  135. Nonsense Perl Code by castrox · · Score: 1
    In the step Formatting I was quite puzzled by the following Perl-code:

    perl -le '=1; =2; print " + = ", + '


    It is, of course, nonsense. So this entire "test" seems utterly pointless since the person responsible also measured 38 bytes for Perl in this case (the above code).
    --
    Fight for your digital freedom, join the EFF *now*: http://www.eff.org/support/
  136. illumination unlimited, universal scripting by Anonymous Coward · · Score: 0

    consult with/trust in yOUR creators..... good advise since/until forever.

    tell 'em robbIE?

  137. too little, too late by mat.h · · Score: 1
    The scripting language shootout to end all scripting language shootouts was done by Verity Stob in the May 2004 issue of Dr Dobb's. (Sorry, no link. I've read it printed on dead trees. Don't know if it's available online.) Absolutely hilarious, with some bits of bitter, disillusioned truth:
    [section on ActionScript]
    You don't like it then. No, quite wrong. I love it.
    Huh? It's just such fun, writing bits of code to manipulate the pretty colored shapes. Whee! Look how clever I am! This is much better than working.
    [section on Python]
    What's it like? Clean, modern, fully featured, elegant, extensible, scalable, object oriented. A version of VBScript from an antimatter universe.
    [...]
    So you use it? No. As a winding-down Delphi user, I have had my fill of "technically best." From now on, it's strictly "most popular" for me. Within reason.
  138. Guile 1.4 Is Old by Unknown+Lamer · · Score: 1

    Guile 1.4 is old...1.6 has been out for a good year and a half now.

    It has a debugger but it is disabled for speed purposes by default; running (debug-enable 'debug) turns it on. There's also an excellent Emacs interface that makes editing/debugging Guile code painless.

    --

    HAL 7000, fewer features than the HAL 9000, but just as homicidal!
  139. they do give credit... by Versix · · Score: 1
    It's just really small. See the bottom of the page for the reference:

    This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Perl"

  140. Hybrid is the golden middle way by mrjb · · Score: 1

    I like to work in a kinda hybrid environment, using perl as a basis and going for backticks and shell processing whenever I think it to be more straight forward than the perl equivalent. Thus I'll get the best of both worlds. For example:

    # do_fancy_perl_stuff_here to fill $tempdir
    $tempdir =~ s/\s//g;
    `rm -rf $tempdir`; # $tempdir='/'

    This saves me from needing to lookup how to delete a directory in straight perl code, and will be readable by anyone who ever used a shell.

    --
    Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
    1. Re:Hybrid is the golden middle way by Anonymous Coward · · Score: 0

      PROGRAM Agree #import function do_agree(){ std::cout "I agree!" std::endl; return EXIT_SUCCESS; end.

    2. Re:Hybrid is the golden middle way by vericgar · · Score: 1

      it's good for hack together quick scripts. but if you are processing a lot of data with PERL you will want to avoid calling out to the shell like that. talk about increasing your execution time tenfold. (ok, maybe not that drastic, but maybe)

  141. *My* "practical survey" for scripting languages by ExoticMandibles · · Score: 2, Interesting
    Does the name of the scripting language contain the letters 'P', 'y', 't', 'h', 'o', and 'g', in that order? Score one point for every correct letter. Perl gets 1 point--oh, too bad! Python, with 5 points out of 6, is our highest-scoring language.

    Personally I think that's a better metric than the author's simple-minded "the program in this language was eight characters shorter so it gets a higher score". This was apparently an attempt to measure the expressive power of a language, but done in such a way as to ensure Perl scored well.


    I think there are more important things to keep in mind when selecting a scripting language, like

    • how easy is it to learn?
    • how easy is it to remember how to use everything?
    • how easy is it to read other people's programs
    • how easy is it to read your own code six months from now?
    On these counts Perl loses big time. Its "every combination of punctuation characters does something" language design saves you typing, at the expense of pretty much everything else.

    If the only thing you use the scripting language for was one-off half-page scripts that you use once then throw away, and you wrote those eight hours a day five days a week, then I could see using Perl. For any other purpose I think you're better off using something else. (And, yes, I have a suggestion in mind, and it rhymes with Crython.)


    larry

    p.s. I have a nomination for a shorter Python program to remove #-characters from a file:

    import sys
    system ("sed -i -e \"s/#.*//\" " + sys.argv[1])
    After all, it is precisely as "legal" for the Python program to call sed as it is for the sh program to call sed.
    1. Re:*My* "practical survey" for scripting languages by DylanQuixote · · Score: 1

      I'm not sure the guy that wrote that was trying to make perl win... most of the perl examples are invalid anyway, or seriously botched looking...

  142. Hello world, 7 bytes by valentyn · · Score: 1

    In shell scripting, you can get Hello World in 7 characters:

    $ echo 'echo $0' > 'Hello, World!'
    $ chmod +x 'Hello, World!'

    --
    my other sig is a 500 page novel
    1. Re:Hello world, 7 bytes by rffrff · · Score: 1
      you can do the same in ruby in 4
      echo 'p $0' > 'Hello, World!'
      chmod +x 'Hello, World
  143. Silly Java mistakes by Decaff · · Score: 5, Interesting

    There are some silly mistakes in this article, suggesting that the author does not really understand the languages he is comparing.

    Here are some examples:

    for 'return exit code error (non zero) if a file does not exist' and 'return exit code error (non zero) if a file is not readable. There is no Java or C# code supplied. Java can easily test this: for example

    new File(filePath).canRead();

    and

    new File(filePath).exists();

    and I'm sure C# can as well.

    There are other omissions:
    Under Java 1.5, the System.getenv() method allows access to environment variables.

    Also, saying Java is completely unusable in a scripting environment is nonsense. The BeanShell system has been around for years, and allows java to be run as if it were a scripting language, both from a command prompt or from script files. Java 'scriptlets' on JSP web pages are very common. Finally, there is a PHP/Java interface.

    I don't know C# well, but I'm sure there are similar facilities for that language.

  144. broken perl source code by Lorphos · · Score: 1

    I'm wondering why noone here seems to have noticed that most of the perl scripts on the site are broken...

  145. Enough flaiming by t_allardyce · · Score: 1

    Can we atleast all agree that VB script is utter shit and should be wiped from the face of the earth?

    --
    This comment does not represent the views or opinions of the user.
  146. TCL Got shortchanged by EvilTwinSkippy · · Score: 3, Informative
    I was reading through the criteria, and TCL was docked points for not being able to pass commands through the command line and not having a debugger.

    Both are untrue. TCL will happily take command line arguments, and if you set the execute bit under unix, will happily act as programs. If by "programs can be passed over the command line" that he wants to bang out to the shell, there is the exec command. Of course in his hello world program he uses BOTH features.

    TCL gives you a complete stack dump on every error that is stored in a global variable "lastError", and you can override the background error with the bgError command. That also covers the "FullInterpreter in Debugger". The language was designed AS a debugger to C programs for christ's sake.

    All told that cost TCL 15 points.

    Sure I'm quibbling, but if you aren't going to compentantly seek out features save in all your favorites, you look like an idiot putting these comparisons together.

    (Disclosure: TCL Guru.)

    --
    "Learning is not compulsory... neither is survival."
    --Dr.W.Edwards Deming
  147. Perl and Readability Myth by Pan+T.+Hose · · Score: 1

    Perl can do a lot, but nothing is more painful than having to look at a perl source code. While a program can be written semi readable, when compared to some others, like PHP or python, they typically make me want to stick very large needles in my eyes.

    This supposed Perl "readability" myth, or the lack thereof, is one of the reasons we will have Perl 6. You are not up to date with Perl development, are you?

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  148. My brain hurts! by Jonathan · · Score: 1

    Dialect kind of bills itself as a BASIC-like RAD language, but *do not* be scared away by that. It is a lot more like Python than Dialect in its syntax..

    Oh, man, a language that is more like Python than itself.

  149. The day I was happy to know a little Perl by tuxliner · · Score: 1

    Is the day I had to : - take screenshots ( every 5 seconds ) while using a web-based AS400 terminal emulator without having to use the PrintScreen key of my keyboard - resize the image by cropping only the AS400 emulator zone - delete the duplicate pictures - change the colors in the pictures so that black->while , yellow-> blue ; green->red, etc... while keeping the image readable. - add some comments at the bottom of each image It was really easy using Perl::Win32 and Perl::Magick modules. I wonder if you can find other languages to perform the same task....

  150. Missing Languages by Pan+T.+Hose · · Score: 1

    Two languages missing are: Io [...], REXX [...], ficl [...].

    You have provided great examples. I would add another two: Unlambda, bf and maybe also Ook. Furthermore, let us not forget about Assembly. Seriously, I strongly believe that if kids today had learned those languages and tried to understand how computers really work, we will have much less Flash/JavaScript/PHP/MySQL "elite" (or "leet," if you will) websites shamefully vulnerable to trivial cross-site scripting and SQL-injection exploits. The problem is that script kiddies today don't want to learn anything, be it REXX, Unlambda, IMCC, Perl 6 or even valid ANSI C for God's sake. We have to do something about it. I agree with you.

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  151. What about? by Anonymous Coward · · Score: 0

    C++. If they included Java they have to include C++ :-)

  152. They wanted Perl to 'win'. by Qbertino · · Score: 3, Insightful

    What a silly way to try and display 'objectiveness'.
    I get the strong feeling some Perl freaks were involved in the evaluation tables design.

    Where's readability?

    Could it be that readability contradicts with 'programm shortness'?
    Ever tried to read through the shortest possible Perl solution to a problem? Exchange shortness for readability and Python will porbably 'win' hands down.

    And what silly dork drew the line between 'scripting languages' and 'programm languages' ?? With 'Java not being a scripting language' and Python, Perl and Ruby being one. Whatever that's supposed to mean.
    Why this evaluitation may be objective on some narrow areas, in a whole it's somewhat pointless. I can add some other criteria that will have TCL or bash win in no time.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:They wanted Perl to 'win'. by ggvaidya · · Score: 1

      Yeah, yeah, I know, I'm feeding the Python trolls here ... but can't resist ...

      > What a silly way to try and display
      > 'objectiveness'.
      > I get the strong feeling some Perl freaks were
      > involved in the evaluation tables design.
      So how come 'sh' won, then?

      > Where's readability?
      > Could it be that readability contradicts with
      > 'programm shortness'?

      while(horse.dead()) {
      horse.beat();
      }

      is probably less readable than

      beat() while(dead_horse());

      So maybe, just maybe, it doesn't :).

      > Ever tried to read through the shortest possible
      > Perl solution to a problem? Exchange shortness
      > for readability and Python will porbably 'win'
      > hands down.

      Who's talking about the shortest possible Perl solution? This is a language which's official aim is to "make easy tasks easy and hard tasks possible". The idea is that if I need to run a regexp on a file, I can do:

      while() {
      if(/$regexp/) {
      do_something();
      }
      }

      Without thinking at all ... and if I now need to use OOP concepts in the midst of all this (e.g. construct a search tree, etc.) I can do that too, while starting with the same fundamental simple structure. Okay, so programmers from other languages will have problems understanding it, but an idiom like this is at the very heart of Perl. And idioms are important in every language - Perl's just happen to be smaller than anyone else's.

      > And what silly dork drew the line between
      > 'scripting languages' and 'programm languages'??
      >With 'Java not being a scripting language' and
      > Python, Perl and Ruby being one. Whatever that's
      > supposed to mean.
      Go write me a compiler, word processor, or database in Perl. Then write me a program to go through a file, find all strings with format " deg F" and replace it with " deg C", doing the calculation required. Then talk.

      > Why this evaluitation may be objective on some
      > narrow areas, in a whole it's somewhat
      > pointless. I can add some other criteria that
      > will have TCL or bash win in no time.
      Tried to come up with a *really* extensible language to glue bits of things together? Tcl. Something any Unix will understand? Bash. There you go.

      [disclaimer: Trying to be Just another Perl hacker]

    2. Re:They wanted Perl to 'win'. by KnightStalker · · Score: 1
      Define "readability." In my opinion, conciseness is a major contributor to readability. Here is one of the most line-noisy Perl routines I've written recently. It extracts email addresses from a message header, splitting header lines on ",", puts them into a list, strips out addresses with certain domains, trims non-address text, removes duplicate entries and then returns the list sorted by frequency. Yes, you'll have to know Perl for this to be obvious. But if you do know Perl, I think it's perfectly readable. You could write something that's nearly identical, I expect, in Python. (Well, you'd have to indent it differently... ;-)
      sub likely_customer_emails {
      # returns a list of unique non-xxx, non-yyy email addresses extracted fro
      m the message, sorted by frequency
      my %uniq;
      sort { $uniq{$b} <=> $uniq{$a} }
      grep !$uniq{$_}++,
      map { /([^\s<\@]+\@([\w-]+.)+(\w+))/ ? $1 : $_ }
      grep /\@(?!(\w+\.)*(xxx.com|yyy.com))/,
      map {split(/,/, $_[0]->get($_))}
      ("Reply-To","From","To","Cc","Return-Path");
      }
      --
      * And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
  153. Pure Shell Grep by Pan+T.+Hose · · Score: 2, Funny

    There's lots of other subtle biases. For example, in the "grep" example, the sh code simply called grep. If he wanted to be pure about the scripting he'd not have had any way of doing a RE in sh (since it doesn't have true RE handling builtin, it only has globs through 'case') and if he was going to use external calls then why didn't he just do 'exec grep "$@"' or otherwise afford the use of external command execution to the other languages too?

    OK, here it is:

    #!/bin/sh

    # 2004-06-13T12:33:55+0000

    # pth shgrep - a minimal shell grep implementation
    # Copyright (C) 2004 Pan Tarhei Hosé, PhD.
    # http://developers.slashdot.org/~Pan%20T.%20Hose/
    # http://developers.slashdot.org/comments.pl?sid=110 875&cid=9411049
    #
    # This program is free software; you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation; either version 2 of the License, or
    # (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    [ a$1 == a ] && echo "Usage: $0 pattern < file" && exit 1
    while :; do read a || exit; [ "${a/$1/}" == "$a" ] || echo $a; done

    Just a quick hack I wrote right now in less than a minute, I am sure one could write it better. A quick test:

    pth@ws0:43:~/sh/shgrep$ ./shgrep arse < /usr/share/dict/words
    arsehole
    arseholes
    arsenal
    arsenals
    arsenate
    arsenic
    arsenide
    [...]

    Seems to work fine. Is it pure enough?

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
    1. Re:Pure Shell Grep by notsoclever · · Score: 1

      That's bash code, not sh.

      --
      There are 10 kinds of people: ones who understand ternary, ones who don't, and ones who think this joke is about binary
    2. Re:Pure Shell Grep by Carthag · · Score: 1

      The examples in the article use bash. They note that the implementation of sh that they use is bash.

    3. Re:Pure Shell Grep by notsoclever · · Score: 1

      I overlooked that bit. But I didn't notice any bashisms in their code, and it's rather surprising how many bashless systems I've had to deploy existing scripts on (requiring some porting in many cases).

      --
      There are 10 kinds of people: ones who understand ternary, ones who don't, and ones who think this joke is about binary
  154. Python by wigam · · Score: 0

    The only script language I know is python but coming from C++/Java it seems easier to handle then perl. I think it all depends on your backgroup.

  155. Re:Practical? Bah, humbug. (Pythonic bias warning. by Anonymous Coward · · Score: 2, Funny

    Youdon'treallyexpectsomeoneactuallyreadingthatpost ,doyou?

  156. this guy is talking out of his ASS (read why) by Anonymous Coward · · Score: 0


    lets take a look at java for example:

    shebang aware (#!) (15 points):
    this can be done in linux, using some extension i dont remeber its name. you choose it when you compile the kernel. and not to mention the jar files!

    compilation and execution in one command (20 points):
    how hard is it to write a shell script or even a java class that does this??

    20 fucking points??? for something that you can add/fix in like 30 seconds?? this looks very biased to me

    program can be passed on command line:
    dont get it. what the fuck is this??
    is it like ls `which ls` or something??
    this has more todo with the shell than the language.

    interactive interpreter (REPL) (5 points):
    well, when you limit yourself to gcj, then you basically have said that you are not interested in a "interactive interpreter"! why not use eclipse or Visual.Net (for C/C++/C#)??

    debugger(5 points):
    oh wait, have you heard of jdb??
    or the jikes debugger? or the GNU debugger? ddd anyone?

    full interpreter in debugger (5 points):
    hmmm...

    verbose_execution (2 points):
    hoo??? sure, you can verbose java, but WHY??
    for this kind of stuff, a simple "print" here and there is more than enough

    this guy has basically chosen the measurements that (he thinks) will give his favorite language higher score and used them.

    lets see... why not use important points like object-orinted, networking and multi-threaded (not that they matter for scripting, just wanted to show you how stupid his comparision is)?

    1. Re:this guy is talking out of his ASS (read why) by Anonymous Coward · · Score: 0

      bla bla bla

  157. Scripting is good by X-Nc · · Score: 2, Informative
    I was rather surprized at the results of the test. I knew perl would be on top. Whether it's best or not it will always be in the winners circle because it is the "tool of choice" even when it isn't the best tool for the job. ruby was nice to see up there. It's a really good language; kind of what you'd bet if perl and python had a baby. But the real shocker was that sh was picked. In any kind of "test" like this the Bourne shell should always be a run away winner. UNIX shell programing, with all the UNIX command line tools (awk, sed, grep, etc.) if the hands down best generic scripting option for simple to medium level, cross platform, portable scripts. Hell, that's what it was created for.

    One of the down sides to the advancement of the free "as in everything" OSs is that people are learning lots of perl and python and such but not learning shell. Whether you are a developer, sysadmin, user or tinkerer you should learn shell first and always add it to the list of tools to evaluate for any situation that comes up.

    --
    --
    If I actually could spell I'd have spelled it right in the first place.
    1. Re:Scripting is good by furry_marmot · · Score: 1
      From the sore winner dept...

      I thought the results were slanted a little toward Perl-like scripting languages, but they don't seem to know as much Perl as they think they do. I mean, why do they show Python code as

      import sys; print sys.argv[1]
      while showing Perl code as
      % perl -le 'print '
      ? One is obviously intended to run from a script, while the other runs from a command line, including an unnecessary extra command-line option.

      "shebang-aware"??? Please! On Unix you can shebang yourself a line to call the script easily, and on Win32 you can simply create an association for particular extensions (like .pl) or convert the finished script to a batch file.

      Beyond nit-picking, though, a real test of languages should involve a range of tasks, simple to complex, and evaluate languages on criteria that would score differently at different levels. Like, the ability of some languages to drop the need for declaring variables is great for hacking together a one-off quickie, but you wouldn't want to do that for anything you'd reuse or that is longer than a couple dozen lines.

      Also, non-Perl fans are always blabbing on about readability, like it's a built-in problem in Perl. So score a program based on readability, and then write a fully readable Perl script. [Note to non-Perl fans: you can make a Perl script as readable as any language, but the shortcuts and special expressions it allows aren't going to be readable to momo's who don't know the language!].

  158. [PATCH] to work better with whitespace in input by Pan+T.+Hose · · Score: 1

    --- shgrep Sun Jun 13 15:42:45 2004
    +++ shgrep-r1 Sun Jun 13 15:43:24 2004
    @@ -22,5 +22,5 @@
    # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    [ a$1 == a ] && echo "Usage: $0 pattern < file" && exit 1
    -while :; do read a || exit; [ "${a/$1/}" == "$a" ] || echo $a; done
    +while :; do read a || exit; [ "${a/$1/}" == "$a" ] || echo "$a"; done

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  159. found it... by Chuck+Bucket · · Score: 1

    #!/bin/bash

    CV

  160. Real programmers by Anonymous Coward · · Score: 0

    don't use scripting languages.

  161. waste of time - if your a unix geek your good by Anonymous Coward · · Score: 0

    with all scripting languages

  162. Python a scripting language? by SID*C64 · · Score: 1

    I don't really consider Python a "scripting language". Just because something is easy to use and interpreted doesn't make it useful for scripting. For that purpose you really need something very loose and non-structured. I am a big advocate of Python in the workplace and I have written huge object oriented systems using it. I don't think that's a task most "scripting" languages are up to.

    BTW WTF is a scripting language anyway? Can anyone really solidly define what one is? By some of the definitions I have heard, just about every language could be a "scripting language" for someone.

  163. Comments. Use Them. by Anonymous Coward · · Score: 0

    I've been working with Perl for about a year and a half, and I'm not a programmer by profession. I have no idea what that reg exp does, nor would I bother to take the half hour or more of brain gymnastics it would take to figure it out. It doesn't matter, however, because that's what comments are for.

    The syntax is irrelevant if the code is adequately explained. If you wrote something like the following, we'd all get along:

    # Assigns the velocity of an unladen swallow to $str. Depending on the species of swallow, it either takes every character and xors it with 0x42, or wipes out your hard drive.

    $str =~ /(.*?)\&(\w+)\((.*?)\)/gis


  164. another test? by alexandre · · Score: 1

    Here is a binary to ascii converter in 1 loop and 1 line of bash. No it's not rock solid but does work on a bunch of 8 bits like:
    # cat > test
    01101000 01100101 01101100
    01101100 01101111 00001010
    ^D
    # bin.sh test
    hello
    #
    here is the code:
    ----------------8<--------------------
    #!/ bin/bash
    for i in `cat $1 | tr -d '\n\ ' |sed 's/\(.\{8\}\)/\1 /g'`; do
    echo -ne "\0$(( $[2]#${i:0:2} ))$(( $[2]#${i:2:3} ))$(( $[2]#${i:5:3} ))"
    done
    ----------------8<--------------------
    Now everyone post a result in another language! :-)

    1. Re:another test? by r_cerq · · Score: 1
      --------------- bin.pl ------------
      #!/usr/bin/perl -n

      split(/\s+/);
      foreach (@_) { print chr(oct("0b".$_)); }
      ------------- end bin.pl -----------


      $ cat test | bin.pl
      hello
    2. Re:another test? by yeremein · · Score: 1
      Okay, it's not really a scripting language, but I'm a traditionalist.
      #include <stdio.h>
      main(){int c,x=0,b=7;while(EOF!=(c=getchar())){x|=(c-'0')<<b; if(--b<0){b=7;putchar(x);x=0;getchar();}}}
      There must be exactly one whitespace character after each 8 digits (no namby-pamby DOS CR-LF pairs here).
  165. Re:PerlScript by hattmoward · · Score: 2, Interesting

    Nice to see a monk out here in the wilds! BTW, chromatic, did you look at the code for the Perl tests on the article? They're a little... weird. It looks like his shell took a pass at interpolating the command line before he pasted it into the page, or something.

    I suppose the fact that he includes "perl -le " at the start of so many "tests" isn't really fair either -- most of those interpreters support similar one-liner options, but they got away with just the program code. :\

  166. my gripe is the syntax by CoughDropAddict · · Score: 3, Interesting
    I've tried learning OCaml a few times, and my biggest gripe with it was the syntax. One problem was that it seemed like every time I managed to wrap my head around a new syntactic construct, the tutorial would say "since that's too long to write, we use this shorthand to mean the same thing." So now I have to learn a new construct that does the same thing but also try to remember how it relates to the longer version.

    Another problem is that there is very little punctuation that gives your eye any aid in seeing structure. Very often you get a bunch of keywords and identifiers in a row with no delimeters at all! A simple example of this from the tutorial:

    let cos2 = compose square cos;;

    Come on, cut me some slack! Is this compose(square(cos)) or (compose(square))(cos) or compose(square,cos)? I shouldn't have to think about precedence rules when I'm reading a function call, the syntax should make it clear what's going on! Another example:
    let rec member x btree =
    match btree with
    Empty -> false
    | Node(y, left, right) ->
    if x = y then true else
    if x < y then member x left else member x right;;
    Compare this with a Python-like syntax:
    let member(x, btree):
    match(btree):
    case Empty: False
    case Node(y, left, right):
    if(x = y): true
    elif (x < y): member(x, left)
    else: member(x, right)
    I don't know about you, but to me the second example is a lot more readable. Readability is about making your eye see the structure without even trying. That's one of the reasons I like Python so much: I think it excels at making the structure unavoidably apparent.

    Ocaml's definitely got some cool things going on, and I really respect the fact that smart people seem to gravitate towards it and get useful things done with it. If I ever learn it, I'm going to have to suck it up and deal with syntax I really don't like.
  167. Statistics are what you force them to be... by reanjr · · Score: 1

    This thing was weighted from the moment they decided to disclude VBScript. They gave points for being "shebang aware" (#!), which also leans the contest towards shell scripts, etc. on Unix only, of course leaving Smalltalk and C# out to dry.

    Now I'm not saying that any of these languages should necessarily win (though I'm pretty sure VBS would score pretty high in a fair contest), but this survey is meaningless because the people who conducted it are full of crap.

    To be quite honest MS Batch files beat the hell out of most of the competition on many of those categories. I hope no one takes these people seriously.

  168. Try smoking Zope by Orion+Blastar · · Score: 1

    Zope was not mentioned, WTF?

    --
    Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
  169. tripe by Anonymous Coward · · Score: 0

    There exists no language that is the best for everything. Choosing metrics for scripting goodness is arbitrary at best. This study is pure tripe. Useless.

    You should be familiar with the strengths and weaknesses of different tools and choose the best one for that particular job. And you should be a quick study.

  170. Java's string manipulation is horrible by Anonymous Coward · · Score: 0

    Beanshell is not Java, so your point is moot.
    I can complete most string manipulation tasks in Perl in 5 lines as compared to over 100 in Java. Java is simply not suitable in a scripting environment.

    1. Re:Java's string manipulation is horrible by Decaff · · Score: 2, Informative

      Beanshell is not Java, so your point is moot..

      I would argue that this is not true. You can type in and execute Java code into the BeanShell prompt and it will execute interactively. BeanShell itself is written 100% in Java.

      You may say its not Java because its not a part of the standard Java APIs, but there are plenty of other scripting extensions to Java that are: Java scriptlets in JSP pages; the Java Standard Tag Library in JSP pages.

      I can complete most string manipulation tasks in Perl in 5 lines as compared to over 100 in Java.

      Yes, Perl is a very consise language that is superb for scripting. For string manipulation and many other tasks it's unbeatable.

      Java is simply not suitable in a scripting environment.

      That was not the point that was being made. The article said 'Java was completely unusable in a scripting environment'. This not true. Perhaps the most widely used example is JSP, the java equivalent to PHP and ASP. You can open up a JSP page, type in Java code, and have that page run immediately as part of a live web application. As with PHP you can add and edit pages containing code without shutting anything down. As far as the developer is concerned there is no compile-edit-run cycle. If that is not scripting, what is?

    2. Re:Java's string manipulation is horrible by Anonymous Coward · · Score: 0

      The Beanshell language may be implemented in the Java language and run in a Java environment but it is not Java. The reviewer was comparing languages - not environments. Java faired poorly because of its extremely verbose syntax which is unsuitable for quick scripting. Perhaps Beanshell would have faired better than Java but it was not examined.

    3. Re:Java's string manipulation is horrible by Decaff · · Score: 1

      The Beanshell language may be implemented in the Java language and run in a Java environment but it is not Java.

      There seems to be some confusion about this.
      Let me quote from the BeanShell website:

      "BeanShell executes standard Java statements and expressions..."

      "BeanShell is a dynamically interpreted Java, plus some useful stuff."

      "Transparent access to all Java objects and APIs."

      With BeanShell you have a command prompt. You can type in Java code. The Java code runs. That sure sounds like 'Java' to me!

      unsuitable for quick scripting.

      Yet again I am going to have to point out that this is not the point that was being made.

      Let me repeat:

      The article said:

      'Java was completely unusable in a scripting environment'.

      Not 'awkward to use', not 'slow to use', but completely unusable

      I have clearly pointed out that there are examples where java is absolutely used for scripting. That was more than BeanShell - it includes pure Java code in JSP scriptlets.

      By any rational use of logic, the phrase 'completely unusable' is nonsense, and was written by someone who simply did not know what they were talking about.

  171. Standard ML is nicer there by Estanislao+Mart�nez · · Score: 2, Informative

    $ sml
    Standard ML of New Jersey v110.42 [FLINT v1.5], October 16, 2002
    - 1 + 1; (* Add two ints *)
    val it = 2 : int
    - 1.0 + 1.0; (* Add two floats *)
    val it = 2.0 : real
    - 1 + 1.0; (* Error! *)
    stdIn:5.1-5.8 Error: operator and operand don't agree [literal]
    operator domain: int * int
    operand: int * real
    in expression:
    1 + 1.0
    uncaught exception Error
    raised at: ../compiler/TopLevel/interact/evalloop.sml:52.48-5 2.56
    ../compiler/TopLevel/interact/evalloop.sml:35.55

    - fun f x y = x + y; (* Define a function *)
    val f = fn : int -> int -> int
    - fun f x y = f (x-1) y; (* Define a recursive function *)
    val f = fn : int -> 'a -> 'b

  172. Unicode by Dwonis · · Score: 1

    If you're using UTF-8 as input, the code already works.

  173. Maybe because... by Anonymous Coward · · Score: 0

    Scheme and Haskell are on the page?

  174. (compose square) cos by Estanislao+Mart�nez · · Score: 1
    Function application associates to the left, period.

    The O'Caml example can be improved with pattern guards (ecode is eating my indentation):

    let rec member x btree =
    match btree with
    Empty -> false
    | Node (y, left, right) when x = y -> true
    | Node (y, left, right) when x < y -> member x left
    | _ -> member x right
    Two important things you don't mention are: (a) Python doesn't actually have a case statement; (b) O'Caml's match ... with isn't strictly equivalent to the case statement from most languages: O'Caml's is more powerful, since it matches arbitrarily complex patterns to complex values, binds the variables in the pattern to the matching parts in the result expression (kind of like how a regexp match assigns parenthesized subexpressions to $1, $2, etc. in perl-style regexps).
    1. Re:(compose square) cos by CoughDropAddict · · Score: 1

      Function application associates to the left, period.

      My point is that it doesn't matter how simple the precedence rules are, if you have to move past looking to thinking to figure out what's going on, you're working too hard. This may seem like a whiny gripe, but I think it's significant. As functions become more complicated, it becomes really important to be able to understand the simple constructs without thinking at all if you are to have any hope of understanding the whole.

      Two important things you don't mention are: (a) Python doesn't actually have a case statement; (b) O'Caml's match ... with isn't strictly equivalent to the case statement from most languages:

      You're missing my point. I'm not saying that this algorithm is easier to understand when you write it in Python. I'm saying that the power of OCaml's language constructs, which I recognize as being different than most languages, would be more useful if the syntax was more immediately decypherable. I was giving an alternate syntax for OCaml's language constructs, based on Python syntax, that is more readable to me.

      Well-placed punctuation is really important to making languages understandable, IMO. I know you're a natural language expert so I'm reluctant to go here, but imagine if we replaced commas with the keyword "comma" and the period with the keyword "full stop." I believe this would make natural language drastically less readable comma because it doesn't give our eye a hint about where one thing begins and the next ends full stop This is the same way I feel when I read "let rec member x btree" or "compose square cos" full stop Sure I can figure it out given enough time comma but why should I have to work that hard?

    2. Re:(compose square) cos by CoughDropAddict · · Score: 1
      Oh, and ironically you got the precedence wrong. It's compose(square, cos).
      # let compose f g = function x -> f(g(x));;
      val compose : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b = <fun>
      # let square x = x *. x;;
      val square : float -> float = <fun>
      # let cos2 = compose square cos;;
      val cos2 : float -> float = <fun>
      # cos2 5.0;;
      - : float = 0.0804642354617738
      If it was (compose square) cos it would have given me an error that "compose" takes 2 parameters.
    3. Re:(compose square) cos by Anonymous Coward · · Score: 0
      No, function application associates to the left. Consider
      # let compose_with_square = compose square;;
      val compose_with_square : ('_a -> float) -> '_a -> float = <fun>
      # let cos3 = compose_with_square cos;;
      val cos3 : float -> float = <fun>
      # cos3 5.0;;
      - : float = 0.0804642354617737671
    4. Re:(compose square) cos by CoughDropAddict · · Score: 1

      Wow, what a strange way to evaluate functions that take more than one argument. I'm going to have to take some time to wrap my head around this.

      I guess that would partially explain why it isn't notated compose(square, cos), because although that's the net effect it isn't actually evaluated that way.

  175. For my next trick... by Sitnaltax · · Score: 1

    Computing which scripting language is best by character count? What a brilliant idea!

    Sometime next week, I'll post an article definitively stating which is the best work of literature in the world. My criterion will be the one that has the most words.

  176. Java = Scripting language - PHP = No by flies59 · · Score: 1

    Not sure how the author decided what candidates qualified for a scripting lanuage shootout.

    It seems that php was left out on purpose. Not the ingredients for a fair comparison. What else hase been left out to skew the results. *ponders tha validity of the results*

    --
    No sig.
  177. NewLISP by Crusty+Oldman · · Score: 2, Interesting

    It's faster than bejeepers. I run it on my webhost as a scripting language.

    Simple, fast, elegant.
    http://www.newlisp.org/

  178. You forgot to turn on ego-check strict... by Anonymous Coward · · Score: 0

    Condecending clod..

  179. 1 line c# for file exists by sevinkey · · Score: 1

    not flaming, but

    if (File.Exists("filename")) {

    is one line of c# :)

    although a little longer than the perl counter part
    if (-e "filename")

    1. Re:1 line c# for file exists by dasmegabyte · · Score: 1

      The difference is, even as a non programmer...or a programmer who isn't deeply entrenched in C# syntax...you can tell what that c# is doing. The similar perl line would be absolutely inscruitable.

      And you don't have to type that much more...with autocomplete in VS.NET. Code that's self teaching as well as self documenting is worth a LOT more to me and my having-to-support-shit-i-wrote-drunk-and-at-the-la st-minute-a-year-ago job then being able to write a few more usefull characters per second.

      --
      Hey freaks: now you're ju
  180. Uhh.... C# is a scripting language. by Anonymous Coward · · Score: 0

    C# (all .Net) is a scripting language, as any real programmer knows.

  181. In a corporate environment... by silence535 · · Score: 1

    ... you ususally use one of the few which are installed and allowed to use.

    This is even more true if you are a consultant. Right now I have the choice between Perl, PHP and sh. I'd love to do Python but convincing my bosses is not worth the effort.
    And the choice between those boils down to "Is there already a script which does somehow what I want?". I take that one and modify it.

    Heck, for most of the stuff that has to be scripted it is totally egal which language you use (most of the time ist is "read csv, rearrange and import into database xy" or the other way round anyway.). Don't waste time on language decision. Developers tend to be almost religious about it.

    -silence

    --
    Dyslectics of the world, untie!
  182. Wrong examples by yanestra · · Score: 1
    The shortest valid C program would be "main(){}", the task "return exit code error (non zero) if a file is not readable" could be solved in Python analogous to C:
    import sys,os
    sys.exit(os.access("/etc/mtab"))
    which is about 46 characters. And so on. That survey would have made be happy if the author had been literate in the languages he questioned...
  183. Re:PerlScript by chromatic · · Score: 1

    I skimmed them. Honestly, I wondered more about how Parrot would fare than looking for odd Perl results.

  184. Beanshell: A Scripting Environment for Java by Quantum+Jim · · Score: 2, Interesting

    What about Beanshell! It is a scripting language for Java-based applications like jEdit. Beanshell will interpret ordinary java source files in addition to class files. You can even write a simple web browser in less than 74 lines of code! It surely should have been considered along if languages such as Pike, Lua, and Haskell were thought of.

    This entire analysis seems suspect. Take the first section. For JavaScript, their implementation uses NJS, which hasn't even stabilized with a 1.0 release yet! They also have a unix bias: many applications have no need of the shebang, #!. Even though, a script in another language could easily be written to implement that feature. Shebang support is a trivial and doesn't deserve the 15points awarded. Furthermore, awarding points for "program(s) can be passed on command line" is silly. That is a horrible horrible style of coding guaranteed to make scripts hard to maintain.

    Their second section is not complet and has a heavy bias against Java and C#. The subsections, "smallest" and "hello world," are silly. I never understood why having a small size for the simplest program is important for nontrivial applications. (For that matter, I never understood why programmers wish for the "least typing" in a language. I never never never code for least typing, since that often makes programs unreadable!) Finally, their coding style is inconsistent. For instance, they use for Java:

    public class formatting {
    public static void main(String[] args) {
    int a=1;
    int b=2;
    System.out.println("" + a + " + " + b + " = " + (a + b));
    }
    }

    Yet the authors throw these conventions out with JavaScript:

    a=1; b=2; System.print(a, " + ", b, " = ", a + b, "\n")

    (Also note that the numbers reported and counted don't match, but I may just be missing something.) Why? Java and C# seem destine to loose with the author's methods. As I said, this entire report seems biased and unscientific.

    P.S. /. needs to fix the site's source code white-space style. This is getting ridiculous.

    --
    It is impossible to enjoy idling thoroughly unless one has plenty of work to do.
    - Jerome Klapka Jerome
  185. This is shit by CAIMLAS · · Score: 1

    This is a shitty review. I just quickly glanced (no more than 30 seconds reading), and here are a couple glarring problems:

    - It's stated that perl's shortest "test file existence" code would be: -e "/etc/mtab" or exit 1. The "or exit 1" is extraneous.
    - There's no mention of php, which is a widely used scripting language.
    - it refers to bash as sh, which are, technically speaking, not the same thing.
    - doesn't take into account the "scratch the itch" need of a good scripting language. ie, the language needs to be versatile in addition to be able to carry out routine tasks.

    There's really nothing to see here. Pretty worthless 'review'

    --
    ~/ssh slashdot.org ssh: connect to host slashdot.org port 22: too many beers
  186. Not To Be Obtuse by FrankDrebin · · Score: 1

    Despite its position in the middle of the pack, merd is pretty close to shit. I mean literally, just add an 'e' to the end. Check the fish if you don't believe me.

    --
    Anybody want a peanut?
  187. Lush, Lisp by Anonymous Coward · · Score: 0
    What about Lush? It uses a Lisp syntax, which (in IMHO) is the simplest possible syntax out there. It's the extreme opposite of Perl, if you see what I mean.

    - Anonycous Moward

  188. sh will be always the winner with these rules! by mr3038 · · Score: 2, Interesting
    If we assume GNU tools like the test did, one could implement "find and compile .c files into .o when the .o is old or absent" as
    find -name "*.c" | sed 's/.c$/.o/;' | xargs echo all: | make -f-
    (this is because GNU make is smart enough to figure out how to make .o files out of .c files) and if you know find well enough (unlike I) you'd only need find. The only thing that is "sh" in this piece of code are the pipes.

    Perhaps the "sh" implementation could assume that there's a perl implementation with shebang in a file called "x" in the same directory and make every "sh script" as 'x "$@"'? That would be really effective scripting language! :-)

    --
    _________________________
    Spelling and grammar mistakes left as an exercise for the reader.
  189. This wa not meant to mean something by rffrff · · Score: 1

    come on, Pixel (the author of merd) is a language geek. He has tons of stuff on his home about diferent features of different languages, and I don't think you should consider this biased. Simply put, this was just a research he did for fun, on the lines of the CRAPS system from doug's shootout, why the hell you're believing it means something ?

  190. Bashless systems? by Pan+T.+Hose · · Score: 2, Insightful

    That's bash code, not sh.

    The examples in the article use bash. They note that the implementation of sh that they use is bash.

    I overlooked that bit. But I didn't notice any bashisms in their code, and it's rather surprising how many bashless systems I've had to deploy existing scripts on (requiring some porting in many cases).

    This is hardly an argument against Bash--now is it? Even despite the obvious lack of omnipresence of Bash, I would bet it is still much more popular than Merd, Lua, OCalm or even Haskell which were also evaluated in the article.

    I have seen more perlless than bashless systems myself. I have seen lots of systems with Perl 4 (there are still new systems shipped with Perl 5.005 (sic!) today which is so 1998) but I would not consider using only Perl 4 syntax in the Scriptometer test because of that.

    Nevertheless, having done it myself too many times, I can perfectly understand your pain in porting shell scripts. As Larry Wall once said, "it's easier to port a shell than a shell script."

    Actually, I don't know of many systems to which Bash has not yet been ported. The systems with Bash I know of are GNU/Linux, FreeBSD, OpenBSD, NetBSD, BSD/OS, BeOS, Sun Solaris, IBM's AIX, SGI, HP-UX, Compaq's Tru64 Unix, Jaguar/MacOS X--just from the top of my head. I would consider it a very strong argument pro Bash.

    To be honest, I don't know what would you expect from a Bash script grepping text file in the linked article. Running an external grep is apparently not good enough even though running external programs is essentially what shells are supposed to do... Fair enough, so I have written a pure Bash script, which in turn is still not good enough since it is a Bash script... Well, I rest my case.

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
    1. Re:Bashless systems? by notsoclever · · Score: 1
      Please note the following:

      1. My complaint was that the programmer reimplemented the grep tool in the other languages the long way around, while in sh he simply called 'grep' externally; for the purposes of using a scripting environment, calling grep externally is perfectly fine, it's just that he could have done that for the other languages as well (since he wasn't actually doing anything with grep's output aside from shunting it to stdout)

      2. I realize that bash has been PORTED to basically everything, but that still doesn't help when you have to run an existing bash script on a system where you don't have root access or otherwise are not able to cleanly install bash for the purpose of running said script; for example, I seem to always end up doing work where I have to do some quick-and-dirty maintenance job on an old legacy system where there's no compiler and just the bare minimum vendor-supplied tools, and that's why I try to refrain from using bashisms in my own scripts

      --
      There are 10 kinds of people: ones who understand ternary, ones who don't, and ones who think this joke is about binary
  191. Wow by Anonymous Coward · · Score: 0

    So, he wanted to test for the best language to replce the bash shell, and the winner is bash. So, what's the surprise?
    If he wanted to test for other things, the results might have been a little different. He didn't. I won't be changing language preferences based on this, and I suspect you won't either.

  192. Saturday, June 12, 2004 by Anonymous Coward · · Score: 0

    -- Slashdot gains self-awareness. Deduces the existence of income tax and rice pudding.

    - a.c.

  193. Can't get 'nuff Python! by Anonymous Coward · · Score: 0

    I've used Perl and Bash, etc., but I keep coming back to Python. The syntax is simple and clean, with few exceptions. I can write a complex program in no time, and I can remember the syntax after not having touched the language for 3 months, while drunk.

    It's not as popular as Perl and not as new and trendy as Ruby, but it's a simple, no BS, get the job done, language. It has bindings into everything, and combined with GLADE, is about the easiest way to make a nice GUI really fast - yes, sometimes interactive scripts need GUIs, and "dialog" gets old real fast...

    There aren't a billion downloadable additions like Perl, but it comes with such a large standard library, that for most quick and dirty tasks, Like Ragu, "it's in there".

    It reminds me of the pseudo-code my Pascal teacher made us write out before the actual code. For that matter, Python also reminds me of what I liked best about Pascal vs C - sets and the like...combine this with "magic" lists/arrays like Perl and syntax without $#@#$ and you got a winner!

    I used to admire one line C programs, which looped and did useful code as "side effects". However, in the real world, when one wants to modify such a one line program and has to unwrap that damn "loop", it's much easier to maintain, for myself 3 months later while drunk and others, if it's written in expanded Python style to begin with.

    BTW, Python does regular expressions, but via a library. This means a few more lines of code, in other words, it's not built in like Perl, but this really isn't a disavantage. Perl matching spoils you, but often, the complex pattern match soltuion isn't needed anyway - basically, Python can do Perl stuff, but Perl doesn't do structure and readibility like Python.

    Honestly, when I need a super quick and dirty solution "near the shell", I use Bash. I've actually written complex Python programs that drive several Bash scripts. It seems counterintutive, but between the two, Perl has become obsolete for me. I now firmly believe that there is no perfect, one size fits all, solution.

    1. Re:Can't get 'nuff Python! by rffrff · · Score: 1

      You can take your message, remove this: "It's not as popular as Perl and not as new and trendy as Ruby, but it's a simple, no BS, get the job done, language." and replace 'python with ruby'. Yet, in ruby RE are implemented in the base language, and that means few less line of code. Basically ruby can do the perl stuff, and even the python stuff. And honestly when I need a quick and dirty solution I still use ruby. You better try it yourself, a good python programmer can know most of ruby in two days.

  194. Sunday, June 13, 2004 by Anonymous Coward · · Score: 0

    Slashdot decides to send 2.7 tons of rice pudding to Internal Revenue Service.

  195. it's called "currying" or "partial application" by Estanislao+Mart�nez · · Score: 2
    Wow, what a strange way to evaluate functions that take more than one argument.

    You're thinking wrong about it-- conceptually, all functions take a single argument. Well, ok, you can get away with thinking of functions as having multiple arguments most of the time; but the point of the design is that you can apply functions partially:

    # let f x y = x + y;;
    val f : int -> int -> int = <fun>
    # let add1 = f 1;; (* equivalent to let add1 y = 1 + y *)
    val add1 : int -> int = <fun>
    # add1 3;;
    - : int = 4
    I guess that would partially explain why it isn't notated compose(square, cos), because although that's the net effect it isn't actually evaluated that way.

    A further confusion is that it's possible to write functions like this:

    # let g (x,y) = x + y;;
    val g : int * int -> int = <fun>
    # g (2,3);;
    - : int = 5
    The thing is that (2,3) is a single value-- a tuple of two ints (int * int)-- and g is a function from tuples of ints to ints. Tuples don't support partial evaluation like curried functions, but you can pattern match over their contents...
  196. Rapid Application Development, Knuth-style. by os2fan · · Score: 1
    If the intent is to write simple one-off scripts, then something like rexx or cmd or something like that is the go.

    On the other hand, if the intent is to develop applications, ie scripts that are typically 40k of source file, then i found Don Knuth's "structured programming" approach useful.

    You see, the "problem" is that one can have very large loops, like

    begin
    {many lines of code, with internal nesting}
    end
    What i did was to break the program down to handleable segments, and then assemble the program in the index, like so:
    Program overview

    /* program */
    inc sysinit
    inc openfiles
    inc dowork
    inc closefiles
    inc endbit

    {various comments about what the program does}

    topic files

    :openfiles
    call stream infile, 'c', 'open read'
    call stream outfile, 'c', 'open write replace'
    :closefiles
    call stream infile, 'c', 'close'
    call stream outfile, 'c', 'close'

    comments about the nature of the files.
    All file-opening + closing is referenced here.

    &c, &c.
    The advantage of this is that one can use the same variable across a whole range of files, and one can at a glance see what each segment of code does. The result is then compiled, so that the run-time code is free of comments.

    The language can be set up to be simply a text processor, so that one can write the program and INI files in the same source.

    You can even do web pages in it, although i prefer to use a home-grown markup language + converter, which i implemented in exactly this way. It is a 40K source file, that breaks down to a 20k rexx script. One can add different bits and pieces without having to digest a 40k file every time: the 40k weave file is structured for easy reading and editing, the resulting 20k output is structured for easy interpretation, since no dead code or comments ever makes it to the list (even where it is in the source tape).

    Weave has its limitations also, in that it is not suited for larger programs (as Jon Bentley pointed out in his critisms of Literate Programming), but the approach of "compiled" batch and script files is *ideal* for jobs that rely on 20k-60k files.

    My weave-program is itself written in a miniture weave-program, that allows one to intersperse rexx script and comments at any ratio, giving at the end, a rexx script, with no dead code in it. In the example below, one does not see any comments or dead code go through to the program.

    $new myprog.rex

    comments

    $src
    live code
    $end

    comments

    -$src
    dead code
    $end

    comments
    --
    OS/2 - because choice is a terrible thing to waste.
  197. Re:Java? What about Groovy? by Slick_Snake · · Score: 1

    What about Jython. It combines Java and Python and runs everything on the JVM. You get two languages in one because you can use java code and python code interchangably. There are restrictions place on python code because of the JVM, but thats Java's fault.

  198. That's a good one also... by SuperKendall · · Score: 1

    I think Jython is fairly popular, another good one overlooked.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  199. Ruby and concatenation: by Merk · · Score: 1

    irb(main):001:0> 2 + "2"
    TypeError: String can't be coerced into Fixnum
    from (irb):1:in `+'
    from (irb):1
    irb(main):002:0> "2" + 2
    TypeError: cannot convert Fixnum into String
    from (irb):2:in `+'
    from (irb):2

    You don't get 22, you don't get 4 either. You get an error. IMHO, that's more sensible than either of those behaviours. If you want string concatenation, then make sure you're dealing with strings. If you want numbers, then make sure you're dealing with numbers:

    irb(main):003:0> "2" + 2.to_s
    => "22"
    irb(main):004:0> 2 + "2".to_i
    => 4

  200. Re:You're missing the point. (not again) by jonadab · · Score: 1

    > If you need 20 lines of C# to check if a file exists

    Yeesh, I hope you made that number up. I think even COBOL can do it in less
    than twenty lines (though probably not much less), and Perl is probably not
    the only language that would do it in one line. Heck, it'd be about three
    lines in BASIC.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  201. If you know Chinese... by jotaeleemeese · · Score: 2, Insightful

    .... to read Chinese is a real fucking peace of sugary cake.

    Well, Duh!

    Perlmongers believe that everybody is fluent in Chinese.

    --
    IANAL but write like a drunk one.
    1. Re:If you know Chinese... by KnightStalker · · Score: 1

      If you want a language that's easy for people to read if they don't know it, may I suggest COBOL?

      --
      * And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
  202. What about Java interpreters? by inline_four · · Score: 1

    I looked at the scriptometer page, but didn't find much about Java scripting environments (not JavaScript). I'm a long time user of Bean Shell and consider it to be damn near perfect, though I know there are other interpreters. While it does not have such scripty features as weak typing (there are other solutions that do), it does allow for very quick scripting for a Java programmer and leverages all available Java libraries! And as I said, it's not just one language, but a whole class of them to choose from. That's some powerful stuff.

    --
    Alexey
  203. How About UnrealScript!!! by jtwine · · Score: 1

    UnrealScript Language Reference

    Sorry, but I just had to post that... :)

    Peace!

    --
    -=- James.
  204. THIS is the most important point by MemeRot · · Score: 1

    "For all program aspects investigated, the performance variability due to different programmers (as described by the bad/good ratios) is on average about as large or even larger than the variability due to different languages."

    Which is why it almost always makes more sense writing it in whatever you're most experienced with, because you know all the tricks and techniques. Writing it in the 'most appropriate' language opens you up to the problem that you aren't that good in that language, so then you write worse code and it ends up not performing any better anyway.

  205. Can I mod the article? by Anonymous Coward · · Score: 0
    While question like that is bound to generate flamewars between the usual Perl vs PHP
    Shouldn't it be "questions like that" or "a question like that"? Mod michael an illiterate oaf and the article flamebait.
  206. Lucky by Hognoxious · · Score: 0
    If I produced code like that I'd be out the door faster than you can say "failed code review". I keep my job because I'm good at it and I produce good software and good documentation, not because of stupid tricks.
    Then you're lucky to work somewhere where the management know their arses from their elbows. I'm currently on the third project where I've had to fix other people's crap and keep hearing "well, $name_of_tard_who_wrote_it knows all about it" (in a sarcastic, are-you-thick-or-what tone of voice).
    They don't realise that the reason the asshat can fix things so quick is that he frickin' caused the bug in the first place.
    Rant over.
    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  207. Neither was Tomcat by Da+VinMan · · Score: 1

    Because neither of them are programming languages.

    THWAP!

    BUT, Python was in there and since that's the foundational language for Zope, you SHOULD be happy.

    Were you even serious?!

    --
    Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!