Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Status of builtin function implementation

The following is a table of the status of the implementation of various builtin-functions as defined in the LambdaMOO 1.8 specification, as well as some extensions that were added in ToastStunt and then ported over to mooR. (And some novel extensions added in mooR itself.)

The table is broken down by category, and each function is marked with a checkmark if it is implemented.

If there are any notes about the implementation, they will be included in the notes column. If you notice anything missing, or if you have any questions about the implementation, please feel free to open an issue on the mooR Codeberg repository issue tracker.

LambdaMOO 1.8 builtin function list and status

Lists

NameCompleteNotes
length✓
setadd✓
setremove✓
listappend✓
listinsert✓
listdelete✓
listset✓
equal✓
is_member✓
match✓
rmatch✓
substitute✓
complex_match✓Advanced pattern matching with ordinal support

Strings

NameCompleteNotes
tostr✓
toliteral✓
crypt✓Pretty damned insecure, only here to support existing core password functions.
index✓
rindex✓
strcmp✓
strsub✓
salt✓Generate a random crypto-secure salt for password. Not compatible with toast's function of same name
binary_to_str✓
binary_from_str✓

Booleans

NameCompleteNotes
tobool✓Mirrors if/while truthiness rules

Numbers

NameCompleteNotes
toint✓
tonum✓
tofloat✓
min✓
max✓
abs✓
random✓
time✓
ctime✓
floatstr✓
sqrt✓
sin✓
cos✓
tan✓
asin✓
acos✓
atan✓
sinh✓
cosh✓
tanh✓
exp✓
log✓
log10✓
ceil✓
floor✓
trunc✓

Objects

NameCompleteNotes
toobj✓
typeof✓
create✓Quota support not implemented yet.
recycle✓
valid✓
parent✓
children✓
chparent✓
max_object✓
players✓Potentially slow in a large DB.
objects✓mooR extension. Wizard only.
is_player✓
set_player_flag✓
is_anonymous✓
is_uuobjid✓
move✓
parse_command✓mooR extension. Wizard only.
find_command_verb✓mooR extension. Enables custom command dispatching.
dispatch_command_verb✓mooR extension. Wizard only.

Properties

Verbs

NameCompleteNotes
verbs✓
verb_info✓
set_verb_info✓
verb_args✓
set_verb_args✓
add_verb✓
delete_verb✓
set_verb_code✓Enhanced with diagnostic verbosity & output mode options
eval✓Enhanced with diagnostic verbosity & output mode options
format_compile_error✓mooR extension. Formats structured compilation errors
disassemble✓Output looks nothing like LambdaMOO's
verb_code✓
prepositions✓mooR extension. Returns list of all valid prepositions

Values / encoding

NameCompleteNotes
value_bytes✓
value_hash
string_hash✓
binary_hash✓
decode_binaryBinary encoding will likely work differently in moor. See README.md for more info.
encode_binary
object_bytes✓

Server

NameCompleteNotes
server_version✓Crate version + short commit hash, for now
renumber✓Supports numbered/UUID conversion in both directions
reset_max_object
memory_usage✓
shutdown✓
dump_database✓
db_disk_size✓
connected_players✓
connected_seconds✓
idle_seconds✓
connection_name✓To make this 100% compat with core, reverse DNS & listen port is needed.
connections✓Returns connections for current player, or other players.
notify✓With rich_notify feature on, supports sending additional content types
event_log✓mooR extension. Log to event history without broadcasting to connections
boot_player✓
player_event_log_stats✓mooR extension. Inspect encrypted event history.
purge_player_event_log✓mooR extension. Delete encrypted history / public key.
server_log✓
load_server_options
function_info✓
read✓

Tasks

NameCompleteNotes
task_id✓
queued_tasks✓
valid_task✓
kill_task✓
resume✓
queue_info✓
force_input✓Does not support "at-front" argument, and command executes in parallel not in a queue
flush_input

Execution

NameCompleteNotes
call_function✓
raise✓
suspend✓
seconds_left✓
ticks_left✓
pass✓Is an opcode
set_task_perms✓
caller_perms✓
callers✓
task_stackNot supported: running tasks are parallel, so stacks are moving targets without pausing or heavy instrumentation
function_help✓mooR extension

Network connections

mooR handles outbound networking differently than classic LambdaMOO - see the networking section for details on using workers for outbound connections.

