LambdaMOO with multiple inheritance, anonymous objects, HTTP, JSON <-> MOO translation, better crypto, a map datatype and a RESTful interface.
C++ C Ruby TeX Makefile Yacc Other
Latest commit 4638169 Dec 4, 2016 @toddsundsted committed on GitHub Merge pull request #8 from tvdijen/patch-3
Never end up with an empty keywords.cc file
Permalink
Failed to load latest commit information.
crypt
executables
files
nettle
test
yajl Move YAJL code into a subdirectory. Nov 26, 2016
.indent.pro GNU Indent normalization Mar 3, 1997
AddingNewMOOTypes.txt Updated the docs to reflect the current state of the server. Dec 16, 2011
CONTRIBUTING Cleanup. Feb 17, 2014
ChangeLog-YAJL.txt
ChangeLog-fileio.txt Updated the documentation. Aug 5, 2011
ChangeLog.txt
FileioDocs.txt Updated the documentation. Aug 5, 2011
GNUmakefile
Gemfile
Gemfile.lock
HACKING HACKING Apr 23, 2010
MOOCodeSequences.txt Stripped RCS comments. Nov 28, 2013
Makefile.in
Minimal.db
ProgrammersManual.texinfo Remove `memory_usage()'. Nov 28, 2016
README
README.Minimal Improve the security suggestions. May 13, 2013
README.YAJL Added the YAJL library (v 1.0.12). Jun 13, 2011
README.fileio Initial commit of the FileIO patch. Jul 27, 2011
README.lambdamoo
README.rX
README.sosemanuk
README.tests
Test.db Added tests. Lots and lots of tests. Dec 7, 2012
acinclude.m4
aclocal.m4 Added support for BCrypt encryption and salt generation. Nov 17, 2013
ast.cc
ast.h
base64.cc BUG: fix memoized length of base64 encoded string. Nov 29, 2016
base64.h
bf_register.h Stripped RCS comments. Nov 28, 2013
client_bsd.c Stripped RCS comments. Nov 28, 2013
client_sysv.c
code_gen.cc
code_gen.h
collection.cc
collection.h Map in/is_member now behaves more like list in/is_member. Jul 20, 2011
config.h.in
configure Regenerate configure script. Jan 26, 2014
configure.ac Prefer `waitpid()'. Jan 26, 2014
crypto.cc Refactor `is_int()', `new_int()', `is_obj()', `new_obj()'. Nov 27, 2016
crypto.h
db.h
db_file.cc
db_io.cc Stripped RCS comments. Nov 28, 2013
db_io.h
db_objects.cc Refactor `is_int()', `new_int()', `is_obj()', `new_obj()'. Nov 27, 2016
db_private.h Stripped RCS comments. Nov 28, 2013
db_properties.cc Refactor `is_int()', `new_int()', `is_obj()', `new_obj()'. Nov 27, 2016
db_tune.h
db_verbs.cc
decompile.cc
decompile.h
disassemble.cc
disassemble.h
eval_env.cc Stripped RCS comments. Nov 28, 2013
eval_env.h
eval_vm.cc Stripped RCS comments. Nov 28, 2013
eval_vm.h
exec.cc Added casts. Jun 20, 2013
exec.h
execute.cc
execute.h Added colorized logging. Feb 3, 2014
extensions.cc
fileio.cc
fileio.h
functions.cc
functions.h
garbage.cc
garbage.h Added support for cyclic garbage collection. Dec 7, 2012
http_parser.c
http_parser.h
install-sh
json.cc
json.h
keywords.cc
keywords.gperf Stripped RCS comments. Nov 28, 2013
keywords.h Stripped RCS comments. Nov 28, 2013
linenoise.c
linenoise.h
list.cc
list.h
log.cc
log.h
map.cc
map.h Fixed (mis)use of the `new' keyword. Jun 18, 2013
match.cc
match.h Stripped RCS comments. Nov 28, 2013
my-ctype.h
my-fcntl.h
my-in.h Stripped RCS comments. Nov 28, 2013
my-inet.h
my-ioctl.h
my-math.h
my-poll.h
my-signal.h
my-socket.h
my-stat.h Stripped RCS comments. Nov 28, 2013
my-stdarg.h
my-stdio.h
my-stdlib.h
my-string.h
my-stropts.h Stripped RCS comments. Nov 28, 2013
my-sys-time.h
my-time.h
my-tiuser.h
my-types.h
my-unistd.h
my-wait.h
name_lookup.cc
name_lookup.h
net_bsd_lcl.cc
net_bsd_tcp.cc
net_mp_fake.cc
net_mp_poll.cc
net_mp_selct.cc
net_mplex.cc
net_mplex.h
net_multi.cc
net_multi.h
net_proto.cc
net_proto.h
net_single.cc Stripped RCS comments. Nov 28, 2013
net_sysv_lcl.cc
net_sysv_tcp.cc
net_tcp.cc
network.cc
network.h Stripped RCS comments. Nov 28, 2013
numbers.cc Extend `random_bytes()' limit and test. Nov 28, 2013
numbers.h Stripped RCS comments. Nov 28, 2013
objects.cc
opcode.h Added support for bitwise operators. Feb 3, 2014
options.h
parse_cmd.cc
parse_cmd.h Stripped RCS comments. Nov 28, 2013
parser.h
parser.y
pattern.cc
pattern.h
program.cc Stripped RCS comments. Nov 28, 2013
program.h
property.cc Refactor `is_object()'. Nov 27, 2016
quota.cc
quota.h Stripped RCS comments. Nov 28, 2013
random.h
regexpr.c
regexpr.h
restart
restart.sh
server.cc
server.h
sosemanuk.c
sosemanuk.h Integrated SOSEMANUK into random number generation. Nov 28, 2013
storage.cc Remove `memory_usage()'. Nov 28, 2016
storage.h
str_intern.cc Added casts. Jun 20, 2013
str_intern.h
streams.cc
streams.h
structures.h Move `str_dup_to_var()' and `str_ref_to_var()'. Nov 28, 2016
sym_table.cc
sym_table.h
system.cc
system.h
t2hinit.pl Stripped RCS comments. Nov 28, 2013
tasks.cc Refactor `is_int()', `new_int()', `is_obj()', `new_obj()'. Nov 27, 2016
tasks.h Stripped RCS comments. Nov 28, 2013
test.yml
texinfo.tex Added support files necessary to generate the documentation. Oct 8, 2011
timers.cc Stripped RCS comments. Nov 28, 2013
timers.h Stripped RCS comments. Nov 28, 2013
tokens.h Stripped RCS comments. Nov 28, 2013
unparse.cc Added support for bitwise operators. Feb 3, 2014
unparse.h
utils.cc
utils.h
verbs.cc Move `str_dup_to_var()' and `str_ref_to_var()'. Nov 28, 2016
verbs.h
version.cc
version.h Stripped RCS comments. Nov 28, 2013
version_opt_gen.pl
version_options.h Inspect value of `PLAYER_HUH' option. Dec 31, 2013
version_src.txt
xtrapbits.h Added xtrapbits.h to get common bit array operations. Apr 21, 2012

README

See `README.lambdamoo' for general information on LambdaMOO.

