Sunday, January 21, 2007

Dog's Dying Crying

From last year july, I heard the news there's a county launched dog slaughtering, they did it just only because the rabies let some people dead! But just heard, until today.

Why dog bites? if you do not show your animus to a dog, if you do not attack a dog, dare it bite you? No! Those hydrophobic dogs already died or sent to animal salvation station because of they might hurt people. The rest dogs they are smart, even if a human kind, will not attack a bigger animal, dare you attack a elephant or lion? Keep self safe is the basic law in nature, whatever a human being or an insect, every creature obey this law.

The government can have another better way to prevent rabies, they can set up better welfare system, let the best friends of human can have a place to live. Or promote people's moral diathesis, why I say moral? Look at the original place where starts dog slaughtering, that's a county where the people's average moral diathesis is quite low, maybe someone out there wants to relieve their discontentment, so they attack dogs. Why the government choose dog slaughtering? If they corrupt a little more, the saved money is absolute enough to build pet welfare system. How can we continuely believe the government's intelligence? Human kind developed millions years, why there are so many people's intelligence is still in a lower level?

Just less than a century before, in the second world war, no one will forget those massacres on human, the racial massacres will be shameful wounds and stay in history forever, nanjing, ukraine, italian massacres, who can remember? In today, there are more massacres in Africa. What's inside human? the evil never ends.

We kill mosquitos because of the yellow fever, We kill birds because of the avian influenza, We kill civets because of SARS, We kill dogs because of rabies, when shall we start to kill human beings because of AIDS/lunacy/hepatitis/etc? Human body can take far more contagious diseases than any other creatures in the world can do. We Kill, Kill, Kill, Until nothing can be killed except ourself.

Last month, I saw a dog, and it scared not because of my look, but of I'm a human! It might just get away from those slaughterman. Today, I saw a dog dying by human's selfish, this dog, looks familiar.


Saturday, January 20, 2007

A strange problem in platforms incompatibility

I found a strange problem between .net application and 16bit application(in nt vm), my operating system is Windows XP SP2.

