哪些编程语言支持热代码交换和/或沙盒? [英] Which programming languages support hot code swapping and/or sandboxing?

查看:42
本文介绍了哪些编程语言支持热代码交换和/或沙盒?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个基于网络的 MMO 游戏,允许用户编写 AI 并将其作为游戏的一部分运行.我计划将 Html5 用于图形,并希望它基于网络,以便可以从智能手机访问.我需要找到一种支持沙盒、并发、热代码交换和大型库的编程语言,使事情变得更容易.

I would like to write a web based MMO game that will allow users to write AI and run it as part of the game. I plan to use Html5 for graphics and want this to be web based so it can be accessed from smartphones. I need to find a programming language that will support sandboxing, concurrency, hot code swapping, and a large library to make things easier.

此时我的研究是关于 Erlang、Stackless Python 和 Lua.任何帮助表示赞赏.

At this time my research is turning up Erlang, Stackless Python, and Lua. Any help is appreciated.

推荐答案

Erlang 支持沙箱,所以你可能不想使用它,至少对于你的脚本语言是这样.Erlang 无论如何都不适合编写脚本,所以这可能没问题.

Erlang does not support sandboxing, so you probably don't want to use that, at least for your scripting language. Erlang isn't ideal for scripting anyway, so that's probably ok.

Erlang 为这样的项目制作一个很好的后端语言,但是,我强烈推荐它以个人经验.

Erlang would make a good backend language for a project like this, however, and I'd highly recommend it from personal experience.

我不认为 Stackless 也有沙盒支持,所以这可能也不在列表中.

I don't think Stackless has sandboxing support either, so that's probably also off the list.

另一方面,Lua 明确支持沙箱,并且也有协程:http://lua-users.org/wiki/SandBoxes, http://lua-users.org/wiki/CoroutinesTutorial,所以我会推荐你​​的脚本语言.

Lua, on the other hand, explicitly supports sandboxing, and has coroutines, too: http://lua-users.org/wiki/SandBoxes, http://lua-users.org/wiki/CoroutinesTutorial, so I would recommend that for your scripting language.

Lua 也非常容易嵌入,如本教程所示:http://heavycoder.com/tutorials/lua_embed.php(你甚至可以在没有加载所有库的情况下逃脱,因为无论如何你都想对其进行沙盒处理).

Lua is also extremely easy to embed as seen in this tiny tutorial: http://heavycoder.com/tutorials/lua_embed.php (and you can even get away without all the library loading stuff since you'll want to be sandboxing it anyway).

这篇关于哪些编程语言支持热代码交换和/或沙盒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