[MUD-Dev] [Tech] Functional languages

Brian Hook brianhook at pyrogon.com
Tue Sep 9 14:42:46 CEST 2003


On Tue, 09 Sep 2003 10:26:16 +0100, ceo wrote:
> Brian Hook wrote:

> - functional languages are not inherently well-suited to
> outputting partial results, or having side-effects.

You could use that argument to disallow functional languages for
just about anything.  Who would use Lisp for a text editor?!  Or
OCaml for a file directory synchronization tool?  Yet they do.

> - ...But it's a little like wondering why no-one has written an
> OpenGL-based 3D engine in pure assembler, without any recourse to
> C, C++ or etc - why on earth would you do it?

That's my question, sort of -- why not?  There have been many games
that have used variants on Lisp or Scheme for scripting because
there ARE advantages.  It's not that they're better, it's only that
they have some advantages over other languages for certain domains.

> certainly have uses in some branches of AI and parsing, but in
> what ways are they suited to MUDs?

Aside from the networking layer, I can't conceive of a reason why
something like OCaml or even Haskell can't be used to write a
reasonable MUD.  I'm not saying it wouldn't be optimal, but there
are things I could see simplifying things, like list comprehensions,
closures, mappings and a well defined syntax that describes
properties instead of side-effects.

Don't get me wrong, I'm not advocating that they're superior, I'm
mostly trying to figure out if someone sat down and tried to write a
MUD server in CLOS and eventually said, "Whoa, this just sucks".

I mean, I've seen MUD servers written in Perl and Visual Basic.  But
not Scheme?  Weird.

In a post here by Miroslav Silovic on Apr 5, 2000, he said:

> My main gripe with Common LISP is that there still isn't any
> single implementation that satisfies all of the following:

>    - within 1/3 speed of C (CMUCL, ACL does this)
>    - realtime, generational GC (ACL checks)
>    - optimised CLOS implementation (ACL)
>    - free, source available (CMUCL, CLISP check)
>    - source actually readable and compilable (CLISP check)
>    - active development (ummmm... CLISP)

OCaml isn't from the Lisp tree of functional languages, but at the
very least it definitely fixes the relevant pieces above (almost as
fast C according to GLCS; realtime, incremental and generational GC;
free with source available; actively developed).

There's the MUQ server (www.muq.org) which has a CLOS-like front end
available, but I know nothing about it otherwise.

There's also "Smud" as described in this thesis:

  http://www.ccs.neu.edu/home/dougo/thesis/000824/proposal/

and his Museme Scheme-based MUD:

  http://www.ccs.neu.edu/home/dougo/museme/manual.txt

But there isn't much other information on the above.

-Hook
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list