Difference between revisions of "Talk:Embedding a new programming language as a module"

From AOLserver Wiki
Jump to navigation Jump to search
(apache mod_lua link)
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
Would be useful here?
 
Would be useful here?
 
  
 
----
 
----
Line 13: Line 12:
 
Ns_RegisterShutdown(MyLuaCleanup, ...);
 
Ns_RegisterShutdown(MyLuaCleanup, ...);
 
</pre>
 
</pre>
 +
 +
----
 +
 +
Also eventually the reader may need to learn about <pre>Ns_ConfigGetValue</pre> to complete more complex tasks.
 +
 +
----
 +
 +
I honestly don't know how to go about building or configuring a ".lua" extension handler. The full-fledged example I would look at (PyWX) is a great example of a C++ module, but it's a bit difficult for me to translate what's going on in PyWX to what I should do for Lua with a C module. I might be able to work out the extension handler portion, but getting Lua's "print" to output correctly might be tricky. -- --[[User:Caveman|Caveman]] 08:42, 6 December 2005 (EST)
 +
 +
== apache mod_lua link ==
 +
 +
There is an Apache "mod_lua" on Sourceforge that could be useful for a "real" nslua module developer:
 +
 +
[http://sourceforge.net/projects/modlua/]
 +
 +
[http://cvs.sourceforge.net/viewcvs.py/modlua/modlua/mod_lua.c?rev=1.3&view=auto]
 +
 +
--[[User:Caveman|Caveman]] 11:09, 9 December 2005 (EST)

Latest revision as of 16:09, 9 December 2005

Do you think any examples like:

Ns_Log(Debug, "opening lua state");

Would be useful here?


What about proper termination:

Ns_RegisterShutdown(MyLuaCleanup, ...);

Also eventually the reader may need to learn about

Ns_ConfigGetValue

to complete more complex tasks.


I honestly don't know how to go about building or configuring a ".lua" extension handler. The full-fledged example I would look at (PyWX) is a great example of a C++ module, but it's a bit difficult for me to translate what's going on in PyWX to what I should do for Lua with a C module. I might be able to work out the extension handler portion, but getting Lua's "print" to output correctly might be tricky. -- --Caveman 08:42, 6 December 2005 (EST)

apache mod_lua link

There is an Apache "mod_lua" on Sourceforge that could be useful for a "real" nslua module developer:

[1]

[2]

--Caveman 11:09, 9 December 2005 (EST)