My Best Teaching Is One-on-One

一対一が僕のベスト

Of course, I team teach and do special lessons, etc.

当然、先生方と共同レッスンも、特別レッスンの指導もします。

But my best work in the classroom is after the lesson is over --
going one-on-one,
helping individual students with their assignments.

しかし、僕の一番意味あると思っている仕事は、講義が終わってから、
一対一と
個人的にその課題の勉強を応援することです。

It's kind of like with computer programs, walking the client through hands-on.
The job isn't really done until the customer is using the program.

まあ、コンピュータプログラムにすると、得意先の方に出来上がった製品を体験させるようなことと思います。
役に立たない製品はまだ製品になっていないと同様です。

Thursday, December 12, 2013

Love and Hate -- 愛と憎み

(This sort of deserves starting another blog, but if I keep doing that, I'm going to have to become a paying customer at Google. Freeloading has limits, and so does my wallet, so I'll keep it here.)
(こんな話題はまた新しいブログを作ってもいい位なんですが、またそうすると、グーグルの正確な顧客にならないといけません。居候は限界があるし、ボクの財布も限界にきているので、このブログに投稿します。)

When I was a student in the primary grades, sometimes the teachers at school and church would talk about how difficult it is to define love. I thought about it at the time and I came up with the following definition of love:
小中学生や高校生の頃、学校や教会の先生方は愛を解説する難しさを偶に取り上げたりしました。先生の話にのってよく考えたら、以下のように愛を定義できると思いました。

  • Love is constructive activities, relationships, and emotions. 愛は、建設的な活動や関係や感情です。

By extension, hate falls out pretty easily:
延長として、憎みの解説は単純に現れてきます。

  • Hate is destructive activities, relationships, and emotions. 憎みは、破滅的、破壊的活動や関係や感情になるでしょう。

Of course, that's an over-simplification, kind of like Newton's 2nd law of dynamics:
これは、やはり、力学のニュートンの2番目の法則のように、簡単すぎな解説です。

F = mA (Force is equal to the product of mass and acceleration.) (作用する力は質量と加速度の積に等しいです。)

But it's a useful basic definition. At least, it has been useful to me.
しかし利用性のある解説です。とにかく、ボクには便利な定義です。

Incidentally, when one considers that building sometimes requires tearing things down a bit, it becomes clear why love and hate don't seem to exist separately.
ところで、ものを建てるには、ものを潰す必要性が偶に出てくることについて深く考えたら、愛と憎みはどうして、まったく別々の存在にはなれないことが見えます。

Wednesday, September 18, 2013

theory of evolution -- 進化論

A friend asked me about the Church's position on evolution.
友人が教会の進化論に対しての立場について伺っています。

Actually, he asked me about shin-ka ron, 進化論、 which could be "The Theory of Evolution" or just "evolution theory". And I don't think he was any more specific than the Japanese expression.
もうちょっと詳しく言えば、「進化論」と言う言葉だけで聞かれると、科学理論の有名ものの一つである「進化論」のことか、それとも一般的に、進化することについての考え方か、どちらかがわからないのです。本人も特にどちらを考えていたかは多分自分でもはっきりしていなかったと思います。

There is an article in the Deseret News, here, from 2006, that asserts "No definitive LDS stance on evolution". It references a "BYU Evolution Packet", apparently, this. The headline isn't quite correct, but that's normal for headlines.
2006年から「末日聖徒は進化論に対して立場を特定しない」と主張する新聞記事が「デゼレトニュース」という新聞のここに掲載された。この記事は「BYU進化論知恵袋」を参照しています。おそらくこれです。ヘッドラインはちょっとハズレですが、ヘッドラインはそんなものでしょう。ちょっと外れるのは普通です。

As I type this, wikipedia has a good article, here. The trouble with wikipedia is that it changes regularly. What may be clear, succinct, and accurate today is sometimes not so clear, accurate, or succinct tomorrow.
打ち込んでいる現在の時点ではウィキペディアにはまあまあいい記事があります。ここです。ウィキペディアの短所ですが、コロコロ変わるのです。今日、明解簡潔で確実な記事は今日あっても、明日には約束がないのです。

Also, FARMS has a review of a book, here, by the two men who prepared the BYU packet, William E. Evenson and Duane E. Jeffery. (The book itself does not appear to be on-line.) And searching through Google, etc., for "BYU evolution packet" produces more interesting links, some of not much value.
またもう一つですが、 FARMS には、BYU進化論知恵袋を編集した二人のウィリアムEエヴェンソン氏とドエインEジェフリー氏が著作した本の評論文をここに掲載されている。(書物そのものは残念ながらネット上に公開していなさそう。)また、グーグルなどで「BYU evolution packet」を検索すると他の面白いリンクが出てきます。あまり価値のないのもありますけど。

The debate is interesting, and may be instructional if you avoid getting caught up in the arguments of either side.
その討論が面白くて、それぞれの議論に夢中にならなければ勉強になるかも知りません。

I need to focus on the job hunt, so I don't have time to post more than this. Even translating it is a stretch of my time. So I should summarize.
就職活動がに専念しないといけないのでこれ以上投稿できません。訳すだけでやり過ぎかも知れません。まとめておきます。

The best summary I can give is that the prophet says none of the sides in the debate has all the truth.
最も正確にまとめようと、預言者の言っていることは討論のどちら側も誰もすべての真実を占めているわけにはいけません。

And the prophets and the apostles keep telling us, let's quit arguing and keep learning truth from wherever God teaches it to us, whether through science or scripture study or friends with different opinions from ourselves. Or direct inspiration. Let's all keep learning.
その上、預言者たちも使徒たちも教えてくれているのは、論争を止めて、真理を、神様がどんなところで教えてくださるにしても、神様から学びましょう。理化学経由にしても、成分研究にしても、自分と違う意見を持つ友達によってもそうです。直接の霊感でも。学び続けましょう。

And, most importantly to this topic, whatever methods of creation were used, man is created in the image of God. We are literally God's children.
そして、この課題に一番大切なのは、どういう創造法に由るのだったとしても、人間は神様に象って作られているモノです。文字通りの神の子で在ります。

And we can repent, learn from our mistakes, turn ourselves towards God's ways, and become much better people than we have been -- We can personally evolve, so to speak.
そして、我々は悔い改めて、間違いから学んで、神の道へ向けて、以前よりはマシな人間になれるでしょう。言えば、個人的に進化できるのです。

Monday, September 9, 2013

What should we do about the NSA?

More revelations about the NSA, Bruce Schneier talks about them here.

Someone asked about it on the debian mailing list, and my knee-jerk reaction was a quote from someone at one of the British counterparts to the US intellegence agencies:
"Those that didn't know about it were gobsmacked."
(Not sure I got that accurate.) To which I added
If any of that surprises you, you haven't been paying attention.

Technology, we can work on a few things to hold them at bay for a little longer.
But keep your nose clean. Don't be a target.

Anything that must be private, keep it off the internet.

Have as few things that have to be kept private as you can.
Develop a good relationship with God, by whatever name you call That
Ultimate Entity, because that's going to be your only help in the end.

The best security is to not have anything worth attacking.

Technology can only go so far. It's always a war of attrition, which is the gaping hole in the NSA's logic in going from theory to practice, en-masse. So we can only keep them at bay for a little bit longer at any particular point in time. If you can't keep up, you're exposed.

That's the reason for going "religious".

War is always a game of going one better against the other guy until someone runs out of the will to do it again, or until someone runs out of resources. It doesn't end until somebody gives in. (That's actually one of the underlying messages of the Book of Mormon, by the way.)

New technology only adds new ways of going one better.

People who want you to pay them for making new technological weapons will argue that their technology can "beat the bad guys".

Funding development of new technology is usually a win-win, but this particular reason is all wrong, for all sorts of reasons.

In the first place, we have met the enemy and (Hi, Pogo) discovered we were looking in the mirror.

