Hacker News new | past | comments | ask | show | jobs | submit login
Extending and Embedding (lethargy.org)
16 points by ddispaltro on Oct 7, 2009 | hide | past | favorite | 9 comments



Interesting that the author likes Lua as an embedding language, but doesn't like the language itself. If I were in his shoes, I think I couldn't be so subjective. Kudos to him.


It's a very subjective article:

> Okay, in all fairness, I didn’t give Tcl its due. It’s likely the most widely embedded language. I just don’t like Tcl and it shows.

If you're talking about embedding languages and don't even cover what Tcl offers in terms of a C API, you really are doing your readers a disservice.

I think he should have just written an article on why Lua is good for embedding, which is really what this is about, and is a very reasonable thing to say.


Lua is amazingly popular in the game industry for exactly this purpose.

- It has an excellent C/C++ interop layer

- You can predictably constraint space and time needs; even on such resource constrained devices such as game consoles.

- The threading model is lightweight enough to give a significant portion of game objects their own execution state. This enables scripters to write "latent" behaviors; very useful for actors in the time-oriented world of games.



using lua is by far the best language to embed -- its why apache httpd is including mod_lua by default in 2.4, the next major version.


Isn't it included because the httpd committers happen to like Lua? I mean, it is a great language for that, but didn't it happen more because someone did the work, and did it with Lua, and was already a respected committer?


^^^ wrote mod_lua


Actually Brian McCallister wrote much of the initial implementation, then called mod_wombat.. I just helped with various bits and kinda championed for including it in apache httpd.

I've used lua for several other projects, and I love its embedability, compared to any of the other language, nothing remotely close to mainstream is anywhere near it.

I'm most interested in seeing how LLVM based things go though, I imagine at somepoint you will be able to just embed LLVM JITs and run langauge X on them, though the API is gonna be complicated compared to Lua's.


> nothing remotely close to mainstream is anywhere near it.

Whether you like it or not, Tcl has been and remains an excellent language for this kind of thing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: