On Sat, 18 Dec 2010, Philipp A. wrote:
my dream for luatex/context would be a built-in lua interpreter (because lua is so fucking small) and optional modules for other, heavier, scripting languages (perl, ruby), which you don’t have to install. i don’t care if python is embedded or extended, i just want to write \directpython{for num in [9,2,4,8]: ctx.print(num**3)} (or sth. like that)
luatex is more than lua (or any prog/scripting language) embedded in tex; it is a programming language with acess to tex's internals. For example, you can find the dimension of each node in a vlist and use a different line-breaking algorithm or tweak the node list after line breaking is done (something like this is done in arabic line-breaking). If you do not want easy access to tex's internals, embedding/extending tex is relatively easy: see for example perltex. Whether the binary of the prog language is embedded in the tex binary, or in the wrapper script for calling tex is immaterial. On the other hand, if you want acess to tex's internals, you can either code it for a specific language (like luatex does), or provide an API interface to the internals. My understanding is that given the complexity of the tex codebase, the latter was more too much effort for too little gain. After all, python vs lua is a minor difference, compared to the programing abilities of TeX. Aditya