I pushed my changes, since you did not anything yet on notification you may be able to use my C to lua conversion code for them, you can drop the rest. I will let you finish the plugin.<div>What annoys me the most is that I spent some hours on it yesterday for nothing, I would have worked on completing the zeromq plugin if I knew :(</div>

<div><br></div><div>As for the complexity on callbacks I really think we gain much more having a simpler plugin code especially if it does not affect the functionalities much (is the multiple callbacks model really used on the other languages bindings ?), it makes it easier for newcomers to dive into the code. Since I started working on collectd plugins not too far away I can assure you that diving into the code is not that easy especially when you try to understand what the hell is happening with your read/write and you end up in filter_chain.c ;)</div>

<div><br></div><div><meta charset="utf-8">I will have a closer look at filters to see if I can do something for them.</div><div><br></div><div>Julien Ammous<br><br><div class="gmail_quote">On 28 November 2010 17:38, Florian Forster <span dir="ltr">&lt;<a href="mailto:octo@collectd.org">octo@collectd.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi again ;)<br>
<br>
On Sun, Nov 28, 2010 at 04:30:10PM +0100, Schmurfy wrote:<br>
&gt; … callbacks …<br>
<div class="im">&gt; do you really think the added complexity of the C code is really worth<br>
&gt; what it brings to the lua side ?<br>
<br>
</div>Just to make sure I understand your approach correctly: After the script<br>
is loaded, check if there is a global function called, for example,<br>
&quot;cb_read&quot;. If there is, call it every $interval seconds. The script does<br>
not call any register_* function for this to happen – defining the<br>
function with this special name is sufficient.<br>
<br>
I think providing the register_* functions is worth the trouble: It is<br>
closer to the C API and the interfaces provided by the Perl and Python<br>
plugins. The Java API is a bit special because Java doesn&#39;t provide<br>
function pointers, but you can still register objects implementing a<br>
special interface.<br>
<div class="im"><br>
&gt; I am more than disappointed by the way you took over my plugin<br>
<br>
</div>Oh, sorry about that :/ I didn&#39;t mean to &quot;steal&quot; your plugin, I just got<br>
excited and carried away. When I get excited about something I usually<br>
start hacking away in a frenzy, sorry … I&#39;ll hold myself back.<br>
<div class="im"><br>
&gt; I am not angry at you (and I hope you won&#39;t be at me for being so direct)<br>
<br>
</div>No offense taken.<br>
<div class="im"><br>
&gt; I finally managed to compile a working lua plugin on my system the<br>
&gt; only problem I had is that the pkg-config package is called &quot;lua&quot; for<br>
&gt; me with 5.1 as its version<br>
<br>
</div>Oh $deity! The pkg-config names are the one thing that should be<br>
constant over all platforms … Oh well, I&#39;ll see if I can work around<br>
that.<br>
<br>
Best regards,<br>
<div><div></div><div class="h5">—octo<br>
--<br>
Florian octo Forster<br>
Hacker in training<br>
GnuPG: 0x0C705A15<br>
<a href="http://octo.it/" target="_blank">http://octo.it/</a><br>
</div></div><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
<br>
iQIcBAEBAgAGBQJM8oWWAAoJEMPSHpbi2MmgbnwP/0klVhqPqIfGyBSakIcglLU9<br>
avHlq8bpntoAv/qErFg4H0rNC/mntHbDc/zNwrG+gLSV3xpLMm9UdsPssFSUKT6H<br>
Fm84w7eeRBoIBgr92O8CNmRWpvSQEnqVq+kYqRX39vIvWY1GUo7NvkQBJXO9AT5Z<br>
TeeztZRgCmtlnouNdcRl7A7+4nbQiYmc/vKi6HtoiWVMBw902w1RP+eAAaLH0d5B<br>
dPVME+Q+XqMudZoHniX1m4RLLJvNKSBV2Ij7ociYO9oGsJqcWJcp+P+mIPwX7IQp<br>
RGFB7dH14QJhwcytcR18aP0D7INrIM9Yp3SUMriR1ZhxJE62tTz50xwpZ2QJ7auR<br>
V0z/SXPMYPJDuXFekxIQ4eNzWaTZC/W/ZUS+Gtf43rOL3tdU0LXzENCoq/rEnbgN<br>
Oj7PqvvJHcIegrbF+mPsM1VXTesvqx1PqGohZ3j7heC7nQ1xjOcGCn6S5+xypzCl<br>
5ssm9JDGRL9e4DbTD1xVnzSfuLYUYEVmsjh71KWI2NwnqS3BVj3YJIgUR5e5q0Zy<br>
zjOQiDOSlJo7ex/eo28GpH27jKxlU2wNfJBbrTkkSVTn5LIxQAG9vfZlp/7ImRgC<br>
2+kYl0AxZfX5RG9+DynDWQWS8KsJxH9a350I9RgNcY2LDKQ+E1vWEEU7GLn1MEiA<br>
pVo7w1Lfsy34umBlupLt<br>
=A17V<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br></div>