On Mon, 2013-07-22 at 17:32 +0200, Bastien Nocera wrote:
> A few comments about the code I saw:
> - Something like:
> grilo.callback(nil, 0, userdata) 
> is particularly ugly. We should have a better way to tell that we
> finished the parsing. I'd rather the C plugin assumed that we finished
> the call when the lua function returns.

Yeah, definitely. We didnt' review that case in our meeting. But we
could do it in the next iteration.

> - The above seems to be caused by the async model being done inside
> the
> LUA sources instead of in the C plugin factory.

Part of the proposal I'd like to do is precisely to move the async model
into the C plugin factory. The way it's done right now still requires
the lua source developer to break the function in chunks so it doesn't
block too much.

But I think this can be moved to a second version of the plugin, and
have a workable first version .

> - The JSON parsing will need to be done on the C-plugin side, not in
> the
> lua plugin. The substitutions look fragile.

IIUC, part of the substitutions were due the handle of utf8 characters.
Seems there's a library to deal with utf8 in lua. Question was how to
use that library and how to distribute it. One of the proposals was
precisely adding those functions in the C part, and access them from the
lua source. We could add also JSON/XML parsing functions, if we see they
are very useful.

        J.A.


_______________________________________________
grilo-list mailing list
grilo-list@gnome.org
https://mail.gnome.org/mailman/listinfo/grilo-list

Reply via email to