Both Python and Java have gained on Perl since January 2000. I might consider switching to another language if this trend persists.
Please do - it's always important to let others decide what's good for you. Here's another table that might help you pick a better language than Perl:
Jan 2000 Jan 2001 Jan 2002 Jan 2003 Jan 20
+04
Ruby 1720 (100) 2670 (155) 5440 (316) 16500 (959) 20900 (1
+215)
PHP 15400 (100) 20100 (130) 37400 (242) 66200 (429) 130000 (
+844)
Python 3850 (100) 6870 (178) 8760 (227) 11400 (296) 25400 (
+659)
.NET 64600 (100) 86200 (133) 107000 (165) 142000 (219) 230000 (
+356)
Java 33300 (100) 37500 (112) 45100 (135) 56700 (170) 103000 (
+309)
Perl 10700 (100) 13700 (128) 14900 (139) 18500 (172) 31700 (
+296)
C++ 17500 (100) 19200 (109) 22200 (126) 30700 (175) 35700 (
+204)
UNIX 20500 (100) 23500 (114) 24500 (119) 29000 (141) 36800 (
+179)
C 120000 (100) 137000 (114) 153000 (127) 172000 (143) 187000 (
+155)
Lisp 2330 (100) 2450 (105) 2420 (103) 2980 (127) 3600 (
+154)
shell 8510 (100) 8580 (100) 8870 (104) 10500 (123) 12300 (
+144)
BASIC 78200 (100) 84900 (108) 93600 (119) 101000 (129) 111000 (
+141)
Forth 13500 (100) 14700 (108) 14900 (110) 16400 (121) 18100 (
+134)
Haskell 713 (100) 634 ( 88) 787 (110) 937 (131) 917 (
+128)
Eiffel 529 (100) 1700 (321) 1680 (317) 1740 (328) 656 (
+124)
Ada 4680 (100) 4660 ( 99) 4640 ( 99) 5430 (116) 5000 (
+106)
Scheme 19900 (100) 22500 (113) 22400 (112) 22200 (111) 20200 (
+101)
Cobol 2530 (100) 2270 ( 89) 2340 ( 92) 2310 ( 91) 2420 (
+ 95)
Pascal 5480 (100) 4260 ( 77) 4590 ( 83) 5220 ( 95) 5140 (
+ 93)
FORTRAN 5080 (100) 3770 ( 74) 4130 ( 81) 3830 ( 75) 3740 (
+ 73)
The code that generated this:
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple qw /$ua get getprint/;
my @years = (2000 .. 2004);
my @months = qw /January/;
my @langs = qw /Perl Python Java C C++ Ruby PHP Cobol BASIC FORTRAN F
+orth
UNIX Lisp Scheme Haskell shell .NET Pascal Ada Eiffel
+/;
my %info;
$ua -> proxy (http => "http://XXXX:XXXX/");
$ua -> agent ("Mozilla/8.0");
foreach my $lang (@langs) {
my $l = $lang;
$l =~ s/(\W)/sprintf "%%%02x" => ord $1/eg;
foreach my $year (@years) {
foreach my $month (@months) {
sleep 2;
my $query = lc "q=$l+programming+%22$month+$year%22";
my $url = "http://www.google.nl/search?$query&hl=en";
my $text = get ($url) or do {
warn "Failed to get $lang/$month/$year\n";
next;
};
print STDERR ".";
unless ($text =~ m!Results \s+ <b>\d+</b>\s*-\s*<b>\d+</b>
+ \s+
of \s+ about \s+ <b>([\d,]+)</b>!x) {
warn "Failed to parse $lang/$month/$year\n";
next;
}
my $count = $1;
$count =~ s/,//g;
$info {$lang} {$year} {$month} [0] = $count;
$info {$lang} {$year} {$month} [1] =
$info {$lang} {$years [0]} {$months [0]} [0] ?
100 * $info {$lang} {$year} {$month} [0] /
$info {$lang} {$years [0]} {$months [0]} [0] : -
+1;
}
}
print STDERR "\n";
}
print " " x 9;
foreach my $year (@years) {
foreach my $month (@months) {
printf " %3s %4d " => substr ($month, 0, 3), $year
}
}
print "\n";
foreach my $lang (sort {$info {$b} {$years [-1]} {$months [-1]} [1] <=
+>
$info {$a} {$years [-1]} {$months [-1]} [1]} @
+langs) {
printf "%7s ", $lang;
foreach my $year (@years) {
my $w = $year >= 2004 ? 4 : 3;
foreach my $month (@months) {
printf "%7d (%${w}d)" => @{$info {$lang} {$year} {$month}}
+;
}
}
print "\n";
}
__END__
Abigail
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|