LuaD: creating a flexible data filter system

yawniek via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 16 02:01:55 PDT 2015


hi,

i'm reading in a stream of data that is deserialized into 
individual frames.
a frame is either of:
a)  a specific D datastructure ( struct with a few 
ulong,string,string[string] etc members), known at compile time
b) json (preferably stdx.data.json)

i now want to implement something where i can dynamically
add lua filters that then get data out of these frames, create a 
new lua object
send it back to D code where its either sent to another lua 
filter or at last
  being serialized again to json und then being processed further.

ideally i would not like to copy all the data into a lua object 
but directly access it
from lua.
is there an elegant approach to do this and support both a and b 
cases?

so far i did some benchmarks, mainly with string comparisons and 
it turned out
that luaD is about 10x faster than mruby and python D bridges.


More information about the Digitalmars-d-learn mailing list