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
| Name | Complete | Notes |
|---|---|---|
length | ✓ | |
setadd | ✓ | |
setremove | ✓ | |
listappend | ✓ | |
listinsert | ✓ | |
listdelete | ✓ | |
listset | ✓ | |
equal | ✓ | |
is_member | ✓ | |
match | ✓ | |
rmatch | ✓ | |
substitute | ✓ | |
complex_match | ✓ | Advanced pattern matching with ordinal support |
Strings
| Name | Complete | Notes |
|---|---|---|
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 | ✓ |
Numbers
| Name | Complete | Notes |
|---|---|---|
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
| Name | Complete | Notes |
|---|---|---|
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
| Name | Complete | Notes |
|---|---|---|
properties | ✓ | |
property_info | ✓ | |
set_property_info | ✓ | |
add_property | ✓ | |
delete_property | ✓ | |
clear_property | ✓ | |
is_clear_property | ✓ |
Verbs
| Name | Complete | Notes |
|---|---|---|
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
| Name | Complete | Notes |
|---|---|---|
value_bytes | ✓ | |
value_hash | ||
string_hash | ✓ | |
binary_hash | ✓ | |
decode_binary | Binary encoding will likely work differently in moor. See README.md for more info. | |
encode_binary | ||
object_bytes | ✓ |
Server
| Name | Complete | Notes |
|---|---|---|
server_version | ✓ | Crate version + short commit hash, for now |
renumber | ✓ | Supports UUID to numbered conversion with auto-selection |
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 |
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
| Name | Complete | Notes |
|---|---|---|
task_id | ✓ | |
queued_tasks | ✓ | |
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
| Name | Complete | Notes |
|---|---|---|
call_function | ✓ | |
raise | ✓ | |
suspend | ✓ | |
seconds_left | ✓ | |
ticks_left | ✓ | |
pass | ✓ | Is an opcode |
set_task_perms | ✓ | |
caller_perms | ✓ | |
callers | ✓ | |
task_stack | ||
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.
| Name | Complete | Notes |
|---|---|---|
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_connection | Not 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_length | Not planned |
Extension from Toast
Functions not in the original LambdaMOO, but were in Toast, and ported over
| Name | Complete | Notes |
|---|---|---|
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
| Name | Description | Notes |
|---|---|---|
xml_parse | Parse a string containing XML into a tree of flyweight objects | Available only if the flyweights feature is turned on |
to_xml | Convert a tree of flyweight objects into a string containing XML | Available only if the flyweights feature is turned on |
Import/Export of Objects
| Name | Description | Notes |
|---|---|---|
load_object | Load an object from objdef format with optional conflict detection and resolution options. | Wiz only |
dump_object | Takes an object and returns a list of strings representing the object definition in objdef format. | Wiz or owner only |
Flyweights & Symbols (new types)
| Name | Description | Notes |
|---|---|---|
toflyweight | Build a flyweight from a delegate, slots map, and optional contents list | Available only if the flyweights feature is turned on |
flyslots | Returns the slots on a given flyweight as a map | Available only if the flyweights feature is turned on |
flycontents | Returns the contents list from a flyweight | Available only if the flyweights feature is turned on |
flyslotset | Returns a copy of the flyweight with a slot added or updated | Available only if the flyweights feature is turned on |
flyslotremove | Returns a copy of the flyweight with the given slot removed, if present | Available only if the flyweights feature is turned on |
tosym | Turns the given value into a Symbol | Available only if the symbols feature is turned on |
Cryptography
| Name | Description | Notes |
|---|---|---|
age_generate_keypair | Generates a new X25519 keypair for use with age encryption | |
age_encrypt | Encrypts a message using age encryption for one or more recipients | |
age_decrypt | Decrypts an age-encrypted message using one or more private keys | |
age_passphrase_encrypt | Encrypts a message using age encryption with a passphrase | |
age_passphrase_decrypt | Decrypts an age-encrypted message using a passphrase |
Expanded error handling
| Name | Description | Notes |
|---|---|---|
error_code | Strip off any message or value from an error and return only the code portion | |
error_message | Return the message portion of the error, or the default message if none exists |
Admin
| Name | Description | Notes |
|---|---|---|
bf_counters | Performance counters for profiling builtin function performance | |
db_counters | Performance counters for profiling DB performance | |
sched_counters | Performance counters for profiling scheduling performance | |
flush_caches | Flushes all internal caches (verb, property, ancestry) | Wizard only |
Tasks
| Name | Description | Notes |
|---|---|---|
active_tasks | Return information about running non-suspended/non-queued tasks which are actively running | |
wait_task | Causes the current task to wait for a given task id to not be in the background queue | |
commit | Causes the current task to immediately commit its data, suspend, and then come out of suspension | Semantically same as suspend(0) |
rollback | Causes 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 not | Wizard only |
suspend_if_needed | Conditionally commits and suspends if remaining ticks are below a threshold, preventing task timeout | mooR extension |