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

34 of 673 comments (clear)

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

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

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

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

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

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

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

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

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

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

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

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

  17. 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
  18. 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
  19. 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
  20. 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
  21. 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.

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

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

  24. *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.
  25. 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.

  26. 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.
  27. 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. :\

  28. 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.
  29. 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/

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

  31. 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
  32. 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.
  33. 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