defexp(self):ifself.has_next(1):ifself.get(1)=='=':returnself.assignment()elifself.get()=='if':returnself.condition()...defcondition(self):self.inc()v=self.ltop()ifself.get()!='{':self.error('exp error : no {')self.inc()ifv>0:v=self.exp_list()else:self.goto_next_block()ifself.get()!='}':self.error('exp error : not }')self.inc()ifself.has_next()andself.get()=='else':self.inc()ifself.get()!='{':self.error('exp error : no {')self.inc()ifv<=0:v=self.exp_list()else:self.goto_next_block()ifself.get()!='}':self.error('exp error : not }')self.inc()returnvdefgoto_next_block(self):count=1whileself.has_next():ifself.get()=='}':count-=1ifcount<=0:breakelifself.get()=='{':count+=1self.inc()
defloop(self):self.inc()p=self.pwhileTrue:v=self.ltop()ifself.get()!='{':self.error('exp error : no {')self.inc()ifv>0:v=self.exp_list()else:self.goto_next_block()ifself.get()!='}':self.error('exp error : not }')self.inc()ifv<=0:breakelse:self.p=preturnv
classFunc():passdeffunction(self):func=Func()self.inc()name=self.get()ifnotself.issymbol(name):self.error('function error name : %s'%name)self.inc()func.name=nameifself.get()!='(':self.error('function error not (')self.inc()func.arg_names=self.function_args_names()ifself.get()!=')':self.error('function error not )')self.inc()ifself.get()!='{':self.error('function error not {')self.inc()func.p=self.pfunc.ls=self.lsself.goto_next_block()ifself.get()!='}':self.error('function error not }')self.inc()self.env.set_value(func.name,func)return0
defl0(self):g=self.get()...elif(self.has_next(2)andself.issymbol(g)andself.get(1)=='('):func=self.env.get_value(g)self.inc()self.inc()args=self.function_args()ifnotself.get()==')':self.error('l0 function call error')self.inc()returnself.function_call(func,args)deffunction_call(self,func,args):env=Env(self.env)forname,vinzip(func.arg_names,args):env.set_value(name,v)self.push_p(env,func.p,func.ls)v=self.exp_list()returnvdefpush_p(self,env,p,ls):self.env=envself.pre_p=self.pself.p=pself.pre_ls=self.lsself.ls=lsdefpop_p(self):ifself.env.parent==None:self.error('pop_p: no parent for env!')self.env=self.env.parentself.p=self.pre_pself.ls=self.pre_ls
hello everyone, today I will introduce you an new kind of science
fiction, we call it “兔子流” in Chinese, translate as “rabbit like”.
what is “兔子流”?
In the ancient old days, a writer, name as “小学生”, translate as
“schoolchildren”, he write a fiction, name as “兔子尾巴”, and with this
characteristic:
main character(young adult male) have super power.
have no sense of moral.
enjoy play around the world.
what is the detail?
for AD&D fans, it is a book about a chaos evil character, how he do the
dirty things. here are some example:
he kills people for fun.
he has one or severial girls as toy.
enjoy the life of doing whatever he wants, if he like something,
just take it.
have sick sense of humor and “moral”, he thinks he is doing
something good which actually really bad, such as kill raped girl
only because he think the girl will have a bad life in the future.
he make social experiment. for maintaining good traffic condition,
he make laws that driver can hit anything on the road… even the
kid.
no friend, no family, no strong feeling except fearing of death.
examples
here are some fiction belows to “兔子流”, and you can google them,
because it is so evil that no static links I can provide:
兔子尾巴
人民公敌
我无恶不作
兔子流屠龙纪要
conclusion
“兔子流” is one of the extrime fiction types I enjoy very much, easy to
read, and have more fun. currently no new fiction is out, I hope in the
future there can be more.
If one person knows how he spend his life, he will be in shock:
he spent 8 hours a day at work, only 1-2 hours (even less!) were for the
jobs really metters. and he lost almost all the time after work: playing
game, watch TV, surfing the internet. and so this is a day. a day
without perception, a day without plan, and it all coursed by a man
without knowning what he is doing.
most of us is this man. is is sad. and on the opposite, some great
people have causion, they know what they what to, and knows it so well
that for every minute (or at least when he is planning to do something),
he can focus on the important things. by doing this, they have better
lifes.
so how could we be one of those “great people”? are there anything
magical? no. there are some simple rules:
rule 1: plan before you start.
we always eager to start doing things right away, it is human nature,
our brain works this way: doing things make ourselves feel better. and
planning is hard, make ourselves feel bad. but the issue is: plannig is
hard because you don’t really know what you starts! and without knowing
the full picture may lead to failure. so make a plan, it is your road
map. without it, you will easily get lost.
rule 2: start and finish what you plans.
people controlled by their feelings. things have good part and bad part.
we always lost the battle. we always retreat, if we don’t have faith. if
planning is like a general, analysis, judges, and make decisions, doing
things is like a soldier. not care about how target is hard to
accomplish, only concentrate on finish it.
rule 3: examine what you finished.
after finish the job, people just passing through, the job has the
feeling of pain, why not folder it, and leave it? the reason is, facing
the pain, make we do better in the future, and the job is our a
reflection of ourselves, examine it make ourselves better. so it is
important.
those are the simple rules. easy to understand, hard to follow. it need
disciprine, it need will power to follow. there is no easy way, maybe
there are some tips that can make it easier, but it still need you to
face the problem.
anyway, hope you can follow it, and be a better man.