新足迹

 找回密码
 注册

精华好帖回顾

· 爪子痒痒了,也发发回忆录《一》(受AS等回忆录的启发) (2007-6-16) lilytop · 粤菜系列(2):萝卜糕 (2009-5-30) shangpin
· 老陶家常菜 (一) (2010-1-28) 老陶 · 参加活动:租房的那些事儿--可怜的小三儿<大结局> (2012-11-9) lostmyway
Advertisement
Advertisement
12
返回列表 发新帖
楼主:bulaohu

Rob Pike批评工业化编程 [复制链接]

退役斑竹

发表于 2010-7-28 23:31 |显示全部楼层
此文章由 大饼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 大饼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 bulaohu 于 2010-7-28 22:26 发表
我不知道航天技术上是否需要那样的实时控制,如果他们不需要的话,恐怕没有哪里需要那样极端。用汇编已经可以很好地控制时间了

其实大部分情况用C已经足够了。现在的嵌入式系统里汇编已经很少了。
很多情况下并不是用了汇编就能减小响应时间的。
我觉得主要是这两种情况要用汇编
1: bootloader
2: 数学运算和时间延时的函数库等。
Advertisement
Advertisement

退役斑竹

发表于 2010-7-28 23:36 |显示全部楼层
此文章由 大饼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 大饼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 garysmith 于 2010-7-28 22:36 发表
不需要,286加汇编就够了。

用286来控制个航天马桶是可以的。现在不论飞机还是航天都不会用286来做实时控制的。
连神6上马桶都用了ARM7(好像有点overkill)

发表于 2010-7-28 23:40 |显示全部楼层
此文章由 garysmith 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 garysmith 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 大饼 于 2010-7-28 23:36 发表

用286来控制个航天马桶是可以的。现在不论飞机还是航天都不会用286来做实时控制的。
连神6上马桶都用了ARM7(好像有点overkill)



这也看做什么用了。当时国内一直在囤积286的,不过有时用双机系统。现在可能更高档了,不过已经不关心了。飞船那样的当然要用高档的,但一般战术武器并不需要。

发表于 2010-7-28 23:47 |显示全部楼层
此文章由 bulaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 bulaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
军用的东西傻贵,往往是因为可靠度要求很高,性能上反而不一定要很高。其实一般的像巡航导弹之类的智能武器,286真的够用了

发表于 2010-7-29 00:22 |显示全部楼层
此文章由 rogerk 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 rogerk 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 bulaohu 于 2010-7-28 22:50 发表


终于被我抛砖把你给引出来了


你的砖抛的太远,砸到我的脚了。。所以我就冒出来了。
头像被屏蔽

禁止发言

发表于 2010-7-29 00:24 |显示全部楼层

他说的是类库还是语法?当他举例其他语言语法难看的时候好像

此文章由 iami 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 iami 所有!转贴必须注明作者、出处和本声明,并保持内容完整
都是因为要引用到类库,一个对象一个对象的实例化,才显得罗嗦。
可是这些对象哪个个可以省掉呢?
看着是罗嗦,但是清晰明了。适合快速理解
如果语法精简的如同中国的古文,只怕维护起来也要无比痛苦。
我宁可看,看一句懂一句的程序,连看三句;也不愿意看看一句,想三句,只看一句的程序。

如果go实现商用化,不出3年,类库也是迅速膨胀,到那个时候,java, c#3个短句,等同于go的一个单句但是3倍长的语句在屏幕上,给谁读都会崩溃吧。

语言不光是精简的问题,也要考虑到通俗易懂,容易维护。
签名被屏蔽
Advertisement
Advertisement

发表于 2010-7-29 00:30 |显示全部楼层
此文章由 rogerk 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 rogerk 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 大饼 于 2010-7-28 23:36 发表

用286来控制个航天马桶是可以的。现在不论飞机还是航天都不会用286来做实时控制的。
连神6上马桶都用了ARM7(好像有点overkill)


