2009年12月17日星期四

奇迹之树

在车上迷糊了一阵,就到站了。
眼前是个对我而言全新的地方。
独有的风景,还有这里的人在生活着。
恩,来接我的人呢?

事情从前几天说起。
放寒假了,我在家里缩着。
也可以说就是闲着的吧。
想起以前时候是一整年天天都忙的不知道做了什么,
此时躺在床上看看电视,随意的换换台。
还真想好好分析下这叫什么感觉。
中午妈妈回来,有了一个新鲜的消息。
至少她是这么认为的。
说有个远亲戚叫我放假去玩。
我当时随口就答应了,
后来想发觉点什么的感觉,
但就似乎是什么都不知道的样子,
反正就上路了啊。

到底是谁啊?
我带着行李上了路,
看车窗外的风景变化了一阵又一阵的,
就开始思考这个问题。
陌生的地方,陌生的人。
真的,即使见过面也只是很久以前有过吧。

车是驶进了一个独特的山区,
在丘陵地区住习惯的人,
在一路上上下下的,
实在...
也不过就如此嘛。
于是一路还是按习惯瞌睡着。
还是终于到站了,我揉揉眼睛下了车。
车站前的广场上,我一个人,站在中间。
只有我停留下脚步的。

“是哥哥吗~~~”
她随后叫起我的名字,好萌的声音。
她拉着一旁大人的手,就向这里我来。
我赶忙走过去,让她停下步子。
“阿姨好!!”我对她笑过后转向一旁的大人打了声招呼。

此时时间已到黄昏了。
好吧,下面没什么特别的。
去她们家,一个单独的屋子。
[待续]




当天很累,
忽然地在一个移动的小盒里晃动了这么久。
本身最近惬意地骨头都有点松了,
再这么,这么。。。
还是休息吧。

当晚,和他们一家,
只是很简单的吃一一餐。
三个加我一个,正好围着一桌。
热腾腾的食物,在冬季里真是驱走了寒意啊。

“真谢谢了,给你们家添麻烦了。”
我有点迷糊的移开椅子。
“没有的,本身就是我主动邀请的嘛。
恩。。。给你单独的房间已经准备好了,
就是那间”

阿姨为我向一件门指了指。
她的丈夫和女儿在一旁,
似乎是在为什么食物讨论着,
一时没有留意我这里。
“那。。。我想先去休息会”

我一人在一间屋子里,
合上门,光上灯,
我静静的一个人。
窗口不断的有丝丝的风侵入,
我一个人,一个人
在遥远的地方,
一个山间仿佛会在某一天会与外界变得无穷远的地方。

我觉得很疲劳,
可是此刻只是真的无法睡着。
明天啊,一早还要出门。
说是正是这个地方一年一次的集会,
说我一定要去参加一次集会的活动。

好吧,会是如何的活动呢。
各种各样的形式都会有的,
让我想到了年历上的图案,
一页,又撕落一页。
静止的画面留在了逝去的时光中。
自己的身影交错在数字的增长之中。

感觉是很遥远的距离了。
他们一家感觉对我是很熟悉了。
而也能感到熟悉,
可是,可是在记忆中还能发现什么
来证明自己的感受。
或者说,我相信什么
只是因为我以前也这么认为着。

当今天从车站离开,
跟着她们,
随着山间的公路,
到了他们家的小屋。

单独的一间小楼,
真是精致啊。
周围一片开阔的景象。
即使走进屋里也有地的触感,
而某个屋子,有门有窗,
却如同悬浮在空中,
安安稳稳,稳稳地,一点气息也无法触及。

“我们已经在这里住了近40年了,
你以前来的时候还很小呢。”
我听到这样的话,
确实吧。
我的新鲜和喜悦感
仿佛被风吹走了。

后来,不知多晚,
还是终于睡着了。

======================


第二天,就是第二天。
似乎感觉忽然不同了,
自己一下有精神许多。
大概。。。真是没睡好吧,
这种奇异的清醒的感觉。

我很迅速的起身,
用衣服把自己打包,
就推开了小房间的门。
背后是窗户透进的阳光,
照得身子暖暖的。

“早上好啊~~”
是可爱的妹妹向我打声招呼,
然后向餐桌跳着跑去了。
他们一下已经准备好开始早餐。

“都起的这么早?”
我其实也不晚的,
虽然是假期里,
也就绝对平时的感觉的早晨。
“恩,今天是早了点。
这么重要的日子,又是一个好天啊”

这是门铃响了,妹妹冲到门口。
“妈妈,隔壁的阿姨送来礼物了。
是几株植物。”
然后他们一家都起身去门口道谢了。

我也起身,在他们身后。
看着他们在交谈,分享喜悦的感觉。
又是植物吗?
为什么是又是的感觉。。。

门砰的声,合上了。
一起都回到餐桌周围。
“你还种一株吗?”
“这。。。”
“还是上次来的时候种的了。”
“好像失败了”我说。

“我也不清楚种到哪里了,
这么多年好像确实没有长出来。
不过也不要紧嘛。”
“恩。”我答应道。
我是在好好种的吧。
这次和妹妹两人下了屋。

我跟着她来到院子,找了块空的地方。
我比那个时候长大了好多,真的。
不过觉得对种点小花小草是更陌生,
那就凭借自己的知识吧。
自己可以判断一些事情,
思考出一些人为正确的方式。

“恩,好了。”
她对着我笑了笑。
笑得很开心啊。。。
我呢,心里祝愿下吧。
自己这次所作出的,
会有成功的结果的。。。

===================

“你们都不去啊?”
看来一人去集会的地方了。
“恩,我去学校,那里大家有活动哦”
“呵呵,我们都今天还有点工作上的事情要做。
你一个去不要紧吧。”

确实,我都长得这么大了。
一个人出门都不是什么的。
只是。。。只是听到这样说,
有失落的感觉。
不过,其实嘛,也不算什么的。

我们一起来门口的公交车点。
阿姨在站牌上刷几下卡
出来的圆形小牌,
递给我一个,也递给妹妹一个。
“用这个上公交。
同路的今天会有很多人的,
你和大家一起参与进去就是了。”

很快,车来了。
“一路顺利哦~~”
“恩,谢谢。”
我回答道。
又是车,又上路了。
一路在山间弯弯曲曲,
对以前的人一定是很艰难的路吧。
我坐在车里,随风景移动。

“要去的是一个神圣的地方。”
我在心里念着,满车都是同行的人。
大家都安静地,
都望着窗外,仿佛遥远的某个地方。
虽然有山的阻隔,
但是在坚定的眼神下最终能被看见的。
“唉,那我是何种心情呢。。。”
我实话,我感觉不到什么神圣。
我相信我只是个无关的,或者只是个旁观者。

人似乎就是被什么束缚着的。
到这个时候,到这一个。
在这里的人,被联系在一起。
在只属于山里的这座城市。
而我,更多却在此刻想着一种遗憾。
因为。。。这里似乎不需要容纳我的感受。

我说下我知道的关于集会
以及今天活动的成因吧:
这个是围绕一棵树展开。
大概就是这里的守护之神之类的。
出于某种传统,
这里的人的生活就
延续在对树的敬意之中。
从很久远的时刻,
一直,一直的
流传了下来。。。

就算一种习俗吧,
照着做就是了,
我如此想着。

======================

车驶向山间更深入的地方,
也就是山间的山间了。
我走下车门的台阶环顾周围,
忽然间觉得周围又多了几层阻隔。
如果在很高的地方看,
在这里众多的树木之间是发现不了我的。

而这里四周遍是茂盛的树木。
记得当初刚到山间,
对此满目的绿色还是很新鲜和兴奋的,
估计也由生了对生命的敬意吧。
不过待久了,觉得就应该如此。
人也好,植物也罢,
都是生活在这里的一员。

只是人常自作多情,
看着风景植物之后,
把自己随意有的,胡乱的一些情感,
都强加在他物之上。
这就是生活丰富的地方。
绘制着自身的色彩,
然后由各种色彩,显得虚假的色彩,
来构成属于人的生活。

“大家走吧~~”
听到声音,我向远处看了看,
人潮向一天山间的路上
涌去。
那是山间的,更深入的地方。
“又能往里走啊?”
我感觉是
要去一个放弃自身存在地方了。
何必呢,不就是个一棵神树吗。

这里树到处都是,
大家自身的敬意的存在,
何必托付给一棵麻木的
不懂得人间感受的植物?
还为此在每年这个时候,
如此麻烦,
由山往山里,
还不断地往山里。
要到何处才能心里才满足啊?

我只是个旁观者吧,
我实在没有那种需要的敬意,
一种力量
让途中的任何艰难都变的微不足道。
或许人们只是想登山吧,
我这样想,
一年的这个时候,天气真的不错。

我大口的呼吸,
这里的空气是格外清新。
一直地,在路上,
随着人群一起走。

或许我起初想得太简单了,
我已经是活动的参与者,
山间的道路在深入的地方,
真是有异常的艰难啊。


======================

或许这才是山路应有的样子。
我才意识到,我习惯了在公路上走了。
建设好的路,即使是在山间也是很平稳的。
不论白天还是晚上,
都可可以安心的走在路上,
享受着建设者种下的守护。
心间,如此温暖的感受,
桔黄色路灯下一人的身影
也不会孤单。

走在山路顾不得多想,
因为这里的路是
一种会让感到危险的路。
如果在山间一过失脚滑,
自己就会消失在
一个无人知晓的地方了吧。

我小心的看着路,
心里也变得紧张起来。
而且。。。而且。。。
过了多久啊。
天空中日光来源的
那个无法被视线捕获的亮点,
已经在艰难的爬升中
到了越来越高的地方了。
这还是冬天啊,
仿佛自己被丢弃到挥汗的夏日。

自己的的每一个举动
都能施展得开。
可以流汗,大呼口气,
就又可以加入到随意的奔跑中。
不过夏日是人也会
充满倦意的。
可以充满精神但是
有时会十分不情愿施展出来。

今天,感觉已经走了好远的路。
我是早已放弃了作为一个旁观者
的这种最初的想法。
因为脚下的这些行程
是确确实实的已经被自己走下了好多。
腿已经开始,已经开始
有点发软了。

“好累啊。。。”
我已经渐渐的放慢了脚步。
到底还要走多远。
我又想远处看,
只是无尽的山间景色。
高低起伏的地面,
随意生长的树木,
还有在今天出现的
好多的行人。
那些山间的存在
能感受今日的不同吗。

我是真的走不动了,
这里果然
是不属于我。
在山路的那一头,
没有属于我的神在等待着我,
而我也从来没有指望过
能获得那个神给予的守护。

而且。。。而且。。。
那只是一棵树,
被这里的人们认为是神圣的一棵树。
或许它确实有一些与众不同的地方吧。
可是,这由能如何。
它只是一棵树,
能感受得了人间的众多故事
和情感吗?

如此细流流淌在山间的人群,
究竟让一棵树能够施舍什么,
再或者就算我们所希望,
又能向一棵只是有些些特别的一棵树,
索求到一点点什么呢。。。

==========================

真的,
这里没有属于我的山间的尽头,
没有属于我的神之类的一棵树。
一不小心,脚尖碰到了块小石头。
接着腿一发软,身子便沉沉的压在腿上。
我瘫坐在地上,沉下头看着地面。
感觉天空一下就远离了自己,
这个冬季里明朗的,悠远的天空。

天空哪里啊,是云层惬意的休息的地方,
是飞鸟自由舞蹈的地方,
是广阔的无边的,
而凭借自己的手和脚,
却是遥远的,永远的
似乎不可能到达的地方。

就是,那棵树又不在天上,
它只是生长在它自身存在的那个山间。
我们本来就不是在去遥不可及的地方。
可是,那棵传说的树就生长在
属于我的那一片天空之中吧。
天空真的可以好多太美的东西了,
有风,有雨,有日光,有彩虹。
我在地面上可以想象就生活在
那些奇妙的感觉之间,
还是。。。用美妙这个词吧。

我瘫坐在地上,天空在我的脑后,
本就是遥远的用想象才能融入的地方。
我的视线触及地面后,渐渐清晰。
看到的是山路的石头,
也有落下的树叶的几片,
被抛弃的等待被风吹走的,
会将消失在无人知道的地方的,
树叶与灰尘。

我向路的后方望去,
已经看不到起初的入口了。
不过不要紧,它就在那里,
我知道,虽然有些距离。
但是它连接着我熟悉的地方,
以及连接着我平日生活的场所。
还是在有个地方,
保留着我生活留下的印记的。

我仿佛感受到了遥远的熟悉的地方,
我用力用手撑了撑地面,想站起来。
不过,还没有到回去的时候哦。
那里在现在的时刻也不需要我,
我的行程,被计划好,
也是被我认可的最好的行程,
将我从那个让我觉得会安心的地方,
把我扫除了出去。

用力之后,我的手还是一松,
没能支起身子。。。
天空的距离又遥远了。
什么嘛,本来就足够远了,
还在乎一下个人的身高?


======================


“我拉你一下。”
我转头,一旁伸来了只手,
温暖的手,我也递上我的手。
她用力的紧紧握着,
我看到那只手已不如年轻的我
皮肤这样平滑,
是时光留下的印记吧。
我沿着她的手臂,抬起头,
看到了她微笑的脸。
她的声音柔和的说:
“再多小心一点哦,
前面不远的地方就到了。”

在她帮助之下,
我站起立在山路之上,
拍了拍沾上的灰尘。
“谢谢。”
此时,那
个帮助我的人已经走入了
前进的人群之中。

刚才我跌倒了,只是有点,
只是有点不小心吧。
我们要去拜访的只是一棵树
而已。
相比天空,是个很近的地方了。
大家在今天,都去一个同一个场所。
有人带领着方向,有选择好的路。
我只是在走动而已,
如此简单,
对啊,本来就是如此简单的一件事嘛。

我又向人群里望了望,
刚才帮我的是那位吗。
很像啊,
可是刚才没有来及看清楚。
恩,到前面说不定还能看到她。
并不是还有什么想说的。
只是刚才那张脸上
忽然间给我的强烈的感受,
我想知道是到底源于
如何的轮廓特征。

后来终于,也不是很久,
行程的目的地到了。
果然是一棵特别的树,
相比四周的明显粗壮了许多。
估计是人合抱都不够,
不过这里人试过如此显得不敬的行动。

树的四周是片开阔的地方,
大家在四处欢笑交谈休息。
我呢,四处闲逛了几圈。
后来就找了块地仰面躺着。
合着眼,不去看什么,
而此刻也不愿能想什么。

==============================

随后,在回去的车上,
我坐在窗边,
吹着风。
是如此的一天啊,
估计今天又会累得很早就睡了。
不过今天的行程就可以算如此结束。
最后的事情又是在移动的车上,
漂浮在公路上,漂浮在一路的气息之中。

自己还是先到了那棵树了,
虽然知道它有特别之处,
也确实,周围没有那么粗壮的。
只是因为它的特别吧,
让这里的人,专门花上一天的精力,
就只是为了来树的周围
这么走一走。

我当初想很快就能到树边,
有些活动,然后看看便是了。
结果呢,路上几乎占了最主要的时间。
漫长的路去,再返回的路上时,
自己的脚都几乎麻木了。

对于去那里的路,
结果是到达了那里。
这就是最初以为的结果,
也是实际到达的结果。
对于这一去一回的我来说,
这个结果可以说是最如期的,
或干脆就说是最应该的。

那一路啊,
被足迹留下的会以为漫长到没有尽头的
山路。
与此刻在身后远去的树的所在地,
还在我心中的树的存在感,
天空的光影之下
都太渺小,
小到程度让我在体会自己的感受时
也充满了层层难度。

本就不是属于我的树,
本就是对我没有意义的神圣之感,
本就是不会体会人的感受的山间境地。
而且可以说,我离开了
山间的那个艰难到达的地方,
甚至可以认为
那个地方就根本不曾存在过。
我只是在夏天里,广阔的空地方
一个人晒着太阳,哼着歌,
即使中暑也不会知觉。

“今天一路还顺利吧”
天色傍晚,我会到了那个所住的屋子。
阿姨和妹妹已经回到家了。
“哥哥,有有趣的事情吗?
说给我听啊”
我听到这样的问题,
感到些意外,一时想不出如何作答。

“好了好了,你们先去院子里玩玩吧。
我要准备晚餐了。”
“那,要我帮忙吗?”我说。
“不用了,只是点很简单的东西。”
“就是,看我妈妈都说了。
那我也不不能赶忙了哦”
妹妹吐了吐舌头,
拉着我就向门外走去了。

=============================

“今天你没看那棵树啊?”
“恩,学校有活动。
不过出于这里的习惯,
也是相关的活动哦”
“确实,你们还小了点。去那里不容易。”
“你啊讨厌,欺负我小嘛。
我去过次数至少比你多啊。”
“怎么去去的?”我问。
“怎么?还能怎么啊。走过去喽。”她冲我笑了笑。

我沉默下来,
因为我此刻不愿说话的,
妹妹她这样的年龄
还真是整天充满欢笑啊。
我抬头,灰暗的天空已经不再清晰。
现在无事,只能在院子里走。
还真是复杂的院子呢,
这里有不少东西,还杂乱的生长些植物。
“啊,那里害怕。”我听见。
“果然,你也不常来这里吗?”
院子就和一个小山相连着,
确实平时是完全不必要走到这里。

而我此时只是没有停下步子,
妹妹在后边拉着我身后的衣服。
只有残留的暮色从枝叶的间隙中穿过,
光斑留在地面和我们的身上。
还不是有虫鸣,和耳边飞过的异物。
不过就看到前边有片较开阔的地方,
我还是想再几步走到那里。

“啊~~~”
背后的声音,只是被石子绊了一下。
她身子向前面压来,
我正要转身回头看,也没站稳,
就向前冲了几步,
一起跌倒在面前的空地上。

我又拍了拍身上的灰,
唉,熟悉的感觉。
幸好这里没有杂乱的树枝,
不然就要擦破点皮了。
现在可以说没事。
我起身,
“不要紧吧,
走,回去吧。”

我看见她没有动,
我喊她而她只是愣着
在望着什么。
于是我也走过去。
眼前是两株小小的植物。
不过并不是弱小的样子,
对这个植物品种来说,
可以说是长得十分旺盛了。

========================

“还熟悉啊”她静静地说。
我站立着,也静静的望着。
此刻我心里也有了熟悉的感觉。
如此的景象,大概很常见吧。
以后的话,估计好能见到更多的。
我心里这样说,这样也是对于我来说,
最直接的想法了。
可是,可是。。。
确实一种不同的很熟悉的感觉啊。

“哈哈,这么多年没来看他们。
都长得这么大了啊。”
她笑着,还含着刚才摔倒时的疼痛,
转过头对着我。
对,我确实发觉,就整如她说的。
好多年前的某一天,我们收到树种,
在一个早晨收到树种。
然后选择了这个空地,
因为就觉得这里有神秘感,
是一种很特别的正是要寻找的地方。

就是一个以后会被遗忘的地方吧,
也是一个注定会重新回到的地方。
不过说注定,在此时只是种巧合罢了。
如果在这里让我忽然间有了感触,
也只是自己的自作多情。
但愿如此,一切就简单了。

今天一早还刚种了一次,
我只能说用上了我知道的那些技能。
可是对于它们究竟能长成怎样,
是完全没有指望的。
至少是如曾经,还小的时候的自己。
每天都来种植的地方,
一天天的来,而在那是就从来没有失望过。
只是在等待,等待。。。
一直到假期临近结束,不得不回家。
而之后不能再对它们的生长有过关注
或者指望。这就是遗忘吧,
而且一直至今。
这就是上次,还是小的时候,
发生在这里的故事。

此后他们,就是被遗弃的了。
没有人再关心它们的生长,
而且很可能,也关注它们。
它生长出来,生长得更好,
都只是在体现着自身的存在,
或许永远不会有人的情感会加注在它们身上,
哪怕是说出一句轻轻的肯定。

==============================

那就是属于植物的意义吧,
生长,不断的生长,
它们不懂得犹豫,
也和旁人的留意无关。
而我也就能由此在
忽然地体会什么想法吗。
让今天的故事又想继续延续?

“那棵树,在这里的神圣感,
有什么特别的缘由吗?”
在餐桌上我提出这个疑问。
“恩,是很久以前的事了。
在这个城市还没有建造的时候。
其实也不遥远,最多大概两百年的时光吧。”

后来,我还回想那时听到的话。
“那是,有一天下起了异常大的暴雨。
随之在山间发生了危险的,
也可以说是毁灭性的泥石流。
这里的先人们,四处逃难,
找到一块能安稳会的地方,
可是随着又是毁灭。
眼看能生存的地方越来越渺茫了。
不过也不能放弃,
只要有一口气,就还有求生的信念。
最终,很幸运的,到了那棵树下。”

“正是棵神奇的大树啊,
一棵生长的异常坚强的一棵树。
它强大的根系稳固了周围的地面,
使得在那个山头,
先人们得以保住了性命。
后来环境平稳了,
人们怀着感激离开了那里。
并将心中共同的敬意,
给那棵树绘制了几层神圣之感。
并每年定下一个日子,
用来祭拜。”

“那一辈的人后来都不在了,
但这祭拜作为一种习俗流传了下来。”
“这么久了,人们的心里还留有感恩吗,
而且对这种久远的无法体会到的恩惠?”
“这。。。没有人去细细想过这个问题。
因为那棵树还生长在那里啊。
这么多年过去了,住在这里人都交替过来。
可是就是这么多年,那棵树还依然生长着,
而且还生长的越发旺盛。
让这里生活的人每天都增添几分安心呢。”

“即使是在如今,
虽然没有什么能够直接的
能够被感激的恩惠。
但是是流传下的习俗,和大树持久的生命,
给了住在山间这座城市里每个人一种信念。
不用害怕不可触及的想来,
不用害怕毁灭性的消失一切让人不能再看到希望的灾难。
人们依然可以活下去,
先人就做到,并且在如今这个眨眼而至的时空的停留点上。
获得了那是不能想象得到的巨大发展。
如今的生活对以前显然是种巨大的幸福,
而现在的,以后的人,
也能怀着这种信念,走向更遥远的地方。。。”

我一人睡在床上,头埋在被子里。
今天,在行程上,那张脸,
是谁一个陌生的人。
伸出了那只温暖的手。
这让我获得了什么呢,没有人似乎有意识到自己要施予什么,
包括那棵树,依旧生长的树,越发茂盛的树。
却是实实在在的,对后人已经日后的生活上的一种信念,
相信着未来,是不论如何经历多大磨难也能到那的未来。
此刻,我紧紧的抱住枕头,有点忍不住,想哭。

当晚的梦,醒来时就一点感觉不到了。
应该那天做了一个梦,一个很特别的梦。



======我是表示结束的分割线啦======

今天元旦,昨天晚上吃过饭后,终于拿本文出来接着写了完。
远去的2009与已到来的2010,
感慨啊,又是新的一年了。
最初还是FFXIII发售那天构想的并写了小一部分,
已经晾了这么多天。

2009年12月8日星期二

GPG与安全相关

好久没更新的感觉了,先来感受下气氛。
呼吸~~~

The GNU Privacy Guard
http://www.gnupg.org/
OpenPGP标准用于加密和签名,而GPG是GUN实现的工具。

按习惯先man gpg一下
http://linux.die.net/man/1/gpg
还有就是,官方的一些资料
中文的使用说明
http://www.gnupg.org/howtos/zh/index.html
完整教程
http://www.gnupg.org/gph/en/manual.html
以下内容参考以上内容,命令尝试可用。

概念及应用
公钥 公开发布的,别人可以用来加密或验证签名
密钥 个人保密的,用来解密被指定收信人的数据,或者用来签名文档
加密 不在传输中被第三方知道数据意义
签名 确保数据的完整性和来源可靠
信赖 是基于 公钥的可靠度,密钥的保密程度,破解方法的成本

使用
生成钥匙,会有一步步的向导的
gpg --gen-key
记住你的uid

Public钥匙
输出 gpg --export -a -o key.asc
导入 gpg --import key.asc

加密与解密
加密
gpg -o doc.gpg -e -r uid doc
其中可选"-r xxx"用于指定接受者
对称加密用 -c
-u 指定Private钥匙,即发送者
解密
gpg -o doc -d doc.gpg

签名和检验签名
对数据签名 gpg -s [file]
用"-b [file]"把签名放在单独文件
加-a 输出为ASCII
其中-s替换为--clearsign可以让生成的文件文本依旧可读

通用命令为
gpg [-u Sender] [-r Recipient] [-a] -s -e [file]
混合了加密和签名

gpg [file]
暗含--verify和--decrypt
都需要先倒入发送者的公钥

密钥也可以导出,但不是PGP默认要实现的功能

确认公钥真实性
gpg --fingerprint
得到公钥对应的一段较小的文本,可以用电话等方式核对
然后gpg --edit-key UID,
输入sign命令设定公钥的可信度

如进行钥匙管理,有一组对应的命令。

如果是单纯用密码进行加密的话,
用"gpg -c [file]"就行
可以和以上的加密和签名方式组合使用

这个是PGP的站点,包含了比GPG更广泛的内容
http://www.pgpi.org/

SSH的无密码认证
用ssh-keygen按照操作提示生成一对钥匙
放在了~/.ssh/路径下
其中公钥放在服务器上,密钥放在客户端上
这样可以在登录中避免密码输入的操作的危险

关于MD5以及sha1/sha256
通过不易可逆或碰撞的HASH算法,表示为较短的二进制串(可写为ASCII形式)
常被用来验证传输文件的完整性
或进行用以验证的密码的非公开存放形式
对MD5的破解方式有制造碰撞以及查表(常附加一个种子值以防止)
而CRC循环冗余校验是冗余校验的一种方式,最简单的是奇偶校验也很有用

====
一些无关的东西:
附[转 http://www.debian.org/doc/]
quick reference cards
refcards.com
http://refcards.com/
A collection of quick reference cards focused mainly on Free and Open Source Software
Quick Reference Cards
http://www.digilife.be/quickreferences/quickrefs.htm
A collection of quick reference cards for the most popular programs and programming languages

2009年11月30日星期一

晨雪之歌

早晨,
雪静静地积在屋檐上,
压起了房屋的温度。

人是为着未来而活着的啊。
想象某一天,
无形阻隔断开了过去的时空,
让回忆所触及的都如同了泡沫,
轻轻地在不断翻滚,
只能用来承载悲伤。
可是,
这只是生活延续下的。
即使是自有生命起背负起的不幸,
即使个人在天空之下显得无比渺小,
只要生活在继续,
只要在冬日的早晨的呼吸能看见隐约的雾气,
就能抓住延续着的悲伤,
创造未来。
未来会怎样呢,
或许又一个悲伤吧。
可是,
即便如此又真得如何呢。
人的脚步在前行,
即便曾经只是在茫然中被时间推动着,
即便又只是让延续的悲伤又再一次重演,
但是却会发现,
或者说终究会发现,
自己的每一次努力,
都在寻找着幸福,
都在描绘着美好的未来。
那是让
即使真的过去已经
无法再给生活延续下丝毫的满足感,
却依然可以延续下一种使命——
去探寻人所能够构建的
幸福未来。

晨雪在日光的暖意中融化,
它没有压抑起微风
和空气中萌发的气息,
一整夜里,
它只是一直在守候着
轻声的祝福。

以上,是如此吗?
那是留给心中小小的坚信。

====
补一下前面那篇写的简单设定,
是划在纸上的点东西:

忘记 magic
精灵,女 使命 BOSS
我 喜欢(上面) 盗贼 无忧 小时
老者 个人 过去 坦然 消失 体会 和平(被梦,或反对) 教 孙女(父母亡)
集镇 科技

消失的奇迹
人生/回忆 意义 珍贵,残-美
老者 坦然 体会 孙女(父母亡)
我 护ill 不孤立

说明:原来的是写上一些关键词,画上连线或箭头关联动词,不过这里没能表示出。
确实很简略,然后内容就按照这个展开的。

2009年11月20日星期五

行进之曲 ~ Days in Sept.

欢迎来到剑与魔法的世界!

花瓣飞舞的季节
广阔的大陆四周都被海水围绕,有冒险者曾尝试去寻找更远的地方。但是他们一次次的失败,只让人更加坚信,脚下的这片是大家共有的财富。不过也因此带来很多战争。
我曾梦想能踏遍陆地的每个角落,至少是见过各地不同的风貌。能实现如此的想法,估计是不可能了,毕竟有太多的地方要去。不过自己也确实在去更多的地方,不是因为我还保有起初的幻想。而是仅仅在让生活变得有意思一些。
我的职业是盗贼,我只知道我一直每天都是如此生活的。以前久远的事情我没必要挂在心里。看到有小孩坐在地上仰望天空的时候,我想我大概也有如此一个无忧无虑的童年吧。
不过我正值年轻,是最有干劲的时候。而且今年战事异常的多。大概和东边的某国十几年前换了君主后的积累有关吧。那就只是一个小国,论面积和实际都曾很平凡,我很诧异他哪里来如今这般强大的力量。
其实,我只是一个废墟盗贼,要做的就是在战事过后无人烟的村落里寻找有价值的东西。通常收获都很丰富,还能获得足够一段时间用的食物。如今的时机是要好利用一番来为了以后的生活。
废墟盗贼和一般人所了解的拾荒者有很大的区别。他们只是碰巧遇到些没人要的东西,有时还有依赖别人的施舍才能生活下去。而我,则要主动去接近会有动乱发生的地方,而且要有恰当的时机。早了会有危险,迟了所剩的食物就会坏掉,或者被别的盗贼取走。
我一直都是一个人生活,每天就是为了生活而生活着。我就在如此度过我的人生吧。有时间隔着时间路过同一块地域的时候,看见村落变成废墟又变成村落,实在是有趣的感觉。
不过这只是我假想应该会经历的事情,毕竟我对度过相似的每一天都无所谓还仍能在环境的差异中感到季节的变换,虽然说实在是无心去记住度过了的日子。每天忙碌着,也不需要牵挂什么。
如今我的行程在往东,这样收获会更为丰盛。这里没有值得分析的因素,因为事实就是如此嘛。频繁战事确实使行程变得艰难,不过程度对目前的我不算什么。

消失的奇迹
今天的收获依旧丰富,我作为一个废墟盗贼,刚观察到迹象有战事结束就赶了过来。现在这里一片废墟,已经没有人烟。我走在乱石石瓦之上的时候,还能感受到残留下的温度。似乎是很温暖的感觉,不过只要一场小雨就会让它不复存在了。
收工吃饱后,我躺在这曾经村落模样的地方外的草地上。拭去嘴边粘着的油腻,大口得喝一下水,望着温暖的柔和的夕阳。
晚上要好好的睡一觉,眼前的迹象表明明天会有场更大的战事,我可以做一个充满期待的梦。而且之后我就去换有些价值而易于携带的宝物,算是为长久的以后而做出的努力。
夜幕里我燃起篝火,充满悠闲感的发着呆,让大脑为一片空白的样子。我习惯如此了。
不过警觉性还是让我听到有传来人类微弱的脚步。若是白天一般是有同行来了,为避免多余的争执,我会悄悄的转移。不过夜晚则实属罕见,和夜精灵之类的种族相比,人类并不适合夜行。从声音的迹象来看,我以经验可以肯定,我现在并没有危险。
一个人影在我一旁坐下,我借着篝火的光打量着他。是个和我年龄相近的年轻人,不过显然不如我长得结实,而他身着宽松的服饰是不适合野外行动的样子。
好了,目前彼此都没有敌意,他一副很疲劳的样子。我就先开玩笑:"你怎么知道我这里不会有危险?"他活动了脖子:"因为夜间精灵是很不喜欢靠近火的。"
说到精灵其实只有很少人真的遇见过,而且分布较广的夜精灵只是夜间行动。不过夜里如果注意观察,他们的存在迹象还是很容易感受到的。不过据说他们相比人类,有极强的战斗力。人们为了安全,就一直和他们保持着距离生活着。
我虽然没体会过夜精灵的危险,不过仍遵守习惯保持一定的警觉。虽然说,其实人类的生活可以完全忽视夜精灵的存在了。
"你就不怕我会让你危险?"果然自己独处惯了,隔了好久才又提一个问句。他有点疲劳,也不会介意我用缓慢的节奏。
"因为我肯定你不是夜精灵呀",他思绪明显不是如我在跳跃。我经历了这么多次人类间的战事,实在觉得人类才最可以成为能被体会到的危险生物。他如此就给予信任未免太天真了,不过这样我倒是确实有感到内心的满足感的。
我还是要提醒他,"最近附近战事多,行动要多多小心。"
我看着他,原来他已经睡着了。那我也可以睡了,不过从他的出现可以判断附近的战争警戒并没有收紧,看来明天的战事有什么原因要被推迟发生。自己明天的行动也要有变化了。
篝火静静跃动着光芒,我听到他梦语般说着什么。同时也能感受,周围还有隐约的夜精灵的歌谣。

被忘记的约定
一大早我就被他扰醒了,实在无法想象他昨晚无精打采的样子。"你好,我是来自南部城市安博列的,我叫……"
"算了,这用不到。"我还瞌睡,还很不高兴。
"你是废墟盗贼吧,你不觉得这样的很堕落吗。"
好,我不说什么。
他继续:"你总在看着一场场战争,它总伴随着巨大的毁灭,人们的生命人们的努力就这样消失,让人看着感到痛心。如今你我都是年轻最能有所作为的时候,何不畅想一下和平后美丽图景。你自己闭上眼睛去想吧,这是我们可以为全人类做出的事情。带来和平,让这个世界上从此没有战争。"
好,我承认我有厌恶感了,觉得他实在傻得天真。和平这种事哪是你这般想想的,或以为是努努力后作为美好的回报,一个人在作着以为伟大以为崇高的不切实际追求的想法。
"没战争了我还吃什么",我是不愿多对他说。我每天都在为着生活奔波,遇到了还会给予饥饿的人以帮助,这些都是我切实的为每一天所做出的。
他听了我的回答,有骄傲得意的样子,似乎要开始发表另一番见解,说带我今天去见识什么。我向背后的他摆摆手,准备离开。不过算了,今天没事。于是又转回身来,"好吧,你领路。"
这是一个集镇,其实我对完好的村落是没有真实的印象了。这里人们每天的行为对于我来说并没有多相干的意义。估计行人在街头为遇见有趣的事情而驻足,夜晚回家时也忘掉它们了吧。
我们路过的集镇中心是个广场,可以看到一侧是一个正有船卸货的港口。虽然港口的规模不大,却使得这里显得繁忙和活跃。当然这仅是一个集镇而已,我毕竟路过了许多地方,可以想象出人更密集的样子。
我们大大的呼吸一口就在这里坐下。"带我去哪呢?"我不是着急,只是无聊得在这么问。
"不去哪里,就在这里转转,估计你很少来人多的地方。"
"确实,"我不想接他的话或者想明白他到底要我认同他什么。我只是望着天空,感受眩目的日光和飘过的云层。偶尔有飞鸟路过,也可能是有翼的种族吧。在太高的地方了,我无法看得清。不过后者可能性不大,因为作为一种古老种族,数目已经很稀少了。
忙碌的人们就在我身边路过,一个个陌生的人影给我总是雷同的印象。
看来我不接他的话,他依旧是满足的样子,不时在打量周围的人。恩?他身后一定距离的地方出现了个特别的身影,他注意到我停留的目光就也把视线转向身后。
是一个夜精灵族的少女。
我是第一次在日光下看到夜精灵的模样。她正抱着小包在胸前,是买东西路过的样子。身高和人类相比显得娇小,手臂露出的皮肤有特殊的光滑感。她走路的节奏似乎在舞动,估计是有个活泼的性格吧。相比最常被人提及的精灵的尖耳,倒不显得特别注意的了。
不过这个第一次不是让我有见到奇迹般的满足,而仅是完完全全的意外。本还想开始进入警戒,不过觉得没有必要。她的身影穿梭在人群里,我的视线就跟着在寻找。
我才发觉我几乎还没有对某个人类有过如此视线的关注,而其实她的种族也没让我感到有多大的差异。我一旁的那个带我来的不管他叫什么的人,注意到我新出现的表情,解释般的说道:"她已经在这里生活了不少时日了,一般会在更靠近中午的时候路过这里。据说是一次战事后被认养的。因为当初年龄还小就和人类生活在一起,大家也就对她放下了戒心。不过她几乎没参加过镇上的活动,平时外出都是一个人,但和大家说话都是亲近友好的感觉。已经完全不像人们所知道的夜精灵的行为与生活的方式了。"
她最终消失在拥挤的人群中,我伸伸退也站起来,"还有别的地方去吗",我问道。很显然我知道,我还是对如此闲暇感的坐着感到厌倦了。这个集镇存在着,或许不多久又会消失。
"当然啊,怎么样期待了吧。下面其实才是我真正要带你去的地方。刚才在那里停留是让感受一下我生活的氛围,也就是预热。我想让你看到,人们欢笑着的生活。他们的生活总有着和平,而战事会将这一切打破。和平是人类美好的追求,只不过有人一时糊涂做了错误的选择。我正值年轻,能够做出努力让世界知道人们的愿望,拥有和平。"
我一路上就听他这么不断地说着,最多还有小孩傻乎乎地身边"啊"的跑过,没感觉有他这么激动的气氛。我摸摸行李,足够今天让停工了,也就这么的跟着他。
"好了,让你看看人类智慧的财富,"他指着面前的建筑。原来,就是镇上图书馆兼实验室。

海岸线处的梦想
就我和他站在建筑物前。
"在这里可以让人类也可像翼人一样飞翔,被遗忘的魔法也可以找回释放的方法。已经有一些成功的小实验,虽然离实际应用还有一定的距离。但是已经可以梦想,人们可以自由的往来于世界各地,可以有动力来帮助人们进行生产。如果我能给这里带来和平,那么……"
我立刻打断了他的话,因为我感到周围有所异样。瞬间的安静过后,地面开始摇动。我看到他慌乱笨拙的样子,就拉着他躲避建筑物上飞落的石块。不过虽然已经向集镇外跑来了一段距离,地面仍充满了危险。我果然不习惯带着人走,一时失足,又受了撞击,变得毫无知觉晕了过去。
后来,在虫鸣鸟叫中醒来,窗口透出黎明特有的湿度。我一人在间木制房间内。从我肚子的饥饿感可以判断,已经到了第二天早晨
。携带的食物是不够今天一天的了,我要打起忙碌的精神,不过身上的伤还有些难受。又翻滚了下身子,一直露宿,还是有床睡得舒服啊。要好好感谢这里的主人照顾了我。我拉了拉身上的被子,粉红色的,好不习惯。
我无力的发了会呆,然后门外有脚步声。在轻轻的敲门声后,门被推开。进来的是一位上了年纪的老者。他放下食物便坐下,"你那位朋友没一点事,刚才说有事要忙就出去了。你倒是伤得不轻,不过没大碍只是会有点不便罢了。这些食物你吃了吧,我先回外面歇会。"
他随即出去并关上了门。我身子又松懈了下来。确实不要紧,只是有些乏力。不过我不能总这么躺着,所以还是起身了。
老者就在门口一人坐在躺椅上。
"今天也要出去忙碌吧,年轻正是最有力气的时候。不如今天你陪我聊聊天,我招待你一天的饭。"
叫我闲一天是有点不大合适,不过今天出去还难说收成如何,看老人一人坐着又确实很孤单的样子,毕竟还要谢谢他的照顾。"您老就一个人生活吗?"我也拉张椅子,放在他的后侧,能看到他日光衬出的背影的轮廓。
他微微抬了点头,似乎在看很遥远的地方。"和我的孙女一起,她有事要做早晨出去了。我虽然年老了不能再工作了,但还有点积蓄。加上她的收入,生活很足够了。"他停下话一段时间,我无兴趣催促。
"我发现年老的感觉是一瞬间的事情,"老人继续道,虽然我觉得他可能只是生活着无聊了,"从某一天开始忽然脑海里多出了许多东西,它们好像曾在我过去里发生过。我如今有了闲暇,就在这个年岁里不断地去努力填充着往昔的记忆。对回忆起的东西,有时不知真假,只是知道往日对这些是不曾留意。"
我和他一样,也望风景。"你的朋友是个有趣的人啊",他终于有转过头来,带着有点僵硬的微笑。
"他啊,其实是前天晚上才认识的,"确实如此,"然后就拉着我,想让我认同他什么的。"
"呵呵,他似乎有些很远大的事想做呢。年轻就总有精力。如果我能回到年轻的时候,或许之后一些很小的事情就能改变掉。即使那些影响不能被现在的我在周围中能感受到,至少对于内心也多了一份安静。对了,你不会喜欢我发些无聊的感慨吧。"
"是的。"
"不过其实是我的闲暇让我害怕这份安静,我也知道我现在的所想对扭曲的曾经的回忆里的我来说,只是份负担。而你也不需要承受这些,有些未来的无奈还不必知道。说说你小时候吧,就当帮我,那些时光对我太遥远了。"
"我的童年?"果然年老就会自寻烦恼,"平时一人不大在意,没印象。只是想或许经历过吧,毕竟我长这么大了。"
"那么能想象一下吗,曾见的风景,照顾过你的人,帮助你成长的人,或者记忆里零星的碎片……"
"算了,"我不耐烦这种话题,"每个小孩都差不多。"至少我感觉昨天所见如此。"你孙女多大了,不陪你聊天吗?"
"和你接近的年龄,她有年轻人自己的想法。有些害怕去触及这些,以至我自己就感觉有了隔阂。这样也好,她也有她的事情要做,不要把我多余的东西给她……不过其实,她也不是我的亲生孙女。"
或许其中有什么,"你的儿女呢?"
"死了。有过一个儿子,就长到你这么大的时候。"他没有停下话,"记得我年轻的时候,就梦想着未来,相信有力量去实现什么。其实这只是种简单的想法,在引导着那时的生活。不过成年时也只是开始了我很平凡的生活,依靠着家里人给的一点财富,也告别哥哥妹妹,来到这里从事经营。当时是个机遇,我只知道我能生存下来,不知之后会怎样。但我的信心让我努力着,也确实是经营的规模在起初就扩展了。那时每天便忙碌于此,后来成了家有了一个儿子。你小时候也有人在教你生存的技能?"
"恩,有些东西不会是天生的,"这个我能根据判断,给出一个被认为理所应当的回答。
"那时的我也就每天忙碌着,并希望这种生活带给自己幸福感。不过自己的经营却想停滞了一样。我盼着它能再扩大,每天都辛劳地努力着。虽然也有小小的发展,可生活只是在重复着相同的模样。不过还能在夜晚的时候,一家人坐在火堆旁,吃些可口的食物。我们把经营上的经验讲给儿子听,而他对此也很有天赋和兴趣。"
"或许我幼时也火堆旁学到技能吧,"我这般想象着,当然,仅表示一种可能。按照我习惯,任何人的经历都是值得尊敬的,便对他继续说表示期待。
"每晚的那段时光就是我最珍惜的。看着儿子的成长,让我想到更遥远的以后,经营能扩大的样子。我只要坚持让经营继续下去就行了,等到儿子长大,让他有能力实现曾有过的愿望,那也是我现在觉得无力再去实现的愿望。在每天的劳累中,我由此寻找到了满足感,也一直有了幸福的期盼。对了,你童年那时在火堆旁是什么心情呢?"
"会是,"我就接着想象吧,"以后会能够生存下去,我大概是很喜欢独立的生活。"
"就没有体会别人传递的什么吗?若干年以后,儿子终于要长大了。可是对那时的我,似乎是在受到了因为甘愿平淡而带来的惩罚。就记得那时,夜晚,我从火堆里取出散发着香味的鱼膘。有点微胡,我洒上椒盐,送到儿子的嘴边。他正睁着大眼睛看着我手的移动,然后小心的吮吸着美妙的滋味,表情像他小时候一样。我看着也带起微笑,可是忽然地面开始巨大的摇晃。张望四周,有士兵带着杀气,就在不远的地方。从他们的服饰可以判断,战争开始了。地面仍在摇晃,我只能先顾着保护着儿子,不让他在地面的开裂中遇到危险。然后一家人小心的逃离这个地方。可惜,晚了。我看到尖锐的兵器就刺进了儿子的身体,带着鲜红的血。瞬间,我放弃还能做的任何努力,呆呆地看着并等待着会发生的任何事情。不过,我没死。"
"恩,不然看着你的背影我会感到意外的惊吓的,"我如此说,应该只是不想让此刻的老者变得伤心,"后来是如何生活的呢?"
"我被到一个陌生的城市,家人都失去了,财富也失去。带我走的士兵带着虚伪的笑容问我,参不参加战争做一个军人。不知将要如何生存,那时的我失落着害怕着,已经无法让自己做出其他选择了。之后发觉,这是在折磨自己。到了战场的时候,我努力的让脑子一片空白。抛弃经历过的事情,忘记它们的存在。还希望把唯一能再守护的,自己的生命,无论如何能够延续下去,而不再做别的奢望了。"
中午,我吃了老人提供的饭菜,他说是他孙女早晨准备好的。下午老人又一直坐在门口,我也继续陪着,但他什么话都没说。我就看看周围的景色,确实好美。
渐渐的,暮色染红了天空。老人的轮廓在光影下多了几分层次。
他终于开口,"我现在是在消磨那时不敢期盼的和平的时光吧,虽然对于如今战事或许也只是短暂的。"他活动了下身子,"看来时间不早了,差不多孙女她,要回来了。"

悠扬之梦
身影就在远方的暮色里明朗,让我意外的,出现的就是先前见过的那位夜精灵族少女。我注意到老人脸上的表情多了份喜悦和暖意。精灵以轻快的脚步走近着,而我则在不断地以先前未有过的距离观察着她的轮廓。
老人起身迎她进门。她一手提着新鲜的食物,一手移开门口老人的座椅。她的举动带着丝疲惫,不过脸上是幸福的笑意。在我面前她确实长得很娇小,行为中透出的天真与成熟,还是可以让我相信她确实与我年龄相仿。
她注意到一旁的我,估计是看我伤好了很有精神的样子,没说什么,就开心地带着很有满足感的表情向屋里走去了。
"再在门外走走,然后就吃晚饭。"我按老人说的陪着他。不过天黑的真快,只是忽然间的事情。走进屋里时小桌上已经有简单但精致的晚餐了。
我和老人坐下,"她呢?"现在只有我们两个人。
"说我孙女啊,"看来老人是有所习惯了,"就在屋外的火堆那里,你先吃饭,过会再一起去。"
"是夜精灵的传统吗?"我注意到窗外燃起的篝火。
"算吧,"老人好像知道我有好奇和担心,"要不,现在就拿着饭菜出去吧。"
我们在一定的距离坐下,因为不想打扰她。那位夜精灵的少女正独自围绕火堆,舞动着。
摇动的火光映红了她跳跃的轮廓,身影不断地闪动着,对我来说我感到这是我见过的最美的舞蹈。火被木材支撑着,高高地燃烧着,阵阵窜动,翻滚起层层热浪。光影在她黑色的衣服和光滑的皮肤上反射出异常眩目的光斑。视线里起伏,让我心里感到了丝丝的欣赏和喜欢。
"她虽然不是我亲身的孙女,不过这着年来确实让我感受着幸福。"老人就坐在一旁,看着火堆,以缓慢的语气说着。
我继续看着她舞蹈的身影,也留意起老人的话来。
老人接着说,"收养她之前,我也已把痛苦的生活累积的好多。感受到自己要上年纪了,在一年一年往复中,觉得自己承受的一切差不多该结束了。在一次出任务时,我们又让一片村落,森林,河流化作了废墟。我只是以僵硬的步子走走,做些无多大作用的清理。她就是那时我发现的,还很小,独自在折断的树枝下哭闹。走近,我注意到特殊的尖耳。虽然有害怕,但还是走近了。人类的小孩或许会被培养为战士,我知道对于一个被敌对的夜精灵族后人来说,只会有可怕的下场。我忽然间明白自己要怎么做。平日自己不知目的积累下财务,都被我找来带着,然后带着她一起开始如今的这般生活。"
"她也很喜欢现在的生活吧,"我问道,老人传来肯定的回答。看着她在我眼前的身影,我仿佛感到其中的奇迹。但我忽然想到什么,又感到惊奇,"不是说夜精灵是天生很怕火的种族吗?"
"没错,而她也不是例外。"老人保持着平淡,"不过成长的这么多年来,她每晚都会这样在生起的火堆周围,独自地极力地舞动着小小的身体。总是这么,在星空和夜幕下,直到浑身是汗并筋疲力竭。我能知道这对于她一定有什么特殊的意义吧,就一直没有过问,度过着一天天。除了平时教过她点金融知识让她有了份职业,这么些年来我就看着她,一直在默默地支持她鼓励她。相信她以后会有她属于自己的生活。"
眼前闪动的残影间,让我又多感受了几层异样的味道。老人没有继续说,我们都仅在静静的,望着眼前夜精灵的舞动。
火光向着高空,自由地跳跃着。少女的身影围绕着火堆,变换着轮廓。腾起的热浪扭曲着视线,看着火堆让我感到它周围又多出一个小小的身影。那仿佛就是年幼的我。在挥舞着手臂比划着什么。
或许是我想象中的童年吧,那时在学到技能是我日后生存的基础。不过,是我独自一人吗?那里或许在我身旁就还有身影正在教我,也坐在火堆旁,大概是我的爸爸妈妈吧。或许是最有这样的可能。忽然我感受到,就在我视野里闪现的,是我记忆里未曾留意过的身影。我努力地向火堆周围望着,希望能看清楚那里身影的模样。此时虽然已随距离变得温和,但传递来的热气让我有冲动跑向前去撕开眼前被扭曲的画面。又看见了她舞动的身影,相比而言,我知道这个影像才是真正分明的。
自己何必呢,今天多了如此的闲心,刚才只不过是刚才想象罢了。
凉风吹过我的头皮,我看到她也停下了她那夜精灵的舞蹈。她直接坐在地上,用手支着身子,大口的呼吸着。
"今天结束的比平常早啊,"老人起身有要向屋里走的意思,"你们都是年轻人,会有同样感兴趣的话题吧。你也去火堆边吧,那里有些食物,你们可以边烤着吃边聊天。今晚的天空很明朗啊。"老人随后就进屋了。
我也向她那里走去,在一旁坐下。看着背影,她显得十分疲劳,但还是转头向我投来了微笑。
"你跳得真好。"虽然她现在是很随意地坐着,但我知道,她是对人仍是内向的。
"谢谢。"她依旧是很有满足感的表情。想到对她的所知,我看了心里也有了特殊的感觉。
"对了,夜精灵族是怕火的吗?"这是我先前的疑问。虽然对她刚才的舞蹈也有所不知,但不想打破如同收获后的幸福感,就先不提及。
"恩,"她转过头去看着火堆,火势已经不如刚才旺盛了。她仿佛在整理着思绪,然后继续开口压制为平淡地说,"其实你所看到,火堆旁的夜精灵之舞,是一种很痛苦的舞蹈。"
"那……"
"它是夜精灵族从远古时代延续下的悲伤。这种舞是对舞者最大的折磨,不只是现在眼前所感受的无尽的肉体与精神的折磨,更甚至是在以生命的消耗作为代价的。族人曾不断设法努力改变这种消耗,却只是能够让这种舞看起来更加美丽了一点。当让我们不得不要重拾于世界的记忆中消失的魔法时,只有再坚持着,生活在这个煎熬着的世界上,展开起痛苦和悲伤的舞动。"
"魔法吗?"我真的还没见过。
"本来族人早已想把魔法丢弃了,相关的本领也降低了好多。属于大自然的夜精灵族只是想能够延续地生活下去,让玛娜去变成花朵和幸福,我们只要见面时都带着微笑便足够了。我生活的丛林也如愿一天天生长着,繁茂地沿着河流。可是在一天,地面发生了巨大的晃动。"
"地震可真多,"貌似我跑题了,但最近印象听了几次这个次。
"这不是寻常的现象,我们能体会到,是有巨大的力量在释放地动魔法。那时感觉,就如同背后出现了巨大阴影,并已经实实在在地压到了我们那里聚居地族人的身上。不过很可惜,害怕只成了多余,或者说是已经根本再来不急。连续的地震其巨大是完全难以想象。地面被拉开丛林被吞噬,族人的身影也在我眼前消失。就不知能否算是庆幸,我竟然能孤独的活了下来。那时还很小,就只是一人在废墟外沿的残枝下无助的哭泣。"
"那你为何需要魔法呢?"
"很感谢爷爷他照顾我,他的照顾也是我活下去的支持。因为我知道我没有丢失了全部,我还有魔法。那是天生的力量和夜精灵的信仰,虽然几乎和完全消失一样,但我肯定能把它寻找回来。一天天的舞动是当初未想象的艰难,毕竟大家都想把它淡忘已经很久了。不过就是这舞动里的坚持,让我充满心情去期待着一天天的生活,一直到现在。"
"那以后会如何,继续这样吗?"是我有了多余的同情吗。她每天如此就仅是为着一种坚持?
"没有以后了,就在今天故事都结束了,"她无力地站起身,但我仍能体会到她娇小身体里蕴含的力量,"这么多年,我真傻……"
"……我后来知道,幼时的我知道了那次恶梦般的毁灭,要只是恶梦就好了,是被人类制造出的地震。人类看见翼人便想翱翔天空,不过后来翼人不常见了,就开始把兴趣转移到魔法上。东部的一个小国在那时就开展了领先的实验,并希望从中获得力量。而他们充满野心的国王,就是权力和技术的集合,号召着全国往这条路走下去。我的如今的一切,我知道了,就是他们造成的。这是毫无保留的破碎,把我一直孤独地抛开。而今天,我魔法的力量终于足够了,终于能做出点什么了。所以就,在今天的一大早赶往那里,毁掉了他们的实验室,杀死了他们的国王。用了好久的时间,但是都做到了。"
我听了很感意外,自己只是在这里停留了一整天,等明日出去,会局势就完全发生了变化吗?
"当我带着无法顾忌更多的麻木感往回的时候,空空的心里闪现起所遇见的景象和面容,才有闲暇发觉其实原来我一直都想得太简单。或许是人类背负了更多的东西吧。你们总能找到让自身强大的力量,以似乎无知的盲目的甚至自私的摸索,构造着自己的发展往科技时代的梦想与幸福感。不过,不能再有机会再体会更多的意味了,也不需要了。我的愿望已经了结,今天也就可以离开这里了,回到族人消失的世界里。"
我听出,她的话里充满了悲伤,"你现在的爷爷呢,你们不继续生活下去吗?"
"我就是有点自私吧,"她正向远处走去,慢慢地,"因为我想要的故事已经结束了,它已经无法再继续了。"
我赶紧冲上前去,想拉着她手,想说出我能在他往日的痕迹里体会到的幸福。可是我只是扑了空,她的身影已到达了更遥远的地方。我只能静静地看着。
"请向爷爷转达我的告别……还有,我的感谢……"

雨点,以及静静的雪
我起身走向屋内,发现老人就站在门口看着这里。我想他已经知道刚刚发生了什么事情。他正用手支着门框,而我走进则遮住了他远望的视线,将火光射下的阴影落在他的脸上。
老人手臂一软,瘫坐在地上。我赶忙向前搀扶,把他送上床。他不愿躺着,用枕头垫起后背,让眼睛能和窗一个高度。而窗所展现的外面只是漆黑,并偶尔传来属于夜的声响。
"我已经老了啊,"老人用着感叹口气。这种舒缓的口气,也让我体会先前没有的沧桑感。我就坐在床边,希望能传递老人一种安定平稳的氛围。
"自己的经历,从小至今的,都如回忆一般,只要自己不认为它是存在过的,便能实实在在地体会到它完全的消失。自己的往日,在现在的我看来,感觉就像是虚假的。"
"她会回来了。"我觉得老人需要安慰,虽然可能不现实。但我至少相信,我是还可以这么认为的。
"那无所谓了,她该有她自己的生活。"老人继续着,"已经看着她从小长得成熟了。我之前觉得,自己每天都是在为了什么而活着,不知道它如何但能感觉到存在,所以始终在寻找着。可是后来的经历,不论怎样已经是我所甘愿接受的,又只是像被无奈地被付与的强压来的,让我体会到生活,是生活,就仅仅是为了生活的延续而已。我拥有着现在的时光,再去想过去,反而就总觉得似乎是自己有什么被掩埋下了,被淡忘了,但一直都没有做到,也是曾不想去或害怕去做到的,或许就是不可能做到的。"
他的声音开始疲惫,随后转为咳嗽,身体的状况开始变得严重起来。我忙向他床头寻找药物,一般来说上年纪的人会平时也要服用一些。果然如此,其中也有草药是有平定精神的作用,现在正是合适。不过,我打开瓶看,发觉了一点残留,是刚吃空空的样子。
"已经没有继续了……"老人仿佛陷入无尽的梦中,仅仅是因为孙女消失的打击吗?
我顾不得了。我知道,这种草药在附近的山上会能够取到,现在赶紧肯定还来得及。不作迟疑,就立刻跑向屋外,进入到夜幕之中。
可惜的是,我完全没有料到。我对这附近还不熟悉,而且陌生的地形在黑夜里被觉得更加复杂。竟然迷路了,虽然很快找到了药材,却无论如何找不到办法把它能及时送回去。我着急地摸索着,努力的奔跑着。挥洒的汗珠,树枝的阻碍,一切不能阻止我……
天亮微了,而我也已筋疲力竭了。以一夜未睡的眼睛的疲劳的光感,终于可以按着路来走了,希望一定还来得及。
回到老人家时,有另一个人在,原来,是我几天前遇过那个。他也在守护着,老人仍昏迷,但状况还好只是多严重了一点点。我给喂上草药,调整了老人的姿势,让他能好好休息一会。
之后我们都走出了老人的房间,气氛有微微轻松了一些。
"你还挺会照顾病人的嘛。我本来是昨晚打算先回这里的,可是眼前意外的情况让我很无措啊。他孙女哪去玩了一夜又没回来照看下,夜精灵的还就是冷酷。"他依旧是很有精神的样子在说,"我还以为你也什么都做不了,以为你就仅习惯仅一个人的生活的。"
确实,那是才到年轻的现在的我一直维持的状况,一直在不带着牵挂让自己继续着自己,没有想法去关注留意或者想念着谁。
"下面去哪里呢?我的想法要如何推动才能实现呀,今天人们对我所表达的那些的兴趣好像忽然就淡了。"他还是依旧想着他自己的事情,虽然于我看来他在想的只感到是很遥远的。
"你的和平事业啊,"他很期待的等我说,我看着他,想了想,还是摇了摇头。感觉到思绪已经似乎被积压满了。
此刻,我想到一墙之隔的房间内老人,他的经历让我觉得,对于他这么多年所经受的,一种平淡着的生活或许正是他最为需要。可是呢他似乎一直,就不曾愿望于此,仅仅是接受着能够遇到的明天。那么老人对和平一类词才是真的更有体会吧。他的生活有了不得不经历着痛苦,而他仅在期待着生活的延续,便能由此就感到生活的幸福和满足。
"那明天还是各自地生活吧,我们还是没有要一起做的事情,"他说。
"恩,"我简单地应答了,明天还是赶往那个废墟吧。不过显然,我在此刻体会到,各自生活是不仅仅属于他的或者我的,无法看见的牵引拉起着不同的人。
先来等待着老人能够醒来吧,他状况真的会好转吗,或者还有什么心愿吗?
现在有闲暇,我就和他说起了我今天知道的故事,关于老人他孙女以及我所相信的自己的往日的故事。

后记
终于可以随意地加点文字了。
三月时写的东西似乎被我寄托了太多,随后一个构想又时机不成熟被坑着。这次就想的是暂先放掉自己对小说构成的看法,简单地用最传统的Fantasy小说的设定来完成一段情节。
下面就说明下看法啦。
照个人的习惯,小说是由其世界历史人物的设定为基础的,情节的展开是设定的要素被构造与融合的过程。在信息的流出中,阅读被视作一种体验。而经历体验是文本的存在中最重要的意义。
在此,设定的目的是为制造情境,以作为情感存在的容器。设定的展现方式,包括叙事手法,以及若干线索的交织安排,使得其中情感的体会可以被传递,或者说被体验到。
完整的设定是为了建立属于文本的情境,让体验能够进入当中,从而建立起小说与外界的阻隔。同时,这种阻隔也是联系被发觉的一种方式。就设定的展现手段来说,体验是感受与其过程的结合,并可作为经历的积累的。
适当的情况,可以让设定的要素就作为情节构成本身,以架空或扭曲时空等方式来塑造独有的背景和思维所触及的存在方式,以逻辑要素存在成为本文中能够被感知的。
这次有很简略的设定,以便一种更纯粹的形态传统感,并侧重于关注和控制构想从设定到成文的全部过程。不过其实个人喜好仍占了份量的。
原本安排了三天的量,可以简短一点。之后的在行文风格有所差异,还是就继续完成掉了吧。

2009年11月14日星期六

代号:行进

引·十一月
早晨,当寒风从窗口吹进的时候,我体会到这是冬的味道。
云层的飘动让床边忽明忽暗,我起身拉开窗帘,天空看来格外清澈。
想起了几天前的暴雨,那是整个十月里唯一的一场,似乎是还在洗刷残留的未销的暑气。
这些记忆中的声响已在耳边不复存在,寂静的光影只带给自己无意义的哄响。
此刻喉咙和鼻子感觉好难受啊,不过想到手纸就在身后不远,让我有片刻的安心。
水壶里空着没有热水,好想来杯热咖啡。
小心地让液体流入口中,带着暖意和幸福感,眼睛被水汽熏得睁不开。


本贴是预告,先来以上的引子。
几天写了个小说,现在也差不多整理好了,还没贴出来。
这次是想不寄托什么,就完成了它而已。
但相比本贴就更缺乏存在感了,因为这本身是多出的东西嘛。

说点别的,
想到了——
人们看画册,是各地风景那种。就会想出去旅游,能够近距离感受一下。
画册有好多页,也就找机会一个一个游玩吧。
不知不觉,可能行为就单调了。只是在积累足迹,坚持着完成曾经的想法而已。
不会再期待下个地点,将带给自己未曾想象的震撼。
其实一般不必涉及以上的态度。
像旅游什么的,能愉快的事情,只要在会有的时间间隙里有份期待,也就满足了。

开始进行文本前,用一小会拿笔纸列了个设定,就简单地列出了人物经历关系,之后就照着展开。
以后(至少是等文本出来)会整理下附在本贴后面。

(乱入部分:是不是有点这次太传统化并展开得与自己有疏远感呢。有些事感觉就是在进行着,无需闲暇起来意义之类来着。)

自己在说什么啊,
似乎这种随意的地方是很适合留点感想的。
是假假的想法呢,还是存在了却感觉多余的东西呢?
当睁开眼睛的时候,就是明天了吧。夜晚又消失了,只好再等它出现。
是感觉找个现成的模子,挤进入就一切都开心了?
能够达成的,不是用必然或应该就可安心的。
以上乱乱地,是感想吧。
都说了嘛,这次本来完全就没写什么。
唉,在浪费挖掘机会。
感觉是在对关于行为存在的意义说了点东西。
在说度过的一天不是多余的?
反正也就成那么一个故事,其他方面的想法就有所回避了。
具体的感想啊,也就算了。
算了是什么呀,觉得就是没失去什么?
……

晚安

2009年10月31日星期六

Desktop/Web App

本帖主题和之前写的东西感觉会有好多交叉,不过看来是我较关注的了。
而以下内容并感觉是没有写得很展开或有深度。

传统命令行程序可以
运行时加参数,然后返回状态值并在标准输出里显示内容,并造成副作用。
此外也可用从标准输入获取数据。以文件读写和系统环境交互。
这种程序的代码结构对C语言的程序来说是很典型的。可以在HelloWorld的基础上通过添加实现功能的代码来实现程序的需要的目的。

另一种是有更强的交互功能,用户可以根据输出的提示和要求进行输入或选择。这就如同现在所见所见的向导模式。想对用户友好是一方面(这里不涉及CLI与GUI优劣的讨论),不过在这种模式下,程序运行不是单单为获得结果。在程序运行的一段时间(用户不再是仅等待用户结束)内,用户的交互会和环境的变化之间产生影响。

下面是说到GUI,以Win32为例,这只是我暂时仅了解这个,不过它也比较典型。在程序建立空白窗体后,进入消息循环。代码根据消息的种类选择合适(有部分参数,但可去读文本框之类的输入内容)的操作。在获得载入消息时,可以在窗体上再绘制或调整需要的内容。

用物件导向来说(这里不是数据抽象的话题,因为那是Obj的另一个用途,或许这里我也会说错了),有属性,事件,方法的概念。属性可以分解为get和set两个消息,方法是消息Call可用以提供功能。事件是物件获得消息时被触发的或查询到环境有需要注意的变化。不过在GUI的编写中,通常是用一定的方式让事件和自己编写的执行操作的代码(一般封装成函数形式,也可以是成员函数,继承之类的东西,虽然我觉得叫方法会更好听,其实就是函数了。算了我说乱了。)进行绑定。

如果忽略掉与绑定有关的部分,那么可以看到的是窗体,窗体的代码,各种模块(非GUI而提供功能的部件啦),以及系统调用的封装。

下面转向Web App,如今它和Desktop App之间的距离正在缩短着,也产生了一些让人很有新意(其实更多是从使用上让人感到有力量的东西)的效果。

根据CGI标准,也就是从它的原理来说,就是按照一定规范编写的CLI程序。用户访问网页,则cgi被执行,向标准输出返回内容,比如可以是以Html格式的,即能被浏览器解析的网页。之后,cgi程序进程即被终止。URI和Form可以被用来向cgi输入内容,并供程序判断需要显示的内容,或者执行对应的操作。cgi进程不断地被产生和销毁,而不会保存用户的状态。所以通常会运用会话和cookies来实现类似于交互进程全局变量(临时文件貌似会有牵连)的作用。

不过网页的显示效果比返回一个有效的字符串要复杂,混合有程序逻辑和用以显示的代码会...分离开会有很有用的分明的感觉的。比如把程序的功能逻辑分离出来,提供接口。再提供类似于GUI的模块来处理与用户之间的交互,而GUI本身显示的效果和处理的代码也有一定的分离进行。比如这样可以获得的一个好处就是,为不同的需要可以进行不同的展示,而和共用的基础代码无关。

模板并不是为了这种分离,它只是用来把服务器端执行的代码嵌入到网页代码中用于生成显示的效果。此种情况下网页的展示被作为的主题,即其效果和内容会获得更主要的关注。不过用来做以上的分离,模板是很有效的机制。

如今ROR框架的思路给Web2.0的开发很有生产力的感觉,至少是对PHP上框架的发展也有强力的影响(我承认这是新手向的分享文了,就是那种总体概览之类的感觉)。对于每个post和get有单独函数(模块)进行(对数据的,数据是框架的基础)处理,前者用于执行操作而后者用于返回结果(一个明显的区别是是否有副作用)。即使两步操作上是连续的,也可按上述区别分开进行。
路由和模型也是结构上的重要组成,补充一下。而框架的存在已不限于提供功能,而设计开发的结构和组织形式。

不过,WebApp的目的已经不仅仅是简单的提交和展示了,DesktopApp的功能可以在网络平台上实施。对于如数据库一类原本就依赖分布的App而言,两种应用之间的区别并不明显。而通过浏览器内js脚本的强大功能以及Ajax技术的运用,复杂的交互和即时的数据交换使得桌面程序的功能和CS结构的程序可以以BS或更轻便的方式实现网络应用。

插一句,发布方式也会产生变化。服务会变得更加重要,而用户看到的是展示的界面。除非是提供局域网使用的套件,版本变化比使用自动更新模块更加模糊。

简单的如计算器之类,比如不涉及文件操作,其功能与运行环境没有直接关联。运算操作在本地进行则没有与桌面应用有很大差别,当然也可以把运算放置到服务器上,仅在浏览器中进行结果的展示。(画板之类)文件操作也可网络化,有服务器进行。
CS的结构可以通过瘦客户端的形式变成WebApp,浏览器也可以当作瘦客户端来使用。整个程序有独立的客户端和服务端,是多对一的关系。两者直接有各自的代码分开执行,然后通过一定的机制相互通讯。不同的是瘦客户端会在每次使用时从网络载入,可以缓存,便于携带,也可通过一定的机制实现离线功能。把瘦客户端转变为桌面应用,以获得更高效的体验,也可编写相应程序或直接利用某平台。

一些框架有自动生成客户端脚本的功能,通常这一机制是在视图和模板这一层面上实行的。可以是逻辑流程的开发变得集中,而不必在不同的语言之间进行切换,只是分别开发了界面和流程部分的代码。和GUi的开发有一定的关联。

桌面应用和网络应用是起源于不同的需求,在设计上会有这不同的出发点和视角。而所谓云(其实就是明说不清,找了一个词)概念的使得它们之间有一定的交融,而在开发与设计上产生了共通点。好了,终于到了本文最终的主题部分了。不过感觉也说的差不多不少东西了啊。再留一点简略的在下面。

关于驱动设计的要素
从数据的创建查询更新删除的角度
从输入输出的角度(包括优先考虑交互和展示的模块)
从要执行的一系列操作的序列流程的角度
从事件(会受到的消息)的角度
还有,从是桌面还是网络应用的角度,但相比以上,这一点是次要的。

恩,以上是些废话而已。顺便再放一个设计与使用DSL的话题吧,就留这么一句。

====
091209
这是11月头写的东西,当时是想着想着就堆了写东西。恩,其实现在都怕看了。都是故意在文字上绕了很多东西。
一个http调用,包含get/post的查询和发送消息
在ajax中可以返回:text文本,html带格式文本,json/xml打包的数据,
js对视图的操作以及跨域回调相关的
这里处理session/cookies用以对客户的认证外,视图的状态保存在客户端
是返回操作还是返回数据有客户端已载入的脚本来执行操作,是两种方式。
B/S结构是依照后者的方式进行的,不过脚本也可视为数据的一种。

网络应用的最终数据存放有三个地方:本地,服务提供者,第三方空间提供者(不提供计算力)。
如果单纯是进行文件的操作,操作接口是类似的。要考虑到减少传输的问题,比如查询数据和被查询的整体数据相比就会有明显的区别。临时文件是和计算操作的的执行有紧密关联的,需要有一致的存放。不同数据存放方之间会产生公开统一的接口。

开发框架和jsGUI库,可以运算完全放在服务端,仅在浏览器中载入GUI库然后和服务器交互。这和仅在操作中进行数据传递有所区别。甚至要在服务端考虑一个用户运行多个进程(回话)的结构,来考虑服务端对状态的存储方式。参见本地程序的GUI库或框架,与网络应用是同一的。而且一些本体应用也有采用C/S结构来设计,通过命令或浏览器中的视图来传递消息或进行交互。

在补充本文的这段时间里有了GOS,让App全部以Web方式运行,技术运用html5(包括了Gear的离线运行能力)提供的网页的语义,表单和新的API。

本来上月里三篇是一个小说相关的,本帖会不协调。不过其实本帖是也同时是上上最后一天晚开始写的,所以也算对存档页的结构影响不大。我多虑了。

2009年10月29日星期四

拼写检查工具-相关

自己平时是不怎么用拼写检查工具了,完全依靠人工。作为自己博客上发布些东西来说,暂且就这么过来了。况且还放置有那些我“闲置”在那里的“文学”类文字呢,仍很欠好好的整理啊。
至少我觉得拼写检查工具是相当实用的东西,可以开专页来呈现相关内容。自己如果去写非母语的东西,也会有不放心的感觉,而去寻找辅助工具。既然标题已经突出“相关”,就话题会扯到关于“表达”了,“工具”会是一个较宽泛的角度。
唉,已经被引言占据太多的内容了。


Aspell
也可用来检查代码

Hunspell
貌似很有用

MSOffice里提供的已经和实用了,相比以上感觉已经很强大了。

话说我是看到这个小工具而想到开此贴的
http://tinyspell.m6.net/
在Win下会对文本框的输入进行检查与提示

Google
字典 http://www.google.com/dictionary
翻译 http://translate.google.com/
对付EN文,很实用的工具了

个人想法是,语言是用来获取和表达的,所以在运用时更关注的不是其本身。
但如此来看,也不能忽视积累的过程。
至于其他的,暂时就留不出更多东西了。

标记:GAME项目OO,音乐和声,Web框架

++++撤销:[插入]占位 091222前来补坑
《面向对象的游戏开发》
----从项目的构成和代码的构成,属于工作记录的性质
《音乐知识手册》(续集)薛良
----简明和声学教程[英]伊瑞克泰曼 <- 我比较注意到了这个
《Rail Cookbook》
----关注点在于ROR的组件和站点搭建设计的技术点

具体目录,可以搜索试试看。

2009年10月20日星期二

十月之雨

其实本月很少要有下雨的痕迹。
喜欢旋律中厚重的低音的拨动。

之前那个小说设想,再简单的说一下,还没成文呢。
宗教集团利用人的局限性以解救来控制人从而获得利益。
神的反对者会希望成为神使的一员而维护神的。
成会尽力中立倾向,即认为存在是有原因,是出于人本身的一种可被审美的要素。
是悲剧化的情感,以及意识的发掘。

而文本是阅读者参与的通道,以信息流出的手段带来完整的体验。
不过是不限定于具体写法的。

本贴有雨,水在积累中……

====
下面贴的算反例(25-26日),不多留其余的了:

顺手再开就可以增加了本月的贴数,不过想来也太随意了些。
感觉如同似乎是要失去什么,而希望能多多保留仅有的东西吧。
总觉得文字是要承载些什么的,这或是珍藏自己所有的,或是留给并告诉未来时刻的东西。
不过像日记那样的不要先构想吧。
在安静的时候,找到一个空间,便可在纸面上捕捉思绪的踪影。
但是,这不是在抛弃痕迹,或发似乎是总有道理的感慨。
因为一天的行动,其中所含的努力,都在日记之外带来的推动。
哪怕是白天留下的困惑,也可在笔端的试探中,体会到忽然间明了,或更多地发现什么。
而有时,是在文字的进行中,做着托付,寻找着表达的方式。
这是相信自己积压下或思考后的体会,并在尽力建立通道来传递或寄托它们。
不会过于依赖计划,认为总会有的,就让它随意的出现。
或者是出于担心害怕,翻动着纸页,做着微弱的保留。
可是,当感觉日常平静了,有很多可以并忙碌于去开心或应对的事情,不需要在闲暇时的担心。
也不需要以压抑的感觉去珍藏什么,挖掘什么。
于是呢,算了,来留点东西,
并为这种随意找了些借口。

====
到十一月了,分明的寒意让周围忽然感到安静。很有闲心的感觉啊,不过喜欢文字是很有力量的样子。

有些虚幻的东西,如果一直相信,就会觉得它真的存在着。
一种是对美好的憧憬,一种是对不满的逃避。
宗教的话题上,可以用诚心来表述。而不论是说能满足什么愿望或反之遭到如何的惩罚。
一个灵魂就就生活在他自身的世界里,分界并不是物理上的阻隔。

多写后已经让构想模糊了,当初只是在扩展一个个人到社会的视角。
一些有意拉开的距离而造成的阻隔,其实……
还是不大好说啊

2009年10月12日星期一

话题]twitter与facebook

最近写贴有些不便,在不使用电脑访问网络时,自己所处之地手机信号也很有问题。而且目前环境给人封闭和满足感,所以文字的闲暇就显得格外多余的安静。
这贴所写的话题,若在08年写,还可以作总结类的文字。而我在之前这里尚未对此有所讨论。SNS类的发展虽然已过了人们关注的高峰,但作为一种趋势仍在进行之中。和传统的协作模式相比,显得非成熟的状态。
下面的是ZZ课上在填的内容,虽然所处时间和本次话题,对我自己而言不去寻找之间的联系。不过这算是难得有的有人文氛围与闲情的时段了。
磨啊磨手机中……
以上无关的说多了。

microblog twitter的创立者曾创办了blogger.com,后者在博客服务商中很具代表性。博客使得用户成为了信息发布的中心,而非原先基于站点的。评论和pingback机制,增加了访问者的交互和博客之间的联系。
微博正如字面所示,每贴变得简短。限定的字数同时作用于发布和阅读两个方面,减少了面对传统的博客时所具有的负担。“What are you doing?”可作为写微博的最初的引导语,通过网页手机IM短信等多种便捷的方式,博主可以随意得发布自己的状态。分享状态是微博起初的推动,且和博客相比信息更加实时。
微博也有发布外的其他机制,关注,回复,推荐,使得独立的微博之间产生了联系。而且用户在对微博的使用也更具目的。如用于发布信息,获取或挖掘信息,进行公开的讨论或分享(比IM公开且参与时间长久,比论坛注重参与个体且广泛有时效性)。一些企业也在其中建立了自己的节点。
手机信号真的不好,这样很消耗我那一点点热情的。
不过我目前twitter的帐号还没有,没去使用过还随意按感觉写或许可笑,不过既然本文把重点放在其中具有的趋势上,那点氛围我想自己还是有所感受的。这段内容也同样适用于facebook(本文还没提到),我还没参与到(包括国内的类似的东西)。所以……我自己也不知该说什么了。
国内对微博,虽也有单独的同类网站,有关注于博主,讨论,时间轴的不同形式。但较成熟的形式是作为SNS的组成模块,用以表示用户的状态,来加强用户间的互动。虽然twitter提供了整合到其他站点的接口,但不同于博客产生的平台间的通讯。

facebook之前,myspace有一定的影响力,貌似那是基于兴趣联络起了个体。脸谱按其名称是通讯录的作用,以实名的形式联络起相识的人。国内的跟随者校内以学生间的联络为让人参与的推动,而开心则是白领群体虽然它起初就是把互动放在联络之上的功能。拉拢用户群体是其起初的发展推动。
标准型SNS之外的,已有内容和用户的站点也可体现出社会化的特征。

常见的SNS是用户与应用的结合。其中,用户是参与的主题,而应用是用户所参与的活动。应用使用户之间走了沟通与参与,和传统方式相比,用户有着比内容更为首要的位置。而社交则是一个平台,在一个平台有足够的有关联的用户基数。平台除了与帐户管理之外的功能,需要依赖应用来发挥基础作用。而应用本身也需要平台的用户进行使用。
对于已有内容的者是或有专题的站点,都已经有了用户与话题的基础,在社交的趋势中,通过组件的增加,以用户间的互动增强联系。这即加强了用户之间的情感,也以有参与的方式辅助了对内容的挖掘。

隔了一周,补完。未加新想法,似乎所写不足。这次已经是很晚,是安静而联络通畅的时候。略困,又有点不安。

书/标记:电影与戏剧

待填……

书目包含
《导演电影》埃里克·舍曼
《电影导演艺术教程》韩小磊
《西方戏剧文化艺术论》李贵森

目录摘要
暂略……

关于此话题
恩,个人的关注点是放在情节及其表现方式上的。
觉得似乎在这个空间该有篇系统化(保守的)表述,或实际的尝试某些要素。
而零星的想法是只让体会到缥缈如烟尘的踪迹。

2009年10月3日星期六

[文-回收]天空,悲伤之境

回收一下写在别处的东西

《天空,悲伤之境》
http://www.keyfc.net/bbs/showtopic-34808.aspx
2009-10-01发的贴,是经历了一个空白的月和表达被阻隔。

《天空,悲伤之境》

Part.1
视野下的青松与河岸在渐渐渺小,我飘向着蔚蓝高空中白色的云团。
双脚与全身不习惯忽然失去重力,感觉很自在却又不知如何是好。
曾听说,天空是悲伤的地方,人在某一刻会带着不舍与痛心飞向那里。
我合上眼,感受轻风给面部的微微触感,此外也有夏日烈日带来的灼伤感。
天空那里,我独自去了,再见伙伴。我希望能一人承担起那里全部的悲伤。
陆地上美景之间的人们,你们不需要留意我。请忘记我,并去享受自己的快乐。
我到达了云团的下方,让天空的阴影去包裹里脚下广阔的一切。
有云间伸出了洁白的手来拉我,我递上手顺着指引。
虽然脑海里闪动画面给我一丝犹豫,忍着,我没有回头望。
光亮闪烁,我消失在云间。

Part.2
她坐在云团边沿,望着远方。如同坐在河岸上孤独地吹着风。
脚下就如水面,映出整个地面的色彩,那里是她曾生活地方。
她只是望着远方,一直没有低下头。捧着手里写好的信,一直到身旁变成了橘红色。
时间不早了,她起身转向后方,准备离开。
忽然一阵风吹走了她手中信纸,纸片飞舞在她的背影之中。
信纸落在云团之外,只是如落在透明平放的玻璃上,安静地停留着。
没有溅起水的波纹,而信纸上却已经留下了层层水渍。
信:伙伴们,
其实,其实大家一直以为错了,天空其实是一个幸福的地方。
在这里玩耍的灵魂根本就不需要悲伤。我在这里能感受到许多快乐的东西,
我想把这一切告诉你们,告诉你们我会幸福。
你们在地面上,不必掩埋起悲伤。因为那种情感,就不曾存在过。
我写下了信,可是我该如何传递给你们。
压抑在心中的情绪,只会让我难过...

Part.3
她来到云层边,光着脚,平静地向云外走去。如同拥抱向无边的水面。
“水面”带给脚的只是玻璃般冰凉的触感,烈日炫目,而不会溅起水的波纹。
玻璃面的另一侧是地面小小的景色,是她熟悉的生活过的地方。
可是,忽然间似乎有狂风,她脚下遥远的地面开始晃动。
那里是满目的红色,火海吞噬着目光所能触及的一切。
她无力地蹲着,缩成一团。紧闭着双眼,身体在颤抖。
口中弱弱地发出声响,
“明明那里,已经,我告诉自己,明明已经是与自己无关的地方了。怎么还...”

话说和贴在这里的东西看时有感觉差异。

文科女生日记(伪
http://www.keyfc.net/bbs/showtopic-34846.aspx
旧文,截取加词句改动。其实这真的是小说。

发觉最近是手生了,而且是总一直想能表达得更明了一些。
有时确实觉得贴的东西仅是个人化的,还是看看再能让文字本身传递或能被体会出什么吧。

是想扩展一下自身的活动范围了。

2009年10月2日星期五

杂乱的记录 - 十月

上个月是九月,这里没做任何更新。忽然间感受的距离不是一个月,而是一年了。这里更新到现在居然也累积了这么段时间了。只是现在再随手开一个贴时,开始想以后要进行如何的话题。

本帖放置些东西,因为它们存在,出于很自然的延续。看到这些文字,感到熟悉,也有陌生感(包括对过去的贴)。


用到过的东西:

工具putty,WinSCP

putty中处理中文
设置中字符集改为UTF-8
执行 export LC_ALL='zh_CN.utf8'
vim/nano可以用了

多man几下喽
对tar.gz
wget获取
tar -xzf zh-hans-6.x-1.0.tar.gz -C ~/public_html/ct 解压到

软链接
[~/public_html/ct/sites/all]# ln -s /home2/zflapcom/public_html/our08/sites/all/modules modules

终端下浏览器 links

drupal
Internationalization

rsync 同步

http://pplog.infogami.com/
Single File PHP Gallery 4.0.0


真的留一个月为空白了啊。

jdownloader.org
网盘下载工具,JAVA的,在Linux下确实很好用。

====
091030
以下是不知放哪个帖子里好的东西

PHP+SQLite实例教程
http://www.phpq.net/sqlite/php-sqlite-tutorial.html
手册
http://php.net/manual/en/book.sqlite.php

QT

2009年8月30日星期日

关于zflap.com

Hello World!

http://zflap.com/
这是前些天买的域名&空间,还没什么内容啊。
先建了一个本博的入口
http://blog.zflap.com/
另提供如下订阅入口
http://feeds.feedburner.com/ZsYard

写在http://blog.zflap.com/的代码暂就不贴了,
给下面的参考链接:
http://phpjs.org/
http://php.chinaunix.net/manual/zh/

备用域名myblog.zflap.com
感觉不好看,不用了。

再强调一下ee.zsy就是我,Z's Yard[中文]的博主。
你可通过下列方式联络
Z's Yard[中文]
Z's Yard[中文] - zflap.com入口
恩,感觉还是缺少一些方便的互动的东西啊,
而且至少目前访问确实也不方便,
此外就是在自己的空间里加强一下自身的存在感。

博客这里的内容是些自己杂乱的东西了,
开来还是需要有特别的项目来开展。
这不是关于关注度的话题,而是我能够创造的价值。
好吧,私人空间就依旧如平静的夜晚吧。

2009年8月28日星期五

伪春菜 - 简述

[茶兔&茶鹿]


伪春菜的说明请转移维基百科
http://zh.wikipedia.org/wiki/%E5%81%BD%E6%98%A5%E8%8F%9C
简单的说就是一个拟人化的桌面玩物,除了所安装的特定的人格(Ghost)机能外,也提供报时收取订阅等系统功能。

目前通过搜索可以找到打包好的伪春菜,不过在这里要自己组装一回。

核心程式:SSP
下载地址:http://cers.cuc2.idv.tw/
解包后运行主程序

先在已经可以开见最基础的平台,之后下载的模块只需要拖动到程序运行的窗口上(或者解包到程序所在目录,对应好路径)。
下面去下载 "人格(Ghost)":这是中文偽春菜後援會Wiki,http://cuc2.idv.tw/wiki/index.php?FrontPage,选择其中的"资源"的"人格"项目。仔细找可以发现下载链接。
其中最知名的人格是"橘花",目前有两个版本。
"落鳥" 以及 "茶兔&茶鹿" 具有很高完成度,推荐使用。
采用拖放方式安装后,右键选择切换或呼叫人格即可。

同时请仔细寻找额外的 "外表(Shell)" "对话框(Balloon)"哦(汗,其实我自己就很不擅长找)。主要是找橘花的,因为另两个有配套的提供。

最新的(从我写贴时间) 小绿
http://220.170.79.48/html/art/20090826/44568.html
来自 acfun.cn

觉得开此贴是在无聊了(没写到什么特别的),下面说玩法:
系统功能,详见右键菜单。
推到抚摸等动作,会与好感度相关。
人格提供的功能,双击出菜单。
调教,自己给人格添加脚本实现功能(算重点吧),涉及辞书文件和伪AI(Shiori),相关资料参见"中文偽春菜後援會Wiki"。

[橘花]图转自官网

好就先这么些,其他更多的可以去Google或百度贴吧看看。

2009年8月23日星期日

关于神的一二[第二篇小说的构想]

Part.1
090823
暂不打算成文,这次目的是完成内容的基础设定。本文标题是原先引开整个构思的话题。

对于神是否存在,有看法认为有,有反对的认为是没有。也有觉得神或许存在,但是在对外界的认识不断构建的过程中,神是会被简化去的事物。这里仅在把话题划分为三种存在形态。
信仰的一种可以的对象,是神。宗教是这种信仰的形式,体现在日常的认知和行为上。
在生命体认识(包括对外界事物和对心理道德等两方面的)有限的时期下,有太多空白需要以神做填补。
原始状况下无知的故事,对于一个隔开的观者,可以表现出满满的悲伤,也同时能体会到些许纯真。
某神说,它是世间的解救者。这与一群人内心想法共鸣,比如不满,愿望,内疚。他们发现,神是可以被认为存在的,并也同时利用他人信仰获得了收益。
于是他们更广泛的传播神的福音,扮演者解救众人的使者。不断歌颂着神的伟大,并描绘着需要齐力对付的黑暗敌人。
面对其他信仰,他们告诫信者,这是恶魔的诱惑,源于对神的不诚。面对神的怀疑者,他们将展示给信者自身的功劳和这类人面临的极大不幸。
信者在成长,对神的认知已不再是原本的共鸣。也没有转向怀疑,因为知道了所保持的信仰代表了自己拥有的,和能够再获得的。
神的影响在壮大,不论是何种缘由,直到有一刻发展成为区域内的共同取向。从此,神由名义的存在,变为了对社会推进的指引。

由此得到一个故事设定,是一个有现代感的封闭村落,保留着有血缘遗传的神的绝对信仰。出于安全考虑(表明其实有反对者活动),神的继承者要送往远方完全隔绝的地方教育成长,并在成年时接回告知神的血统。此时只有接受神的名号才能保障自身(包括父辈)的安全,同时出于传统需要否认之前的一切经历。哪怕是最好的伙伴也只能视为陌生,忍受着孤独。其实在村落里,能成为神是被向往的事情,是希望自己的出身是荣耀的血统。
关于故事的年代设定,是架空的久远的感觉,会调动起人情绪的幻想,而不是无知落后。是面对了合适但又伤感的东西。

成文方式,再等形式确定按需要和预计来。这次风格是打算保持有完整的情节和人物线,也按习惯考虑再在形态上体现些非常态的要素。注重个人体会和神的视角。

人物。主角,男,神的继承者,情节的主线。其他待确认或添加。
这里的内容本身,就在于构想的积累。

Part.2
090824-5
续写和预想总担心会有难调和的地方啊,现在是开始一个新的部分了。

教堂是宗教仪式的场所,具有神圣之感。信者在此洗礼祈愿,希望获得神的庇护。
即使不见神的形体,也能体会到它对未来的影响。以预言的方式,让信者内心感受力量,来支持自身最认为的情况。
或许存在击穿了现实和其他次元的视感,掩饰了悲伤的自虐感。或者既可是源于生命的力量信念向往,亦可是无形沉重的束缚。
仰望教堂汇聚的屋顶,寻找灵魂引导者的光芒。那是被渺小身影寄予希望能存在的神,它的作用在仪式场所里,被实现。
以神的名义而被广知的意志,是众信者依靠的引导。结合在一起的力量,掩去了争端隔阂。不论是出于对此力量的满足或恐惧。
一代代的信者,化身为神躯壳的部件,于发展之路上开拓出新的脚印,光芒闪烁在无尽长河中。
教会的领导者,同时是与神的媒介。也共同意志的个人存在,引导职责的现实担当。他获得着信者对神的依赖,可能出于愿望的共鸣,或也可能是象征体的延续(扮演与希望担当引导者不同的理想)。
古老的预言曾讲述,神把众生从恶魔的拉扯中解救。在延续下的信者对神敬仰的幸福目光的暗影中,有囚禁着的恶魔和发生的对将新诞生的神的杀戮。
神的意志,是生命对不可知的境地的依赖。同时渐渐,个体也把神视作等同满足感的存在,以忍受个体的压抑作为代价,共同填充着神的躯体。
约定,神不会说,因为它没有亲自实现愿望的力量。

以上构造背景是想想的,估计不合实际。教堂是古典欧洲的味道,故事里也想有石墙外神社状神灵和大自然的感觉。设定时间组成,主体是主角成人仪式时段,发生来有隔绝感到村落。还有就是很分明的成长时段,是现代文化的空间,有校园伙伴和成长,是被认为最真实不可丢弃的(有点读者生活的空间的情感)。预言传说,是模糊的,和现实有重影的,被相信而不会摆脱的。好友的亲近和对族人的距离感是对于,也和血缘关系反差。神的存在感,以典故氛围,特别是迫使主角的力量的形式存在。行文对神的重点在存在感,不涉及评价的。完整的故事由线索和场景的发展构成。

人物:主角的父亲,考虑是会有爷爷辈,该角色是发生了双重的身份,这里以长辈的为首要体现。抗议团体,根据上次设定有一个暴力团体,作为力量迫使主角的家族出于安危不可放弃地位(这里可划分出不同立场的)。主角同学,女生,可爱,有相对特别的性格。被祭祀和祈愿的对象,在传说和历史上分别存在的神,自身是认为到幸福的,不过被主角体会到悲剧感(有母亲爱子女感),这个不做故事线索。村民路人,被需要的角色,会提拔其中的任故事要素的。人物间有立场和身份的关系。

直线型情节要交织感有困难啊,情节的波动仍按习惯转移到叙述上(情节本身平稳化)。故事这次打算基于场景和情绪来组织。部分人物有纯真和距离近的感觉。

简单设定点场景(感觉上的,不一定使用):坐在倒下的树干上,夜晚,有虫鸣,星空和月光,独自或和来自外界的人一起,唤起现代回忆下美好和真实的感受。主角的不同时段愿望(理想)的冲突(就仅设定过两个存在的时段吧)。不同身份的人,亲切和敬意的同时存在的对话。注,村落也是现代感的,只是味道不同而已。

Part.3
090830
又过了些天了,构想没多少推进。话说这种依靠累积的项目,是需要安排好集中而平缓的进度的。

在背景中设定的各立场:主体是神,一个抽象的存在。故事中其他视角对它是模糊的认识,神圣无上的感觉。神使和信者,他们共同受神的牵制(这是故事的切入,展现悲伤的情绪,方向是意识的发掘)。两者的自身利益和与相互关系推动出了神的存在形态(也看作人的组成部分,区别在转为了人的制衡)。信者有对神使的不满,但仍有此方向的利益取向(价值的认可和收益)。不同神使有巩固自身利益和立场的动机,这也会造成另一方的情绪。整体是被压制的感觉。

这是补充内容,本篇构想篇第一篇就此结束。这里设定(这贴里的)的要点是故事的主题,也会再补些。此外填充场景(发展中的片段)人物和故事线(展现形态方面的,或情绪关系发展)。

2009年8月20日星期四

开始加AdSense试试

如题,刚填了申请。
加Ad不是本人最初对本Blog建设的设想了,虽然曾有过觉得对不住服务商的想法。
不过为了写本贴,来尝试一下申请和投放喽。
话说其实都没人路过这里啊。
就先这么,样式也不调整了,等下一步怎么做。
Ok,在自家挖个试验田。其他文章属性不受影响。
====
回信说 不符合。
参考这篇
http://www.google.com/support/forum/p/adsense/thread?tid=7ddbed7081a813d0&hl=zh-CN
中文blogspot的站点目前不接受。
注册网站的要求和其他说明看这里
http://www.google.com/support/forum/p/adsense/thread?tid=5b6daaad0a89ba6d&hl=zh-CN
先放一会公益广告吧。
====
090824
准备买空间,有考虑HG的,现在看中HM。
====
090828
前天晚上买好,域名是zflap.com,已尝试Drupal并建立博客入口,SSH也以开通。

2009年8月19日星期三

pdftotext

pdftotext is an open source command-line utility for converting PDF files to plain text files.
http://www.foolabs.com/xpdf/download.html
If your machine is x86,Win32,
you can download the Precompiled binaries for Win32,and use pdftotext.exe following pdftotext.txt.
If the PDF you converted contains Simplified Chinese characters,extra Language Support Packages for Chinese/simplified is needed.The URL where you will get the fonts can be founded in file README,which also shows you how to use this pac.

EN写着不顺啊,而且内容还是提及中文问题的。

2009年8月16日星期日

cgi&c,jQuery&CMS与OO

CGI 通用网关接口

The Common Gateway Interface
http://hoohoo.ncsa.illinois.edu/cgi/
CGI Programming FAQ
http://www.htmlhelp.org/faq/cgifaq.html

文档,参照和参考

最简单的示例

#!/bin/sh
echo Content-type: text/plain
echo /bin/date

出自 - 学习CGI脚本
http://www.jdon.com/idea/cgi.htm
老文了,用实例介绍了cgi

cgi是一种标准协议,与可执行的文件是何种语言编写无关。
通过URI的调用,服务器建立cgi进程。
cgi程序的标准输出的内容被发回客户端浏览器,
输入通过表单的GET和POST是以环境变量和标准输入的方式,
比如"/cgi-bin/test.cgi?inputstr"。
被建立的cgi进程随后销毁
c语言的实验代码

#include
int main(int argc,char** argv,char** envp)
{
puts("content-type:text/html\r\n\r\n");
while (envp++,*envp!=NULL){
puts(*envp);
puts("
");
}
}

解析FROM提交的QUERY-STRING的c实现
参见 用c写CGI 程序
http://www.programfan.com/article/2858.html

QUERY-STRING的格式及代码 略
theName=Ichabod+Crane&gender=male&status=missing&headless=yes
URL编码遵循下列规则:
每对name/value由&符分开.
每对来自表单的name/value由=符分开. 如果用户没有输入值给这个name,那么这个name还是出现,只是无值(象这样 "name=").
任何特殊的字符(就是那些不是简单的七位ASCII,如汉字) 将以百分符%用十六进制编码. 当然也包括象 =, &, 和 % 这些特殊的字符.
在输入区中的空格将以加号+显示.




用perl会比用c方便些,而php则更加专用了。
c/cpp库有 cgic Cgicc
封装了函数提供如表单检查或文件上传等功能
协议大体分别是BSD-Like和LGPL
能找到示例代码

使用FastCGI技术,可以建立长期的cgi进程。
http://www.fastcgi.com

#include

void main(void)
{
int count = 0;
while(FCGI_Accept() >= 0) {
printf("Content-type: text/html\r\n");
printf("\r\n");
printf("Hello world!
\r\n");
printf("Request number %d.", count++);
}
exit(0);
}


想简单实验cgi可以用
(Win32)EasyWebServer V1.9
(Linux)mini-httpd
Linux下注意权限和是否开启cgi功能

c语言下锁住文件用sys/file.h的flock()
例如编写计数器类似程序,会同时对同一个共享的文件读写的。

编写包含同时处理多用户的各自状态的程序,
通过session和cookie来实现
cookie的获取和设定功能,有cgi协议提供
session则对登录的用户分配ID,分别由服务器和浏览器的cookie匹配保存和传递状态。
如果用c编写,session需要自行实现。

CMS
内容管理系统 - Content Management System

比如 drupal,Joomla(个人乱猜前者侧重平台,后者是信息展示)
博客类wordpress也可以算,不过CMS管理个内容不限于博主及Post,且可结合更多样的形式。
对CMS我是刚去了解,之前仅有所耳闻。
我看了各自DEMO,感觉到的基础的组成有:前端后端(用于展示和管理),用户管理,模块管理(安装),文本(基本的)的发布及管理,站点栏目及页面的管理,展示的视图组件(首页的部件,也和使用theme相关),二次开发的API。

jQuery是用于客户端的JavaScript代码库,以实现
DOM操作 选择器及操作
AJAX 用于创建与服务器通信的交互式网页
动态效果
用户界面 jQuery UI
使用已有众多组件

见到有jQuery与drupal结合操作的教程。

如果想复杂,可以自己架一个eyeos试试?
一个基于php的WebOS,
提供GUI创建工具,和供服务端自行编写PHP使用的API。
感觉把一个Linux(界面很像)搬到了浏览器中。
记得它已经有好几年历史了,不过目前看来,过多把数据和处理逻辑全放在服务器,而客户端运行的部分不足,确实不方便。
其他WebOS也有形式如远程终端,FireFox的附加组件类似,FLASH类似先接受一个小心客户端再与服务端交互,AJAX与CGI的处理逻辑分别由和客户端服务端承担。

上面一段是借题想到,就写上去了。话说最近指南类文贴的较多,都仅泛泛说说,而求内容由不集中啊。呵呵。
我给本博想了一个主题,叫 IT技术(与 文艺)提升人的生产与生活。单篇贴仍保持之前“资源与引导”的思路来。恩,这里仅仅是这么想过而已。
有购域名和空间的打算,目前思路还不明了啊。

其实本来开本贴就只打算简单扯几句想法的,介绍部分一写就占内容了。
话说建立站点与信息发布,
较原始和简单的办法,就是手工编辑网页文件。
发布信息,只需要建立新网页或在网页中添加相应内容,修改也是同样的方式。
如果考虑主页的部分内容是可以自动生成的,也可编写简单的脚本来辅助。
评论部分用CGI的GuestBook即可。
单纯的信息发布,也可用已有的博客系统。但相比而言,一个博客系统会比前一种方式要庞大,且机制更为复杂。是否算违背“简单”的原则呢?
恩,这里会考虑分离和重用。就像DIV+CSS可以分离网页的内容和布局,运用博客系统则是分离了对内容的控制和对系统功能的控制。在对系统使用的功能中,使得用户能够更好的专注内容。同时也降低了技术上的要求。而同一份高质量的博客系统可以被不同的人使用,既节约了成本也保障了代码的质量。也有自定义主题和扩展模块的部件。

对于命令式语言,块结构是对GOTO的封装,而函数功能则提供了更高层次的封装。在C风格的API的设计中,可以划分出获取值,设置值,执行命令(初始化和释放是成对出现,有点特别)三类。而以对象形式封装的接口由包,属性,事件,方法组成。接口的信息可以通过文档或对象浏览器提供。GUI组件倾向于后者的形式封装,符合人的观点且可节约代码。(比如,不用调用一个长名称的函数,再加一个指向结构的指针为参数。也增强安全性。)
接口的形式仅是一个方面,这里更多是涉及设计方式的变化。从单一的变量,到包含不同数据的结构体,在演化为对象在包含数据的同时也可以能对自身处理的函数。这是在出于封装需求(安全,重用)的同时,也出于对模拟系统的开发与设计之中的探索(比如生命之类?)。参考Win32API在GUI部分的设计(我记不太清楚了,大体如此吧)是物件导向的思路加函数形式的接口。先填充包含属性和用于处理的消息的回调函数的结构体,由此从窗口类注册并创建窗口对象(也包含按钮文本框之类的,先是一个容器窗口了)。同时存在一个消息循环,就是一个while/loop循环了。接受到来自消息列队的消息并对消息代表的事件判断,就是switch或ifelseif(这两者有区别,因为前者可以优化为跳转表)的形式。事件比如按钮按下更,包括了两个基本的,是创建时和销毁时。如果不是通过资源文件里编写好的对话框样式,窗口就需要在创建是建立如按钮等控件,同时告诉子窗口发回不处理的消息(可能是)。对于窗口可以子类化(先自行处理消息在调用父类处理)和超类化(用来批量创建子类),实现方式体现在对消息的处理流程上。对比smalltalk和c++风格处理消息/方法的办法,前者是动态查找,后者是转化为函数并建立虚函数表处理子类的继承关系(可当接口用)。但至少不用自己进行消息判断的代码,在运用物件导向的同时,既节约了代码,也分离了实现消息处理的方法和设计中消息要处理的实际内容(即实际的处理逻辑)。
先承认一下,我一直认为物件导向给编码带来麻烦,同时又认同设计模式和重构中(才仅听说而已)分离出设计的步骤,且VB和GWBASIC都是方便的东西,所以想来上面一些内容。不过我目前看那些CMS都很痛苦的感觉,不过要用时又确实去会使用他们。

下面的话题是用代码创建一个虚拟的世界,其实就是游戏啦。通常的游戏脚本使用简单的GOTO语句就可以实现逻辑了。也或许有更快捷的方式。
参照是类RPG形式的冒险类游戏。
来伪代码:
while !quitgame
界面绘制()
处理按键()
触发及事件的游戏逻辑()
wend
func 子界面
或者有文本数据
或role npc1=new role("路人甲");sense1.add(npc1);
或...(?)
ok,不早了,先烂尾在这里吧。
4hours累计,闲话啊

======
找来RPGMARKER PC版的试玩,它把项目分为事件和数据(可单独划分出map)两类。其实它事件也是当作数据的,因为游戏本身的系统是固定的。后来的的版本由增加脚本模块,并预置了系统本身使用的脚本,按作用木桶分为:模块,游戏对象,精灵,窗口,场景,自定义插件,主程序。这些脚本可以看作是由原本固定的系统转化而成。在数据部分,系统是极有FF+DQ的风格。道具的效果或敌人的行为等设定并不直接提供脚本形式,而是选择预设的条件事件或加成效果等。事件编辑是条件加事件List(界面就是List加单独的属性框的设计)。RM的gba版和3d版也蛮有趣的样子啊。
看一些Galgame的引擎就是纯文本的脚本了,系统最基本的部分是提供了图像声音等一些功能调用。仅限定了游戏的形式,而对游戏的系统设计需自行完成(这样才被玩得有意思嘛)。不过这里通常就不用考虑OO了。状态以变量形式保存,用脚本展现游戏流程,再单独制作如存档等功能模块(包括场景)。
====
090819
关于WebApp的平台或框架,看了GAE和web.py的文档比较简明,虽然它们不是被通常使用。<-病句
AVG游戏的常见引擎有几个,这里略过。N,K,R.
有的CMS就可当框架用了,不过当然不是一回事情。
====
091029
只想着设计上的接口和抽象了,忘说cpp设计的一个初始目的是便于组织代码结构。<-当然前者仍是这贴里考虑的重点,貌似我当初是在这么写的。

2009年8月12日星期三

[回收贴]编写简单的语言解释器

说明:注意哦,是回收贴,把这段时间的一些实验的想法和代码贴过来。
都仍只是不成熟的内容,问题会比较多,而且缺少很多东西,如错误处理之类。
贴过来是觉得这些东西还是有点实用价值的。
因为代码中"<"和">"没有处理,所以#include部分在显示上有问题。
恩...我K&R风格的缩进也没显示出来。

Part1
编写简单的语言解释器
09-7-19

是想只记录构想要点的,不过仍是多了些无用的词句。不想在文字而非内容上耗时间。嗯,想到自己写文字为邮件是纯笔记的时候,是快快完成内容为先的啦。或者就把记事本里留的直接贴上,那个没有是专门去写的感觉。

语言用C,目地是纯实验,仅此很个人的。之前有试写了片段,不过若要完整的开始,还是先有份文档为好。
有三个方向,一个是GWBASIC兼容的,再适当扩展简单的代码风格。一个是基于lisp式表达式处理的,是处理type,value car,cdr式结构的,因为需要对list进行处理,不过如果从纯函数的角度说也不一定有必要。前面的那个就直接基于文本解析了,不按照编译原理先对完整的代码做词法和句法的分析,虽然有效率和编译时错误的缺陷,但我想会是仍能满足简单的运行要求。还有一个方向就是基于命令的如bat,sh,是语言本身就十分简单实用的实现。

BAS
由行构成,以换行或":"分割,行第一项为行号(纯数字只在换行后的行首,这次按Label处理,增加L语句)可省略,接着为语句名称,写为变量名的形式,对后续参数的处理由语句名称决定
变量简单地用链表储存,不hash或btree了。每项是字符串到值,值有类型和数据两部分。(之前第三类是全视为字符串,这里不是,有至少整数实数二进制字符串三类。)
先来流程控制部分。
LISP,先解析填充为树状结构,然后执行。两者之间可适当封装一下。
简单是原则哦。


lisp5.c

前缀表达式计算实验
ee.zsy按照BSD协议发布
缺陷
缺少错误处理
使用方法参见bat文件
lisp5.exe用TCC默认参数编译
09.07.12

BG
PLAN
简单的LISP解释器
//BAS解释器
TODO
逐步实现更多特性
从直接处理文本改为先转换为语法树
NEXT
改进getnum为getitem+isnum


#include
#include
#include
#include

char *exp;

int main(int argc, char** argv){
double eval();
//~ printf("argc %d\n",argc);
char ins[255];
gets(ins);
exp=ins;
printf("%s\n",exp);
//exp="(/ (+ 32 12) (* 1 4))";
printf("RST %g\n",eval());
return 0;
}

double getitem(){
double eval(),getnum();
if(*exp=='('){
printf("eval %s\n",exp);
return eval();
}else{
//printf("num %s\n",exp);
return getnum();
}
}

double getnum(){
int i=0;
char ts[10]={0,0,0,0,0,0,0,0,0,0};
printf("getnum %s\n",exp);
//~ for(i=0;isdigit(exp[i]);i++);
while(isdigit(exp[i]) || exp[i]=='.'){
i++;
}

printf("LEN %d\n",i);
strncpy(ts,exp,i);
printf("STR %s\n",ts);
printf("NUM %g\n",atof(ts));
exp+=i;
return atof(ts);
}

double eval(){
double p[5];
double result;
exp++;
switch(*exp){
case '+':
exp+=2;
p[0]=getitem();
exp+=1;
p[1]=getitem();
exp+=1;
printf("=%g+%g\n",p[0],p[1]);
result=p[0]+p[1];
break;
case '-':
exp+=2;
p[0]=getitem();
exp+=1;
p[1]=getitem();
exp+=1;
printf("=%g-%g\n",p[0],p[1]);
result=p[0]-p[1];
break;
case '*':
exp+=2;
p[0]=getitem();
exp+=1;
p[1]=getitem();
exp+=1;
printf("=%g*%g\n",p[0],p[1]);
result=p[0]*p[1];
break;
case '/':
exp+=2;
p[0]=getitem();
exp+=1;
p[1]=getitem();
exp+=1;
printf("=%g/%g\n",p[0],p[1]);
result=p[0]/p[1];
break;
default:
exit(1);
break;
}
return result;
}

getput.bat

getput.exe

后来随即尝试添加了cond语句(有嵌套的问题),并加入lisp中atom/list的处理,还没法编译。

3bas1.c

#include
#include
#include
#include
#define DebugPrint(SS) printf("%d:%s\n",__LINE__,SS);
int main(int argc, char** argv){
int LoadFile();
DebugPrint("main");
LoadFile();
return 0;
}

int LoadFile(){
DebugPrint("loadfile");
FILE *fp;
char *ss;
int fl;
fp = fopen("do2.c","r");
fseek(fp,0l,SEEK_END);
fl=ftell(fp);
fseek(fp,0l,SEEK_SET);
DebugPrint("as");
printf("LEN %2db\n",fl);
ss=(char*)malloc(fl+1);
int i;
for(i=0;i<=fl;i++) ss[i]='\0'; //~ ss[5]='\0'; //~ ss[0]='s'; //~ ss[1]='\0'; printf("%s\n",ss); //printf("%d",i); //~ int i; char ts[256]; for(i=0;i<=255;i++) ts[i]='\0'; //~ strcpy(ts,"bbbbbb"); //~ puts(fgets(ts,255,fp)); strcat(ss,ts); while(fgets(ts,256,fp) != NULL){ strcat(ss,ts); //~ puts("aa"); } //~ for(i=0;fgets(s,256,fp)!=NULL;i++){ //~ DebugPrint("cs"); //~ printf("%2d]",i+1); //~ puts(s); //~ strcat(ss,s); //~ puts(ss); //~ } fclose(fp); DebugPrint("bs"); printf("%s\n",ss); return 0; }

之后添加了

int main(int argc, char** argv)
int LoadSource(char* sn)
int NextStatement()//获取行并执行
int GetItemValue()
int GetItemLen(int start)
struct VarNode {
char *name;
char *value;
struct VarNode *next=NULL;
} VarNode0;//链表,可用代码在下面会有
char* GetVar(const char *name)
int SetVar(const char *name,const char *value)
char* NewStr(const char *Str)//malloc一个字符串的副本


Part2
BAS.txt

语句
[行号] 语句 参数
流程
label
goto
if then [else ]
//on goto

do
end
break,continue
for to stepnext
while:wend

命令
let =
表达式
运算符
数 +-*/
关系运算
字符串
]支持运算符和函数

变量储存
变量名,字符串
数组 支持数组语法 d(i,j)
转为字符串名处理 如 d_2_1
$运算符如 $abc
取字符串变量abc对应值为变量名的对应值
或单独建立类型名为引用
变量名是[a-zA-Z._0-9],凡是分隔符前不能被识别为数字的

def <>=<> 是扫描时定义,label


BAS表达式解析.txt

bas
目标 轻便

表达式计算 部分

记号
整数 digit
实数 digit|.|eE
//strtod能识别的部分,double
//能转换为整数就转换,运算都作实数
//或strtol
字符串 ""之间的
变量名 取得类型和值 alnum |$|%
之后有()则可能是
内置函数 运算
数组 查找
用户函数(或FN 开头) 查找并运算


操作符 长度>=1 可以前后有空格,或省略
优先级

针对double类型的
类型不符合则出错 类型错误
表达式(由高到低,优先处理):

括号表达式
数(leading 0 for octal, 0x for hex, else decimal),变量
一元 -
* /
+ -
= <>
> < <= >=
(* and + are also used for boolean AND and boolean OR)
Boolean expressions evaluate to 0 for false and 1 for true

对字符串类
& 合并
其他函数 返回值为数或字符串

解析函数为递归函数
被提供待解析的表达式
单独的片段
一个起始位
解析返回一个变量结构

流程
记号->变量->函数->常量
操作符

变量结构由链表储存
{
char *name
value
*}
*next
}

value emum type %{int
double
char

基本的常数运算

basexpr2.c
数值表达式

#include
#include
#include
#include
//~ #include
float expr();
float expr0();
float expr1();
float expr2();
float expr3();
float expr4();
float expr5();
float expr6();
char *e;
float expro=0;

double sin(double i){
return i+1;
}

float expr(){
char* o;
int i=expro,j;
expro=0;
do{
o=e;
expro=expr4();
}while(o!=e);
j=expro;
expro=i;
return j;
//~ return expr4();
}

float expr4(){
float o=expr3();
while(isspace(*e))e++;
if(!strncmp(e,"<=",2)){ e+=2; return o<=expr3(); }else if(!strncmp(e,">=",2)){
e+=2;
return o>=expr3();
}else
if(*e=='<'){ e++; return or,4:r->l
}else
if(*e=='>'){
e++;
return o>expr3();
}else{
return o;
}
}

float expr3(){
float o=expr2();
while(isspace(*e))e++;
if(*e=='='){
e++;
return o==expr2();
}else
if(!strncmp(e,"<>",2)){
e+=2;
return o!=expr2();
}else{
return o;
}
}

float expr2(){

float o=expr1();
while(isspace(*e))e++;
if(*e=='+'){
e++;
return o+expr1();//strtod(e,&endp);
}else
if(*e=='-'){
e++;
return o-expr1();//strtod(e,&endp);
}else{
return o;
}
}

float expr1(){
float o=expr0();
while(isspace(*e))e++;
if(*e=='*'){
e++;
return o*expr0();
}else
if(*e=='/'){
e++;
return o/expr0();
}else{
return o;
}
}

float expr0(void){
//~ char *endp;
//~ float o=strtod(e,&e);
while(isspace(*e))e++;
if(*e=='('){
e++;
float o=expr();
e++;
return o;
}else
if(isalpha(*e)){
if(!strncmp(e,"sin(",4)){
e+=4;
//~ return sin(expr());
//~ e++;
float o=expr();
e++;
return sin(o);
}
}else{
/* o=strtod(e,&e);//printf("%d\n",o);
* //~ e=endp;
* //~ else
*
* if(*e==')'){
* e++;printf("%d\n",o);
* return expr2(e);
* }else{
*
* return o;
* }
*/ if(expro!=0){float o=expro;expro=0;return o;}
else{return strtod(e,&e);}

//~ return strtod(e,&e);
}
}

int main(int argc, char** argv){
e="4+<5"; i="expr();">

basstrexpr.c
字符串表达式

#include
#include
#include
#include

char *e;
char* getstr();
char* strexpr1();

char* strexpr1(){
char* o=getstr();
while(isspace(*e))e++;
if(*e=='&'){
e++;
while(isspace(*e))e++;
char* p=strexpr1();
char* q=strcat(strcpy(malloc(strlen(o)+strlen(p)+1),o),p);
free(o);free(p);
return q;
}else{
return o;
}
}

char* getstr(){
while(isspace(*e))e++;
//not necessary
//~ if(*e=='('){
//~ e++;
//~ char* o=strexpr1();
//~ e++;
//~ return o;
//~ }else
if(*e=='\"'){
int i;
e++;
i=strchr(e,'\"')-e;
//~ printf("%d\n",i);
char* p;
p=strncpy(malloc(i+1),e,i);
p[i]='\0';
e+=i+1;
//~ if(p[i-2]!="\0"){
//~ p[i-2]="\0";
//~ }
//~ printf("%d\n%d\n%s\n",i,strlen(p),p);
return p;
}else
if(!strncmp(e,"left(",5)){
e+=5;
char* o=strexpr1();
e++; // ,
int i=strtod(e,&e);
e++; // )
char *p=strncpy(malloc(i+1),o,i);
p[i]='\0';
free(o);
return p;
}
}

int main(int argc, char** argv){
e="left(\"ABcdefg\"&\"CD\",9)&\"EF\"";
printf("e]%s\n",e);
char* i=strexpr1();
printf("]%s\n",i);
printf("]%s\n",e);
free(i);
return 0;
}


basvarnum.c
变量-数字部分

#include
#include
#include
#include
struct num* findnum(char*name);
float getnum(char *name);
int putnum(char *name,float value);

struct num{
char*n;
float v;
struct num *next;
} lne;//list num start
struct num* lns=⪇
//~ struct num ;
//~ lns.v=0.0;
//~ lns.next=NULL;
struct num* findnum(char*name){
struct num* i;
for(i=lns;(i->next)!=NULL;i=i->next){
if(strcmp(i->n,name)==0){
return i;
}
}
printf("not found %s\n",name);
return NULL;
}

float getnum(char *name){
struct num* o=findnum(name);
if(o!=NULL){
return o->v;
}
return 0;
}
int putnum(char *name,float value){
struct num* o;
o=findnum(name);
if(o!=NULL){//exist
o->v=value;
return 0;
}else{//new
o=malloc(sizeof(struct num));
o->n=name;
o->v=value;
o->next=lns;
lns=o;}
return 0;
}

int main(int argc, char** argv){
lne.n="test";
lne.v=123456;
lne.next=NULL;
putnum("a",1);
putnum("b",2);
putnum("c",3);
putnum("b",980);
//~ printf("%g\n",lns->v);
//~ lns=lns->next;
//~ printf("%g\n",lns->v);
//~ lns=lns->next;
//~ printf("%g\n",lns->v);
//~ lns=lns->next;
//~ printf("%g\n",lns->v);
//~ lns=lns->next;
//~ printf("%g\n",lns->v);
//~ findnum("b");
struct num* o=findnum("a");
if(o!=NULL){
printf("%g\n",o->v);
}

printf("%g\n",getnum("b"));
return 0;
}



Part3
变量存放.txt

以链表为基础name->value
局部变量用局部链
或加前缀
或允许同名并针对块语句处理

isitem(",")
=" "*," "*
e++

设计文档与草图
和编码过程

内置函数
数学函数num->num
字符串str->str
str->num
len
val
num->str
str/str$

合并为函数,也可match ,用
if(!strncmp(e,"while",5)){
e+=5;
}
while(isspace(*e))e++;

或建立单独的词法分析函数


对于模块先理,有规划和散开简单的尝试,再补充技术要点,使能初步运行,再补完和修改
有步骤和完成效率,补完类似代码时,目标相对非模糊

往专业化的痕迹

bas转c
添加如字符串库


块语句
设置execline标志判断块内是否执行(或passline)
某变量为记录块的嵌套层数
如果要层可嵌套,则块的首尾语句都要处理,不受标志影响
上层块设定不执行块内语句(不包含结构语句),内层则不做判断,直到上层的结束时恢复标志
块内可有局部变量

对解释while/wend块,若在执行状态则wend处跳回while之前,否则继续执行之后的语句

label table建立(常量)

basexpr3.c
上部分的代码合并并添加新特性

#include
#include
#include
#include
//~ #include

char* getstr();
char* strexpr1();


//================================================================================================
struct num* findnum(char*name);
float getnum(char *name);
int putnum(char *name,float value);

struct num{
char*n;
float v;
struct num *next;
} lne;//list num start
struct num* lns=⪇
//~ struct num ;
//~ lns.v=0.0;
//~ lns.next=NULL;
struct num* findnum(char*name){
struct num* i;
for(i=lns;(i->next)!=NULL;i=i->next){
if(strcmp(i->n,name)==0){
return i;
}
}
printf("not found %s\n",name);
return NULL;
}

float getnum(char *name){
struct num* o=findnum(name);
if(o!=NULL){
return o->v;
}
return 0;
}
int putnum(char *name,float value){
struct num* o;
o=findnum(name);
if(o!=NULL){//exist
o->v=value;
return 0;
}else{//new
o=malloc(sizeof(struct num));
o->n=name;
o->v=value;
o->next=lns;
lns=o;}
return 0;
}

//~ int main(int argc, char** argv){
//~ lne.n="test";
//~ lne.v=123456;
//~ lne.next=NULL;
//~ putnum("a",1);
//~ putnum("b",2);
//~ putnum("c",3);
//~ putnum("b",980);

//~ struct num* o=findnum("a");
//~ if(o!=NULL){
//~ printf("%g\n",o->v);
//~ }

//~ printf("%g\n",getnum("b"));
//~ return 0;
//~ }
//============================================================================

float expr();
float expr0();
float expr1();
float expr2();
float expr3();
float expr4();
float expr5();
float expr6();
char *e;
float expro=0;

double sin(double i){
return i+1;
}

float expr(){
char* o;
int i=expro,j;
expro=0;
do{
o=e;
expro=expr4();
}while(o!=e);
j=expro;
expro=i;
return j;
//~ return expr4();
}

float expr4(){
float o=expr3();
while(isspace(*e))e++;
if(!strncmp(e,"<=",2)){ e+=2; return o<=expr3(); }else if(!strncmp(e,">=",2)){
e+=2;
return o>=expr3();
}else
if(*e=='<'){ e++; return or,4:r->l
}else
if(*e=='>'){
e++;
return o>expr3();
}else{
return o;
}
}

float expr3(){
float o=expr2();
while(isspace(*e))e++;
if(*e=='='){
e++;
return o==expr2();
}else
if(!strncmp(e,"<>",2)){
e+=2;
return o!=expr2();
}else{
return o;
}
}

float expr2(){

float o=expr1();
while(isspace(*e))e++;
if(*e=='+'){
e++;
return o+expr1();//strtod(e,&endp);
}else
if(*e=='-'){
e++;
return o-expr1();//strtod(e,&endp);
}else{
return o;
}
}

float expr1(){
float o=expr0();
while(isspace(*e))e++;
if(*e=='*'){
e++;
return o*expr0();
}else
if(*e=='/'){
e++;
return o/expr0();
}else{
return o;
}
}

float expr0(void){
//~ char *endp;
//~ float o=strtod(e,&e);
while(isspace(*e))e++;
if(*e=='('){
e++;
float o=expr();
e++;
return o;
}else
if(isalpha(*e)){
if(!strncmp(e,"sin(",4)){
e+=4;
//~ return sin(expr());
//~ e++;
float o=expr();
e++;
return sin(o);
}else
if(!strncmp(e,"len(",4)){
e+=4;
//~ return sin(expr());
//~ e++;
char* o=strexpr1();
e++;
int i=strlen(o);
free(o);
return i;
}else{//getvar
char* p=e;
while(isalnum(*e)){
e++;
}
//~ puts(e);
//~ printf("%d\n",e-p);
int i=e-p;
p=strncpy(malloc(i+1),p,i);
p[i]='\0';
puts(p);
float l=getnum(p);
free(p);
return l;
}
}else{
/* o=strtod(e,&e);//printf("%d\n",o);
* //~ e=endp;
* //~ else
*
* if(*e==')'){
* e++;printf("%d\n",o);
* return expr2(e);
* }else{
*
* return o;
* }
*/ if(expro!=0){float o=expro;expro=0;return o;}
else{return strtod(e,&e);}

//~ return strtod(e,&e);
}
}

//=====================================================================================
//~ char *e;
//~ char* getstr();
//~ char* strexpr1();

char* strexpr1(){
char* o=getstr();
while(isspace(*e))e++;
if(*e=='&'){
e++;
while(isspace(*e))e++;
char* p=strexpr1();
char* q=strcat(strcpy(malloc(strlen(o)+strlen(p)+1),o),p);
free(o);free(p);
return q;
}else{
return o;
}
}

char* getstr(){
while(isspace(*e))e++;
//not necessary
//~ if(*e=='('){
//~ e++;
//~ char* o=strexpr1();
//~ e++;
//~ return o;
//~ }else
if(*e=='\"'){
int i;
e++;
i=strchr(e,'\"')-e;
//~ printf("%d\n",i);
char* p;
p=strncpy(malloc(i+1),e,i);
p[i]='\0';
e+=i+1;
//~ if(p[i-2]!="\0"){
//~ p[i-2]="\0";
//~ }
//~ printf("%d\n%d\n%s\n",i,strlen(p),p);
return p;
}else
if(!strncmp(e,"left(",5)){
e+=5;
char* o=strexpr1();
e++; // ,
int i=strtod(e,&e);
e++; // )
char *p=strncpy(malloc(i+1),o,i);
p[i]='\0';
free(o);
return p;
}
}

//~ int main(int argc, char** argv){
//~ e="left(\"ABcdefg\"&\"CD\",9)&\"EF\"";
//~ printf("e]%s\n",e);
//~ char* i=strexpr1();
//~ printf("]%s\n",i);
//~ printf("]%s\n",e);
//~ free(i);
//~ return 0;
//~ }
//========================================================================================

int main(int argc, char** argv){
putnum("a",1);
putnum("b",2);
putnum("cde",3);
e="len(\"asf\")+1";
float i=expr();
printf("%g",i);
return 0;
}


baslineexper.c
按行解析

#include
#include
#include
#include

char *e=
//"0 goto 30 \n"
//"5 print a\n"
"10 while 1\n"
"pause\n"
"while 1\n"
"print in\n"
"pause f\n"
"wend\n"
"wend\n"
//"20 goto 25\n"
"25 end\n"
"30 print 3\n";

char* pe;
char *s[256];//存放指针的数组,不用存行号了
char **ps;//指针 指向 指,数组(类型为指针)的元素

int main(int argc, char** argv){
pe=e;
ps=s;
int ln;
e--;
int passline=0;//跳过执行块内语句,非零为块的条件不成立时
do{
e++;
ln=strtol(e,&e,10);//pass line num
printf("e>\n===\n%s===\n",e);

while(isspace(*e))e++;
if(!strncmp(e,"while",5)){
//e+=5;
puts("[while]");
*ps++=e;
e+=5;
int i=strtod(e,&e);
if(passline==0){
passline=(i==0);
}else passline++;
printf("i='%d'\t%d\n",i,passline);
//~ push(ln);
if(ps==s+10)exit(5);
}else
if(!strncmp(e,"wend",4)){
e+=4;
puts("[wend]");
//~ int i=strtod(e,&e);
//~ printf("i='%d'\n",i);
printf("i\t%d\n",passline);
//~ pop(ln);
//~ //goto ln
if(passline==0){e=*--ps;}
else {--ps;passline--;}

printf("i\t%d\n",passline);
}else

if(passline)continue;
else

if(!strncmp(e,"print",5)){
e+=5;
puts("[print]");
while(isspace(*e))e++;
//

}else

if(!strncmp(e,"pause",5)){
e+=5;
puts("[pause]");


}else

if(!strncmp(e,"goto",4)){
e+=4;
puts("goto");
int i=strtod(e,&e);
printf("i='%d'\n",i);
e=pe-1;
do{
e++;
if(i==strtol(e,&e,10))break;
}while(e=strchr(e,'\n'));



//~ push(ln)
}else

if(!strncmp(e,"for",3)){
e+=3;
puts("[for]");
//~ int i=strtod(e,&e);
//~ printf("i='%d'\n",i);
//~ push(ln)
}else
if(!strncmp(e,"next",4)){
e+=4;
puts("[next]");
//~ int i=strtod(e,&e);
//~ printf("i='%d'\n",i);
//~ pop(ln);
//goto ln
}else
if(!strncmp(e,"end",3)){
e+=3;
puts("[end]");
exit(0);
}
//block,gosub,let,def,data,dim
//else
//if//to
//nextline
}while(e=strchr(e,'\n'));

puts("prog end");

return 0;
}


这个,我编辑器的框好小啊,纯写文字还好,一贴代码自己已经晕了。强调一下,我没考虑错误处理,贴的都是能编译的代码。自己这样一行行写的也是好耗时间的,自己还是不熟练啊。特别是把构想的细处实现的时候,还只有找个安静的地方一人想想才有些进展啊。

补充一下,目前的代码是把数,字符串,数组,变量分开处理的,包括解析和变量存放,比较简单的。另一种是变量是引用一个值,而值是有类型的,可以被处理函数获取。而不同于上面的觉得遇到的应该是什么类型。
表达式解析,除了用专用的词法与句法分析工具,可以递归解析。或从左到右,用两个stack存放元素和操作符。根据操作符的优先级,来进行运算。需要注意stack的长度,避免溢出或动态管理。目前觉得这样可能比递归会更好处理元素类型(?)。
现在是按照纯文本,没有编译加虚拟机,为跨平台考虑。可以解释器与虚拟机分离,使客户端轻便,但不要影响描述性脚本数据的易编辑。

Part4
上面实验代码就这样吧,不行再修改,以后重写时会用到。bas的解释器没写完,暂时停工了,在等打算好下一步的规划。
再贴一点上面已包含的小片段吧。还有一些参考资料。小片段的内容还思路很明了的感觉啊。

K&R
http://cis.csuohio.edu/~somos/ddsbasic.c
http://www.personal.leeds.ac.uk/~bgy1mm/Minibasic/MiniBasicHome.html
WxBasic PDF
FreeBasic chm
http://www.nicholson.com/rhn/basic/
编译原理
编程语言概念/原理

注意需要引用的库,K&R关于库的部分相当粗略。

int GetFileLen(){
FILE *fp;
int fl;
//FILE *fopen(char *name, char *mode);
fp = fopen("do2.c","r");
fseek(fp,0l,SEEK_END);
fl=ftell(fp);
//printf("%d",i);
fclose(fp);
return fl;
}


#include
#include
#include
#include

int main(int argc, char** argv){
char* e="assd+sdfdf";
char* p=e;
while(isalnum(*e)){
e++;
}
puts(e);
printf("%d\n",e-p);
int i=e-p;
p=strncpy(malloc(i+1),p,i);
p[i]='\0';
puts(p);
//free(p);
return 0;
}


...


回收贴了,东西杂乱了一点。
已经成了我不喜欢的形态了。
而且没语法高亮好不习惯,不如直接备份文件了,不过这里好自己附些评论。
对于耗时的事情,定计划长期行为,还是会有效过些。
当然也要预定好目的和结果。

补一下有关日期(会发现是纯粹在写着娱乐啊,日期是最后修改日期)

开贴 090812
today 090813
exp.exe 090709
lisp.c 090712
lisp7.c 0907113
3bas2.c 090720
复件 basexpr.c 090723
复件 basvarnum.c 090731
basexpr2.c 090729
basexpr3.c 090801
BAS.txt 090720
BAS表达式解析.txt 090723
basexpr.c 090727
basexpr2.c 090729
basstrexpr.c 090731
basvarnum.c 090731
basexpr3.c 090801
复件 baslineexper.c 090807
baslineexper.c 090811
变量存放.txt 090811

对这些日期,我承认,我只是想证明一下自己的存在感。
我这段期间里上cnbeta和acfun(我也是东方爱好者哦,还没狂热)也比较多,估计会有同好者看见啊。

====顺便写点,也回收了
说一下前面那贴翻译,目前没计划推动说要就翻译全文,仅凭喜好一点点做了。看来没翻译全部完成的可能,不过不至于是看自己无聊时间到什么地步才做的翻译。

我在自聊?

====
091029
The C++ Programming Language,Special Edition 里把简单的表达式计算作为示例,有很好的代码(相比我的那些就...),即使用C改写也是很容易的。

2009年8月11日星期二

NetHack - 免费游戏推荐篇3

http://www.nethack.org/

维基百科(中文简介)
http://zh.wikipedia.org/wiki/NetHack

我承认我目前还不会玩这个游戏,开此贴仅是为了有地方翻译游戏里附带的介绍和指南。
翻译目前只是在全文的局部缓慢进行,但仍希望能给同样关注此游戏的人一些帮助。
暂时格式设置有点问题,文档翻译仅供参考,内容仍以原文为准。
对于其中的名词用语,我没有与原文对照呈现,可能会有阅读的不便。
译者:ee.zsy,开始于#090811。文档来源为当前最新版本。
也有翻译意向的爱好者,希望能够获得联系。或仅提供相关建议。
感谢google translate&dictionary和认识的人。

引子:FAQ
README(部分)

你问:
好,游戏运行了。我从哪里学习怎么玩呢?

一个路过的陌生人回答:

它当然工作了。你认为我是什么,一个广播?
一旦你进入游戏,一些值得尝试(它们连移动都不算)的命令是 ? 和 / 。At risk of sounding
like a marketing blurb, 帮助键(在你的终端上会标有问号 - 并警告需要按下shift键来激活功能!)提供立即访问我们在线帮助的功能。 It's kind of a menu with lovely
options like "c" (where you get to see MY NAME in the history of
NetHack!), "i" (which gives you all the important legal blurb which
tells you about your rights and responsibilities as a NetHack
licensee), and the more boring items "a" and "b" which merely explain
all the commands and the display symbols and uninteresting stuff like
that. What the hell. It's there, you can use it.
The / key is pretty good, too. If there's something on the
screen that you don't know what it is, well, it's probably a letter or
a symbol or something. That's wisdom, see? But to get onto the
Eternal Verities, suppose you want to know what it MEANS? Aha! Hit
/, say "y", I want to specify it by cursor (cursors are blinking
underscores, and if you're British like me you can curse them with
your numeric bloody keypad, too -- Americans needn't understand this
joke), whatever it is, and then you can point out the object of your
confusion and have it explicated in frabjous detail. Helps you avoid
getting your face et, sometimes, that. Always nice, not having your
face et.
哦,对了,我差点忘。There's the Guidebook, too, for
the quiche-eaters in our midst.... 你可能已在你的游戏里得到一份,以叫Guidebook.txt的文件的形式。


NetHack(部分)

NETHACK

名称
nethack - Exploring The Mazes of Menace
描述
NetHack is a display oriented Dungeons & Dragons(tm) -
like game. The standard tty display and command structure
resemble rogue.

Other, more graphical display options exist if you are
using either a PC, or an X11 interface.

为了能够进行游戏,你仅仅需要知道两个命令。命令“?”会给你一个可用命令的列表(也有其他信息),而命令“/”会辨认你在屏幕上看到的东西。

为了赢得这场游戏(而不是仅仅为超过别人的最高分而玩),你必须找到20层地牢下的Amulet(护身符) of Yendor并把它带出。目前还没有人成功完成这点;任何做到的人将会最为英雄中的英雄流传史册。

当游戏结束的时候,无论你是因为死亡,退出,或是从洞穴中逃离,NetHack会给你(片段)高分的列表。得分是基于你行为的许多方面,但粗略的估计是由你在洞穴里发现的金币数量加上你(真实)经验的四倍获得。带出洞穴的宝石会值很多金币。如果你让自己被杀,会有10%的惩罚。



Guidebook











A Guide to the Mazes of Menace
(Guidebook for NetHack)


Eric S. Raymond
(Extensively edited and expanded for 3.4)



1. 导言

Recently, you have begun to find yourself unfulfilled and distant
in your daily occupation. Strange dreams of prospecting, steal-
ing, crusading, and combat have haunted you in your sleep for
many months, but you aren't sure of the reason. You wonder
whether you have in fact been having those dreams all your life,
and somehow managed to forget about them until now. Some nights
you awaken suddenly and cry out, terrified at the vivid recollec-
tion of the strange and powerful creatures that seem to be lurk-
ing behind every corner of the dungeon in your dream. Could
these details haunting your dreams be real? As each night pass-
es, you feel the desire to enter the mysterious caverns near the
ruins grow stronger. Each morning, however, you quickly put the
idea out of your head as you recall the tales of those who en-
tered the caverns before you and did not return. Eventually you
can resist the yearning to seek out the fantastic place in your
dreams no longer. After all, when other adventurers came back
this way after spending time in the caverns, they usually seemed
better off than when they passed through the first time. And who
was to say that all of those who did not return had not just kept
going?


Asking around, you hear about a bauble, called the Amulet of
Yendor by some, which, if you can find it, will bring you great
wealth. One legend you were told even mentioned that the one who
finds the amulet will be granted immortality by the gods. The
amulet is rumored to be somewhere beyond the Valley of Gehennom,
deep within the Mazes of Menace. Upon hearing the legends, you
immediately realize that there is some profound and undiscovered
reason that you are to descend into the caverns and seek out that
amulet of which they spoke. Even if the rumors of the amulet's
powers are untrue, you decide that you should at least be able to
sell the tales of your adventures to the local minstrels for a
tidy sum, especially if you encounter any of the terrifying and
magical creatures of your dreams along the way. You spend one
last night fortifying yourself at the local inn, becoming more
and more depressed as you watch the odds of your success being
posted on the inn's walls getting lower and lower.



NetHack Guidebook 1





NetHack Guidebook 2



In the morning you awake, collect your belongings, and set
off for the dungeon. After several days of uneventful travel,
you see the ancient ruins that mark the entrance to the Mazes of
Menace. It is late at night, so you make camp at the entrance
and spend the night sleeping under the open skies. In the morn-
ing, you gather your gear, eat what may be your last meal out-
side, and enter the dungeon...


2. 这是怎么回事?

You have just begun a game of NetHack. Your goal is to grab
as much treasure as you can, retrieve the Amulet of Yendor, and
escape the Mazes of Menace alive.

Your abilities and strengths for dealing with the hazards of
adventure will vary with your background and training:

Archeologists understand dungeons pretty well; this enables
them to move quickly and sneak up on the local nasties. They
start equipped with the tools for a proper scientific expedition.

Barbarians are warriors out of the hinterland, hardened to
battle. They begin their quests with naught but uncommon
strength, a trusty hauberk, and a great two-handed sword.

Cavemen and Cavewomen start with exceptional strength but,
unfortunately, with neolithic weapons.

Healers are wise in medicine and apothecary. They know the
herbs and simples that can restore vitality, ease pain, anes-
thetize, and neutralize poisons; and with their instruments, they
can divine a being's state of health or sickness. Their medical
practice earns them quite reasonable amounts of money, with which
they enter the dungeon.

Knights are distinguished from the common skirmisher by
their devotion to the ideals of chivalry and by the surpassing
excellence of their armor.

Monks are ascetics, who by rigorous practice of physical and
mental disciplines have become capable of fighting as effectively
without weapons as with. They wear no armor but make up for it
with increased mobility.

Priests and Priestesses are clerics militant, crusaders ad-
vancing the cause of righteousness with arms, armor, and arts
thaumaturgic. Their ability to commune with deities via prayer
occasionally extricates them from peril, but can also put them in
it.

Rangers are most at home in the woods, and some say slightly
out of place in a dungeon. They are, however, experts in archery
as well as tracking and stealthy movement.








NetHack Guidebook 3



Rogues are agile and stealthy thieves, with knowledge of
locks, traps, and poisons. Their advantage lies in surprise,
which they employ to great advantage.

Samurai are the elite warriors of feudal Nippon. They are
lightly armored and quick, and wear the dai-sho, two swords of
the deadliest keenness.

Tourists start out with lots of gold (suitable for shopping
with), a credit card, lots of food, some maps, and an expensive
camera. Most monsters don't like being photographed.

Valkyries are hardy warrior women. Their upbringing in the
harsh Northlands makes them strong, inures them to extremes of
cold, and instills in them stealth and cunning.

Wizards start out with a knowledge of magic, a selection of
magical items, and a particular affinity for dweomercraft. Al-
though seemingly weak and easy to overcome at first sight, an ex-
perienced Wizard is a deadly foe.

You may also choose the race of your character:

Dwarves are smaller than humans or elves, but are stocky and
solid individuals. Dwarves' most notable trait is their great
expertise in mining and metalwork. Dwarvish armor is said to be
second in quality not even to the mithril armor of the Elves.

Elves are agile, quick, and perceptive; very little of what
goes on will escape an Elf. The quality of Elven craftsmanship
often gives them an advantage in arms and armor.

Gnomes are smaller than but generally similar to dwarves.
Gnomes are known to be expert miners, and it is known that a se-
cret underground mine complex built by this race exists within
the Mazes of Menace, filled with both riches and danger.

Humans are by far the most common race of the surface world,
and are thus the norm by which other races are often compared.
Although they have no special abilities, they can succeed in any
role.

Orcs are a cruel and barbaric race that hate every living
thing (including other orcs). Above all others, Orcs hate Elves
with a passion unequalled, and will go out of their way to kill
one at any opportunity. The armor and weapons fashioned by the
Orcs are typically of inferior quality.

3. 屏幕上所有那些东西意思是什么?

On the screen is kept a map of where you have been and what
you have seen on the current dungeon level; as you explore more
of the level, it appears on the screen in front of you.









NetHack Guidebook 4



When NetHack's ancestor rogue first appeared, its screen
orientation was almost unique among computer fantasy games.
Since then, screen orientation has become the norm rather than
the exception; NetHack continues this fine tradition. Unlike
text adventure games that accept commands in pseudo-English sen-
tences and explain the results in words, NetHack commands are all
one or two keystrokes and the results are displayed graphically
on the screen. A minimum screen size of 24 lines by 80 columns
is recommended; if the screen is larger, only a 21x80 section
will be used for the map.

NetHack can even be played by blind players, with the assis-
tance of Braille readers or speech synthesisers. Instructions
for configuring NetHack for the blind are included later in this
document.

NetHack generates a new dungeon every time you play it; even
the authors still find it an entertaining and exciting game de-
spite having won several times.

NetHack offers a variety of display options. The options
available to you will vary from port to port, depending on the
capabilities of your hardware and software, and whether various
compile-time options were enabled when your executable was creat-
ed. The three possible display options are: a monochrome charac-
ter interface, a color character interface, and a graphical in-
terface using small pictures called tiles. The two character in-
terfaces allow fonts with other characters to be substituted, but
the default assignments use standard ASCII characters to repre-
sent everything. There is no difference between the various dis-
play options with respect to game play. Because we cannot repro-
duce the tiles or colors in the Guidebook, and because it is com-
mon to all ports, we will use the default ASCII characters from
the monochrome character display when referring to things you
might see on the screen during your game.

In order to understand what is going on in NetHack, first
you must understand what NetHack is doing with the screen. The
NetHack screen replaces the ``You see ...'' descriptions of text
adventure games. Figure 1 is a sample of what a NetHack screen
might look like. The way the screen looks for you depends on
your platform.

--------------------------------------------------------------------
The bat bites!

------
|....| ----------
|.<..|####...@...$.|
|....-# |...B....+
|....| |.d......|
------ -------|--










NetHack Guidebook 5





Player the Rambler St:12 Dx:7 Co:18 In:11 Wi:9 Ch:15 Neutral
Dlvl:1 $:0 HP:9(12) Pw:3(3) AC:10 Exp:1/19 T:257 Weak

--------------------------------------------------------------------
Figure 1


3.1. 状态行(底部)

The bottom two lines of the screen contain several cryptic
pieces of information describing your current status. If either
status line becomes longer than the width of the screen, you
might not see all of it. Here are explanations of what the vari-
ous status items mean (though your configuration may not have all
the status items listed below):

等级
Your character's name and professional ranking (based on the
experience level, see below).

力量
A measure of your character's strength; one of your six ba-
sic attributes. A human character's attributes can range
from 3 to 18 inclusive; non-humans may exceed these limits
(occasionally you may get super-strengths of the form 18/xx,
and magic can also cause attributes to exceed the normal
limits). The higher your strength, the stronger you are.
Strength affects how successfully you perform physical
tasks, how much damage you do in combat, and how much loot
you can carry.

敏捷
Dexterity affects your chances to hit in combat, to avoid
traps, and do other tasks requiring agility or manipulation
of objects.

体质
Constitution affects your ability to recover from injuries
and other strains on your stamina.

智力
Intelligence affects your ability to cast spells and read
spellbooks.

知识
Wisdom comes from your practical experience (especially when
dealing with magic). It affects your magical energy.

魅力
Charisma affects how certain creatures react toward you. In
particular, it can affect the prices shopkeepers offer you.









NetHack Guidebook 6



联盟
Lawful, Neutral, or Chaotic. Often, Lawful is taken as good
and Chaotic as evil, but legal and ethical do not always co-
incide. Your alignment influences how other monsters react
toward you. Monsters of a like alignment are more likely to
be non-aggressive, while those of an opposing alignment are
more likely to be seriously offended at your presence.

地牢层数
How deep you are in the dungeon. You start at level one and
the number increases as you go deeper into the dungeon.
Some levels are special, and are identified by a name and
not a number. The Amulet of Yendor is reputed to be some-
where beneath the twentieth level.

金币
The number of gold pieces you are openly carrying. Gold
which you have concealed in containers is not counted.

Hit Points
Your current and maximum hit points. Hit points indicate
how much damage you can take before you die. The more you
get hit in a fight, the lower they get. You can regain hit
points by resting, or by using certain magical items or
spells. The number in parentheses is the maximum number
your hit points can reach.

能量
Spell points. This tells you how much mystic energy (mana)
you have available for spell casting. Again, resting will
regenerate the amount available.

防护等级
A measure of how effectively your armor stops blows from un-
friendly creatures. The lower this number is, the more ef-
fective the armor; it is quite possible to have negative ar-
mor class.

经验
Your current experience level and experience points. As you
adventure, you gain experience points. At certain experi-
ence point totals, you gain an experience level. The more
experienced you are, the better you fight and withstand mag-
ical attacks. Many dungeons show only your experience level
here.

时间
The number of turns elapsed so far, displayed if you have
the time option set.

Hunger status
Your current hunger status, ranging from Satiated down to
Fainting. If your hunger status is normal, it is not dis-
played.








NetHack Guidebook 7



Additional status flags may appear after the hunger status:
Conf when you're confused, FoodPois or Ill when sick, Blind when
you can't see, Stun when stunned, and Hallu when hallucinating.

3.2. 消息行(顶部)

The top line of the screen is reserved for messages that de-
scribe things that are impossible to represent visually. If you
see a ``--More--'' on the top line, this means that NetHack has
another message to display on the screen, but it wants to make
certain that you've read the one that is there first. To read
the next message, just press the space bar.

3.3. 地图(屏幕余下部分)

The rest of the screen is the map of the level as you have
explored it so far. Each symbol on the screen represents some-
thing. You can set various graphics options to change some of
the symbols the game uses; otherwise, the game will use default
symbols. 这里是一份默认符号含义的列表:

- and |
房间的墙面,或者打开的门。或坟墓(|)。

. 房间,冰,或无门门道的地面。

# 过道,或铁棒,或树,或可能是厨房的水池(如果您的地牢有水池),或吊桥。

> 下楼梯:到下一层的路。

< 上楼梯:到前一层的路。

+ 关闭的门或包含你可以学习咒语的魔法书。

@ 你的角色或一个人类。

$ 一堆金币。

^ 陷阱(一旦你发现它)。

) 武器。

[ 一套或一件护甲。

% 可食用的东西(不一定是健康的)。

? 卷轴。

/ 法杖。

= 戒指。









NetHack Guidebook 8



! 药水。

( 有用的项目(pick-axe, key, lamp...).

" 护身符或蜘蛛网。

* 宝石或岩石(可能有价值,可能没价值)。

` 巨石或塑像。

0 铁球。

_ 祭坛,或铁链。

{ 喷泉。

} 一池水或护城河或一池熔岩。

\ 华丽的宝座。

a-zA-Z and other symbols
Letters and certain other symbols represent the various in-
habitants of the Mazes of Menace. Watch out, they can be
nasty and vicious. Sometimes, however, they can be helpful.

I This marks the last known location of an invisible or other-
wise unseen monster. Note that the monster could have
moved. The 'F' and 'm' commands may be useful here.

你不需要记住所有这些符号;你可以通过“/”命令来询问游戏各种符号表示什么(详细信息见下一节)。


4. 命令

Commands are initiated by typing one or two characters.
Some commands, like ``search'', do not require that any more in-
formation be collected by NetHack. Other commands might require
additional information, for example a direction, or an object to
be used. For those commands that require additional information,
NetHack will present you with either a menu of choices or with a
command line prompt requesting information. Which you are pre-
sented with will depend chiefly on how you have set the menustyle
option.

For example, a common question, in the form ``What do you
want to use? [a-zA-Z ?*]'', asks you to choose an object you are
carrying. Here, ``a-zA-Z'' are the inventory letters of your
possible choices. Typing `?' gives you an inventory list of
these items, so you can see what each letter refers to. In this
example, there is also a `*' indicating that you may choose an
object not on the list, if you wanted to use something unexpect-
ed. Typing a `*' lists your entire inventory, so you can see the








NetHack Guidebook 9



inventory letters of every object you're carrying. Finally, if
you change your mind and decide you don't want to do this command
after all, you can press the ESC key to abort the command.

You can put a number before some commands to repeat them
that many times; for example, ``10s'' will search ten times. If
you have the number_pad option set, you must type `n' to prefix a
count, so the example above would be typed ``n10s'' instead.
Commands for which counts make no sense ignore them. In addi-
tion, movement commands can be prefixed for greater control (see
below). To cancel a count or a prefix, press the ESC key.

命令列表是相当长的,但是在游戏中任何时间可以通过“?”命令来阅读,它会获取一份有用的文本菜单。这里是供你参考的命令:

? 帮助菜单:display one of several help texts available.

/ 告诉符号代表什么。You may choose to specify a
location or type a symbol (or even a whole word) to explain.
Specifying a location is done by moving the cursor to a par-
ticular spot on the map and then pressing one of `.', `,',
`;', or `:'. `.' will explain the symbol at the chosen lo-
cation, conditionally check for ``More info?'' depending up-
on whether the help option is on, and then you will be asked
to pick another location; `,' will explain the symbol but
skip any additional information; `;' will skip additional
info and also not bother asking you to choose another loca-
tion to examine; `:' will show additional info, if any,
without asking for confirmation. When picking a location,
pressing the ESC key will terminate this command, or press-
ing `?' will give a brief reminder about how it works.

Specifying a name rather than a location always gives any
additional information available about that name.

& 告诉命令做什么。

< 上到前一层(如果你在楼梯或梯子上)。

> 下到下一层(如果你在楼梯或梯子上)。

[yuhjklbn]
向所指的方向走一步(见图2). If
you sense or remember a monster there, you will fight the
monster instead. Only these one-step movement commands
cause you to fight monsters; the others (below) are
``safe.''











NetHack Guidebook 10



y k u 7 8 9
\ | / \ | /
h- . -l 4- . -6
/ | \ / | \
b j n 1 2 3
(if number_pad is set)

Figure 2


[YUHJKLBN]
按此方向前进,直到您撞墙或遇到东西。

m[yuhjklbn]
前缀:移动而不拾起物体或战斗(即使你有怪兽在那里)

F[yuhjklbn]
前缀:打击怪物(即使你只是估计那里有一个)

M[yuhjklbn]
Prefix: move far, no pickup.

g[yuhjklbn]
前缀:移动直到发现有趣的东西。

G[yuhjklbn] or [yuhjklbn]
前缀:和“g”相同,但是通道分支不视为有趣。

_ 通过最短路径算法旅行到一个地图位置。The
shortest path is computed over map locations the hero knows
about (e.g. seen or previously traversed). If there is no
known path, a guess is made instead. Stops on most of the
same conditions as the `G' command, but without picking up
objects, similar to the `M' command. For ports with mouse
support, the command is also invoked when a mouse-click
takes place on a location other than the current position.

. 休息,一回合不行动。

a 应用(使用)工具(pick-axe, key, lamp...)。

A Remove one or more worn items, such as armor. Use `T' (take
off) to take off only one piece of armor or `R' (remove) to
take off only one accessory.

^A 重复之前的命令。

c 关门。










NetHack Guidebook 11



C Call (name) an individual monster.

^C Panic button.退出游戏。

d 丢掉东西。例如``d7a'' means drop seven items of ob-
ject a.

D 丢掉若干东西。In answer to the question ``What kinds
of things do you want to drop? [!%= BUCXaium]'' you should
type zero or more object symbols possibly followed by `a'
and/or `i' and/or `u' and/or `m'. In addition, one or more
of the blessed/uncursed/cursed groups may be typed.

DB - drop all objects known to be blessed.
DU - drop all objects known to be uncursed.
DC - drop all objects known to be cursed.
DX - drop all objects of unknown B/U/C status.
Da - drop all objects, without asking for confirmation.
Di - examine your inventory before dropping anything.
Du - drop only unpaid objects (when in a shop).
Dm - use a menu to pick which object(s) to drop.
D%u - drop only unpaid food.

^D 踢东西(通常是门) 。

e 吃食物。

E 在地上刻消息。Engraving the word
``Elbereth'' will cause most monsters to not attack you
hand-to-hand (but if you attack, you will rub it out); this
is often useful to give yourself a breather. (This feature
may be compiled out of the game, so your version might not
have it.)

E- - 用你的手指在灰尘上写。

f Fire one of the objects placed in your quiver. You may se-
lect ammunition with a previous `Q' command, or let the com-
puter pick something appropriate if autoquiver is true.

i 列出你的库存(你携带的每样东西)。

I 列出你库存选择的部分。

I* - list all gems in inventory;
Iu - list all unpaid items;
Ix - list all used up items that are on your shopping bill;
I$ - count your money.

o 打开门。

O 设置选项。A menu showing the current option values will
be displayed. You can change most values simply by select-
ing the menu entry for the given option (ie, by typing its








NetHack Guidebook 12



letter or clicking upon it, depending on your user inter-
face). For the non-boolean choices, a further menu or
prompt will appear once you've closed this menu. The avail-
able options are listed later in this Guidebook. Options
are usually set before the game rather than with the `O'
command; see the section on options below.

p 支付你的购物账单。

P 戴上戒指或其他配件 (amulet, blindfold).

^P 重复之前的信息。Subsequent ^P's repeat earlier
messages. The behavior can be varied via the msg_window op-
tion.

q Quaff (喝) something (potion, water, etc).

Q Select an object for your quiver. You can then throw this
using the `f' command. (In versions prior to 3.3 this was
the command to quit the game, which has now been moved to
`#quit'.)

r 宣读卷轴或魔法书。

R 移除配件 (ring, amulet, etc).

^R 重绘屏幕。

s 搜索你周围秘密门和陷阱。通常需要试几次来找到。

S 保存(并挂起)游戏。游戏会在你下次玩时自动恢复。

t 投掷物体或射出子弹。

T 脱下护甲。

^T 传送,如果你有这个能力。

v 显示版本号。

V 显示游戏历史。

w 手持武器。

w- - 不持东西,使用您的双手。

W 穿上护甲。

x 把你手持的武器同你替换的武器插槽里的项目交换。后者用来作为你的第二武器在从事双武器战斗的时候。注意如果其中一个插槽是空的,交换仍然进行。








NetHack Guidebook 13



X 进入探索(发现)模式, explained in its own section
later.

^X 显示你的姓名、角色、性别和联盟,以及在你游戏中的各种神。

z Zap a wand. To aim at yourself, use `.' for the direction.

Z Zap (cast) a spell. To cast at yourself, use `.' for the
direction.

^Z 挂起游戏。 (UNIX(R) versions with job control only).

: Look at what is here.

; 显示可见的符号相当什么类型的东西。

, 拾起一些东西。May be preceded by `m' to force a se-
lection menu.

@ 切换自动拾起选项开关。

^ 询问你早先发现的陷阱类型。

) 告诉你正手持的武器。

[ 告诉你正带的护甲。

= 告诉你正带的戒指。

" 告诉你正带的护身符。

( 告诉你正使用的工具。

* 告诉你正使用的装备;结合前面五种类型不同的命令为一个。

$ 清点你的金币数。

+ 列出你知道的咒语。Using this command, you can also
rearrange the order in which your spells are listed. They
are shown via a menu, and if you select a spell in that
menu, you'll be re-prompted for another spell to swap places
with it, and then have opportunity to make further ex-
changes.

\ 显示已发现的物体类型。

! Escape to a shell.



__________
(R)UNIX is a registered trademark of AT&T.








NetHack Guidebook 14



# 执行扩展命令。As you can see, the authors of
NetHack used up all the letters, so this is a way to intro-
duce the less frequently used commands. What extended com-
mands are available depends on what features the game was
compiled with.

#adjust
Adjust inventory letters (most useful when the fixinv option
is ``on'').

#chat
和某人说话。

#conduct
列出你已经遵循的挑战。 See the section
below entitled ``Conduct'' for details.

#dip 把物体装到东西里。

#enhance
提升或检查武器或咒语的技能。

#force
Force a lock.

#invoke
调用物体的特殊能力。

#jump
跳到另一个位置。

#loot
夺取你下方地上的盒子或袋子,或者从站在你一旁马的鞍上。

#monster
使用怪物的特殊能力(当变形成怪物形态)。

#name
命名一个项目或物体类型。

#offer
向神献祭。

#pray
向神灵祈求帮助。

#quit
退出程序,而不储存游戏。

#ride
骑(或停止骑)怪物。









NetHack Guidebook 15



#rub 摩擦灯或石头。

#sit 坐下。

#turn
Turn undead.

#twoweapon
切换双武器战斗开关。Note that you must use
suitable weapons for this type of combat, or it will be au-
tomatically turned off.

#untrap
Untrap something (trap, door, or chest).

#version
Print compile time options for this version of NetHack.

#wipe
擦拭你的脸。

#? 帮助菜单:获得可用扩展命令列表。

If your keyboard has a meta key (which, when pressed in com-
bination with another key, modifies it by setting the `meta'
[8th, or `high'] bit), you can invoke many extended commands by
meta-ing the first letter of the command. In NT, OS/2, and PC
NetHack,“Alt”键能以这种方式使用。

M-? #? (not supported by all platforms)

M-2 #twoweapon (unless the number_pad option is enabled)

M-a #adjust

M-c #chat

M-d #dip

M-e #enhance

M-f #force

M-i #invoke

M-j #jump

M-l #loot

M-m #monster

M-n #name










NetHack Guidebook 16



M-o #offer

M-p #pray

M-q #quit

M-r #rub

M-s #sit

M-t #turn

M-u #untrap

M-v #version

M-w #wipe

If the number_pad option is on, some additional letter com-
mands are available:

h 帮助菜单:display one of several help texts available,
like ``?''.

j 跳到另一个位置。相同于``#jump'' 或 ``M-j''。

k 踢东西(通常是门)。相同于“^D”。

l 夺取你下方地上的盒子或袋子,或者从站在你一旁马的鞍上。相同于“#loot”或“M-l”。

N 命名一个项目或物体类型。Same as ``#name'' or ``M-n''.

u Untrap a trap, door, or chest. Same as ``#untrap'' or ``M-
u''.


5. 房间和通道

Rooms and corridors in the dungeon are either lit or dark.
Any lit areas within your line of sight will be displayed; dark
areas are only displayed if they are within one space of you.
Walls and corridors remain on the map as you explore them.

秘密通道是隐藏的。你可以使用“s”(搜索)命令发现他们。

5.1. 门道

Doorways connect rooms and corridors. Some doorways have no
doors; you can walk right through. Others have doors in them,
which may be open, closed, or locked. To open a closed door, use








NetHack Guidebook 17



the `o' (open) command; to close it again, use the `c' (close)
command.

You can get through a locked door by using a tool to pick
the lock with the `a' (apply) command, or by kicking it open with
the `^D' (kick) command.

Open doors cannot be entered diagonally; you must approach
them straight on, horizontally or vertically. Doorways without
doors are not restricted in this fashion.

Doors can be useful for shutting out monsters. Most mon-
sters cannot open doors, although a few don't need to (ex. ghosts
can walk through doors).

秘密门是隐藏的。You can find them with the `s'
(search) command. Once found they are in all ways equivalent to
normal doors.

5.2. 陷阱 (`^')

There are traps throughout the dungeon to snare the unwary
delver. For example, you may suddenly fall into a pit and be
stuck for a few turns trying to climb out. Traps don't appear on
your map until you see one triggered by moving onto it, see some-
thing fall into it, or you discover it with the `s' (search) com-
mand. Monsters can fall prey to traps, too, which can be a very
useful defensive strategy.

There is a special pre-mapped branch of the dungeon based on
the classic computer game ``Sokoban.'' The goal is to push the
boulders into the pits or holes. With careful foresight, it is
possible to complete all of the levels according to the tradi-
tional rules of Sokoban. Some allowances are permitted in case
the player gets stuck; however, they will lower your luck.

5.3. 楼梯 (`<', `>')

In general, each level in the dungeon will have a staircase
going up (`<') to the previous level and another going down (`>')
to the next level. There are some exceptions though. For in-
stance, fairly early in the dungeon you will find a level with
two down staircases, one continuing into the dungeon and the oth-
er branching into an area known as the Gnomish Mines. Those
mines eventually hit a dead end, so after exploring them (if you
choose to do so), you'll need to climb back up to the main dun-
geon.

When you traverse a set of stairs, or trigger a trap which
sends you to another level, the level you're leaving will be de-
activated and stored in a file on disk. If you're moving to a
previously visited level, it will be loaded from its file on disk
and reactivated. If you're moving to a level which has not yet
been visited, it will be created (from scratch for most random








NetHack Guidebook 18



levels, from a template for some ``special'' levels, or loaded
from the remains of an earlier game for a ``bones'' level as
briefly described below). Monsters are only active on the cur-
rent level; those on other levels are essentially placed into
stasis.

Ordinarily when you climb a set of stairs, you will arrive
on the corresponding staircase at your destination. However,
pets (see below) and some other monsters will follow along if
they're close enough when you travel up or down stairs, and occa-
sionally one of these creatures will displace you during the
climb. When that occurs, the pet or other monster will arrive on
the staircase and you will end up nearby.

5.4. 梯子 (`<', `>')

Ladders serve the same purpose as staircases, and the two
types of inter-level connections are nearly indistinguishable
during game play.

5.5. 商店和购物

Occasionally you will run across a room with a shopkeeper
near the door and many items lying on the floor. You can buy
items by picking them up and then using the `p' command. You can
inquire about the price of an item prior to picking it up by us-
ing the ``#chat'' command while standing on it. Using an item
prior to paying for it will incur a charge, and the shopkeeper
won't allow you to leave the shop until you have paid any debt
you owe.

You can sell items to a shopkeeper by dropping them to the
floor while inside a shop. You will either be offered an amount
of gold and asked whether you're willing to sell, or you'll be
told that the shopkeeper isn't interested (generally, your item
needs to be compatible with the type of merchandise carried by
the shop).

If you drop something in a shop by accident, the shopkeeper
will usually claim ownership without offering any compensation.
You'll have to buy it back if you want to reclaim it.

Shopkeepers sometimes run out of money. When that happens,
you'll be offered credit instead of gold when you try to sell
something. Credit can be used to pay for purchases, but it is
only good in the shop where it was obtained; other shopkeepers
won't honor it. (If you happen to find a "credit card" in the
dungeon, don't bother trying to use it in shops; shopkeepers will
not accept it.)

The `$' command, which reports the amount of gold you are
carrying (in inventory, not inside bags or boxes), will also show
current shop debt or credit, if any. The `Iu' command lists un-
paid items (those which still belong to the shop) if you are








NetHack Guidebook 19



carrying any. The `Ix' command shows an inventory-like display
of any unpaid items which have been used up, along with other
shop fees, if any.

5.5.1. 商店差异

Several aspects of shop behavior might be unexpected.

* The price of a given item can vary due to a variety of factors.

* A shopkeeper treats the spot immediately inside the door as if
it were outside the shop.

* While the shopkeeper watches you like a hawk, he will generally
ignore any other customers.

* If a shop is "closed for inventory", it will not open of its
own accord.

* Shops do not get restocked with new items, regardless of inven-
tory depletion.


6. 怪兽

Monsters you cannot see are not displayed on the screen.
Beware! You may suddenly come upon one in a dark place. Some
magic items can help you locate them before they locate you
(which some monsters can do very well).

The commands `/' and `;' may be used to obtain information
about those monsters who are displayed on the screen. The com-
mand `C' allows you to assign a name to a monster, which may be
useful to help distinguish one from another when multiple mon-
sters are present. Assigning a name which is just a space will
remove any prior name.

The extended command ``#chat'' can be used to interact with
an adjacent monster. There is no actual dialog (in other words,
you don't get to choose what you'll say), but chatting with some
monsters such as a shopkeeper or the Oracle of Delphi can produce
useful results.

6.1. 战斗

If you see a monster and you wish to fight it, just attempt
to walk into it. Many monsters you find will mind their own
business unless you attack them. Some of them are very dangerous
when angered. Remember: discretion is the better part of valor.

If you can't see a monster (if it is invisible, or if you
are blinded), the symbol `I' will be shown when you learn of its
presence. If you attempt to walk into it, you will try to fight
it just like a monster that you can see; of course, if the








NetHack Guidebook 20



monster has moved, you will attack empty air. If you guess that
the monster has moved and you don't wish to fight, you can use
the `m' command to move without fighting; likewise, if you don't
remember a monster but want to try fighting anyway, you can use
the `F' command.

6.2. 你的宠物

You start the game with a little dog (`d'), cat (`f'), or
pony (`u'), which follows you about the dungeon and fights mon-
sters with you. Like you, your pet needs food to survive. It
usually feeds itself on fresh carrion and other meats. If you're
worried about it or want to train it, you can feed it, too, by
throwing it food. A properly trained pet can be very useful un-
der certain circumstances.

Your pet also gains experience from killing monsters, and
can grow over time, gaining hit points and doing more damage.
Initially, your pet may even be better at killing things than
you, which makes pets useful for low-level characters.

Your pet will follow you up and down staircases if it is
next to you when you move. Otherwise your pet will be stranded
and may become wild. Similarly, when you trigger certain types
of traps which alter your location (for instance, a trap door
which drops you to a lower dungeon level), any adjacent pet will
accompany you and any non-adjacent pet will be left behind. Your
pet may trigger such traps itself; you will not be carried along
with it even if adjacent at the time.

6.3. 坐骑

Some types of creatures in the dungeon can actually be rid-
den if you have the right equipment and skill. Convincing a wild
beast to let you saddle it up is difficult to say the least.
Many a dungeoneer has had to resort to magic and wizardry in or-
der to forge the alliance. Once you do have the beast under your
control however, you can easily climb in and out of the saddle
with the `#ride' command. Lead the beast around the dungeon when
riding, in the same manner as you would move yourself. It is the
beast that you will see displayed on the map.

Riding skill is managed by the `#enhance' command. See the
section on Weapon proficiency for more information about that.

6.4. 骨头楼层

You may encounter the shades and corpses of other adventur-
ers (or even former incarnations of yourself!) and their personal
effects. Ghosts are hard to kill, but easy to avoid, since
they're slow and do little damage. You can plunder the deceased
adventurer's possessions; however, they are likely to be cursed.
Beware of whatever killed the former player; it is probably still
lurking around, gloating over its last victory.








NetHack Guidebook 21



7. 物体

When you find something in the dungeon, it is common to want
to pick it up. In NetHack, this is accomplished automatically by
walking over the object (unless you turn off the autopickup op-
tion (see below), or move with the `m' prefix (see above)), or
manually by using the `,' command.

If you're carrying too many items, NetHack will tell you so
and you won't be able to pick up anything more. Otherwise, it
will add the object(s) to your pack and tell you what you just
picked up.

As you add items to your inventory, you also add the weight
of that object to your load. The amount that you can carry de-
pends on your strength and your constitution. The stronger you
are, the less the additional load will affect you. There comes a
point, though, when the weight of all of that stuff you are car-
rying around with you through the dungeon will encumber you.
Your reactions will get slower and you'll burn calories faster,
requiring food more frequently to cope with it. Eventually,
you'll be so overloaded that you'll either have to discard some
of what you're carrying or collapse under its weight.

NetHack will tell you how badly you have loaded yourself.
The symbols `Burdened', `Stressed', `Strained', `Overtaxed' and
`Overloaded' are displayed on the bottom line display to indicate
your condition.

When you pick up an object, it is assigned an inventory let-
ter. Many commands that operate on objects must ask you to find
out which object you want to use. When NetHack asks you to
choose a particular object you are carrying, you are usually pre-
sented with a list of inventory letters to choose from (see Com-
mands, above).

Some objects, such as weapons, are easily differentiated.
Others, like scrolls and potions, are given descriptions which
vary according to type. During a game, any two objects with the
same description are the same type. However, the descriptions
will vary from game to game.

When you use one of these objects, if its effect is obvious,
NetHack will remember what it is for you. If its effect isn't
extremely obvious, you will be asked what you want to call this
type of object so you will recognize it later. You can also use
the ``#name'' command for the same purpose at any time, to name
all objects of a particular type or just an individual object.
When you use ``#name'' on an object which has already been named,
specifying a space as the value will remove the prior name in-
stead of assigning a new one.











NetHack Guidebook 22



7.1. 诅咒和祝福

Any object that you find may be cursed, even if the object
is otherwise helpful. The most common effect of a curse is being
stuck with (and to) the item. Cursed weapons weld themselves to
your hand when wielded, so you cannot unwield them. Any cursed
item you wear is not removable by ordinary means. In addition,
cursed arms and armor usually, but not always, bear negative en-
chantments that make them less effective in combat. Other cursed
objects may act poorly or detrimentally in other ways.

Objects can also be blessed. Blessed items usually work
better or more beneficially than normal uncursed items. For ex-
ample, a blessed weapon will do more damage against demons.

There are magical means of bestowing or removing curses upon
objects, so even if you are stuck with one, you can still have
the curse lifted and the item removed. Priests and Priestesses
have an innate sensitivity to this property in any object, so
they can more easily avoid cursed objects than other character
roles.

An item with unknown status will be reported in your inven-
tory with no prefix. An item which you know the state of will be
distinguished in your inventory by the presence of the word
``cursed'', ``uncursed'' or ``blessed'' in the description of the
item.

7.2. 武器 (`)')

Given a chance, most monsters in the Mazes of Menace will
gratuitously try to kill you. You need weapons for self-defense
(killing them first). Without a weapon, you do only 1-2 hit
points of damage (plus bonuses, if any). Monk characters are an
exception; they normally do much more damage with bare hands than
they do with weapons.

There are wielded weapons, like maces and swords, and thrown
weapons, like arrows and spears. To hit monsters with a weapon,
you must wield it and attack them, or throw it at them. You can
simply elect to throw a spear. To shoot an arrow, you should
first wield a bow, then throw the arrow. Crossbows shoot cross-
bow bolts. Slings hurl rocks and (other) stones (like gems).

Enchanted weapons have a ``plus'' (or ``to hit enhancement''
which can be either positive or negative) that adds to your
chance to hit and the damage you do to a monster. The only way
to determine a weapon's enchantment is to have it magically iden-
tified somehow. Most weapons are subject to some type of damage
like rust. Such ``erosion'' damage can be repaired.

The chance that an attack will successfully hit a monster,
and the amount of damage such a hit will do, depends upon many
factors. Among them are: type of weapon, quality of weapon








NetHack Guidebook 23



(enchantment and/or erosion), experience level, strength, dexter-
ity, encumbrance, and proficiency (see below). The monster's ar-
mor class - a general defense rating, not necessarily due to
wearing of armor - is a factor too; also, some monsters are par-
ticularly vulnerable to certain types of weapons.

Many weapons can be wielded in one hand; some require both
hands. When wielding a two-handed weapon, you can not wear a
shield, and vice versa. When wielding a one-handed weapon, you
can have another weapon ready to use by setting things up with
the `x' command, which exchanges your primary (the one being
wielded) and alternate weapons. And if you have proficiency in
the ``two weapon combat'' skill, you may wield both weapons si-
multaneously as primary and secondary; use the `#twoweapon' ex-
tended command to engage or disengage that. Only some types of
characters (barbarians, for instance) have the necessary skill
available. Even with that skill, using two weapons at once in-
curs a penalty in the chance to hit your target compared to using
just one weapon at a time.

There might be times when you'd rather not wield any weapon
at all. To accomplish that, wield `-', or else use the `A' com-
mand which allows you to unwield the current weapon in addition
to taking off other worn items.

Those of you in the audience who are AD&D players, be aware
that each weapon which existed in AD&D does roughly the same dam-
age to monsters in NetHack. Some of the more obscure weapons
(such as the aklys, lucern hammer, and bec-de-corbin) are defined
in an appendix to Unearthed Arcana, an AD&D supplement.

The commands to use weapons are `w' (wield), `t' (throw),
`f' (fire, an alternative way of throwing), `Q' (quiver), `x'
(exchange), `#twoweapon', and `#enhance' (see below).

7.2.1. 投掷和射击

You can throw just about anything via the `t' command. It
will prompt for the item to throw; picking `?' will list things
in your inventory which are considered likely to be thrown, or
picking `*' will list your entire inventory. After you've chosen
what to throw, you will be prompted for a direction rather than
for a specific target. The distance something can be thrown de-
pends mainly on the type of object and your strength. Arrows can
be thrown by hand, but can be thrown much farther and will be
more likely to hit when thrown while you are wielding a bow.

You can simplify the throwing operation by using the `Q'
command to select your preferred ``missile'', then using the `f'
command to throw it. You'll be prompted for a direction as
above, but you don't have to specify which item to throw each
time you use `f'. There is also an option, autoquiver, which has
NetHack choose another item to automatically fill your quiver
when the inventory slot used for `Q' runs out.








NetHack Guidebook 24



Some characters have the ability to fire a volley of multi-
ple items in a single turn. Knowing how to load several rounds
of ammunition at once -- or hold several missiles in your hand --
and still hit a target is not an easy task. Rangers are among
those who are adept at this task, as are those with a high level
of proficiency in the relevant weapon skill (in bow skill if
you're wielding one to shoot arrows, in crossbow skill if you're
wielding one to shoot bolts, or in sling skill if you're wielding
one to shoot stones). The number of items that the character has
a chance to fire varies from turn to turn. You can explicitly
limit the number of shots by using a numeric prefix before the
`t' or `f' command. For example, ``2f'' (or ``n2f'' if using
number_pad mode) would ensure that at most 2 arrows are shot even
if you could have fired 3. If you specify a larger number than
would have been shot (``4f'' in this example), you'll just end up
shooting the same number (3, here) as if no limit had been speci-
fied. Once the volley is in motion, all of the items will travel
in the same direction; if the first ones kill a monster, the oth-
ers can still continue beyond that spot.

7.2.2. 武器熟练度

You will have varying degrees of skill in the weapons avail-
able. Weapon proficiency, or weapon skills, affect how well you
can use particular types of weapons, and you'll be able to im-
prove your skills as you progress through a game, depending on
your role, your experience level, and use of the weapons.

For the purposes of proficiency, weapons have been divided
up into various groups such as daggers, broadswords, and
polearms. Each role has a limit on what level of proficiency a
character can achieve for each group. For instance, wizards can
become highly skilled in daggers or staves but not in swords or
bows.

The `#enhance' extended command is used to review current
weapons proficiency (also spell proficiency) and to choose which
skill(s) to improve when you've used one or more skills enough to
become eligible to do so. The skill rankings are ``none'' (some-
times also referred to as ``restricted'', because you won't be
able to advance), ``unskilled'', ``basic'', ``skilled'', and
``expert''. Restricted skills simply will not appear in the list
shown by `#enhance'. (Divine intervention might unrestrict a
particular skill, in which case it will start at unskilled and be
limited to basic.) Some characters can enhance their barehanded
combat or martial arts skill beyond expert to ``master'' or
``grand master''.

Use of a weapon in which you're restricted or unskilled will
incur a modest penalty in the chance to hit a monster and also in
the amount of damage done when you do hit; at basic level, there
is no penalty or bonus; at skilled level, you receive a modest
bonus in the chance to hit and amount of damage done; at expert
level, the bonus is higher. A successful hit has a chance to








NetHack Guidebook 25



boost your training towards the next skill level (unless you've
already reached the limit for this skill). Once such training
reaches the threshold for that next level, you'll be told that
you feel more confident in your skills. At that point you can
use `#enhance' to increase one or more skills. Such skills are
not increased automatically because there is a limit to your to-
tal overall skills, so you need to actively choose which skills
to enhance and which to ignore.

7.3. 护甲 (`[')

Lots of unfriendly things lurk about; you need armor to pro-
tect yourself from their blows. Some types of armor offer better
protection than others. Your armor class is a measure of this
protection. Armor class (AC) is measured as in AD&D, with 10 be-
ing the equivalent of no armor, and lower numbers meaning better
armor. Each suit of armor which exists in AD&D gives the same
protection in NetHack. Here is an (incomplete) list of the armor
classes provided by various suits of armor:

dragon scale mail 1
plate mail 3
crystal plate mail 3
bronze plate mail 4
splint mail 4
banded mail 4
dwarvish mithril-coat 4
elven mithril-coat 5
chain mail 5
orcish chain mail 6
scale mail 6
studded leather armor 7
ring mail 7
orcish ring mail8
leather armor 8
leather jacket 9
no armor 10

You can also wear other pieces of armor (ex. helmets, boots,
shields, cloaks) to lower your armor class even further, but you
can only wear one item of each category (one suit of armor, one
cloak, one helmet, one shield, and so on) at a time.

If a piece of armor is enchanted, its armor protection will
be better (or worse) than normal, and its ``plus'' (or minus)
will subtract from your armor class. For example, a +1 chain
mail would give you better protection than normal chain mail,
lowering your armor class one unit further to 4. When you put on
a piece of armor, you immediately find out the armor class and
any ``plusses'' it provides. Cursed pieces of armor usually have
negative enchantments (minuses) in addition to being unremovable.

Many types of armor are subject to some kind of damage like
rust. Such damage can be repaired. Some types of armor may








NetHack Guidebook 26



inhibit spell casting.

The commands to use armor are `W' (wear) and `T' (take off).
The `A' command can also be used to take off armor as well as
other worn items.

7.4. 食物 (`%')

Food is necessary to survive. If you go too long without
eating you will faint, and eventually die of starvation. Some
types of food will spoil, and become unhealthy to eat, if not
protected. Food stored in ice boxes or tins (``cans'') will usu-
ally stay fresh, but ice boxes are heavy, and tins take a while
to open.

When you kill monsters, they usually leave corpses which are
also ``food.'' Many, but not all, of these are edible; some also
give you special powers when you eat them. A good rule of thumb
is ``you are what you eat.''

Some character roles and some monsters are vegetarian. Veg-
etarian monsters will typically never eat animal corpses, while
vegetarian players can, but with some rather unpleasant side-ef-
fects.

You can name one food item after something you like to eat
with the fruit option.

The command to eat food is `e'.

7.5. 卷轴 (`?')

Scrolls are labeled with various titles, probably chosen by
ancient wizards for their amusement value (ex. ``READ ME,'' or
``THANX MAUD'' backwards). Scrolls disappear after you read them
(except for blank ones, without magic spells on them).

One of the most useful of these is the scroll of identify,
which can be used to determine what another object is, whether it
is cursed or blessed, and how many uses it has left. Some ob-
jects of subtle enchantment are difficult to identify without
these.

A mail daemon may run up and deliver mail to you as a scroll
of mail (on versions compiled with this feature). To use this
feature on versions where NetHack mail delivery is triggered by
electronic mail appearing in your system mailbox, you must let
NetHack know where to look for new mail by setting the ``MAIL''
environment variable to the file name of your mailbox. You may
also want to set the ``MAILREADER'' environment variable to the
file name of your favorite reader, so NetHack can shell to it
when you read the scroll. On versions of NetHack where mail is
randomly generated internal to the game, these environment vari-
ables are ignored. You can disable the mail daemon by turning








NetHack Guidebook 27



off the mail option.

用于宣读卷轴的命令是 `r'。

7.6. 药剂 (`!')

Potions are distinguished by the color of the liquid inside
the flask. They disappear after you quaff them.

Clear potions are potions of water. Sometimes these are
blessed or cursed, resulting in holy or unholy water. Holy water
is the bane of the undead, so potions of holy water are good
things to throw (`t') at them. It is also sometimes very useful
to dip (``#dip'') an object into a potion.

The command to drink a potion is `q' (quaff).

7.7. 法杖 (`/')

Magic wands usually have multiple magical charges. Some
wands are directional--you must give a direction in which to zap
them. You can also zap them at yourself (just give a `.' or `s'
for the direction). Be warned, however, for this is often unwise.
Other wands are nondirectional--they don't require a direction.
The number of charges in a wand is random and decreases by one
whenever you use it.

When the number of charges left in a wand becomes zero, at-
tempts to use the wand will usually result in nothing happening.
Occasionally, however, it may be possible to squeeze the last few
mana points from an otherwise spent wand, destroying it in the
process. A wand may be recharged by using suitable magic, but
doing so runs the risk of causing it to explode. The chance for
such an explosion starts out very small and increases each time
the wand is recharged.

In a truly desperate situation, when your back is up against
the wall, you might decide to go for broke and break your wand.
This is not for the faint of heart. Doing so will almost cer-
tainly cause a catastrophic release of magical energies.

When you have fully identified a particular wand, inventory
display will include additional information in parentheses: the
number of times it has been recharged followed by a colon and
then by its current number of charges. A current charge count of
-1 is a special case indicating that the wand has been cancelled.

The command to 使用 a wand is `z' (zap). To break one, use
the `a' (apply) command.

7.8. 戒指 (`=')

Rings are very useful items, since they are relatively per-
manent magic, unlike the usually fleeting effects of potions,








NetHack Guidebook 28



scrolls, and wands.

Putting on a ring activates its magic. You can wear only
two rings, one on each ring finger.

Most rings also cause you to grow hungry more rapidly, the
rate varying with the type of ring.

The commands to use rings are `P' (put on) and `R' (remove).

7.9. 魔法书 (`+')

Spellbooks are tomes of mighty magic. When studied with the
`r' (read) command, they transfer to the reader the knowledge of
a spell (and therefore eventually become unreadable) -- unless
the attempt backfires. Reading a cursed spellbook or one with
mystic runes beyond your ken can be harmful to your health!

A spell (even when learned) can also backfire when you cast
it. If you attempt to cast a spell well above your experience
level, or if you have little skill with the appropriate spell
type, or cast it at a time when your luck is particularly bad,
you can end up wasting both the energy and the time required in
casting.

Casting a spell calls forth magical energies and focuses
them with your naked mind. Some of the magical energy released
comes from within you, and casting several spells in a row may
tire you. Casting of spells also requires practice. With prac-
tice, your skill in each category of spell casting will improve.
Over time, however, your memory of each spell will dim, and you
will need to relearn it.

Some spells are directional--you must give a direction in
which to cast them. You can also cast them at yourself (just
give a `.' or `s' for the direction). Be warned, however, for
this is often unwise. Other spells are nondirectional--they
don't require a direction.

Just as weapons are divided into groups in which a character
can become proficient (to varying degrees), spells are similarly
grouped. Successfully casting a spell exercises the skill group;
sufficient skill may increase the potency of the spell and reduce
the risk of spell failure. Skill slots are shared with weapons
skills. (See also the section on ``Weapon proficiency''.)

Casting a spell also requires flexible movement, and wearing
various types of armor may interfere with that.

The command to read a spellbook is the same as for scrolls,
`r' (read). The `+' command lists your current spells, their
levels, categories, and chances for failure. The `Z' (cast) com-
mand casts a spell.









NetHack Guidebook 29



7.10. 工具 (`(')

Tools are miscellaneous objects with various purposes. Some
tools have a limited number of uses, akin to wand charges. For
example, lamps burn out after a while. Other tools are contain-
ers, which objects can be placed into or taken out of.

The command to use tools is `a' (apply).

7.10.1. 容器

You may encounter bags, boxes, and chests in your travels.
A tool of this sort can be opened with the ``#loot'' extended
command when you are standing on top of it (that is, on the same
floor spot), or with the `a' (apply) command when you are carry-
ing it. However, chests are often locked, and are in any case
unwieldy objects. You must set one down before unlocking it by
using a key or lock-picking tool with the `a' (apply) command, by
kicking it with the `^D' command, or by using a weapon to force
the lock with the ``#force'' extended command.

Some chests are trapped, causing nasty things to happen when
you unlock or open them. You can check for and try to deactivate
traps with the ``#untrap'' extended command.

7.11. Amulets (`"')

Amulets are very similar to rings, and often more powerful.
Like rings, amulets have various magical properties, some benefi-
cial, some harmful, which are activated by putting them on.

Only one amulet may be worn at a time, around your neck.

The commands to use amulets are the same as for rings, `P'
(put on) and `R' (remove).

7.12. 宝石 (`*')

Some gems are valuable, and can be sold for a lot of gold.
They are also a far more efficient way of carrying your riches.
Valuable gems increase your score if you bring them with you when
you exit.

Other small rocks are also categorized as gems, but they are
much less valuable. All rocks, however, can be used as projec-
tile weapons (if you have a sling). In the most desperate of
cases, you can still throw them by hand.

7.13. 巨石 (``')

Statues and boulders are not particularly useful, and are
generally heavy. It is rumored that some statues are not what
they seem.









NetHack Guidebook 30



Very large humanoids (giants and their ilk) have been known
to use boulders as weapons.

7.14. 金币 (`$')

Gold adds to your score, and you can buy things in shops
with it. There are a number of monsters in the dungeon that may
be influenced by the amount of gold you are carrying (shopkeepers
aside).


8. 指导

As if winning NetHack were not difficult enough, certain
players seek to challenge themselves by imposing restrictions on
the way they play the game. The game automatically tracks some
of these challenges, which can be checked at any time with the
#conduct command or at the end of the game. When you perform an
action which breaks a challenge, it will no longer be listed.
This gives players extra ``bragging rights'' for winning the game
with these challenges. Note that it is perfectly acceptable to
win the game without resorting to these restrictions and that it
is unusual for players to adhere to challenges the first time
they win the game.

Several of the challenges are related to eating behavior.
The most difficult of these is the foodless challenge. Although
creatures can survive long periods of time without food, there is
a physiological need for water; thus there is no restriction on
drinking beverages, even if they provide some minor food bene-
fits. Calling upon your god for help with starvation does not
violate any food challenges either.

A strict vegan diet is one which avoids any food derived
from animals. The primary source of nutrition is fruits and veg-
etables. The corpses and tins of blobs (`b'), jellies (`j'), and
fungi (`F') are also considered to be vegetable matter. Certain
human food is prepared without animal products; namely, lembas
wafers, cram rations, food rations (gunyoki), K-rations, and C-
rations. Metal or another normally indigestible material eaten
while polymorphed into a creature that can digest it is also con-
sidered vegan food. Note however that eating such items still
counts against foodless conduct.

Vegetarians do not eat animals; however, they are less se-
lective about eating animal byproducts than vegans. In addition
to the vegan items listed above, they may eat any kind of pudding
(`P') other than the black puddings, eggs and food made from eggs
(fortune cookies and pancakes), food made with milk (cream pies
and candy bars), and lumps of royal jelly. Monks are expected to
observe a vegetarian diet.

Eating any kind of meat violates the vegetarian, vegan, and
foodless conducts. This includes tripe rations, the corpses or








NetHack Guidebook 31



tins of any monsters not mentioned above, and the various other
chunks of meat found in the dungeon. Swallowing and digesting a
monster while polymorphed is treated as if you ate the creature's
corpse. Eating leather, dragon hide, or bone items while poly-
morphed into a creature that can digest it, or eating monster
brains while polymorphed into a mind flayer, is considered eating
an animal, although wax is only an animal byproduct.

Regardless of conduct, there will be some items which are
indigestible, and others which are hazardous to eat. Using a
swallow-and-digest attack against a monster is equivalent to eat-
ing the monster's corpse. Please note that the term ``vegan'' is
used here only in the context of diet. You are still free to
choose not to use or wear items derived from animals (e.g.
leather, dragon hide, bone, horns, coral), but the game will not
keep track of this for you. Also note that ``milky'' potions may
be a translucent white, but they do not contain milk, so they are
compatible with a vegan diet. Slime molds or player-defined
``fruits'', although they could be anything from ``cherries'' to
``pork chops'', are also assumed to be vegan.

An atheist is one who rejects religion. This means that you
cannot #pray, #offer sacrifices to any god, #turn undead, or
#chat with a priest. Particularly selective readers may argue
that playing Monk or Priest characters should violate this con-
duct; that is a choice left to the player. Offering the Amulet
of Yendor to your god is necessary to win the game and is not
counted against this conduct. You are also not penalized for be-
ing spoken to by an angry god, priest(ess), or other religious
figure; a true atheist would hear the words but attach no special
meaning to them.

Most players fight with a wielded weapon (or tool intended
to be wielded as a weapon). Another challenge is to win the game
without using such a wielded weapon. You are still permitted to
throw, fire, and kick weapons; use a wand, spell, or other type
of item; or fight with your hands and feet.

In NetHack, a pacifist refuses to cause the death of any
other monster (i.e. if you would get experience for the death).
This is a particularly difficult challenge, although it is still
possible to gain experience by other means.

An illiterate character cannot read or write. This includes
reading a scroll, spellbook, fortune cookie message, or t-shirt;
writing a scroll; or making an engraving of anything other than a
single ``x'' (the traditional signature of an illiterate person).
Reading an engraving, or any item that is absolutely necessary to
win the game, is not counted against this conduct. The identity
of scrolls and spellbooks (and knowledge of spells) in your
starting inventory is assumed to be learned from your teachers
prior to the start of the game and isn't counted.










NetHack Guidebook 32



There are several other challenges tracked by the game. It
is possible to eliminate one or more species of monsters by geno-
cide; playing without this feature is considered a challenge.
When the game offers you an opportunity to genocide monsters, you
may respond with the monster type ``none'' if you want to de-
cline. You can change the form of an item into another item of
the same type (``polypiling'') or the form of your own body into
another creature (``polyself'') by wand, spell, or potion of
polymorph; avoiding these effects are each considered challenges.
Polymorphing monsters, including pets, does not break either of
these challenges. Finally, you may sometimes receive wishes; a
game without an attempt to wish for any items is a challenge, as
is a game without wishing for an artifact (even if the artifact
immediately disappears). When the game offers you an opportunity
to make a wish for an item, you may choose ``nothing'' if you
want to decline.


9. 选项

Due to variations in personal tastes and conceptions of how
NetHack should do things, there are options you can set to change
how NetHack behaves.

9.1. Setting the options

Options may be set in a number of ways. Within the game,
the `O' command allows you to view all options and change most of
them. You can also set options automatically by placing them in
the NETHACKOPTIONS environment variable or in a configuration
file. Some versions of NetHack also have front-end programs that
allow you to set options before starting the game.

9.2. Using the NETHACKOPTIONS environment variable

The NETHACKOPTIONS variable is a comma-separated list of
initial values for the various options. Some can only be turned
on or off. You turn one of these on by adding the name of the
option to the list, and turn it off by typing a `!' or ``no'' be-
fore the name. Others take a character string as a value. You
can set string options by typing the option name, a colon or
equals sign, and then the value of the string. The value is ter-
minated by the next comma or the end of string.

For example, to set up an environment variable so that ``au-
toquiver'' is on, ``autopickup'' is off, the name is set to
``Blue Meanie'', and the fruit is set to ``papaya'', you would
enter the command

% setenv NETHACKOPTIONS "autoquiver,\!autopickup,name:Blue Meanie,fruit:papaya"

in csh (note the need to escape the ! since it's special to the
shell), or









NetHack Guidebook 33



$ NETHACKOPTIONS="autoquiver,!autopickup,name:Blue Meanie,fruit:papaya"
$ export NETHACKOPTIONS

in sh or ksh.

9.3. 使用配置文件

Any line in the configuration file starting with `#' is
treated as a comment. Any line in the configuration file start-
ing with ``OPTIONS='' may be filled out with options in the same
syntax as in NETHACKOPTIONS. Any line starting with ``DUN-
GEON='', ``EFFECTS='', ``MONSTERS='', ``OBJECTS='', ``TRAPS='',
or ``BOULDER='' is taken as defining the corresponding dungeon,
effects, monsters, objects traps or boulder option in a different
syntax, a sequence of decimal numbers giving the character posi-
tion in the current font to be used in displaying each entry. A
zero in any entry in such a sequence leaves the display of that
entry unchanged; this feature is not available using the option
syntax. Such a sequence can be continued to multiple lines by
putting a `\' at the end of each line to be continued.

If your copy of the game included the compile time AUTOPICK-
UP_EXCEPTIONS option, then any line starting with ``AUTOPICK-
UP_EXCEPTION='' is taken as defining an exception to the pick-
up_types option. There is a section of this Guidebook that dis-
cusses that.

The default name of the configuration file varies on differ-
ent operating systems, but NETHACKOPTIONS can also be set to the
full name of a file you want to use (possibly preceded by an
`@').

9.4. 自定义选项

Here are explanations of what the various options do. Char-
acter strings that are too long may be truncated. Some of the
options listed may be inactive in your dungeon.

align
Your starting alignment (align:lawful, align:neutral, or
align:chaotic). You may specify just the first letter. The
default is to randomly pick an appropriate alignment. Cannot
be set with the `O' command.

autodig
Automatically dig if you are wielding a digging tool and moving
into a place that can be dug (default false).

autopickup
Automatically pick up things onto which you move (default on).
See pickup_types to refine the behavior.

autoquiver
This option controls what happens when you attempt the `f'








NetHack Guidebook 34



(fire) command with an empty quiver. When true, the computer
will fill your quiver with some suitable weapon. Note that it
will not take into account the blessed/cursed status, enchant-
ment, damage, or quality of the weapon; you are free to manual-
ly fill your quiver with the `Q' command instead. If no weapon
is found or the option is false, the `t' (throw) command is ex-
ecuted instead. (default false)

boulder
Set the character used to display boulders (default is rock
class symbol).

catname
Name your starting cat (ex. ``catname:Morris''). Cannot be set
with the `O' command.

character
Pick your type of character (ex. ``character:Monk''); synonym
for ``role''. See ``name'' for an alternate method of specify-
ing your role. Normally only the first letter of the value is
examined; the string ``random'' is an exception.

checkpoint
Save game state after each level change, for possible recovery
after program crash (default on).

checkspace
Check free disk space before writing files to disk (default
on). You may have to turn this off if you have more than 2 GB
free space on the partition used for your save and level files.
Only applies when MFLOPPY was defined during compilation.

cmdassist
Have the game provide some additional command assistance for
new players if it detects some anticipated mistakes (default
on).

confirm
Have user confirm attacks on pets, shopkeepers, and other
peaceable creatures (default on).

DECgraphics
Use a predefined selection of characters from the DEC VT-
xxx/DEC Rainbow/ANSI line-drawing character set to display the
dungeon/effects/traps instead of having to define a full graph-
ics set yourself (default off). This option also sets up prop-
er handling of graphics characters for such terminals, so you
should specify it when appropriate even if you override the se-
lections with your own graphics strings.

disclose
Controls options for disclosing various information when the
game ends (defaults to all possibilities being disclosed). The
possibilities are:








NetHack Guidebook 35



i - disclose your inventory.
a - disclose your attributes.
v - summarize monsters that have been vanquished.
g - list monster species that have been genocided.
c - display your conduct.

Each disclosure possibility can optionally be preceded by a
prefix which let you refine how it behaves. Here are the valid
prefixes:

y - prompt you and default to yes on the prompt.
n - prompt you and default to no on the prompt.
+ - disclose it without prompting.
- - do not disclose it and do not prompt.

(ex. ``disclose:yi na +v -g -c'') The example sets inventory to
prompt and default to yes, attributes to prompt and default to
no, vanquished to disclose without prompting, genocided to not
disclose and not to prompt, conduct to not disclose and not to
prompt. Note that the vanquished monsters list includes all
monsters killed by traps and each other as well as by you.

dogname
Name your starting dog (ex. ``dogname:Fang''). Cannot be set
with the `O' command.

dungeon
Set the graphics symbols for displaying the dungeon (default
`` |--------||.-|++##.##<><>_|\\#{}.}..## #}''). The dungeon
option should be followed by a string of 1-41 characters to be
used instead of the default map-drawing characters. The dun-
geon map will use the characters you specify instead of the de-
fault symbols, and default symbols for any you do not specify.
Remember that you may need to escape some of these characters
on a command line if they are special to your shell.

Note that NetHack escape-processes this option string in con-
ventional C fashion. This means that `\' is a prefix to take
the following character literally. Thus `\' needs to be repre-
sented as `\\'. The special escape form `\m' switches on the
meta bit in the following character, and the `^' prefix causes
the following character to be treated as a control character.

The order of the symbols is: solid rock, vertical wall, hori-
zontal wall, upper left corner, upper right corner, lower left
corner, lower right corner, cross wall, upward T wall, downward
T wall, leftward T wall, rightward T wall, no door, vertical
open door, horizontal open door, vertical closed door, horizon-
tal closed door, iron bars, tree, floor of a room, dark corri-
dor, lit corridor, stairs up, stairs down, ladder up, ladder
down, altar, grave, throne, kitchen sink, fountain, pool or
moat, ice, lava, vertical lowered drawbridge, horizontal low-
ered drawbridge, vertical raised drawbridge, horizontal raised
drawbridge, air, cloud, under water.








NetHack Guidebook 36



You might want to use `+' for the corners and T walls for a
more aesthetic, boxier display. Note that in the next release,
new symbols may be added, or the present ones rearranged.

Cannot be set with the `O' command.

effects
Set the graphics symbols for displaying special effects (de-
fault ``|-\\/*!)(0#@*/-\\||\\-//-\\| |\\-/''). The effects op-
tion should be followed by a string of 1-29 characters to be
used instead of the default special-effects characters. This
string is subjected to the same processing as the dungeon op-
tion.

The order of the symbols is: vertical beam, horizontal beam,
left slant, right slant, digging beam, camera flash beam, left
boomerang, right boomerang, four glyphs giving the sequence for
magic resistance displays, the eight surrounding glyphs for
swallowed display, nine glyphs for explosions. An explosion
consists of three rows (top, middle, and bottom) of three char-
acters. The explosion is centered in the center of this 3 by 3
array.

Note that in the next release, new symbols may be added, or the
present ones rearranged.

Cannot be set with the `O' command.

extmenu
Changes the extended commands interface to pop-up a menu of
available commands. It is keystroke compatible with the tradi-
tional interface except that it does not require that you hit
Enter. It is implemented only by the tty port (default off),
when the game has been compiled to support tty graphics.

female
An obsolete synonym for ``gender:female''. Cannot be set with
the `O' command.

fixinv
An object's inventory letter sticks to it when it's dropped
(default on). If this is off, dropping an object shifts all
the remaining inventory letters.

fruit
Name a fruit after something you enjoy eating (ex. ``fruit:man-
go'') (default ``slime mold''). Basically a nostalgic whimsy
that NetHack uses from time to time. You should set this to
something you find more appetizing than slime mold. Apples,
oranges, pears, bananas, and melons already exist in NetHack,
so don't use those.

gender
Your starting gender (gender:male or gender:female). You may








NetHack Guidebook 37



specify just the first letter. Although you can still denote
your gender using the ``male'' and ``female'' options, the
``gender'' option will take precedence. The default is to ran-
domly pick an appropriate gender. Cannot be set with the `O'
command.

help
If more information is available for an object looked at with
the `/' command, ask if you want to see it (default on). Turn-
ing help off makes just looking at things faster, since you
aren't interrupted with the ``More info?'' prompt, but it also
means that you might miss some interesting and/or important in-
formation.

horsename
Name your starting horse (ex. ``horsename:Trigger''). Cannot
be set with the `O' command.

IBMgraphics
Use a predefined selection of IBM extended ASCII characters to
display the dungeon/effects/traps instead of having to define a
full graphics set yourself (default off). This option also
sets up proper handling of graphics characters for such termi-
nals, so you should specify it when appropriate even if you
override the selections with your own graphics strings.

ignintr
Ignore interrupt signals, including breaks (default off).

legacy
Display an introductory message when starting the game (default
on).

lit_corridor
Show corridor squares seen by night vision or a light source
held by your character as lit (default off).

lootabc
Use the old `a', `b', and `c' keyboard shortcuts when looting,
rather than the mnemonics `o', `i', and `b' (default off).

mail
Enable mail delivery during the game (default on).

male
An obsolete synonym for ``gender:male''. Cannot be set with
the `O' command.

menustyle
Controls the interface used when you need to choose various ob-
jects (in response to the Drop command, for instance). The
value specified should be the first letter of one of the fol-
lowing: traditional, combination, partial, or full. Tradi-
tional was the only interface available for earlier versions;








NetHack Guidebook 38



it consists of a prompt for object class characters, followed
by an object-by-object prompt for all items matching the se-
lected object class(es). Combination starts with a prompt for
object class(es) of interest, but then displays a menu of
matching objects rather than prompting one-by-one. Partial
skips the object class filtering and immediately displays a
menu of all objects. Full displays a menu of object classes
rather than a character prompt, and then a menu of matching ob-
jects for selection.

menu_deselect_all
Menu character accelerator to deselect all items in a menu.
Implemented by the Amiga, Gem, X11 and tty ports. Default '-'.

menu_deselect_page
Menu character accelerator to deselect all items on this page
of a menu. Implemented by the Amiga, Gem and tty ports. De-
fault '\'.

menu_first_page
Menu character accelerator to jump to the first page in a menu.
Implemented by the Amiga, Gem and tty ports. Default '^'.

menu_headings
Controls how the headings in a menu are highlighted. Values
are 'bold', 'inverse', or 'underline'. Not all ports can actu-
ally display all three types.

menu_invert_all
Menu character accelerator to invert all items in a menu. Im-
plemented by the Amiga, Gem, X11 and tty ports. Default '@'.

menu_invert_page
Menu character accelerator to invert all items on this page of
a menu. Implemented by the Amiga, Gem and tty ports. Default
'~'.

menu_last_page
Menu character accelerator to jump to the last page in a menu.
Implemented by the Amiga, Gem and tty ports. Default '|'.

menu_next_page
Menu character accelerator to goto the next menu page. Imple-
mented by the Amiga, Gem and tty ports. Default '>'.

menu_previous_page
Menu character accelerator to goto the previous menu page. Im-
plemented by the Amiga, Gem and tty ports. Default '<'.

menu_search
Menu character accelerator to search for a menu item. Imple-
mented by the Amiga, Gem and X11 ports. Default ':'.










NetHack Guidebook 39



menu_select_all
Menu character accelerator to select all items in a menu. Im-
plemented by the Amiga, Gem, X11 and tty ports. Default '.'.

menu_select_page
Menu character accelerator to select all items on this page of
a menu. Implemented by the Amiga, Gem and tty ports. Default
','.

monsters
Set the characters used to display monster classes (default
``abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU-
VWXYZ@ '&;:~]''). This string is subjected to the same pro-
cessing as the dungeon option. The order of the symbols is ant
or other insect, blob, cockatrice, dog or other canine, eye or
sphere, feline, gremlin, humanoid, imp or minor demon, jelly,
kobold, leprechaun, mimic, nymph, orc, piercer, quadruped, ro-
dent, arachnid or centipede, trapper or lurker above, horse or
unicorn, vortex, worm, xan or other mythical/fantastic insect,
light, zruty, angelic being, bat or bird, centaur, dragon, ele-
mental, fungus or mold, gnome, giant humanoid, invisible mon-
ster, jabberwock, Keystone Kop, lich, mummy, naga, ogre, pud-
ding or ooze, quantum mechanic, rust monster, snake, troll, um-
ber hulk, vampire, wraith, xorn, apelike creature, zombie, hu-
man, ghost, golem, demon, sea monster, lizard, long worm tail,
and mimic. Cannot be set with the `O' command.

msghistory
The number of top line messages to save (and recall with ^P)
(default 20). Cannot be set with the `O' command.

msg_window
Allows you to change the way recalled messages are displayed.
(It is currently implemented for tty only.) The possible val-
ues are:

s - single message (default, this was the behavior before 3.4.0).
c - combination, two messages as `single', then as `full'.
f - full window, oldest message first.
r - full window, newest message first.

For backward compatibility, no value needs to be specified
(which defaults to `full'), or it can be negated (which de-
faults to `single').

name
Set your character's name (defaults to your user name). You
can also set your character's role by appending a dash and one
or more letters of the role (that is, by suffixing one of -A -B
-C -H -K -M -P -Ra -Ro -S -T -V -W). If -@ is used for the
role, then a random one will be automatically chosen. Cannot
be set with the `O' command.










NetHack Guidebook 40



news
Read the NetHack news file, if present (default on). Since the
news is shown at the beginning of the game, there's no point in
setting this with the `O' command.

null
Send padding nulls to the terminal (default off).

number_pad
Use the number keys to move instead of [yuhjklbn] (default 0 or
off). (number_pad:2 invokes the old DOS behavior where `5'
means `g', meta-`5' means `G', and meta-`0' means `I'.)

objects
Set the characters used to display object classes (default
``])[="(%!?+/$*`0_.''). This string is subjected to the same
processing as the dungeon option. The order of the symbols is
illegal-object (should never be seen), weapon, armor, ring,
amulet, tool, food, potion, scroll, spellbook, wand, gold, gem
or rock, boulder or statue, iron ball, chain, and venom. Can-
not be set with the `O' command.

packorder
Specify the order to list object types in (default
``")[%?+!=/(*`0_''). The value of this option should be a
string containing the symbols for the various object types.
Any omitted types are filled in at the end from the previous
order.

perm_invent
If true, always display your current inventory in a window.
This only makes sense for windowing system interfaces that im-
plement this feature.

pettype
Specify the type of your initial pet, if you are playing a
character class that uses multiple types of pets; or choose to
have no initial pet at all. Possible values are ``cat'',
``dog'' and ``none''. Cannot be set with the `O' command.

pickup_burden
When you pick up an item that would exceed this encumbrance
level (Unburdened, Burdened, streSsed, straiNed, overTaxed, or
overLoaded), you will be asked if you want to continue. (De-
fault `S').

pickup_types
Specify the object types to be picked up when autopickup is on.
Default is all types. If your copy of the game has the experi-
mental compile time option AUTOPICKUP_EXCEPTIONS included, you
may be able to use autopickup_exception configuration file
lines to further refine autopickup behavior.










NetHack Guidebook 41



prayconfirm
Prompt for confirmation before praying (default on).

pushweapon
Using the `w' (wield) command when already wielding something
pushes the old item into your alternate weapon slot (default
off).

race
Selects your race (for example, ``race:human''). Default is
random. Cannot be set with the `O' command.

rest_on_space
Make the space bar a synonym for the `.' (rest) command (de-
fault off).

role
Pick your type of character (ex. ``role:Samurai''); synonym for
``character''. See ``name'' for an alternate method of speci-
fying your role. Normally only the first letter of the value
is examined; `r' is an exception with ``Rogue'', ``Ranger'',
and ``random'' values.

runmode
Controls the amount of screen updating for the map window when
engaged in multi-turn movement (running via shift+direction or
control+direction and so forth, or via the travel command or
mouse click). The possible values are:

teleport - update the map after movement has finished;
run - update the map after every seven or so steps;
walk - update the map after each step;
crawl - like walk, but pause briefly after each step.

This option only affects the game's screen display, not the ac-
tual results of moving. The default is `run'; versions prior
to 3.4.1 used `teleport' only. Whether or not the effect is
noticeable will depend upon the window port used or on the type
of terminal.

safe_pet
Prevent you from (knowingly) attacking your pets (default on).

scores
Control what parts of the score list you are shown at the end
(ex. ``scores:5 top scores/4 around my score/own scores'').
Only the first letter of each category (`t', `a', or `o') is
necessary.

showexp
Show your accumulated experience points on bottom line (default
off).










NetHack Guidebook 42



showrace
Display yourself as the glyph for your race, rather than the
glyph for your role (default off). Note that this setting af-
fects only the appearance of the display, not the way the game
treats you.

showscore
Show your approximate accumulated score on bottom line (default
off).

silent
Suppress terminal beeps (default on).

sortpack
Sort the pack contents by type when displaying inventory (de-
fault on).

sound
Enable messages about what your character hears (default on).
Note that this has nothing to do with your computer's audio ca-
pabilities. This option is only partly under player control.
The game toggles it off and on during and after sleep, for ex-
ample.

sparkle
Display a sparkly effect when a monster (including yourself) is
hit by an attack to which it is resistant (default on).

standout
Boldface monsters and ``--More--'' (default off).

suppress_alert
This option may be set to a NetHack version level to suppress
alert notification messages about feature changes for that and
prior versions (ex. ``suppress_alert:3.3.1'').

time
Show the elapsed game time in turns on bottom line (default
off).

timed_delay
When pausing momentarily for display effect, such as with ex-
plosions and moving objects, use a timer rather than sending
extra characters to the screen. (Applies to ``tty'' interface
only; ``X11'' interface always uses a timer based delay. The
default is on if configured into the program.)

tombstone
Draw a tombstone graphic upon your death (default on).

toptenwin
Put the ending display in a NetHack window instead of on stdout
(default off). Setting this option makes the score list visi-
ble when a windowing version of NetHack is started without a








NetHack Guidebook 43



parent window, but it no longer leaves the score list around
after game end on a terminal or emulating window.

traps
Set the graphics symbols for displaying traps (default
``^^^^^^^^^^^^^^^^^"^^^^''). The traps option should be fol-
lowed by a string of 1-22 characters to be used instead of the
default traps characters. This string is subjected to the same
processing as the dungeon option.

The order of the symbols is: arrow trap, dart trap, falling
rock trap, squeaky board, bear trap, land mine, rolling boulder
trap, sleeping gas trap, rust trap, fire trap, pit, spiked pit,
hole, trap door, teleportation trap, level teleporter, magic
portal, web, statue trap, magic trap, anti-magic field, poly-
morph trap.

Cannot be set with the `O' command.

travel
Allow the travel command (default on). Turning this option off
will prevent the game from attempting unintended moves if you
make inadvertent mouse clicks on the map window.

verbose
Provide more commentary during the game (default on).

windowtype
Select which windowing system to use, such as ``tty'' or
``X11'' (default depends on version). Cannot be set with the
`O' command.

9.5. Window Port Customization options

Here are explanations of the various options that are used
to customize and change the characteristics of the windowtype
that you have chosen. Character strings that are too long may be
truncated. Not all window ports will adjust for all settings
listed here. You can safely add any of these options to your
config file, and if the window port is capable of adjusting to
suit your preferences, it will attempt to do so. If it can't it
will silently ignore it. You can find out if an option is sup-
ported by the window port that you are currently using by check-
ing to see if it shows up in the Options list. Some options are
dynamic and can be specified during the game with the `O' com-
mand.

align_message
Where to align or place the message window (top, bottom, left,
or right)

align_status
Where to align or place the status window (top, bottom, left,
or right).








NetHack Guidebook 44



ascii_map
NetHack should display an ascii character map if it can.

color
NetHack should display color if it can for different monsters,
objects, and dungeon features

eight_bit_tty
NetHack should pass eight-bit character values (for example,
specified with the traps option) straight through to your ter-
minal (default off).

font_map
NetHack should use a font by the chosen name for the map win-
dow.

font_menu
NetHack should use a font by the chosen name for menu windows.

font_message
NetHack should use a font by the chosen name for the message
window.

font_status
NetHack should use a font by the chosen name for the status
window.

font_text
NetHack should use a font by the chosen name for text windows.

font_size_map
NetHack should use this size font for the map window.

font_size_menu
NetHack should use this size font for menu windows.

font_size_message
NetHack should use this size font for the message window.

font_size_status
NetHack should use this size font for the status window.

font_size_text
NetHack should use this size font for text windows.

fullscreen
NetHack should try and display on the entire screen rather than
in a window.

hilite_pet
Visually distinguish pets from similar animals (default off).
The behavior of this option depends on the type of windowing
you use. In text windowing, text highlighting or inverse video
is often used; with tiles, generally displays a heart symbol








NetHack Guidebook 45



near pets.

large_font
NetHack should use a large font.

map_mode
NetHack should display the map in the manner specified.

mouse_support
Allow use of the mouse for input and travel.

player_selection
NetHack should pop up dialog boxes, or use prompts for charac-
ter selection.

popup_dialog
NetHack should pop up dialog boxes for input.

preload_tiles
NetHack should preload tiles into memory. For example, in the
protected mode MSDOS version, control whether tiles get pre-
loaded into RAM at the start of the game. Doing so enhances
performance of the tile graphics, but uses more memory. (de-
fault on). Cannot be set with the `O' command.

scroll_amount
NetHack should scroll the display by this number of cells when
the hero reaches the scroll_margin.

scroll_margin
NetHack should scroll the display when the hero or cursor is
this number of cells away from the edge of the window.

softkeyboard
Display an onscreen keyboard. Handhelds are most likely to
support this option.

splash_screen
NetHack should display an opening splash screen when it starts
up (default yes).

tiled_map
NetHack should display a tiled map if it can.

tile_file
Specify the name of an alternative tile file to override the
default.

tile_height
Specify the preferred height of each tile in a tile capable
port.

tile_width
Specify the preferred width of each tile in a tile capable port








NetHack Guidebook 46



use_inverse
NetHack should display inverse when the game specifies it.

vary_msgcount
NetHack should display this number of messages at a time in the
message window.

windowcolors
NetHack should display windows with the specified fore-
ground/background colors if it can.

wraptext
NetHack port should wrap long lines of text if they don't fit
in the visible area of the window.

9.6. Platform-specific Customization options

Here are explanations of options that are used by specific
platforms or ports to customize and change the port behavior.

altkeyhandler
Select an alternate keystroke handler dll to load (Win32 tty
NetHack only). The name of the handler is specified without
the .dll extension and without any path information. Cannot be
set with the `O' command.

altmeta
(default on, AMIGA NetHack only).

BIOS
Use BIOS calls to update the screen display quickly and to read
the keyboard (allowing the use of arrow keys to move) on ma-
chines with an IBM PC compatible BIOS ROM (default off, OS/2,
PC, and ST NetHack only).

flush
(default off, AMIGA NetHack only).

MACgraphics
(default on, Mac NetHack only).

page_wait
(default on, Mac NetHack only).

rawio
Force raw (non-cbreak) mode for faster output and more bullet-
proof input (MS-DOS sometimes treats `^P' as a printer toggle
without it) (default off, OS/2, PC, and ST NetHack only).
Note: DEC Rainbows hang if this is turned on. Cannot be set
with the `O' command.

soundcard
(default on, PC NetHack only). Cannot be set with the `O' com-
mand.








NetHack Guidebook 47



subkeyvalue
(Win32 tty NetHack only). May be used to alter the value of
keystrokes that the operating system returns to NetHack to help
compensate for international keyboard issues. OPTIONS=subkey-
value:171/92 will return 92 to NetHack, if 171 was originally
going to be returned. You can use multiple subkeyvalue state-
ments in the config file if needed. Cannot be set with the `O'
command.

video
Set the video mode used (PC NetHack only). Values are `autode-
tect', `default', or `vga'. Setting `vga' (or `autodetect'
with vga hardware present) will cause the game to display
tiles. Cannot be set with the `O' command.

videocolors
Set the color palette for PC systems using NO_TERMS (default
4-2-6-1-5-3-15-12-10-14-9-13-11, (PC NetHack only). The order
of colors is red, green, brown, blue, magenta, cyan,
bright.white, bright.red, bright.green, yellow, bright.blue,
bright.magenta, and bright.cyan. Cannot be set with the `O'
command.

videoshades
Set the intensity level of the three gray scales available (de-
fault dark normal light, PC NetHack only). If the game display
is difficult to read, try adjusting these scales; if this does
not correct the problem, try !color. Cannot be set with the
`O' command.

9.7. Configuring autopickup exceptions

There is an experimental compile time option called AU-
TOPICKUP_EXCEPTIONS. If your copy of the game was built with
that option defined, you can further refine the behavior of the
autopickup option beyond what is available through the pick-
up_types option.

By placing autopickup_exception lines in your configuration
file, you can define patterns to be checked when the game is
about to autopickup something.

autopickup_exception
Sets an exception to the pickup_types option. The autopick-
up_exception option should be followed by a string of 1-80
characters to be used as a pattern to match against the singu-
lar form of the description of an object at your location.

You may use the following special characters in a pattern:

*--- matches 0 or more characters.
?--- matches any single character.










NetHack Guidebook 48



In addition, some characters are treated specially if they
occur as the first character in the string pattern, specifically:

< - always pickup an object that matches the pattern that follows.
> - never pickup an object that matches the pattern that follows.

Can be set with the `O' command, but the setting is not pre-
served across saves and restores.

Here's a couple of examples of autopickup_exceptions:

autopickup_exception="<*arrow"
autopickup_exception=">*corpse"
autopickup_exception=">* cursed*"

The first example above will result in autopickup of any type of
arrow. The second example results in the exclusion of any corpse
from autopickup. The last example results in the exclusion of
items known to be cursed from autopickup. A `never pickup' rule
takes precedence over an `always pickup' rule if both match.

9.8. Configuring User Sounds

Some platforms allow you to define sound files to be played
when a message that matches a user-defined pattern is delivered
to the message window. At this time the Qt port and the win32tty
and win32gui ports support the use of user sounds.

The following config file entries are relevant to mapping
user sounds to messages:

SOUNDDIR
The directory that houses the sound files to be played.

SOUND
An entry that maps a sound file to a user-specified message
pattern. Each SOUND entry is broken down into the following
parts:

MESG - message window mapping (the only one supported in 3.4).
pattern - the pattern to match.
sound file - the sound file to play.
volume - the volume to be set while playing the sound file.

The exact format for the pattern depends on whether the
platform is built to use ``regular expressions'' or NetHack's own
internal pattern matching facility. The ``regular expressions''
matching can be much more sophisticated than the internal NetHack
pattern matching, but requires 3rd party libraries on some plat-
forms. There are plenty of references available elsewhere for
explaining ``regular expressions''. You can verify which pattern
matching is used by your port with the #version command.










NetHack Guidebook 49



NetHack's internal pattern matching routine uses the follow-
ing special characters in its pattern matching:

*--- matches 0 or more characters.
?--- matches any single character.

Here's an example of a sound mapping using NetHack's inter-
nal pattern matching facility:

SOUND=MESG "*chime of a cash register*" "gong.wav" 50

specifies that any message with "chime of a cash register" con-
tained in it will trigger the playing of "gong.wav". You can
have multiple SOUND entries in your config file.

9.9. Configuring NetHack for Play by the Blind

NetHack can be set up to use only standard ASCII characters
for making maps of the dungeons. This makes the MS-DOS versions
of NetHack completely accessible to the blind who use speech
and/or Braille access technologies. Players will require a good
working knowledge of their screen-reader's review features, and
will have to know how to navigate horizontally and vertically
character by character. They will also find the search capabili-
ties of their screen-readers to be quite valuable. Be certain to
examine this Guidebook before playing so you have an idea what
the screen layout is like. You'll also need to be able to locate
the PC cursor. It is always where your character is located.
Merely searching for an @-sign will not always find your charac-
ter since there are other humanoids represented by the same sign.
Your screen-reader should also have a function which gives you
the row and column of your review cursor and the PC cursor.
These co-ordinates are often useful in giving players a better
sense of the overall location of items on the screen.

While it is not difficult for experienced users to edit the
defaults.nh file to accomplish this, novices may find this task
somewhat daunting. Included in all official distributions of
NetHack is a file called NHAccess.nh. Replacing defaults.nh with
this file will cause the game to run in a manner accessible to
the blind. After you have gained some experience with the game
and with editing files, you may want to alter settings to better
suit your preferences. Instructions on how to do this are includ-
ed in the NHAccess.nh file itself. The most crucial settings to
make the game accessible are:

IBMgraphics
Disable IBMgraphics by commenting out this option.

menustyle:traditional
This will assist in the interface to speech synthesizers.

number_pad
A lot of speech access programs use the number-pad to review








NetHack Guidebook 50



the screen. If this is the case, disable the number_pad option
and use the traditional Rogue-like commands.

Character graphics
Comment out all character graphics sets found near the bottom
of the defaults.nh file. Most of these replace NetHack's de-
fault representation of the dungeon using standard ASCII char-
acters with fancier characters from extended character sets,
and these fancier characters can annoy screen-readers.

10. 得分

NetHack maintains a list of the top scores or scorers on
your machine, depending on how it is set up. In the latter case,
each account on the machine can post only one non-winning score
on this list. If you score higher than someone else on this
list, or better your previous score, you will be inserted in the
proper place under your current name. How many scores are kept
can also be set up when NetHack is compiled.

Your score is chiefly based upon how much experience you
gained, how much loot you accumulated, how deep you explored, and
how the game ended. If you quit the game, you escape with all of
your gold intact. If, however, you get killed in the Mazes of
Menace, the guild will only hear about 90% of your gold when your
corpse is discovered (adventurers have been known to collect
finder's fees). So, consider whether you want to take one last
hit at that monster and possibly live, or quit and stop with
whatever you have. If you quit, you keep all your gold, but if
you swing and live, you might find more.

If you just want to see what the current top players/games
list is, you can type nethack -s all on most versions.


11. 探索模式

NetHack is an intricate and difficult game. Novices might
falter in fear, aware of their ignorance of the means to survive.
Well, fear not. Your dungeon may come equipped with an ``ex-
plore'' or ``discovery'' mode that enables you to keep old save
files and cheat death, at the paltry cost of not getting on the
high score list.

There are two ways of enabling explore mode. One is to
start the game with the -X switch. The other is to issue the `X'
command while already playing the game. The other benefits of
explore mode are left for the trepid reader to discover.


12. Credits

The original hack game was modeled on the Berkeley UNIX
rogue game. Large portions of this paper were shamelessly








NetHack Guidebook 51



cribbed from A Guide to the Dungeons of Doom, by Michael C. Toy
and Kenneth C. R. C. Arnold. Small portions were adapted from
Further Exploration of the Dungeons of Doom, by Ken Arromdee.

NetHack is the product of literally dozens of people's work.
Main events in the course of the game development are described
below:


Jay Fenlason wrote the original Hack, with help from Kenny
Woodland, Mike Thome and Jon Payne.

Andries Brouwer did a major re-write, transforming Hack into
a very different game, and published (at least) three versions
(1.0.1, 1.0.2, and 1.0.3) for UNIX machines to the Usenet.

Don G. Kneller ported Hack 1.0.3 to Microsoft C and MS-DOS,
producing PC HACK 1.01e, added support for DEC Rainbow graphics
in version 1.03g, and went on to produce at least four more ver-
sions (3.0, 3.2, 3.51, and 3.6).

R. Black ported PC HACK 3.51 to Lattice C and the Atari
520/1040ST, producing ST Hack 1.03.

Mike Stephenson merged these various versions back together,
incorporating many of the added features, and produced NetHack
1.4. He then coordinated a cast of thousands in enhancing and
debugging NetHack 1.4 and released NetHack versions 2.2 and 2.3.

Later, Mike coordinated a major rewrite of the game, heading
a team which included Ken Arromdee, Jean-Christophe Collet, Steve
Creps, Eric Hendrickson, Izchak Miller, John Rupley, Mike Threep-
oint, and Janet Walz, to produce NetHack 3.0c.

NetHack 3.0 was ported to the Atari by Eric R. Smith, to
OS/2 by Timo Hakulinen, and to VMS by David Gentzel. The three
of them and Kevin Darcy later joined the main development team to
produce subsequent revisions of 3.0.

Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga. Norm
Meluch, Stephen Spackman and Pierre Martineau designed overlay
code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the
Macintosh. Along with various other Dungeoneers, they continued
to enhance the PC, Macintosh, and Amiga ports through the later
revisions of 3.0.

Headed by Mike Stephenson and coordinated by Izchak Miller
and Janet Walz, the development team which now included Ken Ar-
romdee, David Cohrs, Jean-Christophe Collet, Kevin Darcy, Matt
Day, Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric
Raymond, and Eric Smith undertook a radical revision of 3.0.
They re-structured the game's design, and re-wrote major parts of
the code. They added multiple dungeons, a new display, special
individual character quests, a new endgame and many other new








NetHack Guidebook 52



features, and produced NetHack 3.1.

Ken Lorber, Gregg Wonderly and Greg Olson, with help from
Richard Addison, Mike Passaretti, and Olaf Seibert, developed
NetHack 3.1 for the Amiga.

Norm Meluch and Kevin Smolkowski, with help from Carl Sche-
lin, Stephen Spackman, Steve VanDevender, and Paul Winner, ported
NetHack 3.1 to the PC.

Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike
Engber, David Hairston, Michael Hamel, Jonathan Handler, Johnny
Lee, Tim Lennan, Rob Menke, and Andy Swanson, developed NetHack
3.1 for the Macintosh, porting it for MPW. Building on their de-
velopment, Barton House added a Think C port.

Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith port-
ed NetHack 3.1 to the Atari. Pat Rankin, with help from Joshua
Delahunty, was responsible for the VMS version of NetHack 3.1.
Michael Allison ported NetHack 3.1 to Windows NT.

Dean Luick, with help from David Cohrs, developed NetHack
3.1 for X11. Warwick Allison wrote a tiled version of NetHack
for the Atari; he later contributed the tiles to the DevTeam and
tile support was then added to other platforms.

The 3.2 development team, comprised of Michael Allison, Ken
Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy,
Timo Hakulinen, Steve Linhart, Dean Luick, Pat Rankin, Eric
Smith, Mike Stephenson, Janet Walz, and Paul Winner, released
version 3.2 in April of 1996.

Version 3.2 marked the tenth anniversary of the formation of
the development team. In a testament to their dedication to the
game, all thirteen members of the original development team re-
mained on the team at the start of work on that release. During
the interval between the release of 3.1.3 and 3.2, one of the
founding members of the development team, Dr. Izchak Miller, was
diagnosed with cancer and passed away. That release of the game
was dedicated to him by the development and porting teams.

During the lifespan of NetHack 3.1 and 3.2, several enthusi-
asts of the game added their own modifications to the game and
made these ``variants'' publicly available:

Tom Proudfoot and Yuval Oren created NetHack++, which was
quickly renamed NetHack--. Working independently, Stephen White
wrote NetHack Plus. Tom Proudfoot later merged NetHack Plus and
his own NetHack-- to produce SLASH. Larry Stewart-Zerba and War-
wick Allison improved the spell casting system with the Wizard
Patch. Warwick Allison also ported NetHack to use the Qt inter-
face.










NetHack Guidebook 53



Warren Cheung combined SLASH with the Wizard Patch to pro-
duce Slash'em, and with the help of Kevin Hugo, added more fea-
tures. Kevin later joined the DevTeam and incorporated the best
of these ideas in NetHack 3.3.

The final update to 3.2 was the bug fix release 3.2.3, which
was released simultaneously with 3.3.0 in December 1999 just in
time for the Year 2000.

The 3.3 development team, consisting of Michael Allison, Ken
Arromdee, David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy,
Timo Hakulinen, Kevin Hugo, Steve Linhart, Ken Lorber, Dean
Luick, Pat Rankin, Eric Smith, Mike Stephenson, Janet Walz, and
Paul Winner, released 3.3.0 in December 1999 and 3.3.1 in August
of 2000.

Version 3.3 offered many firsts. It was the first version to
separate race and profession. The Elf class was removed in pref-
erence to an elf race, and the races of dwarves, gnomes, and orcs
made their first appearance in the game alongside the familiar
human race. Monk and Ranger roles joined Archeologists, Barbar-
ians, Cavemen, Healers, Knights, Priests, Rogues, Samurai,
Tourists, Valkyries and of course, Wizards. It was also the
first version to allow you to ride a steed, and was the first
version to have a publicly available web-site listing all the
bugs that had been discovered. Despite that constantly growing
bug list, 3.3 proved stable enough to last for more than a year
and a half.

The 3.4 development team initially consisted of Michael Al-
lison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin Hugo, Ken
Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet Walz, and
Paul Winner, with Warwick Allison joining just before the re-
lease of NetHack 3.4.0 in March 2002.

As with version 3.3, various people contributed to the game
as a whole as well as supporting ports on the different platforms
that NetHack runs on:

Pat Rankin maintained 3.4 for VMS.

Michael Allison maintained NetHack 3.4 for the MS-DOS plat-
form. Paul Winner and Yitzhak Sapir provided encouragement.

Dean Luick, Mark Modrall, and Kevin Hugo maintained and en-
hanced the Macintosh port of 3.4.

Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas,
and Yitzhak Sapir maintained and enhanced 3.4 for the Microsoft
Windows platform. Alex Kompel contributed a new graphical inter-
face for the Windows port. Alex Kompel also contributed a Win-
dows CE port for 3.4.1.










NetHack Guidebook 54



Ron Van Iwaarden maintained 3.4 for OS/2.

Janne Salmijarvi and Teemu Suikki maintained and enhanced
the Amiga port of 3.4 after Janne Salmijarvi resurrected it for
3.3.1.

Christian ``Marvin'' Bressler maintained 3.4 for the Atari
after he resurrected it for 3.3.1.

There is a NetHack web site maintained by Ken Lorber at
http://www.nethack.org/.

- - - - - - - - - -

From time to time, some depraved individual out there in
netland sends a particularly intriguing modification to help out
with the game. The Gods of the Dungeon sometimes make note of
the names of the worst of these miscreants in this, the list of
Dungeoneers:











































NetHack Guidebook 55



Adam Aronow Izchak Miller Mike Stephenson
Alex Kompel J. Ali Harlow Norm Meluch
Andreas Dorn Janet Walz Olaf Seibert
Andy Church Janne Salmijarvi Pasi Kallinen
Andy Swanson Jean-Christophe Collet Pat Rankin
Ari Huttunen Jochen Erwied Paul Winner
Barton House John Kallen Pierre Martineau
Benson I. Margulies John Rupley Ralf Brown
Bill Dyer John S. Bien Ray Chason
Boudewijn Waijers Johnny Lee Richard Addison
Bruce Cox Jon W{tte Richard Beigel
Bruce Holloway Jonathan Handler Richard P. Hughey
Bruce Mewborne Joshua Delahunty Rob Menke
Carl Schelin Keizo Yamamoto Robin Johnson
Chris Russo Ken Arnold Roderick Schertler
David Cohrs Ken Arromdee Roland McGrath
David Damerell Ken Lorber Ron Van Iwaarden
David Gentzel Ken Washikita Ronnen Miller
David Hairston Kevin Darcy Ross Brown
Dean Luick Kevin Hugo Sascha Wostmann
Del Lamb Kevin Sitze Scott Bigham
Deron Meranda Kevin Smolkowski Scott R. Turner
Dion Nicolaas Kevin Sweet Stephen Spackman
Dylan O'Donnell Lars Huttar Stephen White
Eric Backus Malcolm Ryan Steve Creps
Eric Hendrickson Mark Gooderum Steve Linhart
Eric R. Smith Mark Modrall Steve VanDevender
Eric S. Raymond Marvin Bressler Teemu Suikki
Erik Andersen Matthew Day Tim Lennan
Frederick Roeber Merlyn LeRoy Timo Hakulinen
Gil Neiger Michael Allison Tom Almy
Greg Laskin Michael Feir Tom West
Greg Olson Michael Hamel Warren Cheung
Gregg Wonderly Michael Sokolov Warwick Allison
Hao-yang Wang Mike Engber Yitzhak Sapir
Helge Hafting Mike Gallop
Irina Rempt-Drijfhout Mike Passaretti

Brand and product names are trademarks or registered trademarks
of their respective holders.
















NetHack 3.4 December 2, 2003






====
感觉我前后几次翻译已经出现有不一致的地方了啊,而且转写或许是比翻译更好的选择。