Tuesday, May 5, 2009

How to compile jython-dev under Gentoo?

Jython is an implementation of Python written in 100% Pure Java. It uses "ant" to manage the project.
Why compile jython instead of getting a pre-compile version? Oooo. I suggest that you are interested in jython and want to contribute your code to open source project. Another reason, you may install the newest jython, however, a simple solution can address this purpose.
In windows, you can easily compile the whole project with "ant" and "sun-java". But in Gentoo, something just changes the situation. Followed the Developer Guide of Jython, I install "ant" with its default USE flag:
#emerge -av ant
So this will install "bsf" and "ant-apache-bsf". All of the two packages must enable USE="python" which depends the package "jython". However, the problem comes. If you compile the source code which you check out of subversion may collide with "jython" which is installed by portage. It will complain that the namespace is collision with the library that "jython" provides.
A straightforward solution is changing the classpath, but it did work for "ant". So I try to find how the "ant" works. Good luck for me, I get it.
$export ANT_TASKS="none"
$ant
The world is beautiful again.

Friday, May 1, 2009

生活

  生活就这样继续着,学术上有Dr. Y. H.帮我把关,继续引导我正确的研究观。
  其他实践的内容我仍然要继续学习的态度,学很多方面的,软件架构的思想以及项目管理的经验,好多好多要学习。也看了很多方面的书,算做无用之用,生活就这样地继续着。
  而英语是被老板鄙视之后,奋发图强地学习,好好学吧,迟早要经历的。

Thursday, April 30, 2009

HTML Tags

How to make a blog post more beautiful? The visual editor of blogspot is very uncomfortable. So I decide to learn about HTML language. I think HTML is very simple.You can learn HTML according to some online documents.
I list some abbrev that confusing me last night. I wish it will help you.





































NamesDescription
aachor
brforced line break
dddefinition description
divgeneric language/style container
dldefinition list
dtdefinition term
hrhorizontal rule
h1~h6heading
lilist item
olordered list
pparagraph
prepreformatted text
tdtable data cell
thtable header cell
trtable row
ulunordered list

Sunday, April 19, 2009

What's new in Py3k?

Recently, I have learned the programming language--Python. The knowledge based on Core PYTHON programming, but only the version of python before 2.5 is mentioned in this book. The official site encourage people who start projects using Py3K, so it is important to learn the Py3K by myself.
Py3K is backwards incompatible Python release. I list some tips (You can find more information on http://docs.python.org/3.0/whatsnew/3.0.html):
  • Print is Function
  It is a very famous change. The print statement is replaced with function print().
  • All text is Unicode
  That means you can no longer use the prefix 'u' in string such as u"...".
  • Integers
  1. long type is renamed to int. So there is only one built-in type of integers.
  2. int is a real 'natural' number, because Py3K removes the limit of int type.
  3. The form of octal literals changes.
There are some syntax changes base on PEP(http://www.python.org/dev/peps/).
PEP 0328, 3102, 3104, 3107, 3109, 3132, 3134, 3110, 3113, 3115.
Some changes are already taking effects in Python 2.6. And other changes can be found in official website http://docs.python.org/3.0/whatsnew/3.0.html.
The performance of Py3K is 10% slower than Python 2.5. But I think there is room for improvement.
Generally speaking, Py3K changes a lot.

植物园










Sunday, April 12, 2009

郁金香(续)









Wednesday, April 1, 2009

郁金香