航天器上采用的内存和CPU, 都是特别强化过的,为了抵抗外层空间的电离辐射和高能粒子。以前记得在哪里一篇文章看到过,说是探测器还不是航天飞机上,用的就是类似于80386的处理器,但是,那一块小小的处理器板要几十万美金,就是因为是强化版。

现在手边能找到的就是这个了:
http://en.wikipedia.org/wiki/Radiation_hardening

另外,还有一篇以前看过的文章,将那些给shuttle写软件的人如何工作的,也推荐给有兴趣的人看看:
http://www.fastcompany.com/magazine/06/writestuff.html

They Write the Right Stuff
By: Charles FishmanDecember 31, 1996
As the 120-ton space shuttle sits surrounded by almost 4 million pounds of rocket fuel, exhaling noxious fumes, visibly impatient to defy gravity, its on-board computers take command.

The right stuff kicks in at T-minus 31 seconds.
As the 120-ton space shuttle sits surrounded by almost 4 million pounds of rocket fuel, exhaling noxious fumes, visibly impatient to defy gravity, its on-board computers take command. Four identical machines, running identical software, pull information from thousands of sensors, make hundreds of milli-second decisions, vote on every decision, check with each other 250 times a second. A fifth computer, with different software, stands by to take control should the other four malfunction.

At T-minus 6.6 seconds, if the pressures, pumps, and temperatures are nominal, the computers give the order to light the shuttle main engines -- each of the three engines firing off precisely 160 milliseconds apart, tons of super-cooled liquid fuel pouring into combustion chambers, the ship rocking on its launch pad, held to the ground only by bolts. As the main engines come to one million pounds of thrust, their exhausts tighten into blue diamonds of flame.

Then and only then at T-minus zero seconds, if the computers are satisfied that the engines are running true, they give the order to light the solid rocket boosters. In less than one second, they achieve 6.6 million pounds of thrust. And at that exact same moment, the computers give the order for the explosive bolts to blow, and 4.5 million pounds of spacecraft lifts majestically off its launch pad.

It's an awesome display of hardware prowess. But no human pushes a button to make it happen, no astronaut jockeys a joy stick to settle the shuttle into orbit.

The right stuff is the software. The software gives the orders to gimbal the main engines, executing the dramatic belly roll the shuttle does soon after it clears the tower. The software throttles the engines to make sure the craft doesn't accelerate too fast. It keeps track of where the shuttle is, orders the solid rocket boosters to fall away, makes minor course corrections, and after about 10 minutes, directs the shuttle into orbit more than 100 miles up. When the software is satisfied with the shuttle's position in space, it orders the main engines to shut down -- weightlessness begins and everything starts to float.

评分

参与人数 2积分 +16 收起 理由
degra + 8 感谢分享
bulaohu + 8 感谢分享

查看全部评分

退役斑竹

发表于 2010-7-29 11:15 |显示全部楼层
此文章由 大饼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 大饼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 bulaohu 于 2010-7-28 23:47 发表
军用的东西傻贵,往往是因为可靠度要求很高,性能上反而不一定要很高。其实一般的像巡航导弹之类的智能武器,286真的够用了

GPS制导的286购了。图像匹配制导的肯定不行

发表于 2010-7-29 11:41 |显示全部楼层
此文章由 ASTRA 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 ASTRA 所有!转贴必须注明作者、出处和本声明,并保持内容完整
无论是上天的还是汽车,医用设备,可靠性永远排第一。

退役斑竹

发表于 2010-7-29 11:48 |显示全部楼层
此文章由 大饼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 大饼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 ASTRA 于 2010-7-29 11:41 发表
无论是上天的还是汽车,医用设备,可靠性永远排第一。

楼歪了

发表于 2010-7-30 11:21 |显示全部楼层
此文章由 liaojining 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 liaojining 所有!转贴必须注明作者、出处和本声明,并保持内容完整
gmail的界面还是差了点。
Advertisement
Advertisement

发表于 2010-7-30 11:34 |显示全部楼层
此文章由 Dan.and.Andy 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 Dan.and.Andy 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 liaojining 于 2010-7-30 11:21 发表
gmail的界面还是差了点。


那到不是, 不是每个人都用 PC 和高端手机查收 email的

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部