Click to See Complete Forum and Search --> : Pepsi Challenge!


jemfinch
10-19-2001, 02:11 AM
Anybody have an idea for some kind of "Pepsi challenge" where we can compare
programming languages at some
not-too-simple-but-still-decently-easy-to-implement piece of software? I'd like
to see/compare implementations in several languages, and I'm bored, and wouldn't
mind whipping up what I can in the languages I know, too.

Jeremy

Gnu/Vince
10-19-2001, 10:57 AM
How about the great computer language shootout? http://www.bagley.org/~doug/shootout/

But of course, we could do our own. I could probably provide programs in Ruby with the help of the local Ruby guru, klamath.

And for the record I try to drink pepsi less often.

[ 19 October 2001: Message edited by: Gnu/Vince ]

sans-hubris
10-19-2001, 11:40 AM
C/C++ (equally) and pepsi.

That's a cool link GNU/Vince. I think that he's being foolish by not using STL for C++ only because you can't find a compiler out there (unless it's really old) that doesn't have support for it. True, it's not a part of the C++ spec sheet, but it's an open standard set up by SGI and is de facto.

jemfinch
10-19-2001, 12:37 PM
Rather than just a simple benchmark comparison, like Doug Bagley's site, I'd
like to see little complete programs written in each language. I just don't
have any ideas for those programs :)

Jeremy

Gnu/Vince
10-19-2001, 02:03 PM
Originally posted by jemfinch:
<STRONG>Rather than just a simple benchmark comparison, like Doug Bagley's site, I'd
like to see little complete programs written in each language. I just don't
have any ideas for those programs :)

Jeremy</STRONG>

OK. Hum... give me a couple of time and I can probably come with ideas (hopefully)

Gnu/Vince
10-19-2001, 02:03 PM
And just for fun: THIS IS MY 2000th POST!!!!

kmj
10-19-2001, 02:37 PM
you can do conway's game of life...

Gnu/Vince
10-19-2001, 03:02 PM
Rewrite "Hunt the wumpus" in as many languages as possible.

jemfinch
10-20-2001, 01:14 AM
If I can think of a good testing framework, I think it would be fun to have a
little "paper-rock-scissors" contest, each person writing a program that plays
paper-rock-scissors against another program. I think that could be fun :) I'd
be up for it if anyone else would (we can start a new thread if it takes off.)`

Jeremy

Gnu/Vince
10-20-2001, 12:18 PM
How would they be able to play against each other Jeremy?

bdg1983
10-20-2001, 12:45 PM
Originally posted by kmj:
<STRONG>you can do conway's game of life...</STRONG>

That is so much fun... I once implemented it on a TI-83 graphing calculator. :D 90% of the time I spent on it was dedicated to making it faster... man was it slow to start with. ;) (I did it in basic, I didn't particularly want to learn TI-83 assembly... :p)

bdg1983
10-20-2001, 12:47 PM
Originally posted by Gnu/Vince:
<STRONG>How would they be able to play against each other Jeremy?</STRONG>

You could just run the two programs at the same time and see which wins. Or you could do some threadage to have the two programs started by the same parent and be fed results, etc.

bdg1983
10-20-2001, 12:49 PM
it'd be interesting to see if you could write one that wins reasonably consistantly against one that just chooses randomly... I don't see how you would, though.

Gnu/Vince
10-20-2001, 02:36 PM
I still think "Hunt the wumpus" would be cool. A thing about the program we decide to use though, we should all have the same algorithm, so before we even start programming, we have to agree how we will solve the problem.

jemfinch
10-20-2001, 11:09 PM
Originally posted by Gnu/Vince:
I still think "Hunt the wumpus" would be cool. A thing about the program we decide to use though, we should all have the same algorithm, so before we even start programming, we have to agree how we will solve the problem.

I'm more interested in seeing which algorithms and methods the language
inspires/facilitates than seeing Yet Another Benchmark of the same thing in
every language.

Jeremy

Dru Lee Parsec
10-22-2001, 11:26 AM
I still think "Hunt the wumpus" would be cool

Then don't forget the "One Hour Wumpus" code at my web site: www.brouelette.com (http://www.brouelette.com)


Each language has different things that it's good at. For instance, comparing C++ and Java in a program that does client server communication or builds a GUI would show Java as the better language. But if the test code was a printer driver then C would certainly be the winner. If it was a raw speed problem (like a complex encryption-decryption scheme then assembler may win). If the problem required searching and manipulating text strings then Perl would probably win.

So I don't think you could come up with a single problem that shows the "best" language (and that's probably not what we're trying to accomplish here).

However, www.codeexamples.org (http://www.codeexamples.org) already has some good comparisons of languages. We could probably start there.

klamath
10-22-2001, 03:13 PM
You could design a checkers playing AI, although that is probably too complex.

Maybe that game where you need to arrange 4 blocks in a row, and new blocks are added from the top -- I forget the name, but it's kinda similar to tic-tac-toe, only more complex. Sorry, I know that sounds totally incoherent.

I'd be interested in this.