On Friday, 16 October 2015 at 09:01:57 UTC, yawniek wrote:
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.

The class support in LuaD supports the kind of indirection you want, but it's probably not finished enough for your use case. Once closer to completion, it will be possible to use it with structs as well.

Reply via email to