Erlang 脚本语言解释器
有谁知道 Erlang 中脚本语言解释器(适合游戏的东西)的实现吗?像 Javascript 或 Lua 这样的东西会很棒。
Does anyone know of an implementation of a scripting language interpreter (something appropriate for a game) in Erlang? Something like Javascript or Lua would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以尝试 C/C++ 端口驱动 来运行 lua(或其他)语言解释器, erlua 更有可能是你所需要的(我猜它通过端口驱动程序工作)。
You may try C/C++ port driver for running lua (or other) language interpreter, erlua is more likely what you need (it works via port driver, i guess).
Erlang 本身可以用作脚本语言。请参阅 Erlang 文档中的 escript。
Erlang itself can be used as a scripting language. See escript at Erlang docs.
我赞同 Vijay 的建议,即使用 Erlang 本身。不过,我还会指出 Reia 的存在,这似乎正是您所要求的。
编辑:是的,所以有 erlyjs,一个针对Erlang 虚拟机。我不知道这个项目处于什么开发阶段,进展如何等等,但你可以检查一下。不确定是否需要提前编译 JS 代码,您需要自己查看...
在这里您将找到代码库的几个 github 分支之一。据我所知,一切都在 Erlang 中。
再次强调,这不是一个成熟的产品。但是,随着 CouchDB 的兴起,类似的东西实际上可能在某些重要方面有用......所以它可能会很快变得成熟。
I second Vijay's suggestion to use Erlang itself. However, I'll also point out the existence of Reia, which seems to be precisely what you ask for.
EDIT: Right, so there's erlyjs, a JavaScript compiler targetting the Erlang virtual machine. I've no idea whatsoever if what stage of development this project is at, how well it's progressing etc., but you could check it out. Not sure if it requires ahead-of-time compilation of JS code, you'd need to see for yourself...
Here you'll find one of several github forks of the code base. All in Erlang, as far as I can see.
Once again, this is not a mature product. But then, with the rise of CouchDB, something like this might actually be useful in some significant ways... so it might hopefully actually become mature somewhat soonish.
这个问题出现在谷歌搜索中 - 但评论没有回答最初的请求。原始发帖者寻求的答案是 github 上的 luerl - https://github.com/rvirding/luerl
Luerl 是在 Erlang 中实现的 lua 5.3 vm,由 Robert Virding(Erlang 最初的开发人员之一)开发。
This question comes up in google search - but the comments do not answer the original request. The answer the original poster was seeking is luerl on github - https://github.com/rvirding/luerl
Luerl is lua 5.3 vm implemented in Erlang and developed by Robert Virding - one of the original Erlang developers.