衣食住行知,五权皆无,何谈人权?

By: | Comments: No Comments

Posted in categories: Opinions, 中文, 网文备份

* 安全的權利:有關禁止犯罪行為,如謀殺、屠殺、酷刑和强奸。

人据说有安全的权利,但是却没有不被误杀的权利。(阿富汗,伊拉克)

* 自由的權利:有關自由的範疇,如:宗教和信仰自由、集會、結社。

人有自由的权利,但是却没有在公共场合着宗教服装的权利。(法国)

* 政治的權利:有關人民的自由參政權,如抗議或入黨。

人有政治的权利,但是每年只有一天有选举权。(各国)

* 訴訟的權利:有關防止濫用法律制度,如監禁審訊、秘密審訊和過度懲罰。

人有诉讼的权利。但是理解法律却是昂贵的。(律师费)

* 平等的權利:有關公民的平等, 在法律之前人人平等。

人有平等的权利。但是富人交得起保释金,穷人交不起。(美国)

* 福利的權利(經濟的權利):有關提供教育和免於遭受嚴重的貧窮和飢餓。

人有福利的权利,但是After School和夏令营是昂贵的。(美国)

* 民族的權利:有關群體免受種族屠殺和其建立民族國家之權利。

人有民族的权利,但是美国印第安人是没有这个权力的。(美国)

这个就是人权是如何被大规模明目张胆践踏的。

此外,在不伤害他人的大前提下,仍然:
人没有获取知识的权利–因为知识产权是长期有价的;
人没有知情的权利–因为有那么多机密;
人没有信息平等的权利–关于你账单上每一条都是如何计算定价的,特别是保险费用;
人没有免于病痛的权利–因为医疗保险是分等级的;
人没有自由定居的权利–因为居留权是要申请的;
人没有自由旅行的权利–因为签证是要申请的;
人没有自由着装的权利–尽管不雅着装并不伤害任何人;
人没有自由选择食物的权利–因为吃饲养肉用狗肉也受谴责;

衣食住行知,五权皆无,何谈人权?

请为中国超级计算机喝彩–技术补遗

By: | Comments: 3 Comments

Posted in categories: Opinions, 中文, 网文备份

补遗1:

为什么22nm以下做不出来?

不是做不出来,技术上连5nm都做得出来。因为单原子链宽度1~2nm。单电子逻辑门也在研究中。

但是,如果线宽过窄,同时意味线间距,即绝缘空间过窄。窄到其势垒相对热运动动能以及自然放射性和宇宙射线次级辐射造成的量子跃迁概率不可忽略。因此电路出错率迅速上升。这对目前的低容错能力电路设计是无法接受的。因此可应用线宽受到局限。

补遗2:

关于拼机。

拼机不是体力活和砸钱就干得出来的。你弄1000台22艇拼一块还是干不了航母舰队的活。

大规模机群(Cluster)实现超越单机性能必须克服如下瓶颈:

1)并行化优化编译包–这个没有公共开源解决方案,必须自己搞。没有这个,大规模机群和学校图书馆那一大堆单机没有本质区别;

2)跨节点全自动负载管理–你必须能够合理实时自动分配进程。没有这个,你的大规模机群很可能只有1%的CPU累死,其他99%干看着不干活。这个存在开源解决方案,例如SGE,但是只适用于少于数百节点的中小规模机群。这个也必须自主实现;

3)分布式高速存储组元–这个不是把1000块硬盘堆一起就行的。你必须保障全部节点能够实时无瓶颈读写。包括多备份,大缓存(cache),多通道等技术。就像北京火车站比二道河火车站客流大1000倍,你无法在北京造1000个二道河火车站来实现。你必须有自主设计–即便是配套电路;

4)跨节点内存共享–一般中小型机群都没有这个。各个节点用自己的内存。但是对大机群,必须有这个。因为你不可能为单一节点安装1TB内存。但是会有任务需要这个级别的数据空间。这个不是InfiniBand缺省可以实现的。必须有不同于普通工作站的主板设计 –这个是买不到抄不来的。必须自己搞;

5)实时容错设计–数万个节点中每天都会有数个节点故障。系统不可因此导致任务失败或系统崩溃。监视,检测,实时换用备份,重置作业,这些功能同样是没处抄的。代码都得自己写;

6)机房工程–能耗,制冷,通风,灭火。必须做到一个机柜起火居域灭火而体系仍正常工作;

7)用户帐户管理–这个虽然铜臭却必不可少。否则等着破产。

补遗3:

关于后门。

硬件后门是双刃剑–万一后门被无间道泄露出去,战时对自己的打击将是致命的。硬件里的逻辑后门恐怕并不现实。

软件中的后门是普遍的。而且夹杂在大堆BUG中。自主知识产权软件有必要。

事实上,更普遍的,硬件存在明显的军用级和民用级。不是后门的原因,而是可靠性和对环境耐受度的区别。我们买不到军用级芯片。如果使用民用级芯片在军用系统中,平时完全没有问题,低烈度演习也挺得过去。但是真到战场上,会迅速被电磁脉冲武器摧毁。而敌军的军用级电子设备安然无恙。这样我军就死翘翘了。这个才是必须开发自主知识产权的芯片的关键所在。

比如龙芯,我们有自主知识产权,民用级委托意法半导体制造推广,但是我们仍旧可以自主生产军用级芯片,达到抵抗不能摧毁敌方自己的军用级芯片的抗电磁脉冲和战场环境能力,才能够和敌方回到同一起跑线上。

这个才是关键。

Fedora 13: when home directory is a subdir through nfs and/or link

By: | Comments: 13 Comments

Posted in categories: Computer Tips, Work related

When I upgraded my fedora boxes in a cluster to fedora 13, I found that I can nolonger login locally via graphical interface, and remote login dropped me to / since it could not change dir to user home.

I then

setenforce 0

All back to normal.

However,

audit2allow -m local -l -i /var/log/audit/audit.log

did not show any error, so do

grep seal /var/log/messages

And I did not find any reasonable solution from internet.

For order version of fedora, I used to use local.te to enable /home through nfs.  Now in version 13 it can be done by

setsebool -P use_nfs_home_dirs=1

But this did not change anything here.

So I went to check the path of real /home, and found that “home” has nfs_t attibute since it is a nfs mount.  This is supposed to be resolved by the above means.  However, “home” is not mounted under /, but under /data, which is attributed default_t.  I believe that this is the cause of the failure.

To solve this, I made a local.te file as

module local 1.0;

require {
type local_login_t;
type default_t;
type xauth_t;
type sshd_t;
class dir search;
}

#============= sshd_t ==============
allow sshd_t default_t:dir search;

#============= xauth_t ==============
allow xauth_t default_t:dir search;

#============= local_login_t ==============
allow local_login_t default_t:dir search;

This allows sshd, xauth and local_login to go through default_t.

By inserting this to the selinux policy, the issue is fixed.

Use rasdial to command line operate VPN

By: | Comments: 5 Comments

Posted in categories: Computer Tips, Work related

C:\>rasdial /?
USAGE:
rasdial entryname [username [password|*]] [/DOMAIN:domain]
[/PHONE:phonenumber] [/CALLBACK:callbacknumber]
[/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]

rasdial [entryname] /DISCONNECT

rasdial

Command completed successfully.

应该恢复立法打击投机倒把

By: | Comments: No Comments

Posted in categories: Opinions, 中文

应该恢复立法打击投机倒把.

旧定义:
投机倒把—-是指利用时机,以囤积居奇,买空卖空、掺杂作假、操纵物价等方式扰乱市场、牟取暴利的行为。投机倒把罪是指以获取非法利润为目的,违反金融、外汇、金银、物资、工商管理法规,非法从事工商业活动、扰乱国家金融和市场管理、破坏社会主义经济秩序,情节严重的行为。通俗点就是指某人在a地以低价买入在b地以高出买入价卖出就是投机倒把。

旧定义的问题:
1.定义混乱:做生意利用时机没有过错.掺杂作假是质量管理问题,不是投机倒把问题;
2.打击面过大:绝大多数正常商业行为就是在a地以低价买入在b地以高出买入价卖出.这是正常物流带来的合理增加值.

新定义:
投机倒把—-是指以操纵真实或虚拟资本流动或物资流动为手段故意制造人为或虚假短缺或过剩,以造成投资者,生产者,运输业者,销售业者,或消费者经济损失为代价获取利润的任何商业活动.

实例:拒绝消费者或面对消费者的零售商按市价购买要求;散布虚假短缺或过剩信息;以及通过控制仓储运输等渠道扭曲供求关系等商业行为.

Linux: add a swap file

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

To add a swap file:

  1. Determine the size of the new swap file and multiple by 1024 to determine the block size. For example, the block size of a 64 MB swap file is 65536.
  2. At a shell prompt as root, type the following command with count being equal to the desired block size:
    dd if=/dev/zero of=/swapfile bs=1024 count=65536
  3. Setup the swap file with the command:
    mkswap /swapfile
  4. To enable the swap file immediately but not automatically at boot time:
    swapon /swapfile
  5. To enable it at boot time, edit /etc/fstab to include:
    /swapfile               swap                    swap    defaults        0 0

    The next time the system boots, it will enable the new swap file.

  6. After adding the new swap file and enabling it, make sure it is enabled by viewing the output of the command cat /proc/swaps or free.

How to speak before the war?

By: | Comments: 4 Comments

Posted in categories: Uncategorized, 网文备份

打仗前怎么说话?

亲切友好的交谈——字面意思;
Cordial and friendly conversation — literally;

坦率交谈——分歧很大,无法沟通;
Frank conversation — has big differences, can not communicate;

交换了意见——会谈各说各的,没有达成协议;
Exchanged viewpoints — expressed themselves in the meeting, and there is no agreement;

充分交换了意见——双方无法达成协议,吵得厉害;
Fully exchanged point of views — the two sides could not reach an agreement, argued severely;

增进了双方的了解——双方分歧很大;
Enhanced mutual understanding — the two sides differ greatly;

会谈是有益的——双方目标暂时相距甚远,能坐下来谈就很好;
The talks are positive — the objectives of both sides are far away, it is good to be able to sit down and talk;

我们持保留态度——我们拒绝同意;
We reserve our opinions — we refuse to consent yours;

尊重——不完全同意;
Respect — do not fully agree;

赞赏——不尽同意;
Appreciate — do not entirely agree;

遗憾——不满;
Regret — dissatisfied;

不愉快——激烈的冲突;
Unpleasant — bitter conflict;

表示极大的愤慨——现在我拿你没办法;
Expressed great indignation — now I lack a way to take you down;

严重关切——可能要干预;
Serious concern — may have to interfere;

不能置之不理——即将干涉;
Can not ignore it — about to interfere;

保留做出进一步反应的权利——我们将报复;
Reserves the right of further reaction — we will retaliate;

我们将重新考虑这一问题的立场——我们已经改变了原来的(友好)政策;
We will reconsider our position on this issue — we have changed the original (friendly) policy;

拭目以待——最后警告;
Wait and see — the last warning;

请于*月*日前予以答复——*月*日后我们两国可能处于非和平状态;
Please answer before * month * month * — after the date the two countries may be in non-peaceful state;

由此引起的后果将由*负责——可能的话我国将诉诸武力(这也可能是虚张声势的俗语);
The resulting consequences will be your responsibility — if possible, we will resort to force (this may be bluff saying);

这是我们万万不能容忍的——战争在即;
This is what we absolutely can not tolerate — and the war is soon;

这是不友好的行动——这是敌视我们的行动;可能引起战争的行动;
This is a unfriendly action — action that is hostile to us; action may lead to war;

是可忍孰不可忍——不打算忍了,要动手了。
What cannot be tolerated if this is tolerable — do not intend to put up, ready to fight.

悬崖勒马——想被爆菊么?
Stop moving before you fall — want to be blasted?

勿谓言之不预也——准备棺材吧。
Do not say that we did not warn in advance — you are ready to be killed.

Grub boot without GUI

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

When booting, click any key to drop into grub booting menu, click Tab to bring up option line. Append 1 or 3 after the kernel line.  Then it will boot without GUI.

This is useful in case the X configuration is messed up.  Normal booting will result a locked display as well as locked mouse and keyboard.  By booting without GUI, you can get a chance to reinstall graphic drive, or fix X configuration.

selinux use nfs home dir

By: | Comments: 1 Comment

Posted in categories: Computer Tips, Work related

echo “1 1” > /selinux/use_nfs_home_dirs

Recursive prime triplet by Brillhart – Lehmer – Selfridge algorithm

By: | Comments: 7 Comments

Posted in categories: Fun Stuffs, Prime Search

Take any three primes, say p[1,0], p[2,0], and p[3,0].

Define:

p[i,j]=ABS[1+2*n[i,j]*p[(i+1) mod 3,j-1]*p[(i+2) mod 3,j-1]],n is the integer with minimum ABS[n] that makes p[i,j] a prime number.

The primality of p[i,j] can be proven using Brillhart – Lehmer – Selfridge algorithm recursively by using p[(i+1) mod 3,j-1] and p[(i+2) mod 3,j-1] as helper since n is a small integer, by reducing j to 0.

With this idea, taking

p[1,0]=3, p[2,0]=5, p[3,0]=7

We got the n[i,j] ( columns : j; rows: i):

i j=1 j=2 j=3
1 1 -1 -1
2 -1 2 -1
3 -8 -10 7
4 -14 -3 -13
5 -18 24 46
6 24 39 -32
7 225 -48 27
8 120 -76 30
9 -132 245 -676
10 316 -722 65
11 55 -1197 -510
12 -427 -1716 -637
13 4651 -1158 3420
14 -16337 17640 -18426
15 -8915 -70649 -31489
16 -18844 -92841 124053
17 -144011 -8853 -14042

The last three, p[i,17] makes top 5000 list.
The proof will be posted in the reply of this one.