Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Searching for the Best Scripting Language

michael posted more than 10 years ago | from the less-filling!-tastes-great! dept.

673

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

cancel ×

673 comments

GNAA Reports Third Quater Profit of $200 million (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9410735)

GNAA (Gay Nigger Association of America) Reports Third Quater Profit of $200 Million
Reports Third Quater Profit of $200 Million,
Revnues up 19%,
Profits Before Investment Gains up 43 percent

By GNAA Business Systems Development director, rkz [google.com]
East Midlands, United Kingdom -- Today, GNAA announced financial results for its fiscal 2004 first quarter ending April 1, 2004
For the quarter, the Company posted a net profit of $200 million, or $.55 per diluted share. These results compare to a net profit of $203 million, or $.60 per diluted share, achieved in the year-ago quarter. Revenues for the quarter were $1.825 billion, up 17 percent from the year-ago quarter, and gross margins were 29.8 percent, up from 27.4 percent in the year-ago quarter.
International sales accounted for 46 percent of the quarter's revenues.

"Strong earnings combined with superb asset management resulted in positive cash flows from operations of $234 million," said timecop [www.ne.jp] , GNAA's CIO (Chief Information Officer). "GNAA finished the quarter with $3.8 billion in cash and short-term investments."

"We're pleased to report our eleventh consecutive profitable quarter, with net profits up 43 percent," said Penisbird, GNAA's CEO (Chief Operation Officer). "We had a strong quarter for our pro products, especially Gay Nigger erotic literature."

About GNAA:
GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the first organization which
gathers GAY NIGGERS from all over America and abroad for one common goal - being GAY NIGGERS.

Are you GAY [klerck.org] ?
Are you a NIGGER [mugshots.org] ?
Are you a GAY NIGGER [gay-sex-access.com] ?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!
Join GNAA (GAY NIGGER ASSOCIATION OF AMERICA) today, and enjoy all the benefits of being a full-time GNAA member.
GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the fastest-growing GAY NIGGER community with THOUSANDS of members all over United States of America. You, too, can be a part of GNAA if you join today!

Why not? It's quick and easy - only 3 simple steps!