More information on Stunt is available here: http://stunt.io/.  If you
want to get up and running quickly, consider starting with Improvise,
the Stunt starter kit: https://github.com/toddsundsted/improvise.

This is Release 10-wip of the Stunt extensions to the LambdaMOO
server.  It is based on the latest "1.8.3+" version from SourceForge.
Read the very important WARNING below before running this on your
existing database!!!

Release 10 is based on a "rewrite" of Stunt in C++ (the word "rewrite"
here means that I made the minimal necessary syntactical and structural
changes to get the project to compile on a modern C++ compiler) (shout
out to Steve Wainstead who paved the road here).  This makes way for
major improvements down the road.  Release 10 also includes many
smaller features noted below.

Stunt includes the following functionality not found in the main
server:

1)  Multiple-Inheritance
    `create()' now takes either an object number or a list of object
    numbers in the first argument position.  Two new built-ins,
    `parents()' and `chparents()', manipulate an object's parents.
    The built-ins `parent()' and `chparent()' exist for backward
    compatibility -- when an object has multiple parents these
    built-ins operate on the first parent.

2)  Anonymous objects
    Objects without an assigned object number that are accessible via
    an unforgeable references, and which are automatically garbage
    collected when no longer reachable.

3)  Task Local Storage
    The built-ins `task_local()' and `set_task_local()' retrieve/store
    a task local value.  The value is automatically freed when the
    task finishes.

