comp.lang.ada
 help / color / mirror / Atom feed
From: Craig Carey <research@ijs.co.nz>
Subject: Computer Language Shootout
Date: Sat, 12 Jul 2003 00:05:52 +1200
Date: 2003-07-12T00:05:52+12:00	[thread overview]
Message-ID: <n54tgvgugor0ag2qsv97t9mf9sn9rr542i@4ax.com> (raw)




The Ada 95 entries have appeared that the new
 "Computer Language Shootout" website:

   http://dada.perl.it/shootout/gnat.html

Ada came first of 32 entries in this OO test:

   http://dada.perl.it/shootout/methcall.html

The Ada entry to read numbers from a file was slow.

The specs for the integer summing program are here: 
   http://www.bagley.org/~doug/shootout/bench/sumcol/

I argue here that the Gcc sumcol entry should be rejected. The C
programmers assumed that the file's lines were known, thus they
knew there was only 100 lines. Speed is not important with 100
lines files, but losing a patch of the competition due to buggy
code from C programmer might easily be more important.

That says programs "can assume" that each line has no more than 128
characters. Thus checking can be omitted and a crash is OK. A quite 
different wording was used in the specs, for lines containing 2
integers.

The specs author, Mr Bagley wrote that the programs "should" read
integers "line by line". The C programmers in fact were never told
whether to use the first integer or the 2nd (if there are two or
more). Also they were required to read an integer when there was
none, which suggests error checking but their C code has none.

I speak for comp.lang.ada and express a pessimism that a C
programmer could recognize that winning arguably bug-infested C
entries ought be disqualified.

-------

As for having 100% of all other entries except my Ada entry, crash due
to bugs, the heapsort test could have been developed into that. Other
programmers had confusion between the 1 that was the result of repeated
halving, with the 1 that was the first index of the array being sorted.

The tester in Italy rejected my regular expression program. It looks
like large programs are getting rejected. That submission used my
strings package. Also entries using Charles code wa rejected. The
tester does not reply readily.

Also the "wc" word count example was small, but that was rejected.
I guess that the tester could not linking in the Windows "_setmode"
and "_read" routines. GNAT has a routine but that is not a standard
like Microsoft C. ('Ada.Streams.Stream_IO.Read (File, Item, Last)' does
not allow File to be associated with the Standard Input so accurate
reading from the console is not a feature of Ada).





Craig Carey

--------------------------

How To Cross-Compile to a Linux target while compiling in a FreeBSD 5
host. Some new instructions are here:
http://www.ijs.co.nz/code/ada95-freebsd-to-linux-cross-compiler.txt






             reply	other threads:[~2003-07-11 12:05 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-11 12:05 Craig Carey [this message]
2003-07-11 12:18 ` Computer Language Shootout Preben Randhol
2003-07-11 12:50 ` Preben Randhol
2003-07-15 15:15   ` Matthew Heaney
2003-07-15 23:46     ` Robert I. Eachus
2003-07-16  4:37       ` Matthew Heaney
2003-07-16 18:01         ` Robert I. Eachus
2003-07-16 21:35           ` Matthew Heaney
2003-07-17  9:38           ` Preben Randhol
2003-07-17 16:29             ` Wesley Groleau
2003-07-17 17:36               ` Jean-Pierre Rosen
2003-07-17 20:56                 ` Preben Randhol
2003-07-17 21:47                 ` Robert A Duff
2003-07-18 18:04                   ` Robert Spooner
2003-07-18 18:48                     ` David C. Hoos
2003-07-19  9:51                     ` Preben Randhol
2003-07-21  7:21                     ` Jean-Pierre Rosen
2003-07-23 20:34                       ` Robert Spooner
2003-07-23 22:22                         ` Robert I. Eachus
2003-07-18 21:22                   ` Pascal Obry
2003-07-19 19:04                     ` Robert A Duff
2003-07-19 21:29                       ` Pascal Obry
2003-07-19 23:14                       ` Samuel Tardieu
2003-07-20  0:26                         ` Robert I. Eachus
2003-07-20  8:44                           ` Samuel Tardieu
2003-07-20 13:28                             ` Robert I. Eachus
2003-07-20 17:10                               ` Samuel Tardieu
2003-07-20 22:43                                 ` Robert I. Eachus
2003-07-21  8:31                                   ` Samuel Tardieu
2003-07-21 14:39                                     ` Hyman Rosen
2003-07-21 15:23                                       ` Samuel Tardieu
2003-07-21 15:46                                         ` Hyman Rosen
2003-07-21 16:09                                           ` tmoran
2003-07-21 17:52                                             ` Hyman Rosen
2003-07-21 16:14                                           ` Samuel Tardieu
2003-07-21 17:55                                             ` Hyman Rosen
2003-07-22  9:07                                           ` Preben Randhol
2003-07-22 13:21                                             ` Hyman Rosen
2003-07-23  9:28                                               ` Preben Randhol
2003-07-23  9:42                                                 ` Vinzent Hoefler
2003-07-23 10:35                                                   ` Preben Randhol
2003-07-23 22:19                                                     ` Randy Brukardt
2003-07-21  8:53                     ` Dmitry A. Kazakov
2003-07-21 11:00                       ` Jeffrey Creem
2003-07-21 13:39                         ` Dmitry A. Kazakov
2003-07-17 23:32                 ` Wesley Groleau
2003-07-18  7:36                 ` Dmitry A. Kazakov
2003-07-18  8:05                   ` Thomas Wolf
2003-07-18  9:11                   ` Jean-Pierre Rosen
2003-07-18 17:31                   ` Matthew Heaney
2003-07-17 20:53               ` Preben Randhol
2003-07-17 23:36                 ` Wesley Groleau
2003-07-16  7:11     ` Preben Randhol
2003-07-11 21:58 ` Matthew Heaney
2003-07-14 18:46   ` Matthew Heaney
2003-07-14 23:08   ` Matthew Heaney
2003-07-16  3:20     ` Isaac Gouy
2003-07-16  4:42       ` Matthew Heaney
2003-07-16 15:27         ` Isaac Gouy
  -- strict thread matches above, loose matches on Subject: below --
2001-11-03  4:15 Using "with function" Mark Lundquist
2001-11-03  5:11 ` Computer Language Shootout Eric Merritt
2001-11-03  6:50   ` tmoran
2001-11-03  7:15     ` Al Christians
2001-11-03  8:52   ` martin.m.dowie
2001-11-03 14:04     ` Ted Dennison
2001-11-03 14:24       ` martin.m.dowie
2001-11-03 14:49       ` Larry Kilgallen
2001-11-03 23:03         ` research@ijs.co.nz
2001-11-04  6:39           ` tmoran
2001-11-04 13:44             ` Larry Kilgallen
2001-11-05  0:59               ` Adrian Hoe
2001-11-05  8:04               ` David Brown
2001-11-06  6:36             ` AG
2001-11-06  8:05               ` tmoran
2001-11-07  8:58                 ` AG
2001-11-06 12:07               ` Larry Kilgallen
2001-11-07  6:19               ` Richard Riehle
2001-11-04 15:59     ` Preben Randhol
2001-11-04 20:04       ` martin.m.dowie
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox