hatena

<body>
*1274187457*[Mac]How do I change what is displayed in the tabs of Terminal.app?
>||
printf '\e]2;nishio\a'
||<

http://www.macosxhints.com/article.php?story=20060502160527780
http://www.macosxhints.com/article.php?story=20010522025350220

I really wanted to replace "bash" or "python2.6" displayed with "nishio" or something like that, but it turns out to be "nishio --- bash". Oh well.

In .bash_profile
<img src="http://gyazo.com/355fb082929e8a96fdf49a969cb8f58c.png">
You can also write. I guess ^[corresponds to \e and ^G corresponds to \a]. 0 or]2 or whichever, but the title has changed, so it's a mystery what it means.

*1274203895*Leverage Memo: Balthasar Gracián's Philosophy of Success&#8212;Eternal Wisdom to Improve Your Life
I was waiting for someone and flipped through Balthazar Gracián's book in a bookstore and found it interesting in various toothless ways, so I bought it on Amazon: <a href="http://www.amazon.co.jp/gp/product/4478700826?ie=UTF8 &tag=nishiohirokaz-22&linkCode=as2&camp=247&creative=7399&creativeASIN=4478700826">Balthasar Gracián's philosophy of success&#8212;eternal wisdom to improve your life</a>.

>>
It is unwise to praise people too much. It is an untruth, and it calls into question one's judgment. Excessive praise is also a form of lying.
<<
I have to be careful. I used to think that a benefit that can be given to juniors and others at low cost is praise, but I guess if it's excessive, it's the opposite and we're both dragging each other down.

>>
Ignore people's slander. It is best to respond with silence. Do not appeal to the power of the pen to clear your name. What is written will remain forever, so instead of punishing your enemies, you are helping them to keep your name. There is no revenge better than oblivion.

Do not fight with others. There are few who will fight fairly. The enemy will try to use whatever is available, even resorting to sneaky tricks that he shouldn't. He will get nothing out of it, but it will give him the slight satisfaction of getting back at you. It does him no good to do so, but it is enough for him to feel the slight satisfaction of getting back at them.

Those who wish others misfortune are annoyed when they are successful. The most ingenious punishment is to make one's success a poison for one's partner.

Do not fight what you have nothing to lose. Even if you defeat your opponent, you cannot get back what you have lost.
<<
The "power of throughness." And you shouldn't fight someone anonymous who has nothing to lose. You should use the effort of fighting to build up your own accomplishments.

Unorganized leverage memo below:.

<hr>
Stubborn people are terribly ignorant and therefore refute good arguments and fight without regard for their own interests.

It is common for jealousy to exclude others. Jealousy finds fault with everything good. It is satisfied if it comforts itself. It deflects jealousy by deliberately acting carelessly (not thoughtlessly).

It is admirable to be admired, but it is more important to be loved. The favor of others depends on the favor we give them.

A wise person treats everyone with respect. A wise man treats everyone with respect because he sees the good in everyone. A fool despises everyone. This is because of ignorance.

Even a man who is called a great man has flaws. It was not his faults that made him famous. But people don't understand that. They try to imitate even his flaws by flattering him. What is overlooked in the case of a great man is disliked as a flaw in the case of an ordinary man.

Match the other person. For everyone likes those who are like themselves.

Bad publicity spreads fast. Preventing a single rumor is ten times easier than trying to clear your name later.

It is a blessing to have someone who competes with you and tries to beat you. It is a recognition of our value.

If you want to speak well, you must be brief. A good story is made better by brevity. A boring story is not so bad if it is brief. Don't bore your audience with your story. This is especially true if you are talking to top-notch people. They are extremely busy.

Do not talk about yourself. It will inevitably lead to bragging or self-deprecation. It is also unwise to talk about the people present. You will end up either flattering or bad-mouthing them.

If you complain, you will be unpopular. If you complain, people will not feel sorry for you. Complaining will lead to new complaints. It is much wiser to praise the kindness you have received in public.

If you disagree with everything, you are considered a foolish and nagging person. Finding grounds for opposition is something only a clever person can do, but a stubborn person is a fool.

A good person can see everything with an open mind.

Becoming authentic as a human being is the true path to fame, and the only shortcut to this is to strive to improve one's humanity.

No matter how close you are to someone, there are certain courtesies that should be observed. Even friends keep a secret or two. Even sons do not tell their fathers everything.

To blatantly doubt what they say is to belittle them.

Liars lick double suffering. Not only can he not trust people, he cannot be trusted by them. A wise man suspends judgment for a moment on whatever he hears.

To be depended on by others, it is important not to fulfill all their needs. Expectations linger in the mind for a long time, but appreciation is quickly forgotten. To maintain dependence on others, you must constantly make yourself dependent on them and never fully satisfy their demands.

The best way to make people angry is to refute what they say. If you lose yourself in anger, your true feelings will leak out. Try to carefully refute what they say. Then they will tell you more details to clear your doubts.

It's okay to be teased, but don't make fun. Nothing requires more care and technique than a joke.

People who are only pretending soon run out of things to say. If not moistened by the fountain of knowledge that continually overflows, words will run dry.

Don't be a lover of flaws. Everyone has flaws, but you should not become attached to those flaws. No matter how attached you are to them, you should lose those flaws.

Wise words show clarity of mind and righteous deeds show integrity of heart. These two are the proof of a true human being. Speak with reason and conduct yourself in a manner that will be respected.

Never being angry is not a virtue. When you should be angry, you are angry. If the scarecrow does nothing, the little bird is a fool. Only a fool is a fool who smiles and smiles.

Watch your mouth. Words are beasts. Once unleashed, it is difficult to bring them back.

Know your greatest shortcoming. Pay as much attention to it yourself as you do to those who condemn you for it. And overcome them.

Few words are the mark of the gifted. Silence comes from self-control. The silent one is the true winner. You must do what you do for those to whom you reveal your innermost feelings. The more people you have to deal with, the heavier the burden becomes.

Aim for perfection as a human being. No one is born in a state of perfection.

When starting something you don't know, take the surest path. You won't be called original, but you will be called solid. Taking risks without knowing anything is a path to ruin. v.s. You have to be first. Other things being equal, the advantage of the first to act is unassailable. The extraordinary person makes a name for himself by devising new means. But he must proceed with prudence and safety in his adventures.

Some people have a hard time making up their minds and need the encouragement of others. Often it is not that they are unsure of their decisions, but that they lack the ability to make them.

Don't be at heart with your own negligence. If you do something foolish, at first it can be dismissed as carelessness. If you keep on doing stupid things, you will be considered a real fool.

There is nothing more harmful than a stubborn person. It is a sign that things are not seen correctly.

The trick to holding on to expectations is to add and subtract strength, to make incremental progress toward success, with small increments of knowledge.

No matter how talented you are, you should not turn your nose up at it. You should be satisfied with a job well done, and leave it to others to say this or that.

Some people in this world have quirky hobbies. They dabble in things that intelligent people wouldn't even look at. Anything as long as it is eccentric. They make a name for themselves in the world, but they do not gain much in the way of fame or popularity, just a source of ridicule.

The ability to make choices determines your life.

It's about absorbing and storing a lot from a lot of people. You can speak the opinions of many as your own. You will be honored as a wise man because of the sweat that others have shed.

A fool tries to do everything in a hurry and fails at obstacles. The wise man fails because he hesitates and is inefficient. Quickness is the mother of happiness. Hurry slowly.

Don't put everything on the line for one chance.

People spend most of their time gathering information. They trust others because the knowledge they can obtain on their own is slight. But the truth itself never reaches our ears. Emotions inevitably cling to us. Keep an eye out for falsehoods and contradictions in the stories.

In this world, only the completed will be noticed, and only the successful will retain their fame for a long time. Once you start something, finish it. If something is worth doing, it must be worth accomplishing. If it is not worth it, why set out to do it? Don't just track your prey, finish it.

It is not the fool who does foolish things; it is the fool who cannot hide his foolishness. We all make mistakes, but the wise man hides them. A fool speaks up about even the mistakes he might make.

A fool is stubborn, and a stubborn one is a fool. The more prone to error in judgment, the more adamant they are in their own opinions. Even when you think you are right, give in. You will eventually know which is right. Your profundity will be admired.

Do not follow in the footsteps of a superior performer. It takes twice as much effort just to do the same job as the predecessor.

Never be overconfident in your abilities. Hope for the best, but always assume the worst. Aim just a little higher. Never set an unreachable goal.

Be a bigger person than your post demands.

Do not outsmart your superiors. Those who are above you smile at those who help you, but are cold toward those who try to overtake you.

Reward the meritorious in time.

Give rewards for work early. If the reward is given in advance, it creates a sense of obligation to do the work. However, if you give the reward to people of low character in advance, they will be happy to slack off.

All the honor of success is given to those on top. Just as the blame for failure is concentrated on those above. Choose your subordinates carefully.

Associate with those that have much to learn. You will gain sophistication and culture through conversation with your friends.

The fact that your friends have expectations of you means that you are worth it. In this world, you either live with your friends or you fight your enemies. Make friends one by one, one by two. It doesn't have to be your best friend, it can even be something that adores you. If you choose well, you will have some friends left who are worthy of your trust.

Don't get mixed up with fools by associating with them. It is a fool who cannot tell a fool from a fool. It is even more foolish to associate with a fool when you know he is a fool.

Do not be perceived as someone who is unapproachable. There are times when we need the advice of others because we are not perfect. It is a fool who does not listen to the words of others. When you are in a tight spot, no one will help you and you will go on the path of destruction.

When dating a friend, you should consider what happens when he becomes your most formidable enemy.

Do not fight with sneaky tricks. Even if you defeat your opponent, it is a defeat. Even if you and your friend have become enemies, do not use the facts you learned while you were close as a weapon.

Mirror the eyes of others with malice. Flattery is more dangerous than hate. It is in the eyes of malice that we see the truth. See it and change your faults.

Learn to control your anger. Realize that when the blood is in your head, you are upset.

When you have a conflict of opinion with someone, proceed with caution. Be modest in your opinions.

Truth can be sweet or bitter depending on how you handle it. Choose your words carefully and be careful not to lose your decorum. When giving advice to others, you can cite past cases to make them realize the truth. Do not tell the truth as it is to the top management. It is necessary to wrap it in a plastic wrap so that it can be swallowed easily.

Do not reject someone's request at the drop of a hat. What you cannot show favoritism, you can make up for with politeness. Always leave some hope in the air to ease the bitterness of rejection. Never reject everything.

Don't go against what is popular. There must be something good about something that is appreciated by many and valued by all.

As you polish your inner life, pay attention to your outer appearance. The majority of people in the world are deceived by appearances. If those with outstanding talents devise ways to impress people with their talents, their reputations will be further enhanced. If you cannot see it, it is as if it did not exist.

Don't say anything unnecessary. Don't put yourself out there. Never be too much. If you go out because you are wanted, you are welcome. Don't show up when you are not invited. If you are not willing to take the initiative, you will be hated when you fail and unappreciated when you succeed.

Find and praise the beauty in others. When you see the good in one person, you will quickly notice the same in others. Be discerning and don't overlook the good things about others. Complimenting others is a great way to create a buzz. Some people do the exact opposite. They always try to find fault with others, and they always try to curry favor by bad-mouthing those who are not there.

The world values a well-timed rescue more than an all-out attack. Do not go all out. Always leave room for contingencies.

Bad luck is usually the result of folly. Nothing is more contagious than bad luck. When in doubt, stay close to wise and thoughtful people.

Know when you're not lucky. Your mind can be bright or dull depending on the day.

To live a great life, first spend time talking with the deceased. Second, talk with those with whom you live in the present. Third, talk to yourself.

Understand what your best qualities are. If you develop them, other qualities will grow.

The most important thing in life is patience. It takes a great deal of patience to meditate on the behavior of fools. Consider such a time as the perfect opportunity to practice patience.

Do not aim for popular acclaim. No thoughtful person wants the applause of the masses.

Gather excellent people around you. The benefits are astounding. Habits, hobbies, and even knowledge will become yours without you even knowing it. If you are impatient, make friends with the easy-going. Then you will become a moderate and moderate person.

Set your mind on one great person to be your goal. Compete, not imitate.

Be in the minority when you think, and be in the majority when you speak. If you listen only to what is said in public, you will not know who the wise man is. The wise man does not speak his truth, but curses in his heart and conforms his speech to the foolish masses. A wise man avoids being contradicted or having his opinions challenged. Therefore, the wise man keeps his mouth shut and refrains from speaking, revealing his heart only to a very small group of people whom he understands.

It is happiness to have nothing to hope for, but it is also unhappiness to have no hope for the future. When we reward others for their achievements, we should not completely satisfy them.

When something goes wrong, wait for it to settle down naturally. When people are upset, a poor move will only make things worse.

There are not that many problems that need to be taken seriously. It is foolish to worry seriously about things that should be left alone.

Be courteous to everyone. Those who are treated with courtesy will be welcomed with courtesy.

Avoiding danger is a courageous act.

Do not lose yourself in fury. The wily ones deliberately set traps to turn people against each other.

Values change with the times. Find out what prevails now.

Self-satisfaction is the happiness of fools.

The only thing a person can call his own is time. Everyone is given time equally. Life is precious. It is foolish to spend that time on mechanical, unchanging work, and it is foolish to struggle through work that is out of your control. Work should not be a burden, and it is even worse if we struggle with it. It will ruin your life and make you mentally ill and unable to even live.

Think daily about your goals and how to get there.

It is better not to divulge secrets to others, but if you have to, you should make sure that they do not divulge them to others.

If you are trying to get a person to change his will, it is not enough to encourage him to change his mind. Determine the pleasure that the person is seeking. Find out what is most in sync with the person's impulses.

Don't share secrets with your superiors. It is an eyesore to have those who know your true self in front of you.

Do not fall into the same misfortune out of pity for the unfortunate.

Let a good wine be drunk only in sips. The less you have of a good thing, the more valuable it becomes. Those who have tasted it to their heart's content will not be so happy the second time around. It is dangerous to give as much pleasure as one desires.

When you are still inexperienced and are ready to grow, it is good to associate with superior people. When you are ready to be recognized by the world, you should associate with ordinary people. If you are around people who play the leading role, you will be second best.

Nothing will work and everyone will not be satisfied. We should look for sacrifices to cover the mud.

The haves are satisfied and will not take the bait. The have-nots are more valuable.

When you reward people for their achievements, do it with your own hands. When we punish, it is with the hands of others.

At first, they pretend to give in and let the other person talk, pretending to have the other person's best interests in mind while looking out for their own.

People appreciate difficult stories. Intellectuals value the intelligent ones, but the average person is fine with them as long as they look lofty.

In all cases, speak according to the other person. Speak to a fool in the language of fools.

Everything is either the right path for the brave or the shortcut for the schemer. If you cannot take the right path, take the shortcut.

He who has wisdom, share it with others; he who lacks wisdom, ask others. Ask those who know what you do not know. To live, we need wisdom, whether our own or borrowed.

The wise ones are armed with a store of sophisticated and lofty knowledge.

Talent flourishes through intelligence and character. Fools neglect character and create a source of stumbling blocks.
<hr>
<iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=AAFFAA&fc1=000000&lc1=0000FF&t=nishiohirokaz-22&o=9&p=8&l=as1&m=amazon&f=ifr&md=1X69VDGQCMF7Z30FM082&asins=4478700826" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe><iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=AAFFAA&fc1=000000&lc1=0000FF&t=nishiohirokaz-22&o=9&p=8&l=as1&m=amazon&f=ifr&md=1X69VDGQCMF7Z30FM082&asins=4887595166" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe><iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=AAFFAA&fc1=000000&lc1=0000FF&t=nishiohirokaz-22&o=9&p=8&l=as1&m=amazon&f=ifr&md=1X69VDGQCMF7Z30FM082&asins=4766702387" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>

*1274208344*[Haskell]Continued yesterday.
I'm sleepy, but I must leave you with this.
This issue from yesterday: <a href='http://d.hatena.ne.jp/nishiohirokazu/20100517/1274105783'>... is a rigid type variable bound by ... </a>
It seemed like the right way to solve the problem, like using OCaml's module system in this article. <a href='http://itpro.nikkeibp.co.jp//article/COLUMN/20070116/258746/'>6th Edition OCaml's "Module System" - Recommendations for Mathematical Scientific Bug Eradication Methodology: ITpro</a>.
<a href='http://www.sampou.org/haskell/tutorial-j/modules.html'>A Gentle Introduction to Haskell: Modules</a> also has an example of modules making ADT in Haskell.
I didn't know how to tie T3Game and T3Play together, so I had to newtype them separately, and Play a => caused a problem that was too broad, but I thought I could just type Game and Play in the T3 module. This was the answer to "the same need can be solved in a different way". Maybe. I'm sleepy, so I'll implement it tomorrow night.
</body>

Hatena Diary 2010-05-18

This page is auto-translated from /nishio/Hatena2010-05-18 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.