4)  Map Datatype
    The server includes a native map datatype based on a binary search
    tree (specifically, a red-black tree).  The implementation allows
    in-order traversal, efficient lookup/insertion/deletion, and
    supports existing MOO datatypes as values (keys may not be lists or
    maps).  Index, range, and looping operations on lists and strings
    also work on maps.

5)  JSON Parsing/Generation
    The built-ins `parse_json()' and `generate_json()' transform MOO
    datatypes from/to JSON.

6)  New Built-in Cryptographic Operations
    The new cryptographic operations include SHA-1 and SHA-256 hashes.
    The existing MD5 hash algorithm is broken from a cryptographic
    standpoint, as is SHA-1 -- both are included for interoperability
    with existing applications (both are still popular) but the default
    for `string_hash()'/`binary_hash()'/`value_hash()' is now SHA-256.
    Stunt also includes the HMAC-SHA-1 and HMAC-SHA-256 algorithms for
    generating secure, hash-based message authentication codes.
    `crypt()' has been upgraded to support Bcrypt hashed passwords.
    The random number subsystem is now based on the SOSEMANUK cipher
    and seeds itself from `/dev/random'.

7)  Built-in Base64 Encoding/Decoding
    The built-ins `encode_base64()' and `decode_base64()' encode and
    decode Base64-encoded strings.

8)  An Improved FileIO Patch
    The 1.5p1 patch that is in wide circulation has flaws, including two
    server crashing bugs.  This patch fixes those bugs/flaws without
    changing the API.

9)  Secure Suspending Process Exec
    The exec functionality adds an `exec()' built-in which securely
    forks/execs an external executable.  It doesn't use the `system()'
    call, which is hard to secure and which blocks the server.
    `exec()' takes two parameters, a list of strings comprising the
    program and its arguments, and a MOO binary string that is sent to
    stdin.  It suspends the current task so the server can continue
    serving other tasks, and eventually returns the process termination
    code, stdout, and stderr in a list.

10) Verb Calls on Primitive Types
    The server supports verbs calls on primitive types (numbers,
    strings, etc.) so calls like `"foo bar":split()' can be
    implemented and work as expected (they were always syntactically
    correct but resulted in an E_TYPE error).  Verbs are implemented
    on prototype object delegates ($int_proto, $float_proto,
    $str_proto, etc.).  The server transparently invokes the correct
    verb on the appropriate prototype -- the primitive value is the
    value of `this'.

11) In Server HTTP Parsing
    The server uses the excellent Node HTTP parsing library to
    natively parse HTTP requests and responses into key/value pairs in
    a map datatype.  The parser handles corner cases correctly and
    supports things like HTTP upgrade (for using WebSockets, for
    example).  It's also much much faster than parsers implemented in
    MOO code.

12) Colorized Logging and Line Editing
    The server writes colorized output to the log when attached to a
    console.  The `server_log()' built-in allows colorized output from
    within the server.  And line editing is supported in emergency
    wizard mode.

13) Bitwise Operators
    The server supports bitwise and (&.), or (|.), xor (^.), logical
    (not arithmetic) right-shift (<<), logical left-shift (>>), and
    complement (~) operators.

14) Testing Framework
    The server includes a unit testing framework based on Ruby's
    Test-Unit.  It includes a Parslet parser (two, actually) for
    turning moo-code values into Ruby values, which makes writing
    tests much easier.  The new code is covered very well by the
    existing tests.

WARNING: This server changes the database format in a non-backward
compatible way in order to persist multiple-parent relationships.  The
server will automatically upgrade version 4 databases, however THERE
IS NO WAY BACK!

Use Github and the Github issue system for feedback and bugs!  See
CONTRIBUTING for details on how to contribute.

Todd