LambdaMOO Server

This is the source for the latest version of the LambdaMOO server.

Please consult the ChangeLog for the full list of new features, changes, and bugfixes incorporated into this release.

For legacy databases that previously ran on LambdaMOO 1.8.4 or CodePoint (Unicode+int64) servers -- 1.9.0 being a unification of both of these lines of development -- or earlier servers, see Legacy database support below for options/extensions you will need to enable/disable from ./configure in order to continue running with minimal database changes.

Test Suite

Unlike most modern applications, the LambdaMOO test suite is in a separate package not included here. You should retrieve that as well (see instructions wherever you got this from).

Getting Started

For those of you starting fresh, what to do will depend on how you got here. There are two ways to proceed:

Building from a distribution

These are the instructions for building from a distribution tarball — a file of the form LambdaMOO-1.9.nn-dist.tar.gz — that you can (and likely already have) run tar xzf to unpack and then cded into the source directory created (at which point you most likely started reading this file).

The process from here is:

    ./configure
    make

The ./configure script may complain about missing prerequisites. Various situations are covered below.

Building from git

This process is more involved and requires git, autoconf, gperf, and yacc:

    git clone REPOSITORY SRCDIR
    cd SRCDIR
    autoconf
    ./configure
    make

As of this writing (Sept. 2025), REPOSITORY is

https://github.com/wrog/lambdamoo.git

If this has changed and for whatever reason we were not able to put up a notice there about where we've moved to, the LambdaMOO site or my own site will likely have something to say about this.

VPATH builds

To build in a different directory from where the sources live, useful to simultaneously create versions with different options set, you can instead do

    cd BUILD
    PATH/TO/SRC/configure --srcdir=PATH/TO/SRC
    make

where BUILD is a fresh directory and PATH/TO/SRC is whatever path gets you from there back to the sources. (E.g., if you wish to build within the subdirectory b of the source directory, you can:

    mkdir b
    cd b
    ../configure --srcdir=..
    make

).

VPATH builds require the source directory to be pristine (i.e., no post-./configure or make artifacts can be present). This means if you have previously done any building there, you will be needing to do at least a make distclean before any VPATH builds will be allowed.

Note that autoconf always has to be run in the source directory (since it has to create the ./configure script there).

Prerequisites

Build tools

Build tools for building from git

Libraries

For all library prerequisites, the library itself may well already be installed, but you will also need the correponding build package with the #include headers (the -dev package in Debian/Ubuntu terminology).

In some cases, an extension may instead allow for building a statically linked library (--with-ucdpath, --with-expatpath) if you have the corresponding library source distribution.

Using ./configure

options.h is a generated file

Once you have satisfied the prerequisites, ./configure will reach the end of its run and you will see

    config.status: creating options.h

Which means you now have an options.h file, which lists all of the individual settings with the fully up-to-date and gory details of what each setting actually does and how each option is currently set.

Note

To MOO veterans: Yes, as of version 1.9, options.h is now generated and read-only. Which may seem weird for a file that was originally meant to be edited, but ... keep reading.

The best and easiest way to change option settings is by rerunning ./configure.

General principles concerning ./configure

Specific arguments for ./configure

Either of

    ./configure --help=short
    ./configure -hs

will list all arguments that are specific to the LambdaMOO server build process.

Note

For now, you need not bother looking at the longer ./configure -h or ./configure -hr help messages, since there has been, as yet, zero effort put into getting any of the make install options listed there — which are mainly about getting general purpose libraries and applications installed into the correct system directories — to actually work, it not yet actually being clear what make install should even do given the wide variety of server setups that people have. For now, as far as we are concerned, the build process is complete once a new moo executable exists.

There are two classes of command-line arguments for ./configure

For those running legacy (LambdaCore, JHCore, etc.) databases, there are more examples further down specifically intended for those situations.

Note that the ordering of ./configure arguments does not matter since (1) the high-level packages affect disjoint sets of options, and (2) the low-level --enable-def- arguments will take precedence whenever they occur. This way, if there's some high-level setting that does most of what you want, you can include the additional --enable-def- arguments to fix the settings it got "wrong". You should, however, try to do as much as you can with just the high-level settings since they'll do a bit more sanity-checking than the low-level settings can..

saving your ./configure arguments

If you forget what arguments you used on your last run of ./configure

   ./config.status --config

will repeat them back to you. Once you have a configuration you like, you may want to save the output of this command somewhere, in, say, a shell script to run the next time you do a git pull or otherwise upgrade your server sources.

This is also available in-MOO as server_version("config/args")

verifying your option settings

If, in a successfully compiled or running server, you need to verify that a particular option setting is what you think it is, or how a particular OPTION_DEFAULT value was resolved, you can invoke server_version("options") from MOO code to see all compiled-in options or, say, server_version("options/MPLEX_STYLE") for just one.

how NOT to do options.h or config.h settings

As a matter of general principle, if you ever find yourself trying to use a -D NAME or -U NAME cc argument or in a $(CFLAGS) or $(CPPFLAGS) specification in Makefile(.in) in order to affect a NAME intended to be #defined in either options.h or config.h,...

... just don't. I can pretty much promise it won't end well.

Optional Features

New Options

The following options were introduced in 1.9.0.

The following options were introduced in 1.8.4.

See options.h for the full descriptions. Each of these can now be set individually by --enable-def-OPTION_NAME on the ./configure command line.

Extensions

The 1.9.0 release includes the following optional extensions and associated new options

