Giter Club home page Giter Club logo

moo's People

Contributors

bigfug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moo's Issues

Add a web server

Add a built in web server feature.

Serve static HTML files so you can stick fTelnet in it and not require a seperate web server

HTTP GET/PUT/DELETE interface to getting data from the ObjectManager - great for status pages and monitoring, etc

LineEdit commands

The LineEdit class already supports several ReadLine style commands. Here's a list of all the commands I'd like to implement:

Shortcut Comment Status
Ctrl+A Beginning of line Done
Ctrl+B / Backward one character Done
Alt+B Backward one word Done
Ctrl+D Delete one character Done
Alt+D Delete one word Done
Ctrl+E End of line Done
Ctrl+F / Forward one character Done
Alt+F Forward one word Done
Ctrl+H Delete previous character Done
Ctrl+M Same as Enter key Done
Ctrl+N / Next line (in history) Done
Ctrl+P / Prev line (in history) Done
Backspace Delete previous character Done
Enter Submit line Done

Map as a datatype

Currently the map datatype in Lua is just a QVariantList pushed onto the stack. This results in code like:

-- get a map property from object
local var = object.map
 
-- insert a new value
var.value = "hello"

-- put the map back into the object
object.map = var`

This is obviously bad performance wise, especially if the map is large, and it's just more code than we need.

With a proper map datatype in Lua we can just do the following:

-- insert a new value into the object's map property
object.map.value = "hello"

Job done...

Add modem support

Add extended serial port listener with support for sending modem commands to answer the phone and deal with CONNECT messages

Multiple Inheritance

Currently objects are arranged in a hierarchy using the parent field to denote the parent of each object. Parent can be OBJECT_NONE (like on the Root object) but generally every object has a parent.

An object inherits all the verbs and properties of all its ancestors, which is powerful but requires careful planning of where to put these attributes.

Multiple inheritance (having more than one parent) would be useful to divide up functionality. Stunt does it by having parents() and chparents() functions.

I'm not too worried about the performance of doing this but I wonder if there is a cleaner way rather than just lumping bunches of objects into a complex hierarchy.

Mixins

One idea would be to use a mixin style system where objects continue to have a single parent, which then becomes useful for categorisation so Car.parent = Vehicle and Car.is_child_of( Vehicle ) == true but we can add functionality:

Box:add_mixin( Lockable ) -- box is now lockable
Door:add_mixin( Lockable ) -- door is now lockable

User:add_mixin( BuilderTools ) -- allow user access to create/dig verbs
User:rem_mixin( BuilderTools ) -- user is no longer allowed to build

Objects would still inherit verbs and properties from mixin objects, and it might be a nice idea that add_mixin() calls MixinObject:mixin_added( DestObject ) to initialise properties.

It would seem to make things a bit easier to understand but probably a bit harder to design.

Another benefit would be that a cleanly designed mixin should be able to be exported and imported between systems.

Implementation

Internally this would require an extra text field in the database that contains a comma delimited list of mixin object numbers. As we'd already have the object loaded into memory, I don't think having a separate table is really necessary.

ODB will load the field and convert it into an array of ObjectId's

Object->findProp and Object->findVerb would need to search the array of mixins

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.