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."
Hello, I am the Slashdot Source Code. The answer is Perl. This question is now answered.
Thank you for visiting Slashdot.
where's php?
print "hello world";
/* oops I accidentally made a comment, sorry */
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.
C++ was also praised: "C++ is a fine programming tool for many applications."
...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/
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" );
}
}
Hmmm.
Good Point.
We'll incorporate it into our next build.
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.
As the old saying goes:
"Do you have job security?"
"Yes? Do you have code to prove it?"
Begun the great scripting languarge holy war has.
This guy is way out there
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.
I never really thought about it before now, but damn, l337-speak can look like exceptionally grotty perl code when it wants to...
So perl regexps are cryptic and hard to read even if you know regexps already. Thank you.
Are you adequate?
Which is when they realize how good of a programmer you are, and hire you back for twice your previous salary.
Best Slashdot comment ever
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.
Fixing all that (except for the Unicode bit) is left as an exercise for the reader.
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?
Sincerely,
Pan Tarhei Hosé, PhD.
"Homo sum et cogito ergo odi profanum vulgus et libido."
Youdon'treallyexpectsomeoneactuallyreadingthatpost ,doyou?
Because no one writes comments you insensitive clod!