Lua-L最近发生了点趣事与大家分享下。

Stefan是一个想把lua引向mobile的人,他发帖

1Let's make Lua mobile!

-- Persistence: Uses Pluto.

-- Safety:
--   Untrusted non-frozen scripts should be fine (b/c of sandboxing).
--   Untrusted frozen scripts should not be run.
--   (No protection against bad bytecode or malformed Pluto images)

其中提到了Persistence 和Safety

Pluto作持久化不仅可以持久化常规的的数据对象,还包括functions,thread;

但是发现Pluto 生成的是byte code而不是source ocde;于是他发帖:

《2》Pluto generating source code?

Here's another little idea:

I could imagine a Pluto-like library outputting pure Lua source code.
You would need a few special functions to recreate the coroutine stack
frames - but other than that, I don't see a real obstacle here. Or is
there?
Outputting source code would be quite elegant and certainly more
readable than bytecode.
Comments?

他轻描淡写的说何不生成source code呢,你可能需要一些步骤来重建coroutine ,这也没啥大不了嘛。(不知大家怎么想,我顿时耳赤了,我是做不来的)。

有人回到:

我看这个问题有点愚蠢,我喝着咖啡也不明白——老外很幽默的。

后来有人解释了各种lua类型的持久化,他不是pluto的作者但是造了个差不多轮子persistencehttp://code.google.com/p/corsix-th/wiki/Persistance.

这段故事3段就结束了,看来使用bytecode是绕不过的,于是Stefan开始质疑Lua的Bytecode

《3》Bytecode: Safe or not? / luac manual

"Lua always performs a thorough integrity test on precompiled chunks"?
I thought everybody agreed that bytecode is unsafe in 5.1.

How can the contradiction be solved?

我认为所有人都承认5.1的bytecode是不安全的,这个矛盾怎么解决?

Lua的作者说5.2去掉bytecode verifier就没事了,Peter Cawley在之前指出5.1的bytecode verifier有些漏洞

Stefan回复Lua的作者

Ah. So the manpage is basically in error because it doesn't know about
the exploits yet.

I really do hope that lbcv covers all the possible violations. Having
a safe way of loading untrusted bytecode is quite crucial to what I
want to be able to do with Mobile Lua.

Once we have safe deserialisation of Lua states - we can achieve total
mobility for all Lua code.

I don't know about you guys, but I for one am really excited about
that perspective.

啊哈,这么说手册基本上是错误的,因为它还不知道有这个漏洞,lbcv(这个我恕我无知)

一旦我们做到安全的持久化Lua states,我们就完全的实现了Lua Code的漫游。你们这些家伙怎么想我不知道,反正我一想到这个就鸡冻鸭冻。

然后他解释了什么叫漫游

Let me explain the principle once more.

Script S is run on machine A until it calls freeze().
It is then serialized into a Pluto image (or an image made by a future
library that is even better than Pluto).
The image is sent to machine B - which may or may not "trust" machine
A, it doesn't matter much.
There, it is deserialized and script S continues to compute. (Safely,
because of sandboxing.)
Later, the script may travel somewhere else again, of course.

Pluto requires saving and loading bytecode, so we need that ability
for this to work.

Script S在A机上运行直到call freeze()。然后持久化到Pluto Image(或者另一个未来的,比pluteo更好的库的image),然后该image发送到B机,在B机上还原为S继续运行(安全),这样,script可以自由的去她向往的地方。然后解释,Pluto通过bytecode来存取,所以需要这个功能(bytecode safe)

有人回:

Even a flawless byte code verifier is not the right tool to verify a Lua-State, by all I'm able to imagine

我用尽想象,即时是一个完美无瑕的bytecode verifier也无法验证Lua-State

Stefan回:

Well, it's one part. The other part would be a Pluto image verifier
which, among other things, calls the bytecode verifier for all
bytecode chunks.

I mean, this is an engineering task. No more no less. I don't know
exactly how much work it is, but I don't think it would take all that
long if a skilled engineer gets to work on it.

And I know there are some real Lua internals experts even on this very list :)

我想,不管多少难易,这就是个工作量。虽然我无法确切知道坑多深,但是我想一个娴熟的工程师要不了那么长时间就能填平。

况且这里就不正好有很多Lua专家。

有人回:

No amount of engineering will solve the Halting problem.

停机问题可不是什么工作量

Stefan回:

Sorry, but what does this have to do with anything discussed before?
Don't you rather want to contribute something related to the topic?

但是,这个跟前面讨论的有关系吗?拜托有点建设性?

有人(Rob)回:

He did.  And as a bonus, he didn't bring up some fantasy about us not
using money by next year.  *That* is off-topic.

怎么说他没有建设性呢?他没有整来一些什么的到明年都不花钱的幻想。(作者,整不对这个翻译)

Stefan回:

Haha. No it's not. It's extremely important and very real. Because
many people believe - wrongly - that money is something that will
continue to exist. And base their lives on this fantasy.

I offer you reality. Are you ready for it? Seems like you're a little
outside of it, Rob.

And since you chose to attack me: Who are you anyway? All I found on
your homepage is:

"Rob Kendrick has no website design skills."

Sounds... uhm, "impressive" :)

既然你选择攻击老子,你哪颗葱啊?我看了你的主页,那里只有“Rob 没啥网页设计能力”

很多人讨论停机问题,我想也是,verify bytecode你必须按照程序流程走啊,lua当然可以给你构造一个无限循环。

有人拿出General Magic

Stefan回:

Let me ask you this: How many of the apps you're running right now are mobile?

Say that your battery is running out within 5 minutes and you have
another machine sitting on your desk.

Can you transfer all your running apps over to that machine within 5
minutes - with all their unsaved data etc.?

Hmm... you can't?

Well then the mobile code revolution has obviously not engulfed your
computer yet.

Q.E.D. - it has not happened yet. But it sure can. :)

好吧,现在你的手机中运行这多少个app,假如电池将在5分钟耗尽,而旁边有另一台机,你在这5分钟能把所有的app传送到这台机上吗?包括所有没有存的数据?

你不行吧?

这说明代码漫游的革命尚未吞噬你的计算机

Q.E.D. –这一切尚未发生,但是必将到来。

有人回:

别人也曾经尝试过,也许你可以从他们的失败中汲取教训。

Stefan回:

Well to tell you the truth: I don't know why they failed. Maybe they
were commercial and that killed them. For example, Telescript doesn't
seem to exist in the open - at least I didn't see a download link
anywhere after a quick search.

I have spent some years thinking about mobile code, and I believe I
have experienced all the possible traps myself by now and I know now
how to realize such a system. I'm ready to overcoming some unplanned
challenges if any should present themselves. But actually the road
ahead looks pretty clear as of now.

Thanks for the input though :)

实话实说,我不知道他们为何失败,也许因为商业原因,比如Telescript没有开放,至少我没找到下载。

我思考代码漫游有些年头了,能碰到的坑都踩过了,我现在确信明白如何实现这样一个系统。我时刻准备着克服未知的困难,路在脚下,清晰可见。

有人回:

Rob没有对你人身攻击,但是你却对他人身攻击。你在lua的地盘撒野也不是第一次了。

有人回:

小屁孩就是小屁孩

“合理的人自己适应世界;不合理的人在努力适应自己的世界仍然存在,因此,所有的进展取决于不合理的男子。”- 萧伯纳

 

Stefan回:

I am neither arrogant nor stupid. I am far from both. I defend myself
when attacked, and sometimes strongly so, but always in proportion to
the attack. In this, I follow the same principle as all peaceful men
before and after me.

You seem unable to see some attacks for what they are. Why that is, I
don't know. Maybe a problem in perception.

Sorry to disappoint you, but I have nothing to change in my conduct.

我既不傲慢也不愚蠢,而且恰恰相反,我是正当防卫,有时过当但是遵循以牙还牙。而对于和平的人我是克制的。

看起来你没有看到他们的攻击,我也不知道这是为什么,也许是选择性失明。。

让你失望了,但是我行我素,走自己的路让别人说去吧。

未完待续。

转载于:https://www.cnblogs.com/yujiang2011/archive/2011/11/30/2269816.html

