TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Getting started with mruby

33 点作者 mattetti大约 13 年前

2 条评论

Derbasti大约 13 年前
I have quite some experience with Lua scripting and embedding. Honestly, I can't see any other language taking that throne any time soon. For all its quirks, Lua is an amazingly powerful language that was designed from the ground up for embeddability.<p>You know, you can replace Lua's memory allocator with your own by overwriting one simple function. Your platform does not support double? Lua has you covered: Change one define, and Lua uses short as its numeric data type. Since it is all ANSI C, this enables you to run Lua on a fixed-point signal processor if you must.<p>And then there is memory consumption and execution speed. Can you fit Ruby in 150k? Lua fits just fine, including its (small) standard library. Also, it is insanely easy to embed into your C codebase. Basically, it is one include and one struct you have to carry around and you are all set.<p>For embedding, Lua is just awesome!
评论 #3890216 未加载
sciurus大约 13 年前
Can anyone provide insight into how mruby's implementation differs from the reference 1.9.3 implementation?
评论 #3889826 未加载