Wingy's Snow MOO Programming Cheat Sheet (modified from numerous authors)

A programmers guide for Sensemedia's Snow Moo User Programmers...

Last HTML Update October 3, 1998 by Zorro


Document compiled by Wingnut A great guy by the way....

Mail him HERE... 


Webbed (HTML) version compiled by Bruce 'Zorro' Larrabee

Mail him HERE... 



Updated and maintained by Bruce 'Zorro' Larrabee

Help included on the following utilities:




Types of data recognized:

TYPE ->type Example Data type can be determined using typeof(data).
Typeof Variables and thier Values
KEYWORD VALUE Description Visability
INT 0 Integer YES
NUM 0 Same as INT YES
OBJ 1 Object YES
STR 2 String YES
ERR 3 Error YES
LIST 4 Linked list YES
CLEAR 5 Clear properties value slot NO
NONE 6 Uninitialized variables NO
CATCH 7 On-stack marker for an exception handler NO
FINALLY 8 On-stack marker for a TRY-FINALLY clause NO
FLOAT 9 Floating point numbers YES

Back Up To Menu...


Errors

Back Up To Menu...


Subscripting

Back Up To Menu...


Special variables in functions

Back Up To Menu...


Expresions

Usual C stuff, except: Strings comparisons are case-insensitive.

Back Up To Menu...


Statements

Back Up To Menu...


CORE Commands...

Entries ending with (*) are wizard only...

Back Up To Menu...


CORE Commands for Objects

Entries ending with (*) are wizard only...

Back Up To Menu...


CORE Commands for Strings

Back Up To Menu...


CORE Commands for Math

Back Up To Menu...


String Utilities

$string_utils

Conversion routines:

Type checking: Parsing: Matching: Pretty printing: Substitutions Miscellaneous string munging: A useful property: Suspended versions:

(with _suspended at end of name)

Back Up To Menu...


Object Utilities

$object_utils

These are useful for finding out information about individual objects.

Examining everything an object has defined on it:

Investigating inheritance: Considering containment: Verifying verbs and properties:

(identify location and usable name of verb)

Player checking: Suspending:

(Many of the above verbs have ..._suspended versions to assist with very large object hierarchies.)

The following exist:

Back Up To Menu...


List Utilities

$list_utils Mapping functions:

(take a list and do something to each element):

Association list functions:

(An association list (alist) is a list of pairs (2-element lists),
though the following functions have been generalized for lists of n-tuples (n-element lists).
In each case i defaults to 1.)

Back Up To Menu...


Math Utilities

$math_utils

Trigonometric/Exponential functions:

Statistical functions: Number decomposition: Other math functions: Series: Integer Properties: Miscellaneous: Bitwise Arithmetic:

Back Up To Menu...


Time Utilities

$time_utils Converting from seconds-since-1970: Converting to seconds: Converting to some standard English formats: Substitution: Miscellaneous:

Back Up To Menu...


Sequence Utilities

$seq_utils

(A sequence is a set of integers. integers in the range [$minint+1..$maxint].
The implementation depends on $minint never being included in a sequence.)

Back Up To Menu...


Set Utilities

$set_utils

(This object is useful for operations that treat lists as sets.)
(i.e., without concern about order and assuming no duplication).

Back Up To Menu...


Command Utilities

$command_utils

Detecting and Handling Failures in Matching:

Reading Input from the Player: Utilities for Suspending: Client Support for Lengthy Commands:

Back Up To Menu...


Code Utilities

$code_utils

Parse verb and property references:

Conversion: Integer to error name conversion: Preposition routines: Verb routines: Verbs that do the actual dirty work for command lines verbs: Random but useful verbs:

Back Up To Menu...


Building Utilities

$building_utils

Back Up To Menu...


Gender Utilities

$gender_utils

Defines the list of standard genders,
the default pronouns for each,
and routines for adding or setting
pronoun properties on any gendered object.

Properties:

Verbs:

Back Up To Menu...


Matching Utilities