Lua新闻组的其人其事(一)相关推荐

  1. 骥遇伯乐,关键的一点是人与事的匹配

    骥,千里马也.骥已成年,驾盐车上太行.四蹄伸展,膝盖弯曲,尾巴下垂,脚掌溃烂,口水洒了一地,大汗淋漓,走到太行山的坡道上怎幺也拉不上去了.这时,伯乐来了,拉着马的缰绳哭泣,并脱下麻衣给千里马盖上.千里 ...

  2. 用微笑面对一切令你烦恼的人或事,不久之后,你会发现令你微笑的人或事变得越来越多了。

    用微笑面对一切令你烦恼的人或事,不久之后,你会发现令你微笑的人或事变得越来越多了. 原文地址:http://blog.csdn.net/zhao4zhong1/article/details/4261 ...

  3. 用文本挖掘回顾2017年的一些人与事

    一.前言 终于做出这张图时,我突然有点感慨,这就是2017年我的日记中提到过或记录过的一个个人名,当然为避免引起不必要的麻烦,隐去了许多亲人朋友的名字.想到一辈子说长也长,说短的话,几十张词云图也就概 ...

  4. 微软2018年重组背后,扒一扒受影响的人与事

    ▼ 点击上方蓝字 关注网易智能 为你解读AI领域大公司大事件,新观点新应用 前几日,微软宣布公司内部架构进行大调整,拆解多年来象征微软的Windows和设备部门,成立两个新部门--体验与设备部门.云与 ...

  5. 再谈“所托非人勿怪人,忠人之事需灵变”

    再谈"所托非人勿怪人,忠人之事需灵变" 文章作者:cat442 之前论述过一次,并总结了一个主旨:要做到所托是人,首先要识人 :识人先要识己.不假不识之人.受人之托,力求成人之事. ...

  6. 所托非人勿怪人,忠人之事需灵变

    所托非人勿怪人,忠人之事需灵变 文章作者:cat442 前一段时间在网上看到一条消息: 微软中国于3月12日证实:北京盛安德科技发展有限公司以正版操作系统半价的价格销售的3套Windows 2000  ...

  7. 转:领导力是每个人的事

    个人理解: 导力与人际关系有关,与信誉有关,最终与你的所作所为有关.向内看,向自己求,对他人产生积极的影响. 领导力的榜样就在你的身边.任何一个人,都可能成为他人的榜样,所以领导力是每个人的事情.一旦 ...

  8. 每日新闻:阿里云获GNTC2018网络创新大奖;百度杀毒软件正式谢幕;薪人薪事获金蝶1.84亿元C轮投资...

    关注中国软件网 最新鲜的企业级干货聚集地 趋势洞察 陈肇雄:工业互联网正处产业化发展关键时期 在近日召开的"工业互联网的未来"主题研讨会上,工业和信息化部副部长陈肇雄指出,近年来, ...

  9. “对人不对事”和“对事不对人”

    在各种项目沟通交流,甚至日常生活中,尝尝会发现两种截然不同的看人看事的观点理念.同时,面对这两种不同的观点理念,很多人往往各执一词,面对同样的人或事给出截然不同并彼此对立的矛盾--这两种看似矛盾的方法 ...

最新文章

  1. SBO-COMMON库中查各个表的大小的SQL语句
  2. jquery easyui datagrid 排序列
  3. Quartz 入门详解
  4. zend解释php过程,Zend framework处理一个http请求的流程分析
  5. 84.负载均衡哈希算法:ip_hash与hash模块
  6. 华为机试HJ100:等差数列
  7. pytorch使用说明2
  8. 从内存模型角度说明volatile与synchronized在并发特性方面的区别
  9. 联想开机按f2怎么修复系统图解_联想笔记本开机f2修复电脑步骤 - 卡饭网
  10. android平板用office,现在可以在 Android 平板上使用你所喜爱的 Office 应用程序了...
  11. STM32F407——SYN6288语音播报模块串口一修改为串口三
  12. 数据分析 超市条码_条码的应用
  13. 拉格朗日插值的优缺点_如何直观地理解拉格朗日插值法?
  14. Nginx入门以及开源博客Tale的部署
  15. 课程预约小程序开发需要哪些功能?
  16. asp.net会员卡管理系统VS开发sqlserver数据库web结构C#编程
  17. pg预热插件pg_prewarm
  18. SSL证书的加密算法有哪些?
  19. 【Git版本控制】Git基础入门和分支管理
  20. exam平台Java试题阶段(一)

热门文章

  1. function在mysql里总是出错_如何在MySQL函数中引发错误
  2. 实例:供应商管理报表需求调研报告
  3. java更改svg图片颜色_如何使用Leaflet库填充SVG图像中的颜色
  4. oracle+执行变量语句,ORACLE sql 语句的执行过程(SQL性能调整)
  5. javascript代码_15个最好用的JavaScript代码压缩工具
  6. 嵌入式系统功能需求分析_机械管理系统如何物料需求分析
  7. Puzzle——模拟
  8. 实验2.4 使用系统函数pow(x,y)计算xy的值
  9. 如何在html嵌入html网页
  10. #C语言#重定义问题