[Haskell-cafe] Shootout rankings

Sebastian Sylvan sebastian.sylvan at gmail.com
Sun Jan 15 18:48:53 EST 2006


On 1/16/06, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
> sebastian.sylvan:
> > On 1/15/06, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
> > > sebastian.sylvan:
> > > > On 1/15/06, Isaac Gouy <igouy at yahoo.com> wrote:
> > > > > > Haskell now ranked 2nd overall, only a point or so
> > > > > > behind C:
> > > > >
> > > > > It was always obvious that the "Write the program
> > > > > as-if lines of code were not being measured" clause
> > > > > relied too heavily on contributors willingness to
> > > > > co-operate.
> > > > >
> > > > > http://shootout.alioth.debian.org/gp4/faq.php#implementlist
> > > > >
> > > > > Maybe we finally have enough motivation to move to
> > > > > some other measurement of program volume :-)
> > > > >
> > > >
> > > > I was just thinking about that. Some code is very obfuscated due to
> > >
> > > No Sebastian, this is very obfuscated: http://www.cse.unsw.edu.au/~dons/pretty.html
> > >
> > > ;)
> > >
> > > I think saying obfuscated is very unfair. We took advantage of some strengths
> > > of Haskell, such as type inference, to reduce the number of lines. No
> > > worse than, say, the SML MLton entries do -- and why not leverage this advantage,
> > > since our language can do it?
> > >
> > > In fact, we have 1 line entries for some of the problems that are just
> > > not competitive, though very instructive. It would be nice to be able to
> > > publish those.
> >
> > I wasn't talking specifically about Haskell, but all languages (don't
> > like browsing around other languages only to see highly compact and
> > ugly solutions, which really don't give me a good taste for the
> > langugae).
> > Still, some Haskell implementations are clearly obfuscated to save
> > lines in certain circumstances (like: "thread im om = do (x::Int) <-
> > takeMVar im; putMVar om $! x+1; thread im om" int he cheap
> > concurrencybenchmark, most people don't write Haskell code with
> > semi-colons, and when they do they usually sequence them vertically,
> > not horizontally).
>
> Though often the case, using ; is not without precedent. A quick grep in the
> ghc source reveals many

Yeah sure, but it's quite obvious that in this case the source has
been intentionally obfuscated to reduce the number of lines. Perhaps
the use of several imports on one line separated by semi-colons is a
clearar example of that, though.

/S

--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862


More information about the Haskell-Cafe mailing list