There are no bad guys, no good guys. (There's only you and I and a bunch of other people and sometimes we just disagree about something. Hi, Jim, Hi, Dave.)

Beating the bad guy is always a bad reason.

And if you admit that you may be just as bad, beating the other guy becomes an even worse reason, unless you know how to stop before someone gets seriously hurt.

In the second place, weapons are not the only or even the best use of technology. Neither is war. It's the easy use, in many cases, but that's no excuse, because of the first reason and the third, the reason I have already mentioned: It ain't gonna end until someone gives up or gives in.

In the third place, it's usually the bigger guy who gives in first. You see, the bigger you are, the more you get accustomed to the idea that there is always someone bigger than you are. You beat one enemy, and there's always going to be another. In video games, there's always the final enemy, the big boss. But there's always another video game.

In real life, there's always another bigger guy to beat.

Abraham was shown this, thousands of years ago, if you believe the LDS scripture. It's just as true now.

That brings up the fourth reason and I'll stop with reasons here: God is greater than all of us.

The only way to achieve real security is to develop a good relationship with the Ultimate Entity, as I said above.

I have to acknowledge that humans invent a lot of false gods, because they can't seem to wangle the real God. I'll also acknowledge that there is an influence, a lying influence, that runs around swaggering and claiming to be God, but is not. These are two issues you have to get around before you can start developing a relationship with the real Ultimate Entity.

But if you can get around those (and around your own desire to manipulate reality), you find that God is actually your friend.

Once you can understand that God is your friend, once you can see that God is your ultimate friend, you are no longer vulnerable to the NSA or any other artifact of man's greed.

So, what should we do about the NSA?

First things first, get your own computer in order. Then get your own house, your own life in order.

Wipe Microsofts or Apple's stuff off of it and load a free-as-in-freedom OS.

If you insist on Microsoft or Apple's stuff, think about the free-as-in-beer 3rd-party stuff you've downloaded. Any of those is one too many.

If the source code is not available for you and/or a skilled friend to look at, and if the license doesn't say you and/or your friend can modify the code, it's free-as-in-beer, not free-as-in-freedom.

Understand the difference between free beer and freedom. Okay, that should be the first thing:

Understand the difference between free drugs and freedom.

Well, I can't tell you all the things about repentance you need to know. If you don't have a religion, or a guiding philosophy, find one. You have to start somewhere.

(I'd like to tell you about the so-called "Mormon" brand of Christianity, but you have to take your own course. You're welcome, of course, to check us out, but if that's not your first place to start, start at your own first place to start.)

Be willing to change your ideas about religion, because you are only human, and humans can get wrong ideas. (That goes for any religion or philosophy, including atheism and Mormonism and Shintoism and anything else. No magic incantations that make you suddenly "right".) We all have some wrong ideas now and then. But try to change your ideas for the better, not for the worse.

And don't assume that you have to suddenly throw it all away just because maybe you didn't understand a few things quite right before. A few steps at a time will get you further than one giant step you're too afraid to take.

Once you get connected (or reconnected) with your conscience, learn how to talk with God. Understand that there are deceiving spirits and try to avoid them, but learn how to commune with your conscience. It can tell you right and wrong.

And it can also help you know about strategic things, like whether it's really time to throw away your non-free OS and try debian or openbsd or one of the more popular ones, or one of the more freedom-oriented ones.

And it can motivate you to learn how to use passwords and user names properly. And other things about using the things you have wisely.

So, what to do about all the people who want to steal your privacy?

Don't get too excited.

Get in touch with your conscience first. Once you're in touch with your conscience, the rest comes along, a bit at a time.







Saturday, September 7, 2013

decentralization -- 集中排除

Up until last Monday, I had been using my free-loader account at dyn.com to publish my personal web server at the domain name reiisi.homedns.org. They've been changing the lineup in their free product line, which is perfectly within their rights. But, right now, I can't afford to pay even the small yearly fee for basic dynamic dns, so my personal web server is now off-line.

先週の月曜日までは、 dyn.com のボクの無料アカウントを使って reiisi.homedns.org のドメイン名で自家用のサーバーを公開していました。 dyn.com の方は、オマケの製品を調節しています。その責任と権限は当然彼らのものです。しかし、ボクは、その基本動的 dns のわずかな料金にしても、今は財布から出せないのです。そのため、ボクの個人ウェブサーバーが繋がらないままです。

For various technical reasons, I had wanted to move to a paying account years ago. But I have to feed my family.

技術上のいろんな理由で有料のアカウントに変えたかったんですが、家族は皆食べないといけません。

Why do I think it's important to have my own domain name?

どうして、自分のドメイン名が大事なのでしょう?

Decentralization.

ディセントラリゼーションです。集中排除。

A decentralized network is a more robust network. (This principle needs further discussion, but not here.)

集中排除分散化ネットワークは頑丈です。(この原則を議論したいけど、ここの今ではない。)

In the original plan for the internet, every terminal computer attached to the network was supposed to have its own host (sub-domain) name. (And its own permanent IP address, but that's another topic for another day.)

インターネットの元々の計画では、ネットワークに接続する端末コンピュータは固有のホスト名(下位ドメイン名)を割り当てられているはずです。(さらに、IP アドレスも持っているはずですが、それはまた違う日の課題です。)

So, if my provider were yahoo (It isn't.), yahoo might set me up with reiisi.yahoo-f.jp, and that would be the name of my router (and perhaps a primary computer behind my router). Other computers inside my router might be named clown.reiisi.yahoo-f.jp, merciless.reiisi.yahoo-f.jp, and nohat.reiisi.yahoo-f.jp. And I could set up mail addresses of my own, say, littleguy@reiisi.yahoo-f.jp.

(ヤフーではないけど)仮にプロバイダーがヤフーだとすると、ヤフーからは reiisi.yahoo-f.jp のドメイン名を割り当ててくれるとします。それが家のルーターのアドレスになる。(またルーターのこちら側の主コンピュータのドメイン名かも知れません。)内側のほかのコンピュータは例えば clown.reiisi.yahoo-f.jp や merciless.reiisi.yahoo-f.jp 及び nohat.reiisi.yahoo-f.jp. そして自分でEメールアドレスを割り当てるのです。例えば littleguy@reiisi.yahoo-f.jp.

This solves a whole lot of security-related problems, all by itself. If, for instance, littleguy@reiisi.yahoo-f.jp becomes a spam magnet because I gave it to an unscrupulous salesman, I no longer have to ask my ISP for a new address.

これだけでいろんなセキュリティの問題を解決します。例えば、 littleguy@reiisi.yahoo-f.jp を良心の無い営業マンに渡してしまって、要求無し営利的Eメールがどっさりと入ってくる場合は、わざわざ新しいEメールアドレスを ISP に頼む必要がない。

That's just a small example of how the current centralized mode of control makes a mess of the internet.

これはただ一つの小さい例えですが、現在のインターネットが集中型管理によってどれほど管理できなくなっているかが見えてくると思います。

It's time to change.

改革の時期です。

Tuesday, August 27, 2013

grokked

PJ, at groklaw, recently realized that the internet, in its present form, is just too tempting for the control freaks who tend to gravitate to the tops of bureaucracies. And that the technology ultimately does not change the traceability of communication.

So, rather than risk receiving a warrant from bureaucrats on out of control fishing expeditions, she has decided to shutter Groklaw, apparently on the theory that operating it is tantamount to operating a honeypot for an out the out-of-control government that the US government has become. (Reference the NSA "revelations".)

In order to avoid argument, she locked comments on her final post. So, instead, the loyal readers are commenting via the previous post.

Many of those who have participated in her forum feel that shuttering it is unavoidable.

As a Christian who believes the Revelation of John, I see the end game. Truth will cover the earth as a flood, but that kind of leaves much of what we have assumed about privacy washed away in the flood. Someday, I'd like to write something about that, but rant like my blog posts will not do.

Why am I posting this here? I'm not sure.

Freedom has never come free. I've been trying to talk directly about that on my free-is-not-free blog. But it seems like I am talking around the real problems, after all. Not directly, at all. I've mentioned some relevant issues in my defining computers blog and pages, as well. (Security is not privacy or freedom, by the way.)

My solution to PJ's conundrum would be to just add a clause in the groklaw's site policies -- that the site operators would try to avoid cooperating with the tyrants in government, but that there are no promises.

That's the most that can be promised, anyway. We have no right to demand that another should put their lives on the line in some pre-programmed way, and that's what making any more promises than that would encompass.

If PJ cannot be comfortable with that, shuttering the site may be the best part of wisdom on her part. We can't judge that.

As far as making technology that would circumvent the attempts of the various governments to use a news forum for their own spying, the only way to make that kind of thing work is to set up a irregular, large volume wash of what is essentially identical to the spam we hate so much, and use steganography to hide the posts in the flow.

And if we could, what would we have done? Nameless voices are, in the end, nameless.

Nameless is good when you are doing what Jesus called "alms". In political movements, temporary anonymity helps keep movements alive in a hostile society, but the movers have to be ready for when the anonymity is inevitably broken. This is part of freedom, the willingness to take a stand in your own name on important issues. That's what redeems Snowden's behavior most of all.

Conclusion? I have none to offer beyond this. Setting up a temporary anonymous zone so that sites like Groklaw can continue is a bit beyond our current technological context.

What the wash looks like, by the way, is essentially pushing the internet to its correct form, fully distributed, every end-user running his or her or their own local servers -- e-mail, news, editorial (blog), etc. Beyond that, I don't have time to describe now, other than pointing to steganography.

We do have to break our current dependence on centralized certification and centralized software distribution. Proprietary IP does not mix well into this. (Go away, Microsoft, Apple, Oracle, Intel, and all your ilk.) This is a technical requirement.

Saturday, August 17, 2013

love passion power and Chicago

My wife put on her Best of Chicago album (the more recent one) again just now. She's been listening to it a lot lately, I'm not sure why.

I'm a fan of Chicago. I have several albums stored somewhere across the Pacific, about half of their albums from Chicago Transit Authority to around Chicago XI. Some are rotting on tape, unfortunately.

To me, Chicago VII was the pinnacle of their work, and I still think so. Unfortunately, they backed away from their experiments in fusion jazz after that. Mixed with their high-fructose pop output, I'd have liked them to put out some more albums with the heavy fusion influence shown in VII. (Maybe it would have been hard for them to do that without Terry Kath -- the chemistry of a group changes when a member is taken away like that.)

(I notice that Stone of Sisyphus was released around five years ago while I wasn't looking.)

So we're listening to Chicago, somewhere before the tune "Stay the Night" in the play order, and I'm thinking that Chicago, except for V and VII, is pretty much heavy metal for non-metalheads. Metal adapted to pop.

But "Stay the Night" begs analysis. It came out while I was at BYU, and I and most of my friends listened to it, even danced to it, without really thinking too deeply about the lyrics. This was about a boy's passion for a girl, that was all.

I mean, I understood the irony in Heart's "Dreamboat Annie" when I was in High School. (Love that album. And wisdom and experience tell me so many more things when I listen to it now.) But it was several years later, when I met my cousin's sometimes boyfriend that she just couldn't leave behind, before I started really facing the irony that "Stay the Night" is so representative of.

Read the lyrics sometime. It's definitely youthful passion, definitely not the higher emotions of love. Watch the video with Debby Evans. It's amusing, very juvenile, very instructive of the value of juvenile passion.
I don't want you to misunderstand me

(But does he want to take the time to understand her?)
I just want to say what's on my mind
No need to hit me with an attitude
Because I haven't got the time
(No time? What's so much more important than understanding?)

And so forth. When passion remains untempered, when nothing gets in the way, something is lost.

I still enjoy the music, and the way it underscores the melodramatic lyrics. It seems I enjoy popular music now for the irony as much as I used to for the passion.

Friday, August 9, 2013

subconscious vs. unconscious vs. pre-conscious vs. ...

Went to wikipedia to look for a Japanese equivalent of the subconscious mind and was rudely reminded that the argument about the existence of the unconscious elements of the mind are not at all resolved. (I knew that, why was I surprised?)

Freud talked about the unconscious and the pre-conscious.

The unconscious is the suppressed elements of the mental processes, and the preconscious is the parts which are not yet either expressed or suppressed.

And he argues that the "subconscious" is too ambiguous a term to be meaningful.

I'll give him one on that last, but I wanted him to admit that "unconscious", "preconscious" and "conscious" are also rather ambiguous classifications, not forming a true partition.

What we suppress changes from moment to moment. So does what slides in-and-out of focus.

If I wanted to make the divisions he makes, I would do it this way:
  • deliberate thought processes
  • non-deliberate thought processes
And I would note that the partition is not hard. Sometimes we intend to think a thing and sometimes we think that thing without intending to.

I would make another set of classifications, cutting across the first set, dividing by the topics they cover:
  • topics of focus
  • topics out of focus
  • suppressed topics
  • forgotten topics
The first two are clear. It's like the top of our desks; we constantly move things on and off the desk.

But the third is not just a subset of the first two. Whether we have deliberately suppressed a topic or not, the question of focus cannot be answered reliably. This may be somewhat the class Freud was intending by pre-conscious.

Forgotten topics are not just out-of-focus. They are in cold storage.

In a computer system, the first class of topics would somewhat correspond to data in cache. (Except there are hard limits to computer cache, not so much to our minds' cache.) The second class of topics would be data in high-speed store (RAM, in current systems). The fourth would be data stored on disk (or tape, etc.) in persistent store, indexed and addressable, but it takes a while to get at it.

The third would be discarded data, results that seemed, at the time, to unnecessary or even counter to the goal of solution. If a computer system is capable of bringing the discarded data back, it is data that must be regenerated, recalculated, re-indexed, etc.

This is one of the remaining differences between human cognition and mechanical reasoning -- Humans generally can, if they have enough motivation, bring suppressed topics into memory and into focus. Computer systems generally (still) require human intervention to do so.

There are at least four more classes of thoughts that need to be considered:
  • instinct
  • social consciousness
  • divine revelation
  • false revelation
Instinct, I think, will be somewhat acceptable to scientists.Social consciousness would cause some raised eyebrows, but if I talk about the patterns we build in our though processes as a result of nurture, I think the eyebrows will settle i recognition for the moment.

Revelation, of course, is off the board when it comes to scientific discussion.

Wait. I want to refine this last list:
  • internal thought processes
  • socially imposed thought processes
  • other beneficial thought processes
  • other anti-beneficial externally thought processes
This list forms yet another partition that cuts across the first two partitions. It may seem a little more acceptable to science. I am sure it is not.

Internal thought processes includes the following:
  • instinct from patterns in our genetic material, 
  • para-instinctual patterns from our existence in the pre-birth spiritual realm, 
  • habitual and other patterns from our mortal lives to the present,
  • and our own active thoughts, the ones we are most responsible for.
The first two of those include some of what is recognized as common sense.

Socially imposed thought processes include
  • trained patterns -- most of what we refer to as "common sense",
  • lessons of social propriety -- obligation and duty, etc.,
  • reactive thought processes -- analytic, semi-analytic, confirmative, etc.,
  • rebellion processes,
  • etc.
While the thought processes themselves are internal, the patterns are from outside us. In a sense, they are not exactly our own, unless we internalize them, unless we make the patterns our own. Our primary responsibility towards these patterns is what we choose to do with them.

By "other beneficial" I mean various forms of revelations from good sources -- words of warning and encouragement from angels, some of whom are mortal and some of whom are not. Also, scripture, and the more direct revelation from what the Christians call the Holy Spirit.

Mortal angels would include friends and family in their positive moments, some church members who influence us for good, influential teachers, and so forth. They may not be official messengers from God, but they do bring us good and helpful things to think about, and the confirmative feelings by which we generally recognize that there is something worth listening to, checking, pursuing.

I'm not going to talk about immortal angels because God will do what He will do, and there really is not much use talking about that. For the same reasons these sorts of things are not subject to scientific inquiry, they are not generally of much use except to those who receive them.

But I will say this, they are more common than we generally recognize. We have a certain blindness.

The Holy Spirit is, among other things, the primary source of our conscience. I won't say much about this either, except that if you believe there is anything true and good, it is by the power of the Holy Spirit that you believe it. I'm not saying you are a closet Christian, I'm saying that the Holy Spirit is so universal, so ubiquitous. And we often can't see the forest for the trees.

If we believe in love and truth and good, the influence that gives us the confidence to believe is what I call the Holy Spirit. If we find ourselves questioning the errors and excesses of certain religionists, partisans, politicalists, charismats, it may be the same Holy Spirit telling us that they've gone too far.

Anti-beneficial external influences? Well, yes, I did mean to talk about the adversary of our souls and those who follow him. Father of lies -- 99% truth so as to pervert it all and undo it all with that 1% lie.

But refraining from talking about the devil is a good idea, anyway. Much more beneficial to talk about good things and good influences and our relationships to them.

Saturday, August 3, 2013

powerful programming languages -- php5 and suhosin

PHP5 is pretty powerful.

Powerful languages have a problem. They allow things to happen that the language designer hasn't even imagined. Some of those things sometimes allow mean-spirited sorts of people to attack servers, steal credit card numbers, and make general malicious mischief.

So PHP version 5.3 needed a band-aid, to help the naive web programmer avoid blowing him/herself away with good intentions poorly implemented. The band-aid was called "suhosin".

Unfortunately, the three German engineers who developed suhosin seem to have gotten busy doing other things, according to this post at Arch Linux. And the current suhosin doesn't match the current version of php5. [update: If you fail to follow all of the links Pierre provides, at least look at this mailing list post from one of suhosin's developers.]

I had been thinking about brushing up my php skills, so I had installed php. With the upgrade to 5.4 in Debian wheezy, suhosin doesn't load. Instead, it fills my error log files with complaints of incompatibility.

So I checked, and nothing else gets removed when I remove php5. So I removed it.

When I really need it again, I'll install it again. Maybe by that time the guys who run php will have folded all of the functionality of suhosin into the language itself.

But this is not a solution, it's a knee-jerk reaction. More first-aid fixes that don't really do the full job.

This highlights one of the problems in software architecture: The power of a powerful language is in its expressiveness. To the more expressive a language is, the fewer limits there are to the things which can be expressed in it. But security in current practice requires setting limits. We need to give the programmer power, but we need to take power away from the end user.

There is an inherent conflict here. I mean, sure, we could go the direction taken with Java, using execution policies to tune the expressiveness available in the end-user's context, but that has its own set of traps --
  • Will some of the programmers remember to set up the policies?
  • Do the programmers understand how the policies are used to secure the system?
  • Does the policy end up preventing the end user from doing important things?
It is interesting that there are parallel issues in law, regulation, and government policy.
  • Do legislators understand the interaction with law and regulation and the potentials for abusing the laws and regulations?
  • How does the government protect the people's security without inducing more chances for treacherous abuse?
  • And how can a government make the people secure without excessively limiting their freedoms? 
Systems have complicated interactions. The more complicated the systems are, the more loopholes (ergo, vulnerabilities) they have. This is a known problem with systems, and it applies as much to computer systems as it does to bureaucracies.

The answer of the US Constitution was "Use checks and balances and keep it simple." Both of these principles have been long ago set aside as legislators and special interest groups press for responsive government.

Is there something wrong here?

Can we as general members of society learn enough about systems to pare back the legal kruft that is currently overburdening (and overly burdening) society (and is a primary cause of budget problems, not to mention the bureaucratic abuses that show every sign of continuing to increase)?

Can these principles be applied to computer systems? If they can, how?

I think they can, but I'm not sure anyone reading this would understand. (I'm not intending to insult. No one has time to study every necessary subject, and this particular subject has been advertised by certain special interest groups as unnecessary.)

And it seems no surprise to me that the current trends in systems design seem to be going towards increasing complexity in the provided systems, which parallels the political atmosphere, and is exactly not the solution. Precisely what we should not be doing.

We put power in the end users' hands (quite literally with the new crop of portable information devices that match the supercomputers of a few years ago). We spend a lot of money, time, and effort putting power in the end users' hands. Then we spend a lot of money, time, and effort trying to limit that power to some definition of "right" uses. We are
  • Not trying to teach the end user how to use the power wisely. 
  • Not trying to show the end user how to get around the traps.
  • Not trying to give the end user more power to do right things.
  • Not really trying to give the user solutions, just things that we can sell as if they were solutions
We (that is, the primary movers of the industry) don't want to teach the end user anything that would allow him or her to practice the intellectual property that the system designers' (investors and accountants) think should be making profits for the providers.

We can't understand everything the end user wants to do, and we can't predict what would be "safe" or "dangerous" beyond making crude and overly broad walls. (We, as an industry, try to make straitjackets, really, but we fortunately tend to fail to get the user into the straitjackets -- Fortunately, indeed, since success would make us unable to even consider band-aids like suhosin.)

And we (the primary movers of the industry) don't want to believe that end users could really want to use our systems, any more than we want to believe that the end user could understand new and appropriate ways to use our systems.

We don't want to believe that the end users might be smarter than the system designers about what the end user wants to do with the systems.

And yet, it is the only the smart end user that can safely use the system.

Uhm, no, I don't have a happy solution to the problems yet, at least no quick, straightforward patches. The only real solution I can see is not going to be quick, not going to contribute immediately to anyone's bottom line of monetary profit, not going to be considered acceptable to any of the current crop of investors, managers, and accountants.

Tuesday, July 30, 2013

Optimizing all the value out of your bottom line

Money.

I have a bunch of projects I could push forward if I had money. Last time I looked at Kickstarter, I would need a US credit card to try to get them funded there. I've looked at some of the other crowdfunding sites, and I don't really care for the models they use.

It's not just money I need. Publicity on Kickstarter or somewhere similar could help me reach people who might be interesting in working with me on those projects.

It's the connections I develop while getting the money the dull way that is the real value. The portfolio I develop is also useful, but it's the human relationships and the value that people have for each other, the value we generate when we work together that is the real value. Not money.

Money is cheap.

Money.

If money is what you want, I hear it's not hard to get. (And I think I have reason to believe it.) But when you go that way, you get money without meaning.

Money saves no one. I could suppose I could win a big lottery, but then I would have to spend a lot of time every day for several months just getting the money put away where the combination of US and Japanese taxes wouldn't have me owing more than I won.

Sure, that would eventually settle down, and I would be able to focus on my projects. And, for all that I could get to work, I still wouldn't have that network of like-minded people to help. Maybe I could get such a network if I had money. But there is the other possibility of just getting people who want the money clogging up my networks.

People who just want money also clog up companies, make them (appear to be) inefficient.

Companies big and small have focused on optimizing their processes, to build their bottom line. But what do they measure that bottom line in?

Money.

How often it is that a company gets a big hit on a product and then refocuses itself around the money the hit product brings in.

Focuses on the product, in theory, but more on the money. Gotta build that bottom line.

Then they optimize the company around the bottom line -- around the product, first, but around the money most of all.

And then the product begins to lose popularity. And the company finds it has money and no meaning. And no way to survive.

And then the company goes running to the government and cries,
SAVE US FROM OURSELVES!!!
Make a law that requires people to use our product!!!!

'Cause we were stupid and now we don't know anything but the product that people don't buy any more!!!

Copyright! Patent! Something has to work!!!!

We don't know how to make meaning any more!!!
If only companies could really see that this is what they are saying when the run crying to the government. Then they might not optimize all the meaning out of their operations so that they have to be saved from themselves.

Well, let's back up and look at the optimization process. How does that optimization work? How does it rob the company of meaning?

Well, there are two broad facets to the optimization. Two kinds of deadwood that companies like to optimize out of their organizations. Two kinds of employees that don't appear to contribute to the bottom line.

You know the one kind, no one remembers how he got hired. He never does anything. Every time you see him, he's surfing the web. Or talking at the water cooler. Or sleeping on company time.

He comes in late, leaves early. Ask him to do something, and it's a crap-shoot whether what he does, if anything, will be useful. In fact, sometimes when you involve him in your project, he does something that so much gets in the way that you'd have preferred that he had done nothing.

Clearly deadwood. Should be fired.

Well, you have to realize that, when you put that guy on the street, unless he finds something to motivate him, he goes on welfare. Then what the company is no longer paying out in wages, it is now paying in taxes.

(One problem with using inflation -- public debt -- as a way to hide future taxes, we don't see an immediate tax burden in putting such employees on the street.)

Then there's the other type. Faded stars. Still useful. Maybe they were involved in the hit product that is the company's (current) bread-and-butter. But they seem to have lost their way. Anyway, they are going a different direction from the rest of the company. They come in when they want, do what they want, what they contribute to projects is usually hard enough to work with that you wish they had done nothing.

Clearly deadwood. Should be given the opportunity to work elsewhere.

The problem is, intellectual property is a mirage. What the mirage hides is intellectual capital. Intellectual capital is in the brains of the faded stars. Maybe it's kinder to let them go elsewhere, but when you do so, a big chunk of the company's intellectual capital goes with them. And it's that intellectual capital that the company is going to need when the hit product begins to fail.

Let me tell you a secret: These two guys are one-and-the-same. You just didn't know enough about him when I described him to you the first time.

The problem is in your vision. In fact, you should go look in the mirror when you criticize the deadwood at your company, because one of these days, the deadwood is going to be you.

It's necessary to fire people or let them move on sometimes, but we should be careful about our reasons. It's even necessary to let go of entire companies.

But if our bottom line is money, the filter is going to be set to discard all meaning and all value. And it's no surprise when the company fails with its hit product. And no surprise when the surrounding society seems to have trouble maintaining enough value to survive as companies burn brightly and then burn out.



Friday, July 5, 2013

culpability for promoting bad tech

I've been wasting time on groklaw again.

This is about weev's problem, which I blogged about several months ago.

It's not a little problem, and it's not just weev's problem.

AT&T put an open interface to their database of iPhone customers' e-mail addresses. The primary key was essentially the serial number of the phone's radio modem circuit. This was negligent, and, with the current privacy laws, it was criminally negligent. Comparing database interfaces to doors, this is like failing to put a door in the doorway. It must be expected that people will come and go at will.

They could have put a hash on the key in their interface. A simple one-to-one hash would be like a gate with a latch. In this case, the key in the database query (visible in the browser's URL bar) would not look like the modem's serial number, so they interested visitor would be required to think a bit to conclude that there might be a relationship between the key and the serial number.

A simple hash would still be subject to the problem with bumping the number and seeing someone else's e-mail address, but at least it would not be advertising the path in. Using the serial number directly was effectively advertising the path in. That's why it's like an entranceway without gate or door. (And no lock.)

A sparse hatch, where numbers before and after valid keys would be invalid keys, would be a latch with a cheap and easy combination lock. Simply incrementing the key would result in an invalid query instead of a customer's e-mail address. But a curious visitor might "check the doorknob" and even try a few combinations. In other words, might try a long enough sequence to determine that the key was sufficient to produce more valid addresses.

To avoid revealing addresses, AT&T would have to limit such tries from the same IP address.

A cryptologically strong hash, sufficiently sparse, would be like a stronger lock. It would take a lot more deliberate and sustained effort to find valid keys, and such a sustained effort would be a red flag in AT&T's logs. (If they bothered to look.)

AT&T failed to make any real technical measure to limit access.

weev's actions were discourteous. But the only criminal element to them is projected through a twisted interpretation of bad laws that were written without any reference to the technology involved.

AT&T is the criminal, and the prosecuting attorney are also culpable.

Now, in truth, what AT&T did with the database should not need to be considered a crime. Negligent, discourteous, inconsiderate, grounds for reconsidering whether we want to be their customer, yes. It should not be a crime.

Why is it a crime?

The "technology" behind e-mail is extremely simple. Simple, as in, without safety features. Simple, as in minimalistic controls. They were "best practices" in a context where most users were technically inclined and motivated to be courteous to fellow users. They are not even good practices in the current context, where users don't want to be bothered with technical details, where many want to depend on the computer like it's a substitute for God, and where some are all too willing to misuse the tech if they can make a profit thereby.

In some ways, it's simple like physical mail. It's easy to write any address you want on the envelope.

But it is not as good as physical mail because the envelope is basically see-through. Any admin on any server that the e-mail passes through can easily look inside.

And if you open the envelope and change the contents, there is no evidence of the change.

And, while there are words on the envelope and inside it, those words are not like handwritten words, or even like typewritten words. There is no evidence of who put those words there when.

If it says it's from your Aunt Sharon, it's hard to tell whether it really is unless you call her up and ask her.

You can recognize her voice on the phone. If you got a physical letter from her, you probably know what her handwriting looks like. You can sort of tell a little by the words and expressions used, but there are far fewer clues about identity in e-mail.

There is some external evidence in the form of records on servers, but that is pretty weak evidence, and not visible to the ordinary user.

If your mail service provider encrypts their storage, the envelope and the contents become opaque, but only as long as the message is stored. Once the message is transmitted, it is visible to anyone and everyone who bothers to look during transit.

There is also the problem of volume. e-mail is much easier and cheaper to generate in excessive volume than ordinary junk mail.

End user encryption can mitigate some of these disadvantages to a certain degree, but there are no current common ways to use encryption.

When Microsoft incorporated e-mail into MSWindows95's internet application suite, they were making technology for the technically inclined to people who are not interested in technical details. They put an easy user interface on it and allowed ordinary users to do themselves damage with the tech.

They have several times offered to half-fix the technology, but their offerings are woefully inadequate and invariably make critical use of technical measures that Microsoft can control through patents and other means. Their solutions are always going to cement their effective monopoly position, if we allow them to have their way.

AT&T is culpable for putting a bad database interface on the web for all their iPhone customers. Microsoft is culpable for selling us technology that is not really appropriate for ordinary users in ordinary use.

We are culpable for continuing to use it.

I have some ideas about ways to mitigate the problems with e-mail, but it's a lot easier for me to just dream about re-booting the computer industry with good basic technology. So I waste my time dreaming instead of contributing to the solution. Mea culpa.

Someday.

Someday.

Thursday, June 27, 2013

solved grub_divmod64_full not found on upgrading squeeze to wheezy

I have been moving my desktower from Debian 6 stable (Squeeze) to Debian 7 stable (Wheezy) using the apt-get method.

I keep two OSses installed, one of which is primarily to hold the boot manager and as a rescue system when I botch the other. These are on two different disks and, in fact, two different disk controllers.

Grub thinks I must have RAID since I have an external controller that is known for being used as a cheap RAID controller. So it continually messes up its guesses about which drive is which. So, affter I upgraded the rescue/boot system, it tried to set itself up to boot that system from (hd2), but it should have been trying to set itself up to boot from (hd0).

Now, you'd think I could edit the boot command in grub and go, but, no. The arrangement of three hard disks spread across two controllers causes grub to wander off into never-neverland.

The upshot of all this is that it gave me this message:
symbol not found: grub_divmod64_full
and dumped me into the grub rescue shell. (And induced this rant when I went looking for answers and found more questions.)

After more mucking around in the internet, I just burned a copy of the XFCE install disks for debian 7.1, booted the resulting CD, and used the included rescue functions to re-install grub.
  • (got a shell,
  • mounted the botched boot partition to /mnt or /target, 
  • edited /mnt/etc/default/grub, but did I actually change anything important?
  • returned to the install functions,
  • selected the re-write grub option in the CD,
  • re-booted.)
 And that fixed that.

Wednesday, June 26, 2013

grub rescue surprise for MSWindows users

Okay, so you got a laptop or PC from somewhere, cheap, or even free.

It has the entry-level MSWindows OS on it.

It has a moderately large hard disk, say 320 MB. But when you look at the hard disk's properties, it says that there is a nice chunk of it that seems not to be in use. 16 MB or even 100 MB.

And you think, "Huh? I want more space for my movies and songs!" And you format that space. And suddenly part of your laptop is no longer working. Maybe you can't even boot it at all.

You are not alone.

To understand the solution, you need to understand what happened.

There was probably another operating system in there, and it was hiding in the partition you thought would be great to use for your movies. Not just the other operating  system, but the program that lets you choose which one to boot.

So, no way to choose. No way to boot. Now what?

If you have a BIOS that is not locked down, you can boot a live CD from one of the Linux distributions. Knoppix is pretty good for this kind of thing.

You'll probably need a real-world friend to help you get the live CD and then to help you walk through the steps.

Oh, you'll need a CD or DVD drive, too.

Boot the live CD.

Launch a disk utility program. This is scary, because the one you want is also able to wipe your whole hard disk clean.

Select the hard disk.

Set the boot flag to the partition that contains the MSWindows boot programs. It will likely be the very first partition, unless the first partition was the one that was supposed to have Linux in it.

Quit the utility program.

You say, that's scary.

Okay, then here is the better solution:

Just install the OS from the live CD. Tell it to use the partition that you erased. The installer will most likely find your MSWindows partitions and set the new boot manager up for you.

And you'll be back in business with a reboot.

I mean, seriously, the only other alternative was to buy an official, high-priced MSWIndows package and try to install that. Just as dangerous and more expensive.

Just don't erase that Linux partition again. In fact, when you have time, boot the Linux OS and see if you can see anything that makes sense. A little bit at a time, and you can be amazed at what Microsoft won't let you do.



*GRUB* ISSUE in microsoft's help forums?

Got bit by grub2 again. This time it was being dumped to the grub "rescue shell" with a
symbol not found: grub_divmod64_full
message.

Looked it up on Google. One of the hits was on Microsoft's help forums, "GRUB ISSUES". I had to go take a look.

Irony abounds.

A user has MSWindows 7 and "Linux Boss" installed on his/her laptop. (At first, I thought, some new or custom boot manager, but maybe Boss Linux?)

And the user seems unaware that a Linux OS needs its own partition, among other things. And so, when MSWIndows disk utilities tell him he has 100MB unused, he takes the message at face value and reformats the partition for MSWindows.

Thus deleting most of grub. Thus deleting his boot manager. Thus the complaint from the part of grub that remained, telling him that grub can't find itself.

The first post is a partial answer, explanation that the Linux OS got wiped, and giving a pointer to the grub project's on-line documentation.

In the next post, the original poster clears things up. He got the laptop free from "the government". (Free? from the government? hmm .... Boss Linux seems to be an India-centric distribution.) Without install disks. Apparently without much instruction as to dual-booting and such.

(Kind of like with my Lenovo, partial steps that almost seem calculated to make users feel betrayed by Linux.)

Well, I started to get a hotmail account so I could go post over there some time back, but started reading the legalese and thought better of that idea. So I can't add my 50 cents to the discussion there. So I'll rant about it here. (Which delayed, by an hour, maybe, the fix.)

First. The bug is in Microsoft's tools. There should be stronger warning about the possibility of deleting something you actually needed when you decide to format a partition that does not contain a file system recognized by MSWindows.

Actually, if Microsoft wants to save its sinking ship and start learning how to cooperate with the rest of the world, MSWindows, even the free-as-in-free-beer "Home" version, should go to the minor effort of reporting the one-or-two-byte partition type flag that is part of their own partitioning scheme. A simple,

This partition appears to have data written by another operating system in it. You might want to check before you format it.
would be much more helpful than the current
 This partition appears to be empty. Do you want to format it?
Second. I'll offer some solutions, since it looks like other users are ending up in the same fix. But I will offer them in a separate post, to make them easier to find.

Third. The real fix for Microsoft's problems is something I've ranted about before, here, for instance.

Sunday, June 16, 2013

The English Class Blog for the Otemae group, summer 2013

The English Class blog is set up. Not a lot of content yet.

授業ブログを設置しました。まだほとんど何もないままです。

See the blog here.

リンク

How many friends should you have?

This is a question in an English-as-a-Foreign-Language textbook that I will be teaching from for several months.

And the correct answer is ---


THREE.

One to listen to me when I'm happy.

One to listen to me when I'm sad.

And one to talk to me when I'm too busy.

How's that?

;-)

To my new friends, I've changed my mind. I will set up a blog just for the class.

やっぱり。考えが変わった。このブロッグを授業用に利用するのは難しい。専用のブロッグを作ります。

For the homework, something like the above is okay. Something not like the above is okay, too.

宿題については、上記の例のようなものでもいいし、全く違う作文でもいい。

More on Monday.

月曜日にまたお知らせします。

Hang in there.

一緒に頑張りましょう。

Friday, June 14, 2013

Tax season? Geo^H^H^H US-centric universe?

When you live oversees, the US tax offiice (the IRS) gives you an automatic extra two months to file. So my final tax deadline for 2012 looms close.

Now, my present past employer (The staffing agency law has taken effect on the three year cycle, leaving me with three months forced downtime -- technically laid-off -- and the not-exactly welcome opportunity to seek better employment.) is pretty reliable for tax records and such. It shouldn't take me this long.

But I find that reading the new tax reporting rules for Americans living abroad is always an adventure. I have to read the rules, make sure I'm looking at all the relevant forms and instructions, try to figure out if something that changed this year fits in one category or another. All the stuff you guys who can't afford, or don't want, to rely on a tax professional have to put up with, but with two or three more publications and forms that are just for us who live abroad.

This year, the rules have changed again. I never had to mess with schedule B in the past, but now it's not just the interest that requires using that form. Having any foreign bank accounts at all means you have to list them all up on schedule B.

And while I'm on the subject, have you ever heard about TD F 90-22.1 (the poignantly named FBAR)? Did you know that certain kinds of insurance (the "smart" kind, where you get extra coverage, but get a bit more than half back if you don't use it, so-called universal life insurance) will put you in the range of being required to report all your accounts to the US government?

The currency equivalent of $10,000 aggregate in your foreign accounts will put you in the range of having to report all foreign accounts to the US government. And they mean basically anything that could possibly be converted to money. And they expect you to add the maximum in each of your accounts over the course of the year.

If you have one account for your pay to be automatically deposited to and another to have your bills automatically paid from and you make JPY 500,000 a month (Roughly $5,000, how would it be?) you likely bump over the limit without even having any savings.

And if you are sensible and put a month's wages away for the inevitable unemployed periods, or put enough money away to get the family back to the states, that and your regular day-to-day operations bump you into the required reporting range. Any sensible money management will put you over.

If that limit is meaningful at all, it should have risen with inflation over the last thirty years.

Then there is the business about trusts. Trusts are still somewhat protected from taxes, so you can still sort of afford to save up college money for your kids. But if the trust is a foreign trust, the IRS thinks you must absolutely tell them about it. Every foreign trust. I spent a good eight hours trying to figure out whether my kids' insurance policies were trusts or not, including a couple of hours at the insurance company. They aren't, but they could have been.

New rules, except for the FuBAR. I don't know where I'd have squeezed in the time to figure them out if I weren't laid off.

Exceptions to exceptions to exceptions. Reminds me of the math astronomers used to use to explain the motions of the planets, back when the government required them to toe the line on a geocentric universe. You know, Galileo's time and before, when a too-literal interpretation of the Bible verse, of the sun standing still during a war, induced strange impositions on orthodox science.

And it occurs to me that the current mess of the US government grown too big is, in many respects, precisely a problem where laws are trying to match misinterpretations. Such as the idea that increased surveillance will help to reduce "terrorism" events.

(It won't. Attention generally encourages bad behavior, especially inappropriate attention.)

Or the idea that the costs of enforcement in a compulsory tax system won't exceed the costs of non-optimal collection in a voluntary tax system.

Or that a people who refuse to support their own freedom can somehow be forcibly saved from the loss of freedom they are trying to choose.

Monday, June 10, 2013

Okay, so what are dignities?

Okay, so if dignities are not dignitaries in 2nd Peter 2, and in Jude, what are they?

Heh. The dictionary only helps a little on this one.

Let me ask you, what is an indignity? You know when you have suffered an indignity. Sometimes you think you are foolish for feeling indignant about it. Sometimes indignation is foolish.

Indeed, he who will not forgive his brother, especially when his brother really is trying to make up for the offence, "in him remains the greater sin".

But, "It is inevitable that offences must come, ..." Truth is a two-edged sword. "... but wo unto him by whom they come."

Making fun of people is only interesting for a moment. It comes at great cost to all involved -- lost friendships, lost confidence, loss of judgement by those who use it inappropriately, an so on.

A teasing word can go either way. It can stop at a playful jab, it can be followed by words of friendship, or it can decay quickly into making fun.

The bad side of irony and sarcasm is that what was intended to be ironic or a joke sometimes becomes all too real.


Dignities. I'm not talking about pompous behavior, although that can also be an attempt at dignity. I'm talking about our efforts to find or bring meaning into our lives, to do something meaningful.

Truth is two-edged sword. It cuts both ways. Be careful how you swing it or it will cut far more than you intend.

Saturday, June 8, 2013

speaking evil of dignities or dignitaries?

Yeah, I've been killing time on the train thinking about this. Silly? Maybe not.

Let's look at the scriptures.

Jude: 8: Likewise also these filthy dreamers defile the flesh, despise dominion, and speak evil of dignities.

2 Peter 2: 10: But chiefly them that walk after the flesh in the lust of uncleanness, and despise government. Presumptuous are they, selfwilled, they are not afraid to speak evil of dignities.

Many sermons and lessons I have heard take up these verses and substituted "dignitaries" for "dignities". That seems to fit in with the idea that they despise dominion and government. (But who are they?)

But two verses after both verses, the speaking evil is brought up again:

..., speak evil of the things that they understand not ...

And the grammar of the verses in question in no way indicates that the speaking evil of dignities is equated with despising authority. Concurrent with, but not equated with.

And if we consider the meaning of the word "dignities", there is a broader meaning here. Government and authority include some dignity, but dignity is by no means limited to government and authority (or even dignitaries).

I think these verses should only be used to preach against criticism of government or authority by those who wish to call their own understanding of both government and authority into question.

Saturday, April 13, 2013

shakin' the house -- 家を揺らしてくれる

The radio and JMA tell us it was about magnitude 6 over the epicenter in Awaji city, on Awaji Island. Magnitude 5 in the nearby cities, including Osaka, across the bay from Awaji. Kobe, Amagasaki, HImeji and other areas of Hyogo north of the bay, were around 4.

ラジオや気象庁によると震源地の上、淡路島淡路市では震度六、大阪港の向かい側の大阪市では震度5。淡路島のほかのところも震度5。神戸市、尼崎市、姫路市など兵庫の何か所は震度4。

A wall down somewhere in Awaji, and that's about it for damage reports at this point, and the aftershocks are minor. No Tsunami warnings.

淡路市内のどこかで壁が倒れたいがいは被害情報がなさそう。余震も小さくなって行きます。津波警報無し。

We all woke up and got out of bed, and turned on the radio. Then the kids went back to bed and my wife and I got started on the morning chores. 5:33 is time to wake up in this house.

皆起きてラジオで様子を確認したら、子供らが根直している。親二人が朝の用意。この家では5時33分は起きる時間です。

Friday, March 29, 2013

Bragging -- milestone on my asm68c project

Finally had enough time to stare at the screen long enough to fix an outstanding issue on one of my projects.

My 6800/6801 assembler can now handle both the standard

LDAA source

syntax and the

LDA source 

syntax as used in the 6809, which I originally designed it with. (Silly me.)

Now I need to decide whether to add the whole test suite to the Makefile.

Oh! There's a Makefile, too!

Or I could just press ahead on making an emulator or adding 6811 support or doing a 6809 emulator/assembler, or seeing if I can construct a framework in which I can build an IDE for Motorola's current crop of 8-bit processors, or, ...

Or I could get my BIF language running on 64 bit architectures, fix the file interface, ...

Or I could get my RanBunHyou project moving again, add the scrambles, ...

Too many things to do, not enough time to do them all and make a living.

Monday, March 25, 2013

Keeping the kids off the computer in the middle of the night.

Our children have the attitude that using the computer is a right, not a privilege. One seems to think that being denied is cause for outlasting his parents into the middle of the night and logging in while we are asleep.

この家の子供らにしては、特権ではなく、基本的な権利だと、家のコンピュータを使うのを考えているようです。その一人は、ダメだと断られるのは、夜を辛抱して、親が寝ている真夜中にログインする妥当な理由にどうしても思っているようです。

"Fixing" this through technical means is not even a bandaid. It's the wrong thing to do in so many ways. But we need our sleep and this child needs to know some limits.

技術を使って止めるのはとても叶わぬ対処法です。絆創膏治療法と言ってもならん。如何に見ても間違いです。しかし、睡眠が必要なのもあるし、この子は限界を知るべくでもある。

Here's one way to set some limits on Debian -- Use PAM to limit the time certain users can log in.:
デビアン Linux では制限を設定する一つのやり方としては、特定のユーザー号でログイン可能な時間帯を PAM というものを利用して決めるのです。

In the directory
以下の文書配置案内書(ディレクトリ)の

  • /etc/pam.d

are several files where a PAM module called pam_time needs to be enabled:
に、 pam_time という時間関連の PAM上の一単位部品(モジュール)を有効に指定できる文書(ファイル)は幾つか在ります。つまり

  • login
  • su
  • gdm

のそれぞれです。

(There is so much misinformation about this, and so much old information, on the web, it's not at all funny. Since PAM will evolve, this post will get old, and it isn't going to be the same for Fedora or other non-Debian distros, but for now this is how it's done on Squeeze.)
(インターネット網上で調べてみると、もう、まったく面白くないほどの誤情報や賞味期限切れ情報がどっさりと出てくるのを…。まあ、 PAM の進化次第この投稿も賞味期限に着くし、フェドラ Linux などのデビアン以外の配付版では違いますが、現在のスクイーズ版ではこういうやり方です。)

In the files login and su, there are already appropriate lines, commented out:
login 及び su という文書に、注釈化されて無効になっている適切な指定行は既に在ります。つまり

# account    requisite  pam_time.so

の行です。

Remove the hash mark from the head of the line:
ハッシュ記号を行頭から除けば良いです。

account    requisite  pam_time.so

に変えます。

Or, you might want to copy the line and remove the hash mark from the copy so that you remember that it was commented out in the stock version of the files. Or you can leave comments like this:
あるいは、その行の出荷状態はどうなっていたのかを思い出せるようにその行を複製して、複製文からハッシュ記号を抜くのが好いかもわからない。それとも、以下のように自分の注釈文を残すのもいけます。

# Enabled 2013/03/25 JMR

Then, in the file gdm, you need to add a similar line:
続いて、 gdm という文書に似た文を足す必要があります。つまり、

account    required        pam_time.so

という行を

before the line

@include common-auth

という行の前足せば良い。

At least, that's where I added it and it's working for me now. You might want to leave comments here, as well:
とりあえず、ボクがその辺に足して、うまく行っている様です。ここにも注釈が適しているかも知れません。

# Added 2013/03/25 JMR

というコメント行残せばわかるでしょう。

Now you need to restart PAM. I just reboot. Even if you have tools that are supposed to remember (and re-calculate) all the order dependencies for you, by the time you look it all up and get it straight in your head, you could have just rebooted and been done with it long ago.
PAM を再起動させる必要が在ります。ボクにしては単純にシステム全体を再起動します。例え、それぞれの順番と依存関係を纏めて、必要によって再計算してくれる道具が在ったとしても、その命令と使用法を調べて全部を理解して適用でる間に、もうはるか以前にシステムの再起動が終わって新しい指定が効いているのです。

The above lines are necessary to tell PAM (Pluggable Authentication Modules) that it can read the following file:
以上の指定文があって、付け替え可能・認証機能・単品群 PAM に次の

/etc/security/time.conf

and accept the rules it finds there.
という文書を読んでその中の指定文を適用するようになっています。

This file is where you finally add the rule that blocks the login accounts they use during the hours they are supposed to be sleeping. If user1, user2, and user3 are the user ids under which they log in, and the banned time is from 11:00 pm to 5:00 am, 
やっと、子供らが使ってログインしている帳簿(アカウント)を寝ているはずの時間帯に無効にする指定文を、このファイルに足すと効力が有って差し止めることができます。たとえ、ログインしているユーザーイッドは、 user1, user2, 及び user3 になっているとして、禁止の時間帯が午後11時から午前5時までであると

*;*;user1|user2|user3;!Al2300-0500

should do the trick.
という指定でいけるはずです。


But test it first with 
ただ、先に試験した方が良いでしょう。

*;*;user1|user2|user3;!Al0000-2400

and make sure it blocks only these user ids.
の指定でこのユーザーイッドだけを差し止めるのを確認します。

Check the messages in /var/log/auth.log and /var/log/daemon.log, too, after trying to log in. You can use ls and tail:
ログインを試みてから、 /var/log/auth.log内や、 /var/log/daemon.log内のメッセージをも見ておくのをおすすめします。以下のように、 lstail の命令は使えます。

sudo ls -lart /var/log
sudo tail -40 /var/log/auth.log
sudo tail -40 /var/log/daemon.log

Then change the time range to the range you think you should ban, 24 hour clock, military style. Make sure you check the logs again.
確認の上、禁止すると思った時間帯に変更する。指定法は24時間型です。以上のログ記録を最後にもう一度診たほうがいいでしょう。

Mind you, if you have to resort to this kind of thing to discipline your kids, you're going to have to use strong passwords, and keep the passwords where the kids won't find them. But you should be using good passwords anyway, since weak passwords can often be guessed by people out there trying to log in to your computer through the internet.
ちなみに、以上のような手を使った子供らのしつけを図る必要が在るなら、堅固なパスワードを使うしかないのです。そして見つからないところにパスワードを保管しないといけないのです。ただし、単純過ぎるパスワードを、常にインターネット軽油あなたのコンピュータにログインしようと試みている連中はすぐに推測できるので、子供らに対しての対策が不必要だったとしても、パスワードは堅固で在るべき。(パスワードの話のリンク先のページに日本語訳を混ぜたいけど、これを書いている現時点はそこまでの余裕がない。ごめんなさい。)

Hiding your passwords in plain sight is a topic for another rant, but I have to go.
パスワードをみんなの見えるところに隠すことこそ話題になるのです。またいつか。只今は別の仕事が待っている。

Friday, March 22, 2013

bc on MSWindows

Now that you have MinGW installed and running on your PC, it's time to install bc.

bc? basic calculator.

I've mentioned bc before. It's a great little basic calculator for *nix systems. Programmable. Quite literally all the precision you could ever want, if you want it.

If you remember using the old BASIC language interpreters as a substitute for a desktop calculator, and don't like having to open up a spreadsheet document just to check your math on something, bc may be what you're looking for.

bc is one of the packages available for cygwin distribution, so the following is not by any means the only way to get it onto your MSWindows PC. But you can use MinGW to install it, here is how.

[JMR201704271237:

I should note that, unless you really want to practice compiling someone else's source code, I recommend getting Cygwin and just installing bc from the packages with a few button clicks. You can still compile from source using Cygwin, if you want to do that sometime. In the meantime, you can use bc and dc without jumping through extra hoops.

]

bc is not an official package of MinGW, so this is a good way to practice compiling and installing free software by hand.

First, find the source code. As I type this, the wikipedia pages have a link to the source code (alpha, too) on the gnu servers. (The pages also have a link to the bc package from the separate GnuWin32 project on SourceForge, but then you wouldn't get the practice.) (Surprisingly, searching at google for "bc basic calculator source code" did not yield the gnu repositories on the first pages. It did bring us back to the wikipedia pages, so it got close.)

So, download the source code from the gnu servers. (Not the alpha version, I haven't yet figured out how to get that to compile and run on MinGW. Unless you're good at debugging these, in which case, please leave some suggestions in the comments.)

You get a tarball, which stock MSWindows does not know how to deal with. But that's okay, because MinGW should have the tar utility installed with it. (If you type "tar" at the msys shell command line and it says it doesn't understand, check the packages and install the appropriate package with "mingw-get install". But mingw-get isn't going to work without tar, so I guess that should never happen.)

Save or copy the tarball into your user's home directory:

c:/MinGW/msys/1.0/home/username

If you don't already have an msys shell running, go to the MinGW folder in the Start menu and get an msys shell running. (Not the uninstall icon, of course.) Enter the following commands at the prompt:

tar -zxvf bc-1.06.tar.gz
ls bc*

(tar didn't used to accept leading hyphen on the options, now it does.) The directory list should show that the tarball has been unpacked. Move into the bc-1.06 directory that tar just made and tell the configuration script to tell you what it can do:

cd bc-1.06
./configure --help
You probably want to add the readline option or the bsd version of it. (Don't need both.) If you plan, for some reason, on cloning your installation and distributing it to others, use the bsd version to keep yourself in conformance with the license. (I assume you are not going to cloning your installation tree, but I'll remind you just in case.) Here's how to configure it with the bsd version of line editing:

./configure --with-libedit

This will take a few minutes and tell you lots of things you may not really understand. Scan the output but don't worry about the stuff you don't understand unless it says "ERROR!" and stops. Warnings, you don't need to worry about just yet, either. Sort of.

When the prompt returns to you, unless there have been errors, you can make the executable:

make

Make handles the compiler commands for you. Are you let down? Don't be. Look back at the compiler output. ("make clean; make" again if you've lost the output.) You'll see some key warnings. The ones about memset and related functions are not that important, but you can edit lib/number.c (the file number.c in the directory lib) and add the line

#include <string.h>

at the end of the other include lines to get rid of that.

Make it again. (You may want to do a "make clean" just to be sure.) Test the results by typing the command

bc/bc

Once you get the copyright message so you know you are in the bc shell, type

scale = 100
17/11

You should see 1.5454 ... stretching out for 100 places. Now type

exit

to get back the the msys shell and type

bc/bc -l

to start bc with the math library. This is where things get good. Except you have to fix something first. In bc, type

4 * a(1)

That's 4 times the arctangent of 1. It should type the value of pi out to twenty places. (The last digit will be incorrect.)

3.14159265358979323844

But it probably won't.

Until somebody at gnu.org decides to update the package, it will probably complain about segmentation faults and the like. I looked on the web for "bc segmentation fault string.h save_adr" or something like that and found an archived mailing list thread and a patch from the linux-from-scratch project.

If you wanted to practice applying patches you could have applied it before you added the line to #include string.h. If you really want to practice, rename this directory, unpack the tarball again, and apply the patch there.

But it's easy enough to do by hand. Open bc/load.c (the file "load.c" in the directory "bc") in your text editor, and look around line 159. You'll find the line

program_counter save_adr;

On that line, save_adr needs to be declared static. Change it to

static program_counter save_adr;

and save it. Run make again, and repeat the tests. Just for fun, try this:

scale = 1000
4 * a(1)

That should give you pi to a thousand places (the last digit being incorrect again).

Way cool, huh? Now you need to make bc more generally accessible, so you don't have to type the whole path all the time.

make install

and bc is now available as just "bc". (dc is also fun to play with.) After you install it, the manual pages should be available, so you can type

man bc

to get more information about the cool things you can do with it. You can also look in the Examples directory for ideas.

I'll be using bc in some of my posts to the math-and-English blog, too.

Free C on MSWindows -- MinGW -- エムエスウィンドーズ用の自由型C言語 -- ミン・ジー・ダブリュー

I do a lot of my programming work in C. That tends to make it inaccessible to many most of the people I associate with in the real world. (Ergo, disconnected from most of the people in my network.)
ボクのプログラミング作業は、C言語が結構多いのです。したがって、実世で関わっている多く殆どの人に対してはボクの作品などが難解な未知の世界のモノになってしまうのです。つまり、ボクのつながりに繋がっていないのです。

Which is frustrating. But there's something that might help (a little).
気に掛かるものです。しかし、状況を少しぐらい良くするものがあります。

I'd known about MinGW (Minimalist GNU for Windows) and CygWin (Cygnus tools for Windows) for quite a while, but it was only recently that I tried MinGW to solve one of the problems I have trying to help the PC club at the school where I have taught for the last five years.
結構昔から民事、エッと、ミン・ジー・ダブリューやキグウィンではなく、シグウィン(つまり、エムエスウィンドーズ用の小型GNUツールチェイン及びシグナス社のエムエスウィンドーズGNUツールチェイン)については知っていたけど、手を付けることは考えていなかった。しかし、この先の五年間ほど勤めてきている学校のコンピュータ部の応援関連、問題となっていたところの解決に、ミン・ジー・ダブリューを最近使って見ました。

[A little note here, I am currently (May 2015) recommending CyGwin instead of MinGW for beginners. Install and use is similar.
注意してほしいことがあります。2015年現在は、ミン・ジー・ダブリューよりもシグウィンの方を、初心者にお薦めしています。インストールも使い方も似たものです。
--Joel Rees 20150530]

C is about the most essential tool in programming. Absolutely fundamental.
プログラミングには不可欠と言える道具があれば、C言語うです。基本の基礎です。

But it is hard to get system administrators to let you put a compiler on your workstation, if your job does not seem to require it. Compilers cost money, but that's not the problem. The Intel processors and the MSWindows OS still do not properly protect the system from the adventuresome user, and compilers allow the adventuresome user to go adventuring in the system.
しかし、仕事に特に用が無いように見られると、システム管理者に頼んでも、ワークステーションにCのコンパイラをインストールさせてもらうのが結構難なのです。難しいです。コンパイラなんか高額ですけど、価格は特に問題でもないのです。インテルのCPU及びエムエスウィンドーズのオペレーティングシステムは、システムを冒険心を持つユーザから守るのが苦手です。安全対策がちゃんとできていないところが多いのです。コンパイラをインストールすると、冒険家がシステムのアチラコチラに探検しやすくなるのです。

C is considered especially dangerous because of pointers.
ポインターというものがあるから、Cが特に危ないと思われるのです。

Anyway, C is scary. So sysadmins don't help you get it. In fact, they may scream if you follow these instructions on your work PC. But C is important if you want the freedom to use your tools well, and if you want to teach the fundamentals of computer science in a relevant way.
まあ、とにかく、怖いです。要するに、シスアド方は手に入れるのを応援してくださらないのが多いのです。実際にところ、作業場のパソコンに、このブログの説明にしたがってやってみると怒鳴られる確率が少なくないのです。しかし、道具を使いこなす自由度には価値があればC言語は必要な技術です。また、コンピュータ科学の基礎を役立つものにするように教えるつもりなら、なおさら必須です。

Anyway, this is something you can do at home on you own PC. And it may help at work if there is a way to get the system admins to allow its installation.
とりあえず、家のパソコンにはいい手があります。また、システム管理者からなんとか許可を得るのが可能ならこれは役立つのです。

MinGW is small. You can download quickly, or carry it around on USB media, and install it quickly. You can even run it from USB media. The footprint is minimal, so it doesn't leave much behind. Especially, it leaves very little at all behind when MSWindows OS systems are set up to restore the system configuration to the official state at boot-up.
ミン・ジー・ダブリューは小さいです。短時間にダウンロードできます。又、USBの媒体に持ち運べて素早くインストールできます。置く場所が大きくなく、アンインストールするならほとんど跡を残しません。エムエスウィンドーズが起動時にシステムを元の状態に戻す設定をしていると、ほとんど何も残りません。

Of course, you shouldn't install it at work without permission, but it's small enough and clean enough that your system administrator may be willing to let you.
勿論、許可なしインストールはダメですが、小さくて影響が少なく、システム管理者はやらしてくれるかも知れません。

So, it provides one potential solution to one part of the problems faced when trying to teach the kids in the computer club how to really use computers. It also may allow me to distribute tools I build for teaching that I write in C. (I plan to write more on that on my Math and English [or maybe programming fun] blog.)
では、これで児童にコンピュータの本格的な利用を教えようと、出てくる問題の一部は対処できます。ボクの場合は、自作の、C言語で開発している教育用の道具を配布するのを可能にしてくれるかも知れません。(詳しいことは後に、ボクの数学と英語[もしかしてプログラミングの楽しみ]のブログにまた投稿するつもりです。)

(The other big problem is the students' interest. You can't force interest in programming, and trying to make it artificially more interesting than the latest youtube video or free on-line game tends to teach them the bait, not the real reward. Solving this problem just requires patience and creativity and time spent getting to know the students.)
(その残りの大きい問題は生徒の関心を引っ張ることですね。プログラミングに興味を強制することは無理ですし、流行りのユーテゥーブ映像や無料オンラインゲームよりも面白みを無理矢理に創りだそうと、本物の報いのプログラミング術の代わりに、その褒美にしているつもりの餌物を教えてしまうのです。実は、忍耐と想像力それに、児童を知りあって、一緒に時間を過ごすことよってこの問題を解決できます。)

Once you have the permission issues settled, installing MinGW is actually pretty straightforward. The project hosts their distribution on SourceForge, at http://sourceforge.net/projects/mingw/ (But you really want to check the link on MinGW's pages, of course. Search for it with your trusted search engine, satisfy yourself you are going to the right place to download the real thing.)
許可の問題をクリアしたら、そのインストールの手段はそれほど複雑ではない。プロジェクトはソースフォージの http://sourceforge.net/projects/mingw/ に掲載して公開配布しています。(日本のソースフォージにすると http://sourceforge.jp/projects/mingw/ ですが、自動的にできたページですのでそれほどの情報がありません。ちなみに、自分で MinGW のサイトに行って、リンクを確認して下さい。自分の信用できるサーチエンジンを使って調べて、本物のダウンロードページに行っていることを確認して下さい。)

Hosting on SourceForge gives a project's potential users some level of confidence that the project is not bait for installing malware, but, ultimately, you have to judge the danger factors for yourself.
ソースフォージに掲載するのは利用者になろうと考えているユーザ方に、プロジェクトが悪用ソフトウェアの釣り餌ではないことについて、ある程度の確信を与えるのにしても、自分でその危険性を判断しないと行けないのです。

They have a GUI installer, so you can download that. Look for the "Getting Started" link. On that page, find the link to "mingw-get-setup.exe". (It will be the same file as you will find on the installer section of the SourceForge download files page.)
グラフィカル感覚のインストーラはあります。それをダウンロードしていいです。"Getting Started" のリンクを探して下さい。そのページには "mingw-get-setup.exe" へのリンクを探したら良いです。(ソースフォージのダウンロードページのインストーラセクションで見つかるファイルと同じです。)
 For comparison, the url I have for the getting started page on the MinGW site is
http://www.mingw.org/wiki/Getting_Started
and the link for the Installer download files at SourceForge is
http://sourceforge.net/projects/mingw/files/Installer/

確認するために、ボクが指摘したい MinGW サイトの getting started ページのアドレスは
http://www.mingw.org/wiki/Getting_Started
ですし、ソースフォージのインストーラファイルのダウンロードページへのリンクは
http://sourceforge.net/projects/mingw/files/Installer/
です。一方、日本ソースフォージサイトの MinGW のこのページ
http://sourceforge.jp/projects/mingw/
の「Windows」リンクはこの同じグラフィカルインストーラです。

The graphical installer is small, so it doesn't take long to download, and it manages the rest of the download for you. The rest of the download does take about ten minutes to a half an hour if your computer is reasonably new (within the last five-ten years) and your internet connection is reasonably fast (1 Mb/S or better).
グラフィカルインストーラは小さく、ダウンロードは長時間がかかりません。その後のダウンロードはインストーラに任せて良いです。あまりのダウンロードの分は10分〜30分ぐらいかかります。(コンピュータが十年以内古くなくて、インターネットへの接続が現代的の最低1メガビット・秒の速度よりも早い場合なら。)

(Click the information button (i in a circle) on the files page in the sourceforge project to show the checksums, if you plan to check those.
(チェックサムを確認するつもりの場合はソースフォージのファイルページのの丸に「i」情報ボタンをクリックして良いです。

There's a chicken-and-egg problem with getting software to check the checksums. I suppose I should do a write-up on gnupg, too, to show how to start the bootstrap of trust at a different site.)
チェックサムを確認するソフトウェアを獲得することに、鶏と卵の問題があります。 gnupg の使い方を説明する投稿を私が書くべきです。ね。信用の関係をまた異なるサイトでブートストラップ法を案内すべきです。)

If you click the download link, you get an executable, so you don't have to unzip it. If you want to check the checksum, you should do that before you launch the executable the first time, of course.
ダウンロードリンクをクリックすると稼働可能ファイルを受け取ることになりますので解読は不用です。ただし、チェックサムを確認するつもりなら、無論、インストーラを稼働させる前に確認すべきです。

The installer has the usual stuff explaining what it does, and asking if you really want to install. Read it. If you are not familiar with the GPL license, go to the license pages on gnu.org and get yourself comfortable with the license terms.
インストーラは通常の「ご使用にあたっては」の説明が出てから、「本当にインストールしますか」と聞きに来ます。頑張って目を通して下さい。 GPL の利用許諾条件はあまり詳しくない場合は gnu.org のライセンスページを是非、参考して下さい。よく考えて、意味を充分理解して、納得できてからご利用になっていただきたいのです。

If you have questions about the license, more reading is available at the Electronic Frontier Foundation and the Free Software Foundation.
この許諾書について質問が出てきたら、 Electronic Frontier Foundationウィキペディアの記事)及び Free Software Foundationウィキペディアの記事)のサイトで更に詳しく案内してくれるのです。

Check the certificate. It something looks funny, ask someone. MinGW has a mailing list. (If you ask me here, I'll try to respond, but no guarantees that I'll get back to you very soon.)
証明書を見て下さい。何かおかしいと思われるなら誰かに聞いて下さい。 MinGW はメールリストがあります。(ボクにも聞いていただいてもいいですが、ご返事を指していただきたいのですが、どれほど速やかにできるかは、ごめんなさい。約束できません。)

If you don't feel comfortable, take your time. Back out of the installer. Think about it. Wait for someone on the mailing lists to respond. Patience is part of the cost of freedom.
納得できないならじっくりと考える間を設けて下さい。インストーラから後進して脱出して、必要ほどの考察をおねがいします。メールリストなどの返事を待って下さい。自由の一つのコストは忍耐です。

If you decide you are ready, launch the installer again and proceed to the dialog about which components to install and where. Leave the place (path) to install to as it is, unless you really know you want it somewhere else. (If you know such things, you aren't bothering to read this, now, are you?)
もし納得して、用意ができたと思われるなら、また起動して、何の部品をどこにインストールするかのダイアログまで進めば、インストール位置、いわゆる「パス」=="path" をそのまま置きましょう。(本当にその意味がわかって、別の場所に置きたいなら、この説明をなぜ、わざわざ読む必要があるかが、気になるはずです。)

At the package selection dialog, you want the C package, of course. You probably want C++ too, unless you know you don't. Select both.
パッケージ選択ダイアログに来たら、勿論言語のパッケージをダウンロードしたいのです。用がないとわかっていなければ、C++のパッケージも欲しいと思います。とりあえず2つとも選択したらいいです。

Unless you know you don't need msys, you need it. Select it.
そして msys のパッケージは必要だと思うべきです。確実の不用だとわかっている場合以外は選択して下さい。

The MinGW developer toolkit is likely to be useful, too, and doesn't take that much time or space, I'd suggest getting it, too. If you want to compile anything big you will need it. Yes. Select it.
さらに、MinGW developer toolkit の開発者用の道具箱も役に立つはずです。それほどの時間も場所も食わないので選択するのをお薦めします。大きいプログラムをコンパイルする時には絶対に欲しいのです。選択して下さい。

Ada, Fortran, Objective-C? Select them if you think you might be interested, and can stand five to twenty more minutes of download/install time. Or you can get them later with the mingw-get command-line package tool. (Which I describe a bit below.)
他の言語の AdaFortranObjective-C については、面白いと思われるなら選択してもいいでしょう。さら5〜20分掛かるだけです。また、後にコマンドラインのツールの mingw-get を使ってダウンロードできます。(以下は少しだけ触れますが。)

Hit the proceed button and wait. At the end, it asks if you want the shortcuts installed. You probably want at least the one in your "Start Menu". Check that.
進むボタンを押して待ちましょう。終わったら、ショートカットをインストールして欲しいかを聞きに来ます。少なくとも、スタートメニュに入れるのをお薦めします。ここにチャックを入れれば良いです。

Click finish.
完了のボタンをクリックします。

There is some talk in the documents about modifying your system path in the control panel. Unless you know you need to, don't. Sure, it's fun to run a C compile from the MS-shell command prompt, but you don't need to do that right now.
説明の文章にはシステムパスの変更についての説明がありますが、特に用がなければ、変更なしでそのまま使うのをお薦めします。正にマイクロソフトのシェルのコマンドプロンプトからコンパイルを開始させるのが自慢できるかも知れませんが自慢だけのための面倒は今要らないでしょう。

Once you have it installed, you can go to the Start menu and find MinGW, and start up a MinGW shell. (You did select msys, didn't you?)
インストールを完了してから、スタートメニュの中に MinGW を見つけて MinGW のシェルを起動させることができます。(msys を選んでいるでしょうね。)

You can type in your helloworld.c program using MSWindows's own Notepad text editor accessory, or you can use vim (You did install the developer tools, didn't you?). Well, okay, if you are still reading this blog instead of playing with exploring MinGW, you probably want to type in your first program with Notepad, not vim, but finding where to save it is a bit tricky.
ここでは、エムエスウィンドーズのノートパッド文字エディターを使って helloworld.c のプログラムを打ち込んで良いです。それとも、 vim を使っても良いです。(Developer tools も選んでいますね。)まあ、まだ遊べだしている、探検しだしているのでなければ、 vim よりもノートパッドの方が楽でしょうが保存する場所を見つけるのはちょっとコツがあります。

If you left the install path as the installer suggested, your msys shell's home directory for you is at
インストーラの推薦の位置にパス("path")を置いているならば、 msys シェルのホームディレクトリは
c:/MinGW/msys/1.0/home/username  
にあります。

(The version may progress from 1.0 sometime. The username will be your MSWIndows login user name.) That's where you should save your first program. (Oh, and get used to the slashes. MSWindows will show them as it does, yen sign in Japan, backslashes most other places in the world. msys will show the path name separator as Unix would, with a forward slash.)
(いつか、バージョンが 1.0 から上がっていくでしょうけど。ユーザ名はエムエスウィンドーズのログイン名になっているはずです。)この位置に最初のプログラムを保存すれば良いです。(ああ、そうです。スラッシュに慣れるしかないのです。エムエスウィンドーズはエムエスウィンドーズのまま、日本では半角の"¥"、世界のほとんどでは半角の"\"で表示し続ける一方、 msys はパスの区切り文字を Unix の世界に従って、正スラッシュの"/"の半角文字で表示します。)

Not sure what program to type in for your beachhead program? Here's a variation on the typical helloworld.c program:
浜攻撃のプログラムとして何を打てばいいかまだ迷っていますか?以下の典型的な「世界、よ!」のプログラムのちょっと変えたものが良い、かな?
-----------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>


int main( int argc, char * argv[] )
{
 
  printf( "The compiler is working.\n" );
   printf( "1 + 1 = %d\n", 1 + 1 );
   return EXIT_SUCCESS;
}

-----------------------------------------------------------

Save it under your msys home directory, as something like "testing.c".
msys のホームディレクトリの下に "testing.c" のような名称で保存して、

Then go to your msys shell and type in
msys シェルに行って
ls
と打ち込んで、エンターキーを押します。
and hit the enter key. It should show the name you saved the source under in the file listing.
ファイルリストの中に保存した名前を見せてくれるはずです。

Now assuming you saved it as "testing.c", type
それで、 "testing.c" という名前で保存した場合、
cc -o testing -Wall testing.c
と、打てば良いです。

If the compiler gives you warnings and errors, check what you typed in the program source. If the compiler says nothing, it worked. Check the results by typing "ls" in the shell and hitting enter again. You should see the executable object, testing.exe in the list, along with the source file.
コンパイラが警告やエラメッセージを発生してくれるなら、打ち込んだプログラムソースをもう一度確認して下さい。しかし、何の文句が発生されない場合は完成です。結果を確認したいので、もう一度シェルに "ls" を打ってエンターキーを押と、リストの中に、ソースファイルと一緒に testing.exe も出てくるはずです。 

Now try running it. Type 
さて。起動させてみましょう。 
./testing
and hit Enter.
と打ち込めばエンターを押しましょう。

If it prints out what the source would lead you to expect it to, you have a functioning C compiler. Cool enough, hey?
ソースから見て期待するメッセージが出てきたら、利用可能なCコンパイラがコンピュータにインストールされています。カッコエエ、かな?いや、素晴らしいことです。

Now, about the mingw-get command. Let's get a list of components. type:
では、 mingw-get の命令はどうしましょう?部品をリストアップしましょう。次の命令を打ち込みましょう。
mingw-get list

(I don't know the difference between list and show yet.) That scrolls by too fast to get a good look at. Try this, instead:
(今のところ、ボクは list と show の引数の違いがわかれりません。)アアアッ!スクロールが早い!何が入っているか読めない。ヨッシ!次の命令をやってみよ。
mingw-get list | less

You can hit the enter key or the spacebar to scroll through the output.
これでエンターキーかスペースバーを押すとリストの出力を少しずつスクロールして行けます。

If that's still too much trouble, or if less somehow didn't get installed, try this:
それはまだ面倒なら、あるいは less はなんとかインストールしていない場合は
mingw-get list > packagelist.txt

and open packagelist.txt with Notepad or vim. That allows you to look at the packages available.
と打って、この命令でできるはずの packagelist.txt を Notepad 若しくは vim でを開けば良いです。ゆっくりとダウンロード可能なパッケージを閲覧できます。


You can get the documentation manual pages for installed packages by doing "mingw-get install" on the package from the command line. After the download, it will complain that the package is installed, and then it will proceed to install the manual pages. Which is just what you want.
インストール済パッケージの説明書の man ページをインストールするにはコマンド行から "mingw-get install" を送ることができます。ダウンロードが済んだら mingw がパッケージがもうインストール終わっているのだ文句を言って man ページをインストールしてくれるのです。これで結構です。

Let's check by looking at the man pages for vim:
vim の man ページを出して確認しましょう。
man vim 

If less or man or something else important didn't get installed, or if you need man pages, scan through the packagelist.txt file I just told you to create, find the package name for it, and mingw-get install it. For example:
less とか man など、大事な物や、他の man ページなどがちゃんとインストールされていない場合、先ほどの作り方の説明の packagelist.txt ファイルを見て、そのパケージ名を探して、 mingw-get インストールしましょう。例えば、
mingw-get install msys-less

will install less if it hasn't been installed, and it will install the man pages for less either way.
とすると、 less のインストールができていなければ、 less をインストールします。どちらにしても、 less の man ページもインストールしてくれるはずです。

And, of course, there's the help option, to find out what else you can do with mingw-get:
それで、 mingw-get で他にどんなことができるかを見たいでしょう。ヘルプを出しましょう。
mingw-get --help

That should get you started with MinGW.
英語はちょっとつらいけど、これで MinGW を始めることができます。

You can also compile, test, debug, and maybe install software you pick up the source code for elsewhere, of course.
いろんな所で拾えるソースコードをコンパイルしたり、試用したり、修正したりできます。場合によってインストールもしたいでしょう。

My asm68c and bif-c projects compile okay, but they seem to have some issues in addition to the bugs I'm already trying to make time to fix.
ボクの asm68cbif-c プロジェクトはコンパイルしますが、只今対処中のバッグ以外に何らかの不具合あるらしい。さて。

Especially, you can compile and install the *nix basic calculators in the bc package.
特に薦めたいのは *nix 世界の基本電卓の bc パッケージをコンパイルしてインストールできます。

bc is way cool.
bc はすごいです。