MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

report from the 1992 Mathematica Conference

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: report from the 1992 Mathematica Conference
  • From: gaylord at ux1.cso.uiuc.edu
  • Date: Mon, 1 Jun 1992 08:00:35 -0500

i just got back from the 1992 Mathematica conference in Boston and will try
to find time this week to post about some of the stuff that was shown and
discussed at the conference (forthcoming books on Mathematica [there's a
bunch], future features in the program [really neat things] , etc.).

but first, the all-important annual programming competition.

the problem was pretty easy so rather than state it, i'll just post the two
solutions judged as best and let you figure out the question.

--------------------
DO NOT READ FURTHER IF YOU DO NOT WANT TO SEE THE SOLUTION
--------------------

Mysteryfunction[lis_List] := Union[Rest[FoldList[Max, 1, lis]]]

Mysterypattern[lis_List] := lis//.{a___,x_, y_,b___}/;y<=x -> {a,x,b}

==================================================

before you make your own judgement as to which of these entries deserved to
win the competition for elegance in a program, why don't you guess which
one actually did win? 

but wait... before you guess, you might want to remember that the solution
for runEncode that won the competition last year (or the year before, I
forget which) was

runEncode[x_List] :=
 Map[({#, 1})&,x]//.{u___,{v_,r_},{v_,s_},w___}->{u,{v,r+s},w}


okay now you can guess. 

right. Mysterypattern won the contest. 


do you detect an (ugly) 'pattern' emerging in the judging of the contest?


well at least the functional people who got robbed in the elegeance
competition won the efficiency competion. its obvious that the functional
program totally blows away the pattern matching program in speed.



z = Table[Random[Integer,{1,100}], {100}];
{Timing[Mysteryfunction[z];], Timing[Mysterypattern[z];]}
{{0.05 Second, Null}, {0.483333 Second, Null}}


z = Table[Random[Integer,{1,100}], {200}];
{Timing[Mysteryfunction[z];], Timing[Mysterypattern[z];]}
{{0.0833333 Second, Null}, {3.9 Second, Null}}


z = Table[Random[Integer,{1,100}], {500}];
{Timing[Mysteryfunction[z];], Timing[Mysterypattern[z];]}
{{0.25 Second, Null}, {17.15 Second, Null}}


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

suggestions for next year (anyone at WRI listening ?):
 
divide the contest into programming style categories such as best
functional program, best pattern-matching program, best rule-based program.

that way, we won't be subject to the stylistic biases of the judge(s)[also
get some judges whose aesthetic sensibilities extend beyond the greetings
inside Hallmark cards and paintings of elvis on velvet (just kidding)]. 

don't make efficiency a separate category; efficiency should be one of the
factors considered in determining elegance. 

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

that's it from the meeting; got to go pick up a new puppy. more reports on
the meeting will follow as time permits.


p.s. 

i got a lot of e-mail back on my comment about the 'little' Maple language
which i was able to handle and read after the flames died down.

apparently there's not a consensus as to what it means to be a little
language as opposed to a general purpose language.

the definition that i used (and which i got more-or-less from a cs book by
Appleby) is: a little language is one which is used only by the users of
the program in which the language is available AND which is used only
within the scope  of that program.

obviously there's not going to be anything gained by discussing the
comparative merits of the two languages (or 3 if you count Macsyma) until
we get someone who is an unbiased expert on both languages and not just one
or the other.
richard j. gaylord, university of illinois, gaylord at ux1.cso.uiuc.edu

"if you're not programming functionally, then you're programming
dysfunctionally"






  • Prev by Date: Re: Differential Equations
  • Next by Date: report from the 1992 Mathematica Conference
  • Previous by thread: Re: Differential Equations
  • Next by thread: report from the 1992 Mathematica Conference