If you consider the lua implementation (the actual lua-5*.tar.gz
) as a library coded in C that you want to call from Common Lisp, your question becomes how to call a C foreign function from Common Lisp (i.e. asks about foreign function interface of your Common Lisp implementation). The answer is of course implementation specific. For SBCL, read its §8 Foreign Function Interface chapter. For CLisp, read §32.3. The Foreign Function Call Facility. The Common Lisp CFFI might be helpful. You might want to interface the Lua API to your Common Lisp implementation (but I'm guessing you don't need to; you probably want to run the lualatex
program in a different process).
If you consider Lua as a programming language specification (with its syntax and semantics, written in English in some report) you could also write your own Lua interpreter in Lisp. Since Lua is simple, that might be easy (but is it really worthwhile? Probably you'll need to reimplement many Lua primitives).
According to your comments, you might be interested in LuaTeX or LuaLaTeX. Then you really want to start a different process running that. And several Lisp implementations provide some way for this, for example SBCL provides run-program
and you might want more inter-process communication (on Linux, that might be unix(7) sockets, or fifo(7), or pipe(7)...). Many Lisp implementations provide some ways to use these. See their documentation.
If you need to understand more how to have several processes working together on Linux -one of them being e.g. lualatex
- , read some Linux programming book, perhaps the old ALP (freely downloadable), then intro(2) & syscalls(2). The poll(2) multiplexing system call is relevant, to be used in your event loop. Many Lisp implementations provide ways to do such system calls; for SBCL look into sb-posix
(asking for explicit software resources is off-topic on SO)