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 GitHub 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 | ✓ |
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 |
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. |
is_player | ✓ | |
set_player_flag | ✓ | |
move | ✓ |
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 | ✓ | |
eval | ✓ | |
disassemble | ✓ | Output looks nothing like LambdaMOO's |
verb_code | ✓ |
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 | ||
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 | ✓ | |
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 |
Network connections
Name | Complete | Notes |
---|---|---|
set_connection_option | ||
connection_option | ||
connection_options | ||
open_network_connection | ||
listen | ✓ | print-messages not yet implemented. errors in binding not properly propagating back to the builtin |
unlisten | ✓ | |
listeners | ✓ | |
output_delimiters | ||
buffered_output_length |
Extension from Toast
Functions not in the original LambdaMOO, but were in Toast, and ported over
Name | Complete | 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. |
argon2 | ✓ | Same signature as function in ToastSunt |
arong2_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 |
Flyweights & Symbols (new types)
Name | Description | Notes |
---|---|---|
slots | Returns the slots on a given flyweight | Available only if the flyweights feature is turned on |
remove_slot | Returns a copy of the flyweight with the given slot removed, if present | Available only if the flyweights feature is turned on |
add_slot | Returns a copy of the flyweight with a new slot added | 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 |
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 |
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 |