Tom Eastep wrote: > Natanael Copa wrote: > >> Have you thought of lua? should give you better performance than perl >> and would still be small enough for embedded. I can't say I have been >> looking at the shorewall code, but lua is very table oriented, which >> might be good for your table based config files. > > I suspect that the parser part of Shorewall might be difficult to write > entirely in LUA (although I've only browsed the reference manual). Also, LUA > appears to be a language that may only be embedded in C -- it does not stand > on its own. So what you end up with is a C program that uses a "smart > library". >
Tom, Since I was mentioned in this thread already, I'll give my $0.02. Feel free to send to /dev/null A) The Lua manual is really bad. LuaForge is a mess. I really needed Programming in Lua to make sense of the language (Ver 1 is online http://www.lua.org/pil/ Version 2 is only available in dead-tree format and was worth the cost. B) The Lua parser is surprisingly good for regex type stuff. Its just /different/ from the other "standard" regexes. C) You are right about Lua wanting to be embedded in C (or some other language) - imagine however, a tiny "C" wrapper that forked iptables-restore[1] once and then used a lua parser to send all the data to that one process instead of forking iptables 1000's of times. The C code would be minimal, just enough to instantiate a Lua VM. D) Shorewall is YOUR fun project... so none of the above need apply. ;-) [1] - Believe it or not, http://www.netfilter.org/documentation/FAQ/netfilter-faq-4.html#ss4.5 says this is the "official" way to program iptables without using system() calls. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel