Showing posts with label lifehacker. Show all posts
Showing posts with label lifehacker. Show all posts

Wednesday, December 25, 2013

Life was never easy...especially in post-prism era;-)

I've watched a great free speech today:

Bruce Schneier, our great philosopher in cybersec field. And Eben Moglen, afaik, he is a great hacker( not in computer stuff) in free software law field. I do remember I used to listen Eben's free speech( electronic version) when I was in college. Seven years until now, I know better about why there are group of people has been trying fight for digital rights, software freedom, etc.....

I'm here to share something I've learn from Bruce and Eben today. This writeup is going to be my notes and some personal summary of 2013. It may be mess a little bit;-)

What do we learn from Mr Snowden's disclosure about crypto?
------------------------------------------------------------------
Cryptography itself is still hard to break. NSA is not breaking the math, but breaking by cheating, by stealing private keys, by forging certificates, by doing non-crypto stuff to archive their *ditry* goals. Even in the fucked-up case of Google, NSA didn't crack the traffic between user's browser and Google's server. Because Google uses client auth SSL at default, more importantly, it works( NSA dont like it). But NSA hijacked the traffic between Google data centers where the SSL/TLS was removed for whatever reasons( cost?). Crypto is still the one of the best ways to fight NSA or NSA-like organization.


Tor stories?
------------------------------------------------------------------
Personally, I like Tor. It probably could save people's life in some "restricted" area. Tor is pissed off agencies like NSA. The contributors of Tor project have routine seminars. It seems that the discussion of how to break Tor is their daily bread;-) Thanks to Tor project contributors.

What if NSA is in our threat model?
------------------------------------------------------------------
The 1st thing is mitigation: NSA got a piece of math but still need a bunch of engineers to make it work. Let NSA pay for higher cost( timing budget not new math). Plz use particular crypto technology( on GNU/Linux distro) as much as possible. It's reasonable to speculating that NSA has something about crypto stuff but we don't. Information asymmetry is indeed exsit. Of course NSA known what we do in past decades but we are rarely to known what NSA has been doing in the same period..so thanks to Mr Snowden's disclosure gave us *a little more* information.

And NSA-like organizations are definitely needs a lot of automated attack tools: foxasset? The reason it simple: you can't just train people on the street to become old school hackers in few months. That's why they have to develop automated tools.

btw: What does old school hacker mean in my context? A type of people who are highly skilled with low-level techniques, such as *NIX System, networking( both internet stuff and corenet of telco), reversing, cryptography, C/ASM code audit, etc..and also have a specific type of strong philosophy with underground spirit;-)....ug spirit~wth

Standard corruption?
------------------------------------------------------------------
It's not all standards does security matters. Bruce thinks AES is still secure. We can't only blame the Dual ECC stuff to standard process's fault. Implementation is important, such as non-NSA involved internation cellphone standard was fucked up..A1/5? Ring the bell? We should only trust these public standards, which our guys( free software enthusiast, cybersec philosophical anarchist like Phrack guys? or people like Bruce?:)) are getting involve with it.

What tools can we trust?
------------------------------------------------------------------
GNUPG, tor, OTR, etc... Some of these open source tools are written by security/crypto paranoids. They have a very awesome design and implementation.

What if you are on the target list of NSA-like organization?
------------------------------------------------------------------
If you are targeted, there's nothing you can do in that level. Is this a super-APT shit?

Is cyberwar going to be end?
------------------------------------------------------------------
I don't think so. If everyone holds the philosophy of "I'll fuck you if you don't fuck me first, sir", then it would turn the whole scene to be everybody being fucked by everybody. That's what old school hackers has been through the paradigm shift( painfully?) from old good hacking days to "This is cyber, sir!".

Is that sounds we are hopeless?
------------------------------------------------------------------
Nope, quoted from Bruce:"Society improves because people dare to think the unthinkable and then after 20, 30 years everyone says that was kind of good idea. It takes a while but it has to start."


FOSS solutions?
------------------------------------------------------------------
Bruce thinks open source solution is more secure than closed ones. Because:
1, You can look at it( source code)
2, It's harder to let someone slip into

We probably don't need to worry too much( did I say "too much"?) about NSA was/is/will try to put backdoor in some fundamental free software projects, like linux kernel, GCC, Glibc, "supposed to be re-written" openssl;-) etc. Because according to the full-disclosured documentations, NSA seems amazingly risks aversed. They only want to take a safe path. Yeah..yeah, I know what they're thinking...you can do evil, but don't be caught up;-) Free/open source community have a lot of old school hackers has been do code review for decades. They did a great job. And they are going to continue this *secret* war aginst NSA-like organization. So it's not easy attack( backdooring) on compiler.....( and, there are tons of guys like me are trying to be old school hackers).

Leap of faith?
------------------------------------------------------------------
Yeah, it sounds perfect. But no one can ensure you 100% secure. But the fact is that you can't examine everything. You must trust them( the tools you use). Give yourself a little faith. Did Soren A. Kierkegarrd said that we could feel comfortable to use GCC;-)

Well, use Apple products( iphone, ipad, ishit) and Microsoft products( Win for gaming platform, Office for whatever) are not a good options. Drop them, come on!

Hardware box issues: never update the full-disclosured vulns:
------------------------------------------------------------------
In some countries, cybersec business couldn't support small business. The reason cause that happened, because the most of customers had/have the wrong concept about cybersec. They think the only thing you need to do is
buy a bunch of hardware boxes( firewall, IDS/IPS, UTM, NGFW, or whatever). Obviously, it's violating the very important old school principles:
------------------------------------------------------------------
Security is NOT:

Security is NOT installing a firewall ..
Security is NOT a Product or Service .. ( by Schneier, Bruce )
Security is Not a Product; It's a Process .. ( by Schneier, Bruce )
A Security Audit is NOT "running a port scan and turning things off" ..


Security is:

Security is "Can you still continue to work productively/safely, without compounding the security breach"
Security is only as good as your "weakest link"
Security is "risk management" of your corporate resources(computers/people), required expertise, time management, implementation costs, data backup/recovery proceedures ...
Security is a Process, Methodology, Costs, Policies and People
Security is "Can somebody physically walk out with your computers,
disks, tapes, .. "
Security is 24x7x365 ... constantly ongoing .. never ending
Security is "learn all you can as fast as you can, without negatively
affecting the network, productivity and budget"
------------------------------------------------------------------

In past few years, more and more enterprise management guys are realizing that those hardware boxes can't solve the problem, which it was supposed to be solved.* Right here, there's one thing you might want to know: Firstly, some "sec box" vendor has been using a lot of open source code( linux kernel, snort, l7, BRO, etc) but they never contribute to the community. *........Personally I do believe that only old school cybersec principles can make system secure. But it need skilled people to do a lot of work in the daily cybersec process.  Well,  the mainstream marketing are still advertising the *boxes* solution is one thing, while it's hard to find old school guys is another.

What I'm trying to say are not hardware boxes are not important. But people also can do small business with trying to find cheap and effective solution. That's where open source cybersec solution fit in. There are a lot of great cybersec open source project. All you have to do is to pay someone who know
these cybersec open source code and combine them into the your own cybersec solution. For example, a customer want to hardening their network and server. There are a lot of open source sec project can do that, such as
iptables/snort/psad/tcpwrapper/apparmor/openssl/apache or web level
hardening stuff( inside the DJANGO for preventing sql injection, mod_security, etc). But the customer would pay someone who know about it to consulting for
them. The skilled guy could train customer's IT guys or go through
with their own implementation. Personally, I think it's the best to do
the cybersec small business. It's win-win solution! Old school guys get
pay and customer are happy.

btw: Some regions may have these cybersec small business model already.
--------------------------------------------------------------------------

Well, it's Christmas today. As a Neo-Calvinist, I wouldn't talk about religion too much  in my daily life. But all in all, neo-calvinist is Christian indeed. I'm not too religious. Sometimes, I really hate those nominal christian was feel so good to doing terrible things  in name of god....fuc* them....Anyway, hacker is a type of people who are willing to seek the truth with no matter cost. Even I'd see L0rd Jesus look like overmind( from starcraft) after I die. The problem to me would be "Is this true my L0rd looks like overmind?", if he is the L0rd whatever he looks like, I'd be still worship him;-)

Hacker can pick the red pill.
Hacker can destroy the blue pill.
Hacker can embrace the desert of the real.

Merry Christmas, my fellow brothers/sisters!

May L0rd's hacking spirit guide us in 2014!!!

Saturday, December 31, 2011

Summary 2011

Jan 26:
有几个中国年都没有回家,因为不打算跟酱缸教的忠实信徒浪费时间,还不如到处逛逛,这一天到达了深圳,和一个朋友进行了连续20个小时的philosophical conversation后休息了4个小时,之后又继续了15个小时左右,交谈的内容主要关于人生意义的探讨,自由软件哲学,复杂系统等话题,其实关于"人生意义"是个古老的题目,但这个题目人类谈论了2000多年还是没有"确切"的结论,虽然Shawn信稣哥,但这并不代表就可以以宗教作为借口来回避这一神圣而又永恒的话题。

Feb 4:
在HK为老婆购买了一台Macbook,也是Shawn第一次使用Macbook,苹果的产品很好的照顾了old school和new school黑客的需求,new school黑客可以直接使用xCode来完成对Mac OSX,iPhone,iPad应用程序的开发,old school黑客可以使用Traditional Unix Development Environment(包括GNU工具链)进行和在unix-like平台上一样的开发,其实Shawn为老婆买Macbook是因为一个教育计划,试想如果让她直接从习惯了N多年的WIN平台上转移到GNU系统上还是很困难,但Macbook可以作为一个buffer,Shawn建议她使用GIMP来替换以前在WIN平台下的PHOTOSHOP,GIMP是自由软件,所以也可以顺便谈谈自由软件运动的历史和哲学,最终到了10月份,老婆在思考了黑客生命,自由软件和她所在的行业(非计算机领域)的关系后决定,这台Macbook将是她的最后一台苹果产品,下一此买laptop肯定会装GNU/Linux。

Apr 29:
从2月到4月一直在思考技术的本质到底是什么,KK的What Technology Wants提供了很多参考,4月中旬辞职后开始快速的reviews最近几期的Phrack杂志,4月28日XX山上第一次攀岩后读到了关于利用SMM的rootkit,虽然不太能理解技术细节但至少确定了CPU也能中rootkit的可能性。这个月也发出了为一个old school的ezine---DNFWAH(DO NOT FUCK WITH A HACKER)编写文章的邀请,给Shawn所认识的computer hacker和generic hacker,虽然得到的回应不多,但总算是在5月份发布了Issue 1,发起这份ezine的目的很简单,就是提供一个old school风格分享生命的平台,你不一定需要在某个领域是所谓的"大牛",但你的文章必须是你通过你的生命的一种体验hacking而成,这份ezine不是为了仅仅分享知识,把知识和生命的结合在一起的hacking才符合真正的黑客伦理。

May 3 --- Jul 27:
开始了新的工作,也是网络安全公司,之后的几个月的工作并不是太忙,闲暇时间继续着gaming的同时也总结了netfilter和NIC之间的关系,从4月份开始和cloud club的家伙们谈论云里雾里的"云计算",关注这个的目的到不只是为了寻求商业机会,云计算作为一个大整合的平台就像黑洞一样吸收了几乎历史上所有的信息技术,Shawn认为云计算和另外的一个aha是有联系的:Ray Kurzweil的The Singularity is Near,科技的进化非常的迅猛,这个进化系统对于个人而言是什么?到底Shawn是仅仅感觉到恐惧就回避问题还是积极的拥抱新的技术,如果是前者那肯定不配做基督的门徒,因为这往往是酱缸教徒的选择,但如果是后者要做的选择更加的复杂,技术进化系统到今天已经非常庞大,而一个复杂系统仅仅了解其部分是根本无法搞明白本质的,但如果以所谓的整体论的方式来构建知识论的话,这已经远远超出了一个个体生命所能承载的极限,终极解决方案:社区。但如何构建强社区?神哲学,兄弟会,四层模型....太多的要素需要考虑,从Shawn懦弱的内心深处的提示是:give up。难道Shawn也应该和那个撒克逊的小朋友问同样一个问题:我是懦夫的原因是因为我的父亲是懦夫?难道该找一个借口:这么复杂的问题留给下一代?去他妈的,Shawn都无法办到的事情怎么好意思厚颜无耻的让下一代去完成...

Sept 5:
生活如果一天没有aha简直要让Shawn窒息,如果每时每刻都有aha的wired-in状态那该多好,往往日常生活乏味的出奇,随着对奇点的了解,好像每天如果不来点关于GNR的信息就浑身不自在,或许这是今年在solidot上发的新闻报道最多的一年的原因。9月也参加了软件自由日的成都站,来的人不是很多,但来的家伙都对自由软件充满了热情;软件自由日当天购买了Xbox 360和Kinect,之后的几个月的gaming几乎从PC平台搬到game console上了。2005年,M$发布Xbox 360的时候,Shawn当时预测Xbox360的下一代主机之后游戏的画质会变得更接近真实,这一代的游戏主机把大部分的硬件资源都消耗在图形处理上了,AI方面显得过于薄弱,今年的所有大作里Shawn只认为2部FPS游戏在画质上有质的飞跃:基于id tech 5的Rage和战地3。

Oct 3:
到达雪山脚下,hiking的路程并没有太远,更多的是和老婆一起享受大自然的阳光和雪景,当然还有在帐篷里读着那本"创业的过度:以色列的经济奇迹",Shawn曾经向稣哥祷告过,这本书Shawn会拿出10%-part的那部分收入来购买70本送给陌生人,朋友和native hacker,Shawn一般不在公开场合用"十一奉献"这个词,TMD所有的收入都是来自稣哥,何谈"奉献"一说?整个10月份有三位伟大的黑客离开了我们:John McCarthy, Dennis Ritchie和Steve Jobs。如果说"摆地摊"的Steve Jobs(黑客们更欣赏那个在车库里hacking的Jobs)改变了世界,那Dennis Ritchie则创造了世界,而John McCarthy则是沿着他的老师Alonzo Church的道路给予了后来的黑客们创造世界的可能性。关于他们Shawn写了一篇A & G Trends II会在年底的dnfwah issue 2上发布,明年会发布到blog上。

Nov 12:
和某位对hard sci-fi热衷的家伙的几次讨论深入了一些有趣的题目,但这些题目比起可以即时体验的Kinect和PS3而言显得诱惑力不足,这个月的20号之后在忙一些公司的事情,小到移植应用软件,大到查找内核内存泄漏,繁杂到连个log系统也要亲手来实现,从规模和框架设计的角度,这个日志系统当然不能跟syslog/syslog-ng相比,客户不要求多线程,性能问题他们是打算通过增加硬件来解决,项目完后Shawn编写了一个GPLv3版的日志系统---netlog,功能不是很完善,只是把基础框架完成了,但别指望Shawn继续完善netlog,毕竟Shawn的比特总是从一个领域跳到另外一个领域;Shawn一直认为在亚洲的大部分软件公司只是把人当奴隶来使用,大部分的软件开发人员并没有通过这份工作进而帮助他们思考人生意义,一年的工作经验重复了十次当然可以在简历上写有10年的工作经验,别TM跟Shawn讲为什么Shawn不也是这样的吗,Shawn有自己的理由,但现在却不能分享这些理由,如果稣哥允许Shawn再拥有24年的生命,那Shawn会分享更多的经历的。

Dec 25:
2011年的圣诞节的到来意味着这一年的结束,在25日到元旦的这6天应该是反思这一年所做的事情和选择到底在多大程度上和人生意义的方向一直。去TM的圣诞老人,圣诞老人的来历其实是当年的大公教会的一名虔诚的信徒,也是主教,因为他的所作所为后来被教会封为圣徒。当然今天的圣诞节更多是酱缸教狂欢的日子。每年的这个时候Shawn总是恐惧颤惊,应付忽悠一下公司老板或者教会的自称基督徒的家伙们倒是很容易,但Shawn还没狂妄到去忽悠稣哥,每年这个时候除了祈祷,认罪,忏悔,感恩之外,真不知道还能做些什么。2011年的分享更多是跟神哲学没有直接的联系,但这并不代表Shawn停止了对形而上的思考,像Herman Bavinck的著作和宗教改革运动的资料在2011年仍然是hacking的部分,只是比重不如过去的3年。2011年的最大的aha是得益于神哲学的基础,感谢上帝,到了这个2011快要结束时Shawn终于确认了一些开始于2005年的事情,但要逆向工程第四级别的隐喻还得花一些时间,这个时间恐怕会超过7年。

Dec 31:
北京时间5:15AM,DNFWAH的第二期发布,第一期发布后的40天左右下载量达到了200,原本预期第二期发布后的24小时下载量不会超过50,毕竟作为一份old school风格的中文ezine并不受太多人的关注,早上在solidot上报道了后70分钟内下载量达到83,Shawn看到后跟朋友讲今天的下载量大概会在200左右,可惜50分钟后下载量已经达到203,Shawn就一直跟朋友讲,或许今天第二期的下载量会突破300,400,500,600,700....到下午吃饭的时候已经突破900,TMD这不是稣哥耍我们吗?对于hacking on life/Purpose/Knowledge的old school中文ezine怎么可能会有这么多人关注?到现在(10:08PM)时已经突破1097下载了,也就是说DNFWAH Issue 2发布16个小时后下载量突破了1000,whatever...希望读者们能严肃的去思考自己的人生意义,这里Shawn必须感谢Phrack的作者们,如果没有他们就不可能有这份ezine,2011年的最后一天以这种方式结束还算是aha,也算给稣哥交帐了。

今年的总结有点乱,但大概是记录了生命的经历,下面是今年在solidot上发的报道:
DNFWAH第二期发布
Richard Resnick:欢迎进入基因革命时代
《科技想要什么》中文版上市
NVIDIA开放CUDA编译器源代码
程序外包真的省钱吗?
生物朋克宣言
IBM使用现有工具制造Racetrack存储器
黑客伦理的归来
Stephen Wolfram加入救生艇基金会下赌注--奇点
华为公司驻巴西员工过劳死
Doom 3源代码发布
Intel公布Xeon E5和Knights Corner众核处理器
异构计算的诱惑
黑客:计算机革命的英雄推出周年版
上海政府要建设100个黑客空间社区
开放硬件杂志第一期发布
Ivy Bridge已经开始批量生产
Android 4.0发布
Stuxnet之子的狂野之舞影响欧洲
Google改进语音翻译与Siri竞争
计算机能耗遵循Koomey定律
RAGE不是一个大错误
自由软件正则表达式引擎的对比
LulzSec和Anonymous的三名成员被捕
以色列加入CERN成为第一个非欧洲国家成员
软件自由日2011
超越基于OS的安全
Broadcom以37亿美元收购NetLogic
Happy Programmer's Day 2011(程序员节快乐)
AI vs AI--当AI与自己聊天
奇点会议2011
GNU黑客大会2011
Cosmos--基于C#的操作系统
只有蠢人才不会回馈自由软件社区
当领导者离去:苹果应该学习微软等的经验教训
杀出重围III中的cyborg技术
竞速下一代防火墙
为什么亚马逊的Kindle不能在美国制造
斯坦福大学开放更多计算课程
超过10,000名学生注册斯坦福开放课程
人类的大脑网络限制了多任务处理
你的同事正在杀死你吗?
Doom III源代码将会随Rage发售开源
Google前首席信息官建议"做愚蠢的事"
新血液测试可以检查出阿茲海默病
德克萨斯高中教科书---进化论的胜利
奇点将至:当人类超越生物
FPGA位元流加密漏洞
Rage公布发布日期
开放硬件游戏机---Uzebox
纳米磁铁可替代晶体管
MIT OCW开放量子复杂性理论课程
记念Alan Turning(阿兰.图灵)第99个生日
开放知识基金会2011年度会议
传统纸制书将要终结
IBM Waston震撼医生
AMD将在以色列新建研发中心
RMS取消以色列之行
商用量子计算机遭质疑
dnfwah Issue 1发布
Metasploit 3.7包含了Apple iOS漏洞利用
Google的秘密黑客空间
比FPGA更快更廉价的选择
Predator比Kinect更酷?
Michio Kaku的黑暗预言---摩尔定律将失效
社会工程学---剖析人类的艺术
开放硬件新书---Arduino: a Quick-Start Guide
武装的人道主义者
开放硬件1.0
Slashdot启用新的风格
用Kinect建造真实世界的3D地图
Phrack在25年的67期之后
为最符合你的风格的geek投票

Merry Christmas! Shalom, brothers and sisters!

May L0rd's hacking spirit guide us in 2012!

Thursday, October 06, 2011

Shawn the Shi* living like a dog

Holy shi*, it's hard to share about what the fuc* of my life in 2011. After thinking in a long night I just can say I was living like a dog this year. I have spent a lot of time for really boring job, repeat again and again. It would be suck to a hacker, right? Where the frenk'in of my creative and passions? I felt like it's all gone in past few months. I hate wasting life on boring work. Only the coward would do complain the "unfair" world and keep finding excuses but the truth is I was playing a coward this year. I want hacking/hiking/gaming like a real hacker. I want to startup again, and I will use free software solution this time. When? It's still planning... The Creator of Universe, help a coward to become a real warrior. May your will be done but not mine!

Yes, I'm living like a dog. But I'm still have to share the philosophy of free software to friends, I gave a free speech( downloadable slide) on Software Freedom Day 2011 in Chengdu Linux User Group. Only few enthusiasts came:

hiking on the trail:

the 2nd day we hiking into the montain:

beatiful snow views:

vampyre?

Thank to my beautiful wife has been always supporting my path which is subculture:

dude, we need to across the yak's territory:

Do not look at the middle:

Camping:


I love this book:Start-up Nation: The Story of Israel's Economic Miracle. I presented 15 copies of Chinese version to those people I met in seminar and trip. I will present another 55 copies to Chinese native speaker hackers. I don't why I think I'm duty share the oldest religion and the cutting-edge technology where comes from Israel, to hackers.

Burning stuff:

Ashes, looks like in inferno. Hhh... If God takes those nominal Christians who are greedy hypocrites to heaven, I would prefer inferno-_-

The morning of the 3rd day:

hello, dog:

Friday, April 29, 2011

rock climbing --- a type of hack

I made a list which is a hacking plan in June 2009. It's almost 2 years for now. My hacking is still running by the list. Let's make a short version of that list. There are 3 stages that I have to finish on the road of old school hacking.

1, (2010)Learning GNU/Linux and start doing with a real engineering project which related to data-communication fields, such as developing the product of switch, router, etc.

2, (2011)Start to hack the security part of data-communication field. I'm on this stage now. So I need to get a job like that. Perhaps I'm going to work for a local the biggest security next week.

3, (2013)When above 2 stages done. I will spend my hacking time on server security that means the world of the art of exploits will be open up to me.

It's a not very long plan. It only cost 3--5 years of my life. I looked into the ezine at first time in 2004. But I have no idea what was it talking about. The technique and philosophy are so hard to me. Thank God, I got phrack ezine again last Aug. These high quality papaers might help a lot in my hacking journey.

I resigned my prev job 2 weeks ago. I don't work for money. That would be terrified to those managers who just want to hire a good monkey-coders by a good salary. I think that money as a only reason for work is a stupid of life. Think about that, 40 percents (maybe more) of your life are going to cost by work. What would hacker do? (another version of WWJD?-_-) You tell me.

Today, another "aha" was that I have my first experienced on rock-climbing. Matt (he is a ROR programmer) as a ranger that he lead the way and I followed. I was feeling real great in that 2 hrs of rock-climbing. We have been hacking stuffs (programming and more) on mountain for days. I'm hacking on a paper about SMM rootkit from the 65th issues of phrack mag. Maybe I could share about it in the future.

May LORD's hacking spirit guide us!!!

Friday, February 04, 2011

got "What Technology Wants"

before I was started this trip,I googled the mainstream bookstore in hk about KK's new book-What Technology Wants but the final result was no inventory.I was upset and started to think a question,if i should just break my current paradigm(pay for cash) to pay online for this book at once.sound like a dinosaur still living on the planet,right?but thank GOD,my wife finally found this book in the city.What Technology Wants would give you a precise way of explaining that how technology have been affecting our history and the future.The whole history of technological things is run by a kind of organic co-evolution system.That kind of system would never be stopped or influenced by personal human's willing.I think KK's world view is going to bring me into a world which can get closer to the type of world view in planetary.I just finished the 1st chapter of the book reading.At the end of the 1st chapter ,KK mentioned about autonomy's definition.That was really interesting.It reminds me another stuff that our conversation going to be fucked if we dont have a accurate terms.

Met friends in person,watched the video of sci-fi science,and walked down the seaside with my beautiful wife and enjoyed delicious food(sushi,seafood,of course my favorite beef),that's all I have done in past 9 days vacation.

btw:Im writting this blog with my 1st macbook.Dont blame me,dude!Im not RMS or kind of person who are enthusiasm in pure free software.This macbook is for my wife's daily use in most time.I just take a while and look into the macintosh sometimes.To me,GNU/Linux is still my favorite platform.Amen!

This is my precious!


hello,kitty...

Does uncle Mario has something to do with namco?WHT~~~

But I love Uncle Mario.Plumber probably was the most famous occupation of the kids's dream.

Did I become a experimental object of namco?daahhh...

Monday, December 27, 2010

summary 2010

aha,2010 going to be a history and 2011 is coming.It's pretty exciting to embrace the new year's come.Im feeling never strong than now.That's a good sign for 2011.

I want to write some shit down here.it's all about my memorable history:
The first job(in IYAKASA) I got after graduated that it's roll to write the automobile detection system in MFC code.I hate mfc,always.ditry framework and ugly macro-reflection was tortured me for 4 months.Then I got my second job in Just In Mobile.I worked for JIM even not much longer than IYAKASA(only 3 months).I felt better in JIM because I could written C code with UNIX platform out there at least.

Then,I was started a startup with 2 guys which the company's name is od software which focus on developing customized system for specific-industry.This Business is good in local but I think there's something inside of my heart I need to follow:try to figure out the truth of computer field.So I have to ask help for Computer Sicence,math,and philosophy.We closed the od after worked together for 18 months.Then I was travel to many places in China for tech seminars and hiking.After more than 6 months traveling around I got back in Feb.Now Im working for a local data-communication company.porting stuff from x86 to other architecture is my majority work now.It's a sleepy job for living at least can work with GNU/Linux.

I sponsored a open-seminar with few guys in mid-2008.And we are going to start a open-hacks with few MIT OCW(practical-c-programming,ose,CLP,etc) next January.We provided room,of course and Chinese tea:-) We hate the traditional teacher-student model.We would like to use DND model instead of traditional one which means:
1,we need a leader as if a dungeon master guide us a direction of the hack that described in OCW's lecture pdf when a group of guys hacking a specific open course
2,teacher(teacher) is a student,student is a teacher.

HOpe can bring more hacker spirit to those who will be hacking the open courses with us.

Another aha about the Kevin Kelly(KK).I would like to let you know a great book(in CHinese version) from KK has already been published for few days.I have read the first 3 chapters.the quality of the translation is always most-care thing we have.According to the first 3 chapters I think it's ok to read.Go,get the book.paper-version in Chinese or electronic in original(english).

KK's world view should be the high-prio task which we need to push it into our "queue".To me(and few hackers),magical literature like as Tanach(Old Testament) and science-fiction like as New Testament Bible in the level of mythology.It's hard to believe that KK was started writt the Out of Control about 20 years ago.Those ideas he talked about in the book is not expired for nowadays.How can a geek do
that?because of his Jerusalem trip or biking 4000 miles?or what...I dont know.But I definitely make sure that it's worth to read.Out of Control and KK's new book-What tech wants.A few months ago,a sister gave me a msg said"hey SHawn,you must be heard of KK".Wowo,If you points KK the wired I certainly Knew.Then we have start a open-seminar to discussed about KK's world views in Oct.

wowo...I bullshit a lot.And I really want to share more aha here.maybe next time~

Last thing,the articles I posted on solidot(Chinese slashdot) in 2010 lists:
钢筋水泥真的如此重要?
科幻电影能让儿童成为未来的科学家
智慧设计论禁令
KK的新书<技术到底想要什么>出版
视频游戏增强视觉注意力
Happy Programmer's Day(程序员节日快乐)
Burning Man上使用的开源电话系统
quakecon 2010的John Carmack的有趣演讲
华裔女医生Karen Woo在阿富汗被塔利班枪杀
黑客杂志的魅力
入侵检测自由软件项目Snort停止开发了
Mark Zuckerberg改变世界的方式
风险投资者们开始反对软件专利
俄罗斯hacker精神的体现--一个人造地铁
2010的OPLC XO-3原型机
开放硬件可以赚大钱
印度bangalore自由软件年会II
guile-1.9.10发布了
DIY图灵机
Dr. Beat Richner的故事
30年前开始的计算机公司
印度bangalore自由软件年会
Nvidia放弃对开源驱动的支持
编程到底出了什么问题
春节假期的建议--向周围朋友分享MIT OCW


This is new year or just another fight?
God bless China and Israel in 2011!!!

Friday, February 19, 2010

twisted festival,do not fuc* me

I really hate to the modern way to celebrate the Chinese Spring festival.so i have been running away from hometown to a silent place with my wife,just for recisis and writting something.And I posted which suggesting people to share MIT OCW with friends,while celebrating Spring Festival,in a Chinese version of slashdot(solidot)春节假期的建议--向周围朋友分享MIT OCW.

then,I wanna to share with you guys about my way to talk about free software


like to see a warmhouse booth in the city


the place I only found where sale the books about GNU/Linux development

Friday, October 23, 2009

trip of Beijing---free software seminars

seminar:Free software
date:Oct 22th,2009
location:Beijing

This was my 3rd time to the city--Beijing.Im here for 3 seminars.One about free software.2 of seminars are tech-related(helloGcc and aka kernel).

RMS gave us a free speech last night.The topic is Danger of Software Patent that he explain why the patent system are threating the public freedom.I totally agree with him on this point.After the speech~we have turning to FAQ time.I went to the front of the table and speak to him.Here's the conversation snippet I have remember:
------------------------------------------------------------------------------------
Shawn:Hello,Mr.Stallman.It's honorable to talk to you.I wanna ask a question for ya.What do you think of the purpose of your life and free software,I mean the connection about them?

RMS:That's a huge problem.There are a lot of purpose in life,I would love to learning new things,see the beautiful things,and ...eat delicious food.

Shawn:what's your final purpose?

RMS:There's no final purpose.

Shawn:sounds humanism.I think your final purpose are "there's no final purpose".Are you a Jew?

RMS:Im a antitheist in scientific.

Shawn:Mr.Stallman.Is there are any possibility to beat the patent system?

RMS:No,but we can avoid it.
------------------------------------------------------------------------------------
RMS is a one of great man I met.He is a great warrior in software field.About 30 years ago,some hackers who claimed that they are Christians.Some of them own better tech skills and knowledge than RMS.Perhaps they truely believed in Christ.But there is just one man came forward with respect to the moral law(the creation of General Revelation by GOD).I think of almost of free software philosophy comply with the Holy BIBLE.Try to think about this:God created the world and share the details about the creation of the world include our weakness and the possibility to betray HIM.thats why Satan(lucifer) knew our weakness.What if GOD has not share the source code of the creation of the world?That would be terrify.

ancient Greeks,Homer's epic points out that there are 4 attributes which could be composed a perfect character---knowledge,wisdom,courage,temperance.RMS is a warrior with courage,He prefer gave up a lot of shits like money,fame,etc to pursuiting the purpose of his life---free software movement.I,as Christian,firstable Thank GOD allowed the possibility could be existed in phenomenon world(because of the possibility,our life have funs).and I also thank RMS to made a great choice even though he is not a Christian now.

I was never stop asking my myself after leave the seminar yesterday:Where was the heros of kingdom of God gone?Where are they now?

May LORD Jesus leading hackers!

btw:Tom Pittman expressed the importance of creativity in his description of the feeling that accompanies true hacking:In that instant,I as a Christian thought I could feel something of the satisfaction that God must have felt when He created the world.

The father of free software movement.

The founder of GNU project.GNU/Linux is just a piece of GNU system.

RMS,Shawn

xf was talking about open hardware with RMS.

ben NanoNote from qi-hardware and openMoko

thank God,I got a openMoko that will be my next hacking.

line 4,MTR

I bet he will be a great artist:)

Shawn,my old sister

Oct 25th 2009,kernel seminar

宫敏博士

Herbert Xu

Monday, May 04, 2009

some notes

I was "trapped" in somewhere which is a gift from Lord Jesus.Im just here,to hacking.make a preparation for cultural mission that for glorify Him.Im going no where for next 6 months.stay here...be here...forget what i know at first.what's the purpose of my life?I have to answer it,thats why im here.Im searching the Tao(logos) from any fields what i can understand.math,computing,philosophy...oohh yeah~reformed theology is the best one.Thank to Von neumann,Alonzo Church,Alan Turning,Soren Kierkegarrd,Blaise Pascal,John Calvin,St Augestine,author of Hebrews(in new testament)......The Trinity God--Holy FATHER HOly SON HOly SpIrit.

People has necessary needs that not love,not money,not fame,even not the faith,but give me truth.

Happy hacking!my brothers!

首先谈谈哲学观对于我们认知事物的影响,认知科学的基础就是找出异同关系,道在最早时处于混沌状态,道要可道的第一步就是化分领域的界限,比如科学(sicence),哲学(philosophy),etc.而第二步则是探讨非科学(non-sicence),非哲学(non-philosophy),etc的这种"非我"的形态.从本质上,也是一种信息的传递,而在这一方法中又有四个必须面对的问题:
1,主体.进行认知过程的人.
2,客体.被进行认知过程的人进行认知的事物(包含上帝,自己,人和物质).
3,环境.进行认知的人必须被限定的范围内.
4,媒介.通过人的五官等媒介进行信息传递.

系统,即广义的硬件和广义的软件的复合;在认知系统的过程中就会有更加直接的方法可
以参考:
以计算主义在面对DNA配对关系问题为例,
1,观察.对DNA配对的本身进行观察.
2,实验.用物理的仪器对DNA进行实验.
3,推理.通过观察和实验建立有效的计算模型,他们假设了一个前提,即如果人类有一台计算
能力为2的78次方的"终极量子计算机",那这个问题是可解决的,反之既然.
4,计算.由于这个问题的计算量是3的500次方,因此放弃计算.

之后谈到了数学中的分类,大类主要分为:集合论,组合数学,数理逻辑,图论,代数结构.集合
论主要是研究确定行止的对象.而数理逻辑中又分为了几个主要的分支:
1,证明论;
2,公理集合论;
3,递归论;
4,模型论

之后谈到了数学的一些方法,比如分析,拓扑和概率.当然变分变法变是最有趣的一个思想试验,
我们无法观测到这个世界的本质一样,即蚂蚁以二维的方式无法观测到生活在三维空间的人类,而人类也无法理解更高层的世界.这个我想需要更多的了解了数学史可以有更加深入的思考.

之后谈到了中国先秦哲学<易经>对于现代数学的类比,道是无形的,道看似无为,却又无所不为.但站在人类有限理性的角度去认知道的本身是一件很难的事情,所以我们只能认识到那有限的"道,可道"(logy),却无法看清楚"非,常,道"(logos),在这种境况下古代的先哲们也有自己的方法去了解这个世界,即异同和对比的方法,简单的来讲,也就是先认知到混沌中的边界:阴和阳.

之后以此为基础去推导出这个宇宙的规律如下:
阳是physical,阴是metaphysical.
阳:阳,古字(正),可知.
阴:阳,古字(常),常态.
阳:阴,古字(奇),不可测度,cant measurable.
阴:阴,古字(浑),不可知.

阴和阳再与以上的结果对比,最后就产生了八卦:
乾,古字(天),集合A,辖域.
坤,古字(地),集合B隶属于集合A.
天地乃时空的描述.<老子>上讲"人法地,地法天,天法道,道法自然",也就是说站在人最低级的
位置,只需要地就可以作为人的尺度,而人透过对天地的认识建立了时空观,在希伯来旧约圣经
里谈到"地"时也指的是低级的价值和刻度,如"不要思念地上的事","人终归于尘土"即非永恒性的事物,而在犹太人的文化中探寻永恒性是重要的.

兑,古字(泽)
艮,古字(山)
道如流水行云,山和水的特性就想如此,和拓扑有类比的关系,外表变化无偿,而内部固定不变,
我们可以看到水是有形的,而它的形又不断的变化,但是它的本质是不会发生变化的,这种变化
就尤如阳和阴的转换,阳是主动的,而阴则是被动的.

震,古字(雷)
巽,古字(风)
雷和风代表这能量,前者的能量存在方式是离散的,至少以人的尺度来认知是这样,而风的能量
则是连续性的,此二者代表了能量的传递方式.

离,古字(日)
坎,古字(月)
日和月表示了信息的本身,日即太阳的周期从人的基本观察是每日一次,而月亮是每月一次,这
或许是命名的原因.在信息论当中,信息的改变频率越高,熵则越大,即信息量越大.新约圣经希伯来书讲到:"神既在古时借着众先知,多次多方的晓谕列祖,就在这末世,借着他儿子晓谕我们,又早已立他为承受万有的,也曾借着他创造诸世界.Hebrew 1:1--2".这里的"多方"英文是"various ways",而"多次"则是"many times",主动性的是"神",被动者是"列祖"对应"我们",媒介则是"众先知"对应"他儿子"(指耶酥基督),时间的刻度是"古时"对应"末世".various ways有点类似C++里的GP,更类似于lambda calculus,一个lambda的左结合可以接收任何的信息(广义上的lambda).

How does a mathematician describing the relationship?
1,words.eg,man and woman:a couple
pro:描述确切,用于写作.
con:不直观
2,graph theory.
pro:直观,用于授课.
con:元素较多后描述比较复杂
3,matrix.
pro:在计算机中表达方便,也易于在计算机中进行计算,用于写程序.
con:不直观,元素较多后描述复杂.

集合论中的关系,泛序关系
reflexive relation(自反关系):x R x,一个元素与自己的关系.
只要存在的元素就肯定有自反关系,对自我存在的一种关系的描述是
很重要的,比如人类就具备这种关系,经过了数千年的存在主义(Existentialism)哲学探讨至今基本分为2种:
1,主体性的观察的存在,即只要你能够明白(understand),认知(know)和相信(faith)的就是存在,不能明白,认知和相信的就是对主动认知的主体(人类)的不存在.

2,客观性的存在,即实在存在(existing theory),客观真理是存在的,客观真理是不由主动观察的主体(人类)的意志而变化,比如宇宙中最基本微粒的碰撞所形成的今天这个物质世界的事件在人类能够观察以前就已经存在.

不过以上2者到最终都必须面对一个极其困难但又是至关重要的问题,即存在的意义是什么?或者说存在的意义是谁赋于的?

symmetric relation(对称关系):x R y => y R x
比如兄弟关系,x是y的兄弟,而y肯定也是x的兄弟.

asymmetric relation(非对称关系):x R y
<和>都是属于这种关系,即x<> x=y
1>=1,1<=1,比如MD5的加密也是属于反对称关系,MD5先把原有的明文转化成密文,也生成一个效验sum,原文和密文其本质都是一样,但密文不能通过明文来进行比较,只能通过效验sum来比对. identity relation(恒等关系): 对角线上的所有的点. transitive relation(传递性关系):(x R y,y R z) => z R x
1<2<3,1<3> #t

(define func (lambda (n) (* n n)))
(eqv? x (lambda (n) (* n n))) => #f

(eqv? "hello" "hello") => #t

等价聚类的结果:商集
商化:U/R
积化:从不相交的集合组成新的set.
eg,{N} {1,2,3,4...}/7
1*7+3=10
2*7+3=17
3*7+3=24
=> {10,17,24...}/同余同关系R

分类对策:cond
eg:
(define pnz (lambda (x)
(cond
((> x 0) "positive")
((<> "is 0"

良序集合:有头元素的全序集合是良序集合(well-ordered set)

泛序关系:广泛的次序
eg:
'(5 (4 . (3 . ()))
(2 . (1 . ())))
=>(5 (4 3) (2 1))

we have done some type-transform test in computer.one of important is
that string->list then list-> if we want to convert string into vector.

逻辑Logic
关于历史上出现过的logic探讨:
1,古代中国的墨子对名和实的探讨,公孙龙对白马是马的一个名字的探讨.韩非子的"自相矛盾"的典故.

2,古代印度的因名学派对"宗,喻,名"的探讨.

3,古代希腊的亚里士多德(Aristotle)的逻辑学中的三段论进行了阐述,即大前提+小前提=结论.逻辑学遵守3个规律:
1,同一律,专注在同一个事情,不能偷换概念.
2,矛盾律,不能自相矛盾.
3,排中律,不能似是而非.eg,即不是男的也不是女的.

斯多葛学派的创始人是Zeno,他们最大的贡献是提出了命题和演绎逻辑.

逻辑学探讨的3个方面:
1,基础逻辑,探讨人的思维的规律.
2,原逻辑,探讨逻辑本身.
3,应用逻辑,比如电子上的数字逻辑.

逻辑的分类大体上分为:形式逻辑和辩证逻辑
形式逻辑又大体分为:演绎逻辑(Aristotle,Zeno)和归纳逻辑(Francis Bacon)
演绎逻辑大体分为:传统演绎逻辑和数理逻辑(用集合论来看待关系的演化)

逻辑的方法
1,概念
很多概念组成了2,判断
很多判断组成了3,推理

推理在遵守3律的情况下有3中形式:
1,演绎,即大前提+小前提=结果
2,归纳推理,一组同质的对象的观察.eg,如果观察100只大象都有鼻子,判断大象是有鼻子的.
3,类比推理,观察2类对象的性质.

The first paradox in math
逻辑的规则,在毕达哥拉斯看来万物的本源就是数,即所有的数可以用2个正数比
对(有理数).

此悖论是Hippasus(希伯斯)提出.

一个正方形,边为1,对角线为square root of 2(根号2),但是1~2+1~2!=~/2
eg,
反证法:
假设square root of 2 is rational number.
~/2 = p/q (p,q属于z)
z=p^2/q^2
p^2=2q^2
p^2是偶数
p*p是偶数
p是偶数
p=2r (r属于z)
p^2=4r^2

4r^2=2q^2=>2r^2=q^2
q也是偶数
q=2m (m属于z)
p=2r

p/q=2r/2m (可以归约)
所以~/2不是有理数

谈到了dedekind cut,即一条数轴上有无数多个数,用x把2边的书切分开,x可能是有理数,也可能不是.
1,x*x<2>2
可以逐步逼近的方式来求平方根.eg:
(define q3 (lambda (n x)
(cond
((= (* x x) n) x)
((> (* x x) n) (- x 0.001))
((< (* x x) n) (q3 n (+ x 0.001)))))) (q3 2 1.0)=>1.141
(q3 3 1.4)=>1.732
(q3 3 1.5)=>1.732
(q3 4 1.0)=>2

数理逻辑和可计算性理论有很大的关系.
lambda-calculus,作者是Alonzo Church
从数学的角度看:
A,y=x^2+2x+1
B,y=(x+1)^2
A=B

从存在性的角度看以上正确,但从构造性的角度看则不然,如下:
A,y=x*x+2*x+1
B,y=(x+1)*(x+1)

eg:
A,(+ (* x x)
(* 2 x)
1)

B,(* (x+1) (x+1))

所以轮到lambda出场了:
lambda-exp ::= {constant}
|{varibale}
|{lambda-exp1} {lambda-exp2}
|lambda {variable} . {lambda-exp}

两个lambda-exp有2种方式求值:
1,normal ordered:"fully expand and then reduce"
evaluate the lambda-exp1 at first

2,application ordered:"evaluate the arguments and then apply"
evaluate the parameter at first.

eg,a procedure which from sicp can provide a test for make sure whether the
interpreter is normal ordered or application ordered.
(define (p) (p))

(define (test x y)
(if
(= x 0) 0
y))

(test 0 (p))
=>if dead loop,it's application ordered.
app is (lambda (0 (p)))
=>0,it's normal ordered.

if we have a procedure which living in a Interpreter,it would be
maintained by sybolic table like below:
(define square (lambda (x) (* x x)))
---------------------------
|square|lambda(x) (* x x) |
|--------------------------
| |

what is algorithm?Aha,algorithm!
在有限的步骤内完成问题的求解.
real problem->philosophy thinking->math model->computing model->coding
glossary:indefinitely small=im
im>0,|x-A|
无穷小 2 无穷大

套区间,有自然数的特性.
induction:
1+2+3+...+n= n(n+1)/2

1,if n=1, 1= 1(1+1)/2
2,if n=k, 1+2+3+..+k= k(k+1)/2
3,n=k+1, 1+2+3+..k+(k+1),
k(k+1)/2+2(k+1)/2= k(k+1)+2(k+1)/2
=(k+1)(k+2)/2=> n(n+1)/2

组合:C(n r),r<=0,n中选择r个元素. 排列:P(n r),r<=0 P(n r) C(n r) * r! C(n r) = n!/(n-r)! 1,2,3...r........n ------------------>
|__r___| |_(n-r)__|

eg:
(define tail-fac (lambda (x)
(let loop ((n x) (acc 1))
(if
(= n 0) 1
(if
(= n 1) acc
(loop (- n 1) (* n acc)))))))

(define fac (lambda (n)
(if
(= n 0) 1
(* n (fac (- n 1))))))

(define fib (lambda (n)
(cond
((= n 0) 0)
((= n 1) 1)
(else
(+ (fib (- n 1)) (fib (- n 2)))))))

(define tail-fib (lambda (x)
(let fib ((n x) (acc1 0) (acc2 1))
(if
(= n 0) 0
(if
(= n 1) acc2
(fib (- n 1) acc2 (+ acc1 acc2)))))))

the recognize process:material->sybolic system->new recognition
自然数,是人类认知最直接的数,19世纪的德国数学家Leopold Kronecker曾经讲"God made the integers; all else is the work of man" (Bell 1986,p. 477).上帝创造了自然数,其他数都是人造的.自然数在圣经中也有严肃而有趣的联系,圣经中描述的三位一体(trinity)的上帝,三个位格分别是圣父,圣子和圣灵,在犹太人的先知赞美上帝时呼喊"圣哉!圣哉!圣哉!"也是3次,耶酥基督对于自我的存在性的实在和意义的宣称"我是道路,真理与生命".也是3,圣经中关于3的描述还不止于此,但关于在描述方向时就不是3而是4,4个方向:东,南,西,北;同时也有四季:春,夏,秋,冬.而表示绝对创造者本身的3和作为被造相对者的人类产生关系时,即3+4=7,一个礼拜有7天,罗马帝国曾经尝试把一个礼拜搞成5天,结果把人们搞的都不想做事情(和前新教伦理有关系),斯大林也尝试把一个礼拜搞成10天,结果弄的不少苏联人得了累的要死.7天是最适合人类的,圣经中7的描述也有很多,包括对教会,节日(7年释放一次奴隶).同时7在希伯来文化中也代表一个完整的过程.自然数7到今天也影响着我们,一个礼拜仍然是7天,Intel的员工都盼望着7年一次的长假,etc.我们对自然数的确是有先验式的敏感,所以很多方法论也由此而生,eg:尝试把数学上的描述都能够简化到用自然数系.

the basic Primitive recursion function:
1,Constant function:The 0-ary constant function 0 is primitive
recursive.(if n =1)

2,Successor function:The 1-ary successor function S, which returns the
successor of its argument (see Peano postulates), is primitive
recursive. That is, S(k) = k + 1.

3,Projection function:For every n≥1 and each i with 1≤i≤n, the
n-ary projection function Pin, which returns its i-th argument, is
primitive recursive.

General Function:
1,前继,n!(fac)
2,后续,(n-1)!(fac (- n 1))
3,测零,(= n 0)
4,不动点算子,1

eg:
(define a (lambda (n)
(if (= n 0) 1
(* n (fac (- 1))))))

Church-Turning thesis
1,Church's thesis: "Every effectively calculable function (effectively
decidable predicate) is general[1] recursive" (Kleene 1952:300)
可计算函数都可以用一般递归函数构造.

2,Turing's thesis: "Turing's thesis that every function which would
naturally be regarded as computable is computable under his
definition, i.e. by one of his machines, is equivalent to Church's
thesis by Theorem XXX." (Kleene 1952:376)
一切递归函数可以用一般递归函数(1..4)来构造

reduce-law:
alpha:λx.exp-->λy.exp [y/x]
beta: <λ-exp1><λ-exp2>--> <λx.exp1> [/x]
eta:(λx.exp)y--> λ-exp

bound variable:
((lambda (n) (* n n)) 6)=>36
(let ((n 6)) (* n n))=>36

block structure里只能通过arguments作为外部能见的接口.

regular-exp cant be reduced.

Church-Rosser TH I
is x--(reduce)->y,so x->z->y.存在性

Church-Rosser TH II
x--->y.构造性

Ackerman function
{n+1 if m=0
A(m,n)={A(m-1,1) if m>0 and n=0
{A(m-1,A(m,n-1)) if m>0 and n>0

(define ackermann (lambda (m n)
(cond
((= m 0) (+ n 1))
((and (> m 0) (= n 0)) (ackermann (- m 1) 1))
((and (> m 0) (> n 0)) (ackermann (- m 1)
(ackermann m (- n 1)))))))

ackermann(1,5)

(a 0 (a 1 4))
(a 0 (a 0 (a 1 3)))
(a 0 (a 0 (a 0 (a 1 2))))
(a 0 (a 0 (a 0 (a 0 (a 1 1)))))
(a 0 (a 0 (a 0 (a 0 (a 0 (a 1 0))))))
(a 0 (a 0 (a 0 (a 0 (a 0 (a 0 1))))))
(a 0 (a 0 (a 0 (a 0 (a 0 2)))))
(a 0 (a 0 (a 0 (a 0 3))))
(a 0 (a 0 (a 0 4)))
(a 0 (a 0 5))
(a 0 6)
7

scheme中lambda表达式的形参表有3种接收参数的`方式:
1,定长,eg:
(define square (lambda (n) (* n n)))
(square 5)=>25

2,全定长,eg:
(define foo (lambda x x))
(foo 1 2 3)=>(1 2 3)

3,半定长,eg:
(define f (lambda (x . y) (* x x)))
(f 10 20 30)=>100

(define f (lambda (x y . z)
(begin
(display (+ x y))
(newline)
(car z))))
(f 20 30 10 20 30)=>50
10
此方式在C语言中的printf函数是很好的体现.

tail-recursive version of n!
(define tail-fac (lambda (x)
(let fib((n x) (result 1))
(if (= n 0) result
(fib (- n 1) (* result n))))))

odd? or even?
(letrec ((odd? (lambda (n)
(if (= n 0) #f
(even? (- n 1)))))
(even? (lambda (n)
(if (= n 0) #t
(odd? (- n 1))))))
(odd? 98))
=>#f

count n...1 or count n...1
(define Nto1 (lambda (n)
(let count((x n))
(if (= x 0) x
(begin
(display x)
(newline)
(count (- x 1)))))))

(define 1toN (lambda (n)
(let count((x 1))
(if (<= n x) x
(begin (display x)
(newline)
(count (+ x 1)))))))

;Exercise 1.3. Define a procedure that takes three numbers as arguments and ;returns the sum of the squares of the two larger numbers.

(define square (lambda (x) (* x x)))

(define sum-of-square (lambda (a b)
(+ (square a) (square b))))

(define sum-2-square (lambda (x y z)
(cond
[(and (<= x y) (<= x z)) (sum-of-square y z)]
[(and (<= y x) (<= y z)) (sum-of-square x z)]
[(and (<= z x) (<= z y)) (sum-of-square x y)] )))

(define sum-2-square2 (lambda (x y z)
(cond
((and (>= x z) (>= y z)) (sum-of-square x y))
((and (>= x y) (>= z y)) (sum-of-square x z))
((and (>= y x) (>= z x)) (sum-of-square y z)))))

;Exercise 1.12. The following pattern of numbers is called Pascal's triangle.
; 1
; 1 1
; 1 2 1
; 1 3 3 1
; 1 4 6 4 1
;The numbers at the edge of the triangle are all 1, and each number inside the triangle is the sum of
;the two numbers above it.35 Write a procedure that computes elements of Pascal's triangle by means
;of a recursive process.

(define pascal (lambda (x y)
(cond
((= x y) 1)
((= x 1) 1)
((= x 2) 1)
((= y 1) 1)
(else
(+ (pascal (- x 1) y) (pascal (- x 1) (- y 1)))))))

;Exercise 1.30. The sum procedure above generates a linear recursion. The procedure can be
;rewritten so that the sum is performed iteratively. Show how to do this by filling in the missing
;expressions in the following definition:
;(define (sum term a next b)
; (define (iter a result)
; (if
;
; (iter )))
; (iter ))

(define (inc n) (+ n 1))
(define (idents x) x)
(define (sum-int a b)
(sum idents a inc b))

(define (sum2 term a next b)
(let iter((a a) (result 0))
(if (> a b)
result
(iter (next a) (+ result (term a))))))

(define (inc n) (+ n 1))
(define (idents x) x)
(define (fac n)
(product2 idents 1 inc n))
;recursive
(define product (lambda (term a next b)
(if (> a b)
1
(* (term a) (product term (next a) next b)))))
;iterative
(define product2 (lambda (term a next b)
(let loop((a a) (result 1))
(if (> a b)
result
(loop (next a) (* result (term a)))))))

Thursday, January 01, 2009

summary 2007---2008

Jan 2007,Shawn开始了对jsp和servlet的学习,但跟2006年学习.net一样,大概持续到了2007年3月份就停止了,Shawn在2004年底开始接触programming的原因是因为读了Master OF Doom---一本让Shawn回忆起童年趣事的书,1994年10月开始玩id的游戏到2004年10月刚好10年的时间,上帝的安排很奇妙!Shawn一开始学习程序设计是为了作出一些游戏的mod,到了2005年下半年发现mod很难赚钱,而对自由的追求一直在Shawn的inside里有了印记.而后放弃了游戏mod的开发的学习,而转入去学习"时髦"的.net,但Shawn当时对microsoft总觉得不爽,所以之后为了跟ms"保持距离"而投入了java的阵营,在2007年2月那段时间里每天都在思考程序设计到底为了什么,那时Shawn已经信主超过2年,从内心有一种呼召(the Call),那段时间每天60支cigarattes,感谢上帝!2007年3月份
Shawn读了那本ESR的The Art of Unix Programming,上帝总是借着非信徒的手来让Shawn明白一些圣经的总原则.之后就是毕业后的选择:money or freedom.你们应该知道Shawn的选择:)

2007年6月,对于Shawn来讲是一个人生的转折,第一次接触到了Reformed Theology(归正神学),上帝在此之前的3年里不断预备了Shawn的心,信主的头2年研读了一些关于数学和物理跟圣经之间的关系,第3年阅读了Jaspers对哲学的诠释和关于Pascal的一些文献.最后归正神学让Shawn一直不断的进行归正,那时Shawn才开始逐渐明白世界博弈的复杂性.

2007年中,Jeff花时间给Shawn讲解linux kernel,让Shawn对low-level tech有所了解.2007是沉闷的一年,一直到了年末Shawn阅读了硅谷禁书和黑客伦理,所以Shawn向上帝pray并且对于文化使命作出承诺,具体是什么了解Shawn的战友们都清楚.

2008年1月5日,Shawn辞职开始创业,合伙人xy是个干劲十足的家伙,没有他的冲劲Shawn也无法真的迈出这一步,虽然和xy的合作不长仅8个月,也带来了一些麻烦,但还是感谢主的安排!

2008年地震后,HF正式成立,本想2008年年末开始,但万军之耶和华的命令是不可怠慢的,正如希伯来书所讲"落在永生上帝的手里,真是可怕!",这里Shawn还是提醒主内的弟兄姐妹,上帝的属性不光只有爱,父神那大而可畏的右手让渺小的人类感到恐惧.

2008年Shawn的收获是开始意识到诠释宇宙的4层模型(数学->物理->哲学<=>归正神学)和方法论的重要性.

Shawn感谢上帝在2007年通过ESR让Shawn明白了作为个人去寻求人生意义和文化使命的关系,2008年又通过RMS让Shawn明白了为什么自由软件的自由必须放在伦理和道德的层面来讨论.这2位都不是基督徒,但所作的事情强过于很多基督徒,很可惜,当年的基督徒都不愿意站出来做圣经的文化使命,而上帝就使用了一个非信徒,一位伟大的战士---Richard M.Stallman

现实生活中,Shawn也看到了像ginrut这样的非信徒---为了追求人生的意义,研读神哲学方法论,对真理的探寻的严谨程度超过了Shawn认识的大部分基督徒.也有像defTsp这样的对自由软件超乎常人的热爱,可以待在一个地方研究基础的数学,Functional programming(lisp),AI超过3年的家伙.这只能更加的说明上帝的恩典是白白赐予基督徒,从人本来看,今天的大多弟兄太差劲.

在这篇总结里Shawn打算赞扬这些得着普遍恩惠(common grace)而对上帝作出了回应的非信徒,但也必须批判那些假冒伪善的基督徒,一个弟兄和一个姐妹维持了超过8年的男女朋友关系,当Shawn问他为什么还不结婚,他讲是"上帝还没有预备好",而他所解释的预备是"要有买房子,够办婚礼和家庭支出一年,总共超过20W的人民币",Shawn当时就在思想如果一个基督徒结婚需要用一笔cash来恒量上帝是否预备好,这绝对不是出于圣经的教导,可惜这样一个家伙还是信主很多年被很多人当成"虔诚信徒"的人.Shawn跟老婆的第一次约会Shawn是借钱去的,怕什么,有上帝照着,彪悍的人生不需要解释.

新年已经来到,switchfoot讲"this is a new year and another fight",希望下一次Long Now Fundation的clock响得早一点,最多9次之后我们可以见到那布谷鸟的来到,那是一只不死鸟之火凤凰吗?如果你是hacker你应该明白Shawn在讲什么.

The list is below,which I posted threads on solidot.org:
U2主唱Bono获得诺贝尔和平大使
*G*oogl*e*是天网
大胡子RMS 中国行
避免毁灭性的妥协--RMS
禁止同性婚姻的加州8号提案被通过
10项最伟大的hacks
世界上最小的具有人类特点的机器人
康奈尔大学FPGA课程2008上线了
视频游戏锻造你的创造性
blogspot再次解封?

宽窄巷子 China Lane,Chengdu


my wife

hungry,dude?


I lived near by this street for 1 year when I was a kid.


The centre of chengdu city天府广场


in facto,I always thought that vampire city is here


Happy New Year!This is a New battleField!

btw:happy is yuppie word.

Thursday, November 13, 2008

Faith,Suffering and Victory

Suffering come around my life when I accepted Lord Jesus Christ.Why?There is a good sentence could encourging your mind in old hebrew saying (הכל לטובה) and the right pronunciation is "ha-kol le-to-va".It's means that everything will work out in the end in english.You have to suffering while you are trying to build your faith.But your life definitely gonna be changed after you accepted Lord which means D-Day.The V-Day is the New Zion that we can thinking things that cant think which beyond our rational mind.

Some Christians always tell their friends about they guys life are good and no suffering,just because of they guys accepted Lord.This is not good.They guys talk about it but not by Bible "And he that taketh not his cross, and followeth after me, is not worthy of me.Matt 10:38".

I began to interest myself in Eestern Orthodox Theology recently.Orthodox theology also emphases that suffering is neccessary if you want to build a reformed faith.On the other hand,hum..about my personal experirence.The concept of vampyre(probably people usually to say "vampire") is a little bit of mystery about dark art.ok,forget it!

btw:this girl's body painting is about Linux.It's cool,right?about Linux User Group,we need girls like this:

Tuesday, September 09, 2008

GNU is 25 years old!

A friend of mine who loved free software with enthusiasm,he told me about Freedom Fry — "Happy birthday to GNU".Thank to RMS and punk rock guys who contributed to Free software community!

With keyborad in our fingers and design in our hearts!And in the words of Shawn the R0ck:"We roll tonight to the keyborad bite,and for those about freedom...free software...open hardware~anything about hacking...I salute you."

Tuesday, August 05, 2008

Fallen Shawn the R0ck

I have stay with my girl(in facto,wife now) in the last 20 days.We get marriged before God.Our situation remind me a song:Walk hard.
Walk hard...hard..down life...rock-N-roll~
Walk bold...hard..thats my creed..my code......
Anyway,I have to stay alone for months.I ahhh....emotionally or mentally depressed.I dont know how to explain what i want to say......like as?dead inside?no..of course not~

PLease pray for me!!!Honestly,I need you pray!

My wife bought a book of The Art of computer Programming for me:
a fren'in slacker

my beautiful lady






I have create a google group which named of HackerFellowship.In old greece,the fellowship means a group of guys who enjoy with hacking to achive a same goal.We want to use this group promoting hacker ethic(culture,etc..but not just in computer field),algorithm,philosophy,methodology,computer science(aNd low-level stuff like as embedded system and open hardware).Welcome Hackers to join in!