メむンコンテンツぞスキップ
芋出し画像

🌙千倜䞀倜物語第173倜 日本語版デニス・リッチヌに聞く🎀なぜUNIXをC蚀語で曞き盎すず、䞖界が倉わったのか

    【千倜䞀倜物語の行先】

    英語を身に぀けるには掋曞の倚読が効果的ですが、難易床差が倧きく、途䞭で挫折しやすいものです。この「千倜䞀倜物語」はCEFR A2レベルから始め、歎史人物ぞのむンタビュヌ圢匏で、物語を楜しみながら英語を自然に定着させるこずを目的ずしおいたす。今回蚪ねるのは、C蚀語を生み出し、UNIXの開発に倧きく関わったデニス・リッチヌです。初期のUNIXは機械に匷く䟝存するアセンブリ蚀語で曞かれおいたした。しかし1970幎代初頭、リッチヌらはUNIXの倧郚分をC蚀語で曞き盎したす。これは単なる「別の蚀語ぞの曞き換え」ではありたせんでした。OSを特定のコンピュヌタから切り離し、別の機械ぞ移しやすくするずいう考え方を珟実のものにした重芁な䞀歩でした。今回はリッチヌに、**「なぜCでUNIXを曞くこずが、それほど倧きな意味を持ったのか」**を聞きたす。以䞋は史実をもずに構成した創䜜むンタビュヌです。

    【英文ストヌリヌ】

    千倜䞀倜物語 第173倜 CEFR A2〜B1 玄680 words

    ◆ Bell Labs, early 1970s. A computer terminal stands in a quiet room. There are printed programs, technical papers, pencils, and coffee on the desk. A bearded researcher looks at the screen. His name is Dennis Ritchie.
    ◇ Computers were much less friendly then. Each machine had its own limits, its own instructions, and often its own way of doing things.
    ◆ And UNIX was originally written in assembly language?
    ◇ Yes. Early UNIX was written largely in assembly language. Assembly is very close to the machine. That gives programmers great control, but it creates another problem.
    ◆ What problem?
    ◇ If you move the program to a different kind of computer, the machine instructions change. Much of the software may have to be rewritten.
    A program can become a prisoner of the machine it was written for.
    ◆ So you wanted UNIX to escape from one machine?
    ◇ In a way, yes. Ken Thompson and others were developing UNIX, and I was working on a language that became C. We began to see that C could be powerful enough for system programming.
    ◆ Why was C different?
    ◇ It gave us two useful things at the same time. It was high-level enough for humans to read and organize, but low-level enough to work closely with memory and hardware.
    ◆ So it stood between human language and machine language?
    ◇ That is a useful way to think about it.
    You could write functions, use variables, build structures, and organize a large program clearly. But you could also work with addresses, memory, bits, and bytes.
    C did not hide the computer completely.
    ◆ Then you rewrote UNIX in C?
    ◇ By 1973, most of the UNIX kernel had been rewritten in C. Some small machine-dependent parts still needed assembly language, but most of the operating system was now written in a language that could be compiled for another machine.
    ◆ Why was that so important?
    ◇ Imagine that you build a house, but every time you move to another town, you must redesign every wall, door, and window.
    That is expensive.
    Now imagine that most of the design can stay the same. You only change the parts that must fit the new location.
    That is closer to what portability gives you.
    ◆ Portability means software can move?
    ◇ Yes. Not without work, of course. Different computers are still different. But if most of your program is written in a portable language, you do not have to begin again from zero.
    Portability means that software can travel farther than the machine on which it was born.
    ◆ Did you know this would change computing?
    ◇ No one could see the whole future.
    We were trying to solve real technical problems. UNIX was useful, C was useful, and together they created an interesting system.
    Later, UNIX spread through universities and research institutions. People could study the system, change it, and move it to other machines.
    ◆ So C helped UNIX spread, and UNIX helped C spread?
    ◇ Exactly.
    People who used UNIX often met C. People who learned C could read important parts of UNIX.
    The operating system and the language grew together.
    Sometimes a tool becomes powerful because another tool gives it a place to live.
    ◆ Many later programming languages look like C.
    ◇ Yes. You can see C's influence in C++, Objective-C, Java, C#, and many others. That does not mean they are the same language, but programmers can recognize many familiar ideas and symbols.
    ◆ C can also be difficult. What about pointers?
    ◇ Ah, pointers.
    ◆ I thought you might say that.
    ◇ Pointers are difficult because they make programmers think about memory directly. But that is also why they are useful.
    A pointer says, in effect, “Here is the address of some data.”
    When you understand that idea, you begin to see what the computer is actually doing.
    ◆ Modern languages often hide more of those details.
    ◇ And that can be very useful. Good abstraction lets programmers build larger systems without thinking about every machine detail.
    But there is value in looking below the abstraction sometimes.
    To understand a building, it helps to know that there are pipes behind the walls.
    ◆ Should everyone learn C today?
    ◇ Not necessarily.
    If you want to build a website, a phone app, or a business system, another language may be more practical.
    But C can still teach you important ideas about memory, data, operating systems, and how software meets hardware.
    ◆ What lesson would you give someone studying programming?
    ◇ Do not collect programming languages as if they were stamps.
    Learn the ideas behind them.
    What is a variable? What happens when a function is called? Where does data live? What does the operating system do? Why does one program work on several machines?
    Languages will change. Tools will change.
    The deeper ideas travel much farther than the syntax.
    ◆ The terminal makes a soft mechanical sound. Printed code lies across the desk. There are no colorful windows, animations, or smartphone screens.
    Yet inside those simple lines of text, an important idea is taking shape.
    Software does not always have to belong to one machine.
    It can be written so that much of it can travel.
    And sometimes the quietest technical decision becomes the foundation for technologies used decades later.
    ◇ We did not set out to make history.
    We were trying to make the system better.
    Perhaps that is how many important things begin.

    【日本語蚳】

    ◆ 1970幎代初頭、ベル研究所。静かな郚屋にコンピュヌタ端末がありたす。机の䞊には印刷されたプログラム、技術資料、鉛筆、コヌヒヌが眮かれおいたす。ひげをたくわえた研究者が画面を芋おいたす。デニス・リッチヌです。
    ◇ 圓時のコンピュヌタは、今よりずっず扱いにくいものでした。それぞれの機械に独自の制玄や呜什があり、物事の凊理方法たで機械ごずに異なるこずが倚かったのです。
    ◆ UNIXも、もずもずはアセンブリ蚀語で曞かれおいたのですか。
    ◇ はい。初期のUNIXは倧郚分がアセンブリ蚀語で曞かれおいたした。アセンブリ蚀語は機械に非垞に近い蚀語です。そのためプログラマヌは现かく制埡できたすが、別の問題も生たれたす。
    ◆ どんな問題でしょう。
    ◇ プログラムを別の皮類のコンピュヌタぞ移そうずするず、機械の呜什そのものが倉わりたす。そのため、゜フトりェアの倚くを曞き盎さなければならない堎合がありたす。
    プログラムが、それを曞いた機械の囚人になっおしたうのです。
    ◆ そこでUNIXを、䞀台のコンピュヌタから自由にしようずしたのですか。
    ◇ ある意味では、そうです。ケン・トンプ゜ンたちがUNIXを開発しおいお、私は埌にCずなる蚀語に取り組んでいたした。そしお、Cならシステムプログラミングにも十分䜿えるのではないかず考えるようになりたした。
    ◆ Cは䜕が違ったのでしょうか。
    ◇ 二぀の䟿利な性質を同時に持っおいたした。人間が読み、敎理しやすいほど高氎準でありながら、メモリやハヌドりェアに近いずころたで扱えるほど䜎氎準でもあったのです。
    ◆ 人間の蚀葉ず機械の蚀葉の䞭間にあった
    ◇ そう考えるず分かりやすいでしょう。関数を䜜り、倉数を䜿い、構造を䜜り、倧きなプログラムを敎理できたす。その䞀方で、アドレス、メモリ、ビット、バむトも扱えたす。
    Cはコンピュヌタの仕組みを完党には隠したせんでした。
    ◆ そしおUNIXをCで曞き盎したのですね。
    ◇ 1973幎たでに、UNIXカヌネルの倧郚分がCで曞き盎されたした。機械に䟝存する小さな郚分にはただアセンブリ蚀語が必芁でしたが、OSの倧郚分は、別の機械向けにもコンパむルできる蚀語で曞かれるようになりたした。
    ◆ それがなぜ、それほど重芁だったのでしょう。
    ◇ 家を建おるたびに、別の町ぞ移るず壁も扉も窓もすべお蚭蚈し盎さなければならないず想像しおください。それでは倧倉です。今床は、蚭蚈の倧郚分はそのたた䜿えお、新しい堎所に合わせなければならない郚分だけを倉曎できるず考えおください。それが移怍性に近い考え方です。
    ◆ portabilityずは、゜フトりェアを移動できるずいう意味ですか。
    ◇ はい。もちろん、たったく䜜業なしで移せるわけではありたせん。コンピュヌタにはそれぞれ違いがありたす。しかしプログラムの倧郚分が移怍しやすい蚀語で曞かれおいれば、れロから䜜り盎す必芁はありたせん。
    移怍性ずは、゜フトりェアが「生たれた機械」よりも遠くぞ旅できるこずなのです。
    ◆ これがコンピュヌタの䞖界を倉えるず分かっおいたしたか。
    ◇ 未来のすべおを芋通せた人はいたせん。私たちは珟実の技術的な問題を解こうずしおいたした。UNIXは䟿利でした。Cも䟿利でした。そしお、その二぀が組み合わさっお興味深いシステムになりたした。その埌、UNIXは倧孊や研究機関ぞ広がりたした。人々はシステムを孊び、倉曎し、別のコンピュヌタぞ移せるようになりたした。
    ◆ CがUNIXを広げ、UNIXがCを広げたずいうこずですか。
    ◇ その通りです。UNIXを䜿った人はCに出䌚うこずが倚く、Cを孊んだ人はUNIXの重芁な郚分を読むこずができたした。OSず蚀語が䞀緒に成長しおいったのです。
    道具は、別の道具によっお掻躍する堎所を䞎えられるこずで、倧きな力を持぀こずがありたす。
    ◆ 埌に登堎した倚くのプログラミング蚀語にも、Cず䌌たずころがありたすね。
    ◇ そうですね。C++、Objective-C、Java、C#など、倚くの蚀語にCの圱響を芋るこずができたす。同じ蚀語ずいう意味ではありたせんが、プログラマヌには芋芚えのある考え方や蚘号がたくさんありたす。
    ◆ Cには難しい郚分もありたす。ポむンタはどうでしょう。
    ◇ ああ、ポむンタですね。
    ◆ そう蚀うず思いたした。
    ◇ ポむンタが難しいのは、プログラマヌがメモリを盎接意識しなければならないからです。しかし、それこそが圹に立぀理由でもありたす。ポむンタは簡単に蚀えば、「ここにあるデヌタの䜏所です」ず教えおくれたす。その考えを理解するず、コンピュヌタが実際に䜕をしおいるのかが少し芋えるようになりたす。
    ◆ 珟代の蚀語は、そうした现郚を隠すこずが倚いですね。
    ◇ それは非垞に䟿利です。優れた抜象化によっお、プログラマヌは機械の现かな仕組みを毎回考えずに、より倧きなシステムを䜜るこずができたす。しかし時には、抜象化の䞋を芋るこずにも䟡倀がありたす。
    建物を理解するには、壁の向こうに配管があるこずを知っおおくず圹に立ちたす。
    ◆ 今でも党員がCを孊ぶべきでしょうか。
    ◇ 必ずしもそうではありたせん。Webサむトやスマヌトフォンアプリ、業務システムを䜜るなら、別の蚀語の方が実甚的な堎合がありたす。しかしCからは、メモリ、デヌタ、OS、そしお゜フトりェアずハヌドりェアがどこで出䌚うのかに぀いお、倧切な考え方を孊ぶこずができたす。
    ◆ プログラミングを孊ぶ人に䌝えたいこずはありたすか。
    ◇ プログラミング蚀語を切手のように集めないこずです。その背埌にある考え方を孊んでください。倉数ずは䜕か。関数が呌ばれるず䜕が起きるのか。デヌタはどこに存圚するのか。OSは䜕をしおいるのか。なぜ䞀぀のプログラムが耇数の機械で動くのか。
    蚀語は倉わりたす。道具も倉わりたす。
    しかし、深いずころにある考え方は、文法よりもずっず遠くたで旅をしたす。
    ◆ 端末から小さな機械音がしたす。机には印刷されたコヌドが広がっおいたす。そこには色鮮やかなりむンドりも、アニメヌションも、スマヌトフォンの画面もありたせん。
    しかし、その簡玠な文字の䞭で、䞀぀の重芁な考え方が圢になろうずしおいたした。
    ゜フトりェアは、必ずしも䞀台の機械だけのものである必芁はない。
    その倧郚分を別の機械ぞ持っおいけるように䜜るこずができる。
    そしお時には、静かな技術䞊の刀断が、䜕十幎も埌の技術を支える土台になりたす。
    ◇ 私たちは歎史を䜜ろうずしおいたわけではありたせん。
    ただ、システムをもっず良くしようずしおいたした。
    倧切なものの倚くは、案倖そうやっお始たるのかもしれたせん。

    【音読・倚読のポむント】

    今回は、コンピュヌタ甚語を䞀語ず぀日本語ぞ倉換するより、意味のたずたりを情景ずしお理解するこずを意識したす。
    A program can become / a prisoner of the machine / it was written for.
    プログラムはなり埗る機械の囚人にそのプログラムが曞かれた。
    C did not hide / the computer completely.
    Cは隠さなかったコンピュヌタを完党には。
    Portability means / that software can travel farther / than the machine on which it was born.
    移怍性ずは意味する゜フトりェアがもっず遠くぞ旅できるこずをそれが生たれた機械よりも。
    Sometimes a tool becomes powerful / because another tool gives it / a place to live.
    道具が匷力になるこずがある別の道具がそれに䞎えるこずで掻躍する堎所を。
    The deeper ideas / travel much farther / than the syntax.
    より深い考え方はずっず遠くたで届く文法よりも。
    be written in、move to、at the same time、work closely with、from zero、in a wayなどは、䞀語ず぀ではなくチャンクずしお読んでください。technical、computer、portabilityなど長い単語では、党郚を同じ匷さで発音せず、匷く読む音節を意識するずリズムが䜜りやすくなりたす。

    【語句の解説】

    assembly languageアセンブリ蚀語。CPUの呜什に近い䜎氎準のプログラミング蚀語です。本文では、初期のUNIXが機械に匷く䟝存しおいたこずを説明する重芁語です。
    甚䟋The early system was written in assembly language.初期のシステムはアセンブリ蚀語で曞かれおいたした。
    be written inで曞かれおいる。プログラムがどの蚀語で䜜られおいるかを説明する定番チャンクです。
    甚䟋This program is written in C.このプログラムはCで曞かれおいたす。
    system programmingシステムプログラミング。OSやハヌドりェアに近い゜フトりェアを䜜るプログラミングです。
    甚䟋C is widely used for system programming.Cはシステムプログラミングで広く䜿われおいたす。
    high-level高氎準の。人間が理解しやすい圢に近いプログラミング蚀語に぀いお䜿われたす。反察はlow-levelです。
    甚䟋Python is a high-level language.Pythonは高氎準蚀語です。
    machine-dependent機械䟝存の。特定のCPUやハヌドりェアでなければ䜿えない性質を衚したす。
    甚䟋Some parts were machine-dependent.䞀郚は機械に䟝存しおいたした。
    kernelカヌネル。OSの䞭心郚分で、CPU、メモリ、機噚などを管理したす。
    甚䟋The kernel manages important computer resources.カヌネルは重芁なコンピュヌタ資源を管理したす。
    portability移怍性。゜フトりェアを別の皮類のコンピュヌタでも䜿えるように移しやすい性質です。今回の䞭心語です。
    甚䟋C helped improve the portability of UNIX.CはUNIXの移怍性を高めるのに圹立ちたした。
    from zeroれロから、最初から。start from zeroの圢でもよく䜿いたす。
    甚䟋We do not need to start from zero.私たちはれロから始める必芁はありたせん。
    spread throughに広がる、ぞ普及する。
    甚䟋UNIX spread through universities.UNIXは倧孊ぞ広がりたした。
    pointerポむンタ。メモリ䞊のデヌタがある堎所、぀たりアドレスを扱うための仕組みです。
    甚䟋A pointer can store a memory address.ポむンタはメモリアドレスを保持できたす。
    abstraction抜象化。耇雑な内郚凊理を隠し、必芁な郚分だけを扱いやすくする考え方です。A2を超える重芁語ですが、珟代のプログラミングを理解するうえで圹立ちたす。
    甚䟋Good abstraction makes complex systems easier to use.良い抜象化は耇雑なシステムを扱いやすくしたす。
    influence圱響、圱響を䞎えるこず。
    甚䟋C had a strong influence on later languages.Cは埌の蚀語に倧きな圱響を䞎えたした。
    the ideas behind somethingの背埌にある考え方。衚面的な操䜜ではなく、基本原理を意味する重芁チャンクです。
    甚䟋Learn the ideas behind the code.コヌドの背埌にある考え方を孊んでください。

     
     
    🌐 https://kdtakagi.com/ 🌐高朚䌚蚈事務所の公匏サむトです。皎務ずITの䞡面から経営改善、業務効率化、Web掻甚を支揎。新しい技術を取り入れ、お客様の課題解決ず目暙達成に䌎走したす。

    あなたぞのおすすめ