Case 1: I started a 16bit application under a .net application ( I didn't redirect any standard stream), the 16bit application cannot accept any input, neither output anything.
Case 2: Same as above, but I redirected all standard streams, and specify CreateNoWindow in System.Diagnostics.ProcessStartInfo, unfortrunately, this parameter cannot hide the console window. the other problems are all similar to the above.
Case 3:So I used a middle layer between .net and 16bit vm, I created a process cmd.exe in a .net application with all standard stream redirected, and under the cmd.exe, I started a 16bit sub process, another problem occured, all standard streams are all correct, but the 16bit sub process take down the whole CPU usage.

Maybe this is another evidence about the .net platform is a really *platform* and *environment*. #-_-

Sunday, January 07, 2007

I'm back

The optical cables in the sea ground have broken due to the earth quake in taiwan. These time I cannot access blogger.com #- -
And a interesting stuff is that the day the quake happened, is the birthday of the leader of new China. We made a joke Chairman Mao attacked Taiwan for they forgot who they are and who they were.
A teacher asked me to live in lab, I'm not interesting, it wont be too long we will get holidays, and in this week I'll move my computer from dormity to home.

I feel my english expression ability lost too much :(

Monday, December 18, 2006

Verizon

I'm listening to a audio on Youtube. the client explained detailly twenty minutes, the Verizon still cannot understand the differences between 0.002 cents and 0.002 dollars.



May be the service of Verizon a makeing fun, haha.
That client's blog is http://verizonmath.blogspot.com/.
The cheque from xkcd to Verizon:


Monday, December 11, 2006

The Epic of Gilgamesh

"In those days the world teemed, the people multiplied, the world bellowed like a wild bull, and the great god was aroused by the clamor. Enlil heard the clamor and he said to the gods in council, ' The uproar of mankind is intolerable and sleep is no longer possible by reason of the babel.' So the gods agreed to exterminate mankind. Enlil did this, but Ea [Summerian Enki, god of the waters] because of his oath warned me in a dream ..., ' Tear down your house and build a boat, abandon possessions and look for life, despise worldly goods and save your soul alive. Tear down your house, I say, and build a boat. ...Then take up into the boat the seed of all living creatures...'[Utnapishtim did as he was told, and then the destruction came.]
"For six days and six nights the winds blew, torrent and tempest and flood overwhelmed the world, tempest and flood raged together like warring hosts. When the seventhday dawned the storm from the south subsided, the sea grew clam, the flood was stifled; I looked at the face of the world and there was silence, all mankind was turned to clay. The surface of the sea stretched as flat as a rooftop; I opened for land in vain, but fourteen leagues distant there appeared a mountain, and there the boat grounded; on the mountain of Nisir the boat held fast, she held fast and did not budge.... When the seventh day dawned I loosed a dove and let her go. She flew away, but finding no resting-place she returned. Then I loosed a swallow, and she flew away but finding no resting-place she returned. I loosed a raven, she saw that the waters had retreated, she ate, she flew around, she cawed, and she did not come back. Then I threw everything open to the four winds, I made a sacrifice and poured out a libation on the mountain top."

A section from Western Civilization : A Brief History , third edition page 12.

History always acts like before always, doesn't it like Noah's Ark ? And the same flood happened in china, the second dynasty Shang, for saving our home from the great flood, lord Yu contributed his life. Someone who have watched Stargate? Lord Yu is a Goa'uld in Stargate.

Monday, October 30, 2006

A Big Progress




A stupid mistake disturbed me for many days!!! Damn.
When I was trying to drawing a mesh, I've assigned a right transformation matrix, but I've forgot to restore that to the original one, that causes smaller mesh become smaller, further mesh become further #- -

Now the next step is make it support texture, and support cG interface.

What I've done for this:
  1. Flexible, extensible architecture (more percisely should be called as a framework)
  2. Full featured customed Mesh Model (.x Mesh loading, .lcbm Mesh Loading, and .lcbm persistent, .x text mesh persistent), 6000 faster than DirectX's built-in .x mesh loader
  3. Full featured camera controller
  4. DirectX UI RAD Designer (Design a DXUI is as easy as you can do in VS.NET's RAD mode)

And i've forgot to say what it is, I'm planning to use this demo, a Virtual Classroom to request another big project, Virtual School, haha, that will be pretty cool!!!

A simple pascal compiler

The subject Compiler's Principle, the professor asked me to build a simple pascal's compiler, from tokenlization to code generation, except the optimization part, to earn the full scores in experiment. and I did, that doesn't spend me too much time, all codes I wrote manually, no any connections with yacc,lex,flex,bision,antlr, and all this sorts of tools.

After all the experiments are done, I may open the source of the compiler, that's not complex, and that's a good tutorial for the beginners.

May be the professor will ask me to build a coressponding virtual machine to run the generated code. that'll be a big problem :(
_________________________________________________________________
The architecture's description (Without the instruction set):
Architecture of the Virtual Machine:

The VM is a stack-based structure, have no any general registers, all the operation are done via stack operations.
Inner registers(inaccessible in the the assembly):
Instruction Pointer Register
Return value Register
Call Stack Register
Stack Frame Register

The VM's architecture depends on two sorts of stack, one is Call Stack, element of the stack is StackFrame,
and the Stack Frame contains the second stack, the operation stack.
That's, whatevery what's in the current stack, it will not be able to affect the next invokation.


VM Context will contains:
Call Stack - Stores all stack frames, when the size is 0, the program will end.
Registers - Including the instruction pointer register, return value register
Code Segment- Points to the actual code in the memory.


Stack Frame will contains:
Procedure Configure Block - Configure the resources used by the current procedure
Instruction Pointer - Used to store temporarily IP when a new stack frame pushed into the call stack
Parameters - The caller will put the top data in the stack into this place, the number of parameters is specified by the PCB.
Data Stack - The data stack, size will be specified by the PCB
Local Variants - Same as Parameters, but it will not copy top datas in the caller's stack

The definition of return value: A running procedure, the top data in the stack will be sent to the RV register

Procedure Configure Block
Stack Configure:
maxstack n 16 bits, the maximum of stack (can be ignored in the VM, only needed while optimization and JIT generation used in high performance)
arguments n 16 bits, the count of parameters of current procedure
locals n 16bits, the count of local variants.

Friday, October 20, 2006

Good book met bad translator... ...

NVIDIA recommended four books, but only half of them are published in China.
I owned <GPU Gems> and <The Cg Tutorial>'s chinese translated version.
The <GPU Gems> have many authors, it's translators have many either. the different experiences of these different translators caused this book have many translation style, that's a big weakness of this nice book.

These days I'm hanging on the <The Cg Tutorial>, even if it's a quite old book( published in 2004), but the old cannot cover it's brilliance, the same as <GPU Gems> it's blemish is translation, many glossaries is wrong.

Wednesday, October 18, 2006

So boring... ...

Everyday facing my screen, facing my book.
Maybe I'm insane, I shouldn't spend so much time to achieve my dream, I'm wasting my youth, my life.

i'm escaping too much, but I know, it's not ready to repick my confidence.
wait to the next week, wait for my project's been accepted by school, and, take a rest?find a girlfriend? or still continue on my dream? too many issues disturbing me.

I wish one day I can think where to have dinner instead of functional programming, where to hang around with my friends instead of collision detection, where to share my emotion with my girlfriend instead of shadow volume.

no pain, no gain. hope i'm on my right way... ... fuck!
Left is my shelf in my dorm, and right picture is my bedroom (my home), haha, only thing can make me proud :(



Another Blog

This blog I've registered many months ago. but there the China Telecom had banned the blogspot's address. the monopolization always shame! Before this Blog, i got few, but maybe I don't have the interesting in blogging, they are wasted.

And these days I heard the China Telecom started to ban router, I'm angry! What the hell it's doing! Any one who wants to use internet must use single telephone line to access in, no share and no tolerate any more!