$match_utils Ordinal matches are determined according to the match's position in 'object-list' or,
if a possessive (such as "where" above) is given, then the ordinal is the nth match
in that object's inventory.   Examples:

  :parse_ordref("second broadsword") => {2, "broadsword"}

  :parse_ordref("second") => 0

  Note that there must be more to the string than the ordinal alone.

Examples:

:parse_possessive_reference("joe's cat") => {"joe", "cat"}

:parse_possessive_reference("sis's",fish") => {"sis", "fish"}

Strings are returned as a value suitable for a :match routine, thus 'my' becoming 'me'.

:parse_possessive_reference("my dog") => {"me", "dog"}

Generally used after object is derived from a :match_object(string). [ambigs] is an optional list of the objects that were matched upon. If given, the message printed will list the ambiguous among them as choices.

Back Up To Menu...


Lock Utilities

$lock_utils

These routines are used when locking objects,
and when testing an object's lock before allowing use
(such as in an exit).

Back Up To Menu...


Permissions Utilities

$perm_utils

Miscellaneous routines for permissions checking :

These routines check write flags and also the wizardliness of `who':

Back Up To Menu...


Generic BigList Utilities

This is a package for maintaining huge persistent (sorted) lists in a format that is less likely to spam the server (which runs into a certain amount of trouble dealing with long ordinary lists --- btw we use `biglist' to refer to the huge data structure we're about to describe and `list' to refer to ordinary MOO lists {...}). The biglist in question lives on a particular object, to which we will refer in the discussion below as the `home' object, and its various elements appear as leaves of a tree whose nodes are kept in properties of the home object. It should be noted that the home object does not need to be (and in fact should *not* be) a descendant of this one; this object merely provides utilities for manipulating the properties on the home object that are used in a particular biglist manipulation.

All of the utilities below refer to `caller' to locate the home object. Thus verbs to manipulate a given biglist must be located on or inherited by its home object itself. The home object needs to define the following verbs

See Generic Biglist Resident or $big_mail_recipient for examples.

Those of the following routines that take a biglist argument are expecting either {} (empty biglist) or some biglist returned by one of the other routines.

Back Up To Menu...


NNTP Utilities

This is the NNTP utility package. See `help $nntp' for more details.

Back Up To Menu...


Byte Quota Utilities

$byte_quota_utils

Verbs for user programs:

Verbs the system calls: The measurement task: Properties:

Back Up To Menu...


Object Quota Utilities

$object_quota_utils

Back Up To Menu...


Wizard Utilities

$wiz_utils

The following functions are substitutes for various server builtins.
Anytime one feel tempted to use one of the expressions on the right,
use the corresponding one on the left instead.
This will take care of various things that the server
(for whatever reason) does not handle.

Back Up To Menu...


Network Utilities

$net_utils

Back Up To Menu...


Gopher Utilities

$gopher_utils

An interface to Gopher internet services.
Copyright (c) 1992,1993 Grump,JoeFeedback@LambdaMOO.

This object contains just the raw verbs for getting data from gopher servers and parsing the results.

Back Up To Menu...


WWW Utilities

$www_utils

Back Up To Menu...


WEB Utilities

$web_utils

Back Up To Menu...


Misc Utilities

$misc_utils
 :make_table({"Name","left","| "},
 {"Joe","Jane"},{"Age","right"," | "},{"10","15"},{"","left"," |"},{})

Back Up To Menu...


Net's Wizard Multiple Utilities FO

Back Up To Menu...


Quinn's Utilities

$quinn_utils

Back Up To Menu...


Mickey's Utilities

A package of operations for using special operators to produce formatted output. The following operators deal with plurals. If n is 1, the singular column is used. If it is some other number, the plural column is used. If n is not a number, length(n) is used.


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

 operator singular plural

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

 %s s

 %this, %these this these

 %that, %those that those

 %is, %are is are

 %was, %were was were

 %has, %have has have

 ==============================================
The following ops deal with misc objects:

Back Up To Menu...


Regular Expresions

Back Up To Menu... Back Up To Menu... Back Up To Menu... Back Up To Menu... Back Up To Menu... Back Up To Menu...

Back Up To Menu...


Last Update: February 20, 1999 by Zorro 


WEB Page Version by, Bruce Larrabee aka Zorro(bruce_l@efn.org)