NameCompleteNotes
set_connection_option✓Supports binary, hold-input, disable-oob, client-echo, flush-command options. See networking for details.
connection_option✓Works only for connections, not player objects, since moor has multiple connections per player. connections(player) returns all connections
connection_options✓Works only for connections, not player objects, since moor has multiple connections per player. connections(player) returns all connections
open_network_connectionNot planned - use worker system instead
listen✓print-messages not yet implemented. errors in binding not properly propagating back to the builtin
unlisten✓
listeners✓
output_delimiters✓
connection_attributes✓mooR extension - returns map/list based on features
buffered_output_lengthNot planned

Extension from Toast

Functions not in the original LambdaMOO, but were in Toast, and ported over

NameCompleteNotes
argon2✓Same signature as function in ToastSunt
argon2_verify✓Same signature as function in ToastSunt
ftime✓Slight differents in return value, see notes in BfFtime
encode_base64✓
decode_base64✓
slice✓
generate_json✓
parse_json✓
ancestors✓
descendants✓
isa✓
responds_to✓
pcre_match✓
pcre_replace✓

Extensions

Functions not part of the original LambdaMOO, but added in moor

XML / HTML content management

NameDescriptionNotes
xml_parseParse a string containing XML into a tree of flyweight objectsAvailable only if the flyweights feature is turned on
to_xmlConvert a tree of flyweight objects into a string containing XMLAvailable only if the flyweights feature is turned on

Import/Export of Objects

NameDescriptionNotes
load_objectLoad an object from objdef format with optional conflict detection and resolution options.Wiz only
dump_objectTakes an object and returns a list of strings representing the object definition in objdef format.Wiz or owner only

Flyweights & Symbols (new types)

NameDescriptionNotes
toflyweightBuild a flyweight from a delegate, slots map, and optional contents listAvailable only if the flyweights feature is turned on
flyslotsReturns the slots on a given flyweight as a mapAvailable only if the flyweights feature is turned on
flycontentsReturns the contents list from a flyweightAvailable only if the flyweights feature is turned on
flyslotsetReturns a copy of the flyweight with a slot added or updatedAvailable only if the flyweights feature is turned on
flyslotremoveReturns a copy of the flyweight with the given slot removed, if presentAvailable only if the flyweights feature is turned on
tosymTurns the given value into a SymbolAvailable only if the symbols feature is turned on

Encoding

NameDescriptionNotes
encode_base64Encodes string or binary data to Base64From ToastStunt
decode_base64Decodes Base64-encoded string to binary dataFrom ToastStunt
encode_base32Encodes string or binary data to Base32
decode_base32Decodes Base32-encoded string to binary data

Cryptography

NameDescriptionNotes
age_generate_keypairGenerates a new X25519 keypair for use with age encryption
age_encryptEncrypts a message using age encryption for one or more recipients
age_decryptDecrypts an age-encrypted message using one or more private keys
age_passphrase_encryptEncrypts a message using age encryption with a passphrase
age_passphrase_decryptDecrypts an age-encrypted message using a passphrase
hotpGenerates HMAC-based One-Time Password (RFC 4226)
totpGenerates Time-based One-Time Password (RFC 6238)
random_bytesGenerates cryptographically secure random bytes

Expanded error handling

NameDescriptionNotes
error_codeStrip off any message or value from an error and return only the code portion
error_messageReturn the message portion of the error, or the default message if none exists

Admin

NameDescriptionNotes
bf_countersPerformance counters for profiling builtin function performance
db_countersPerformance counters for profiling DB performance
sched_countersPerformance counters for profiling scheduling performance
flush_cachesFlushes all internal caches (verb, property, ancestry)Wizard only

Tasks

NameDescriptionNotes
active_tasksReturn information about running non-suspended/non-queued tasks which are actively running
wait_taskCauses the current task to wait for a given task id to not be in the background queue
commitCauses the current task to immediately commit its data, suspend, and then come out of suspensionSemantically same as suspend(0)
rollbackCauses the current task to immediately rollback all mutations to the DB and abort the current task. Only argument is boolean whether to send pending content to the player or notWizard only
suspend_if_neededConditionally commits and suspends if remaining ticks are below a threshold, preventing task timeoutmooR extension
task_sendSends a message (any value) to another task's message queue, delivered on commitmooR extension
task_recvCommits current transaction and returns all queued messages as a list; optionally waits for messagesmooR extension