Searching for the Best Scripting Language 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."
Slashdot Code Auto Answer (Score:5, Funny)
Thank you for visiting Slashdot.
flamewar volley 1 (Score:5, Funny)
print "hello world";
What about batch files?! (Score:1, Funny)
Only partially joking, though, as batch files using 4DOS/4NT [jpsoft.com] are really quite powerful.
C++ (Score:3, Funny)
You're right... (Score:3, Funny)
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:Biased (Score:3, Funny)
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" );
}
}
Re:The eternal quest... (Score:3, Funny)
Good Point.
We'll incorporate it into our next build.
Re:Biased (Score:5, Funny)
Re:Biased (Score:2, Funny)
"Do you have job security?"
"Yes? Do you have code to prove it?"
Now (Score:2, Funny)
Re:I used to think Python was great for _everythin (Score:3, Funny)
Re:/Nick 1337h4x0r (Score:3, Funny)
Re:You're right... (Score:3, Funny)
Ah. (Score:3, Funny)
Re:Biased (Score:3, Funny)
Which is when they realize how good of a programmer you are, and hire you back for twice your previous salary.
Re:What about readability? (Score:3, Funny)
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.
Re:What about readability? (Score:1, Funny)
Re:flamewar volley 1 (Score:3, Funny)
I'm playing with a script now, to see the most obnoxious way to do it.
Thanks for the idea!
Pure Shell Grep (Score:3, Funny)
OK, here it is:
#!/bin/sh
0 875&cid=9411049
:; do read a || exit; [ "${a/$1/}" == "$a" ] || echo $a; done
# 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=11
#
# 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
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?
Re:Practical? Bah, humbug. (Pythonic bias warning. (Score:2, Funny)
Re:What about readability? (Score:1, Funny)