The regular expression matching facility has been repackaged as a mandatory extension in order to expose the library choices, currently

For developers, the extensions framework is described in Extensions.md.

Unicode support

Warning

Certain aspects of Unicode support are currently deemed experimental and will likely change in future versions.

Enabling unicode support expands the MOO character set, used for non-binary connections, string constants, and all object/verb/property names, to include nearly all legal Unicode codepoints.

The exact degree of Unicode support is governed by the --enable-unicode command line arguments for ./configure and (more directly) by the UNICODE_IDENTIFIERS, and UNICODE_NUMBERS settings in options.h

Experimental aspects of Unicode

Particular issues under consideration are as follows:

On upgrading to Unicode

Database files dumped from a stock 1.8.4- server can be loaded directly into a unicode-enabled server. Since ASCII representation is a subset of UTF-8, this preserves all prior string data and verbcode.

However, if you have a database that previously contained and relies on any strings with non-ASCII bytes (which can be introduced to db files via direct editing even though this was never officially supported) those sequences will get interpreted differently and potentially cause trouble. If there is any chance of this, you should ensure your database is truly pure ASCII before you attempt a Unicode upgrade.

You will also need to revise any verbcode that implictly assumes that all string chars will be within the ASCII range

Legacy database support

Version 1.9, in its default installation introduces significant changes that are likely to have consequences for existing dbs:

Databases produced by pre-1.9 servers are likely to need updates in order to function correctly on a 1.9+ server compiled with the new default settings.

There are no "compatibility modes" per se, i.e., it's likely no single argument will do everything you want, and how much you will actually need to do ultimately depends on what is in your database that you care about.

However, there exist configurations that should match up pretty well, all things considered. The next sections describe them.

For users of LambdaMOO 1.8.4 and earlier versions

Here, by "LambdaMOO 1.8.4", since there was never any actual 1.8.4 release, we mean a server compiled from either the (final) 2010 sourceforge repository head or github.com/wrog/lambdamoo (tag "1.8.4", commit 232293922083623e45a11b3aff2575104ad6081a) —these sources both being essentially identical to what has been running at LambdaMOO for the past 14 years — with no modifications other than changing the options.h settings available in that version.

The following configuration

    ./configure --enable-sz=i32,bq32

creates an ASCII-only (still the default) server with 32-bit INTs (i32) and with object_bytes() and value_bytes() returning results as if the server were still running on 32 bit hardware (bq32).

(You will most likely want to switch to 64-bit integers sometime before 2038, which is coming sooner than you think.)

Note that --enable-sz is entirely orthogonal to (and may thus be safely combined with) any of the --enable-net settings or any --enable-def-OPTION for options.h settings previously available in 1.8.4 (or earlier).

You may also omit bq32 if you are not using the LambdaCore/JHCore byte-quota system or if having the byte-quota measurement functions return the same values as before is not a priority.

For users of Codepoint 1.8.3

This refers to the final Codepoint "unicode" branch (commit 51761cdc98176f68a955b76a056ae364b2092a6e, dated May of 2011), also not an actual release.

The following configuration

    ./configure --enable-unicode=ids,nums --enable-sz=bq64b

creates a Unicode server with all subfeatures (ids and numbers) enabled, a 64-bit INT type (default), with (bq64b) object_bytes() and value_bytes() accounting for 64-bit hardware but counting floats as boxed (probably not what was intended, but this is what that server actually did...)

Omitting --enable-sz=bq64b reverts to the new 1.9 default byte-quota memory model in which floats are not counted as boxed.

Also, the available Waifs (--enable-waifs) and XML (--enable-xml) extensions are derived from and essentially equivalent to the Codepoint "unicode-waif" and "unicode-xml" branches, except for the minor changes in the XML functions discussed under "Changes relevant to programmers / wizards".

You may also wish to back out of certain Unicode features if you can (see Unicode support).

Database Format Issues

The database format has not changed. The database version number was not raised for the Codepoint server. Therefore database files do not self-identify as to which server with which features enabled created them. This can be an issue if you run multiple versions of the server and thus have some chance of attempting to load a backup file onto the wrong executable. Certain combinations will fail; others will lead to mysterious behavior.

The cross-load situation most likely to cause trouble is loading a checkpoint with non-ASCII bytes -- something that can be caught by a simple egrep test -- onto a non-Unicode server, since, of the various problematic cross-load situations, this one does not necessarily fail immediately (or at all) when it arguably should.

For all situations, the full details are in the ChangeLog (look for the big "WARNING" under "Changes significant to people compiling and running the server") which goes through every setting that affects database file format and what happens with each of the various kinds of problematic cross-loads.

The short answer for how to prevent problems is to keep your respective backups/checkpoints segregated and properly labeled.

A slightly more sophisticated workaround would be to create, in databases you care about, a canonical property, e.g., $saved_version_info to which the value of server_version(1) gets written by $server_started(). You can then, as needed, query this value in Emergency Wizard Mode, which runs after the database is loaded but before any tasks (including the $user_disconnected or $server_started tasks that a session typically begins with) and if you abort or quit out of Emergency Wizard Mode, no tasks are run at all), to see what the settings were for the instance of the server that saved this checkpoint file.

Historical material

See README.1997 for Pavel Curtis' original README, which has important information for people living in 1997 and may also be an interesting window on the world of 25 years ago for the rest of us, what with its references to ancient operating systems, FTP servers, mailing lists, and physical addresses that no longer exist.