First, you have to obtain a copy of GAY NIGGERS FROM OUTER SPACE THE MOVIE [imdb.com] and watch it. (You can download the movie (~280mb) using BitTorrent, by clicking here [idge.net] .

Second, you need to succeed in posting a GNAA "first post" on slashdot.org [slashdot.org] , a popular "news for trolls" website

Third, you need to join the official GNAA irc channel #GNAA on EFNet, and apply for membership.
Talk to one of the ops or any of the other members in the channel to sign up today!

If you are having trouble locating #GNAA, the official GAY NIGGER ASSOCIATION OF AMERICA irc channel, you might be on a wrong irc network. The correct network is EFNet, and you can connect to irc.secsup.org or irc.isprime.com as one of the EFNet servers.
If you do not have an IRC client handy, you are free to use the GNAA Java IRC client by clicking here [nero-online.org] .


If you have mod points and would like to support GNAA, please moderate this post up.

________________________________________________
| ______________________________________._a,____ |
| _______a_._______a_______aj#0s_____aWY!400.___ |
| __ad#7!!*P____a.d#0a____#!-_#0i___.#!__W#0#___ |
| _j#'_.00#,___4#dP_"#,__j#,__0#Wi___*00P!_"#L,_ |
| _"#ga#9!01___"#01__40,_"4Lj#!_4#g_________"01_ |
| ________"#,___*@`__-N#____`___-!^_____________ |
| _________#1__________?________________________ |
| _________j1___________________________________ |
| ____a,___jk_GAY_NIGGER_ASSOCIATION_OF_AMERICA_ |
| ____!4yaa#l___________________________________ |
| ______-"!^____________________________________ |
` _______________________________________________'

Slashdot Code Auto Answer (5, Funny)

Anonymous Coward | more than 10 years ago | (#9410740)

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

Thank you for visiting Slashdot.

The eternal quest... (5, Insightful)

Anonymous Coward | more than 10 years ago | (#9410746)

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

Re:The eternal quest... (4, Insightful)

LBArrettAnderson (655246) | more than 10 years ago | (#9410762)

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.

Re:The eternal quest... (-1, Flamebait)

TastyWords (640141) | more than 10 years ago | (#9410990)

Welcome to v1.0 of the new scripting language known as SpellCheck.

"difinitive" should be "definitive"

By the same vendor, welcome to a preliminary alpha field test of a semantic analyzyer of "bozo posts".

A definitive answer has nothing to do with an objective question.
Perhaps you meant "an objective answer has nothing to do with a subjective question"?

In the future, please don't be in such a hurry to see your postings appear on the first screen; use the [preview] button or the free versions of either pieces of software.

P.S.
Thank-you for playing and come back soon.

Re:The eternal quest... (0)

Anonymous Coward | more than 10 years ago | (#9411004)

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

flamewar volley 1 (4, Funny)

nocomment (239368) | more than 10 years ago | (#9410749)

where's php?
print "hello world";

Re:flamewar volley 1 (4, Insightful)

kfg (145172) | more than 10 years ago | (#9411008)

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

vbscript (1)

badriram (699489) | more than 10 years ago | (#9410761)

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.

its no surprise (0)

Anonymous Coward | more than 10 years ago | (#9410763)

everyone loves perl.

Biased (4, Insightful)

javabsp (591265) | more than 10 years ago | (#9410777)

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.

Re:Biased (5, Informative)

jelle (14827) | more than 10 years ago | (#9410865)

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

Re:Biased (1)

badriram (699489) | more than 10 years ago | (#9410868)

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.

Re:Biased (1)

EvanED (569694) | more than 10 years ago | (#9410903)

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

Re:Biased (1)

EvanED (569694) | more than 10 years ago | (#9410980)

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

Re:Biased (1)

Bill_the_Engineer (772575) | more than 10 years ago | (#9410987)

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

Re:Biased (2, Insightful)

p2sam (139950) | more than 10 years ago | (#9410925)

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.

Re:Biased (0)

Anonymous Coward | more than 10 years ago | (#9410949)

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

Re:Biased (2, Funny)

p2sam (139950) | more than 10 years ago | (#9410985)

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" );
}
}

There's a deeper problem (3, Insightful)

Estanislao Martnez (203477) | more than 10 years ago | (#9410998)

Measuring program size in bytes is stupid. Lines of code, though still rife with problems, is a much better measure.

Nobody ever looks at Io or REXX... (5, Informative)

Dimwit (36756) | more than 10 years ago | (#9410778)

Two languages missing are:

Io [iolanguage.com] , 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 [sf.net] (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 [sf.net] , 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.)

Re:Nobody ever looks at Io or REXX... (1)

BlueCup (753410) | more than 10 years ago | (#9410815)

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

Where is the first post? (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#9410781)

I can't wait to see how clever it is.

good but recognized? (3, Interesting)

2057 (600541) | more than 10 years ago | (#9410787)

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

I put Ruby in my resume (2, Informative)

Estanislao Martnez (203477) | more than 10 years ago | (#9410982)

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.

Re:good but recognized? (5, Interesting)

archen (447353) | more than 10 years ago | (#9410993)

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.

What about readability? (5, Insightful)

BlueCup (753410) | more than 10 years ago | (#9410788)

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.

Re:What about readability? (0)

iserlohn (49556) | more than 10 years ago | (#9410802)

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

Its never the programming language.... (1)

deadmongrel (621467) | more than 10 years ago | (#9410854)

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.

You're right... (2, Funny)

rsilvergun (571051) | more than 10 years ago | (#9410922)

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

Re:What about readability? (1)

outZider (165286) | more than 10 years ago | (#9410861)

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.

Re:What about readability? (5, Insightful)

DAldredge (2353) | more than 10 years ago | (#9410892)

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.

Geek wants Goth (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#9410792)

I'm trying to get out a rut. I'm a part-time junior sysadmin and my life is an empty, friendless mess. I'd like to try out the Goth scene and try to make a friend. Any of you guys have tips for a Goth noob? Can you recommend some websites or chat rooms friendly to Goth noobies?

TIA,

Michael "The Black Hole" Sims

Duh (5, Insightful)

Beek (10414) | more than 10 years ago | (#9410793)

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?

no PHP? (1)

Anonymous Coward | more than 10 years ago | (#9410794)

no PHP???

What about batch files?! (1, Funny)

Anonymous Coward | more than 10 years ago | (#9410797)

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

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

"shebang aware" (0, Offtopic)

PhrostyMcByte (589271) | more than 10 years ago | (#9410805)

I guess we won't be seeing any of this [williamhung.net] then?

VB (0)

Anonymous Coward | more than 10 years ago | (#9410808)

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.

Seriously (0)

Anonymous Coward | more than 10 years ago | (#9410845)

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

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

Re:Seriously (1)

vijaya_chandra (618284) | more than 10 years ago | (#9410976)

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

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

A kindness (1, Insightful)

dedazo (737510) | more than 10 years ago | (#9410809)

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.

What's the best scripting language? (1)

Nimey (114278) | more than 10 years ago | (#9410814)

Mine, of course.

VBScript definitely (1)

vijaya_chandra (618284) | more than 10 years ago | (#9410826)

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)

VBscript seems great... (1)

rsilvergun (571051) | more than 10 years ago | (#9410946)

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?

Re:VBscript seems great... (1)

stevesliva (648202) | more than 10 years ago | (#9411005)

you'd wanna use Lisp as your scripting language
Perish the thought.

But that reminds me of the Scheme Shell Acknowledgements [scsh.net] 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.

BASH! (0)

Anonymous Coward | more than 10 years ago | (#9410832)

bash pwns j00

I just had my first encounder with a C# program (1)

the_2nd_coming (444906) | more than 10 years ago | (#9410835)

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

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

Re:I just had my first encounder with a C# program (1)

Frnknstn (663642) | more than 10 years ago | (#9410891)

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

Re:I just had my first encounder with a C# program (1)

the_2nd_coming (444906) | more than 10 years ago | (#9410960)

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

fuck that asshole RUSTY FOSTER (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9410836)

rusty foster is a filthy money-grubbing kike asshole. fuck him and fuck kuro5hin!

it depends upon the application (2, Insightful)

humankind (704050) | more than 10 years ago | (#9410837)

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

Discrepancy... (2, Interesting)

Polo (30659) | more than 10 years ago | (#9410838)

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 [chalmers.se] is the proclamation.

It's not OCaml.

C++ (2, Funny)

daserver (524964) | more than 10 years ago | (#9410839)

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

Scripting with Java (2, Informative)

los furtive (232491) | more than 10 years ago | (#9410840)

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

Re:Scripting with Java (2, Informative)

Teckla (630646) | more than 10 years ago | (#9410883)

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.

Re:Scripting with Java (0)

Anonymous Coward | more than 10 years ago | (#9410962)

Yes, the correct technology to use would have been BeanShell. [beanshell.org]

PHP (4, Insightful)

mfh (56) | more than 10 years ago | (#9410841)

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.

Sounds like a job for... (0)

Anonymous Coward | more than 10 years ago | (#9410843)

VB Script [microsoft.com]

From an ocaml convert: (4, Informative)

rsidd (6328) | more than 10 years ago | (#9410846)

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 [bagley.org] , 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.

Re:From an ocaml convert: (1)

stevesliva (648202) | more than 10 years ago | (#9410951)

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

Re:From an ocaml convert: (3, Interesting)

pikine (771084) | more than 10 years ago | (#9410959)

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 [kyoto-u.ac.jp] before PHP does! Haha.

Re:From an ocaml convert: (5, Interesting)

gauchopuro (613862) | more than 10 years ago | (#9410972)

I suggest you also take a look at Haskell [haskell.org] , 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.

The future of scripting (0)

Anonymous Coward | more than 10 years ago | (#9410850)

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.

My dear lord, (5, Insightful)

dotz (683519) | more than 10 years ago | (#9410855)

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.

Ruby is first post. (0)

Anonymous Coward | more than 10 years ago | (#9410859)

Exactly that and more.

hmmm (0)

Anonymous Coward | more than 10 years ago | (#9410860)

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.

Being small is overrated (4, Insightful)

smallpaul (65919) | more than 10 years ago | (#9410863)

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

Re:Being small is overrated (0)

Anonymous Coward | more than 10 years ago | (#9410981)

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.

Can't wait for Perl6! (0)

Anonymous Coward | more than 10 years ago | (#9410866)

n/t

whee! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#9410872)

FP > *

Personally I prefer Perl (0)

Anonymous Coward | more than 10 years ago | (#9410873)

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.

knowing the language (1)

kaisyain (15013) | more than 10 years ago | (#9410876)

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.

They forgot PHP... (0)

Anonymous Coward | more than 10 years ago | (#9410885)

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.

no brainer (0)

Anonymous Coward | more than 10 years ago | (#9410886)

perl won .. well duh

MS Conspiracy against Sun/Java (2, Insightful)

vijaya_chandra (618284) | more than 10 years ago | (#9410887)

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)

53 (0)

Anonymous Coward | more than 10 years ago | (#9411003)

public class A{public static void main(String[] v){}}

Re:MS Conspiracy against Sun/Java (0)

Anonymous Coward | more than 10 years ago | (#9411015)

public class A{public static void main(String[] a){}}

That'll save you 3 more - how exciting!

fr1st p0st (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#9410890)

fr1st p0st!

Perl, obiously. (0)

Anonymous Coward | more than 10 years ago | (#9410896)

Note the extension on comments.pl ;)

But.. (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#9410900)

Can they still beat my honda hybrid ?

seems like a crock (1)

wooby (786765) | more than 10 years ago | (#9410901)

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.

Huh? (0)

Anonymous Coward | more than 10 years ago | (#9410905)

Since when were script languages all supposed to be cryptic languages for shell scripting?

Hello World (1)

hypermike (680396) | more than 10 years ago | (#9410906)

Personally I prefer Python due to its simplicity.

'Hello World'

I used to think Python was great for _everything_ (2, Informative)

krumms (613921) | more than 10 years ago | (#9410909)

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.

Who cares (0)

Anonymous Coward | more than 10 years ago | (#9410911)

Who cares ... it's all bits and bytes in the end. A real study would measure relative maintenace.

Python (1)

Frnknstn (663642) | more than 10 years ago | (#9410916)

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.

Yeah about that... (0)

Anonymous Coward | more than 10 years ago | (#9410917)

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

pulling a Tcl boner (4, Informative)

Anonymous Coward | more than 10 years ago | (#9410919)

His Tcl example is not written fairly. The dude should know that that Tcl supports getopts:

package require GetOpts 1.1

No PHP? (3, Informative)

Anonymous Coward | more than 10 years ago | (#9410920)

I don't see PHP listed. It's possition on the list is arguable, but it certainly belongs there.

yattayattayatta (0)

Anonymous Coward | more than 10 years ago | (#9410923)

Whole thing seems sorta silly to me.

Merd? (1)

darkat (697582) | more than 10 years ago | (#9410929)

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

Best Script (0)

Anonymous Coward | more than 10 years ago | (#9410931)


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

Java is completely unusable for scripting... (1)

Dr. Bent (533421) | more than 10 years ago | (#9410947)

...but Groovy [codehaus.org] 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 [jcp.org] for it.

Why I like perl (5, Insightful)

Anonymous Coward | more than 10 years ago | (#9410952)

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.

Wow that's one wacky grading system. (2, Insightful)

Retric (704075) | more than 10 years ago | (#9410958)

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.

Read essays by Paul Graham (4, Informative)

linuxbaby (124641) | more than 10 years ago | (#9410978)

Anyone interested in the benefits of different programming languages should read some of the great well-thought-out essays by Paul Graham [paulgraham.com] :

These guys aren't fluent in Java... (2, Insightful)

arch_helmet (682800) | more than 10 years ago | (#9410986)

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

they left out applescript (0)

Anonymous Coward | more than 10 years ago | (#9410999)

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.

It's not the language it's the library. (4, Insightful)

killjoe (766577) | more than 10 years ago | (#9411002)

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.

What? where? (0)

Anonymous Coward | more than 10 years ago | (#9411012)

Where was vbscript? and where was the proclomation that OCamel was best. I must be missing something.
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...