Where does the "Hello world" come from?

' hello, world ' is usually the first example for any programming language. I always wondered where this proposal came from and where it was first used.

I was once told that this is the first sentence that has ever been displayed on a computer screen, but I could not find a link to it.

So my question is:
Where does the practice of using " hello, world " come from as the first example for computer languages?
Where was it first used?

Update
Although the answers are pretty interesting, I should have noticed that I read the Wikipedia article. He answers the question about the first use in the literature, but does not answer when the " hello world " was first used.
Therefore, I think it is safe to conclude that this is not the first sentence that has ever been displayed on a computer screen, and that there is no record of when it was first used?

+75
history
Mar 02 '09 at 12:55
source share
7 answers

Brian Kernighan actually wrote the first hello world program as part of the documentation for the BCPL programming language developed by Martin Richards. BCPL was used when C was developed at Bell Labs a few years before the publication of Kernighan and Ritchie C in 1972.

As part of a study of the book that I wrote about Alice's programming environment, I corresponded both with Professor Kernigan at Princeton and with Martin Richards in Cambridge (when I taught the seminar there in the 1990s). They helped me track the first documented use of the code to print the message “Hello world!”. Brian Kernigan remembered how to write code for part of the I / O section of the BCPL manual. Martin Richards, who seems to have a treasury of notes, old documents, etc., found a guide and confirmed that it was an original kind of program. The code was used for early testing of the C compiler and made its way into the book of Kernighan and Ritchie. This was later one of the first programs used to test the Bjarne Stroustrup C ++ compiler.

It became the standard for new programmers after it appeared in Kernigan and Richie, which is probably the best-selling programming introduction of all time.

+70
Oct 08
source share

According to wikipedia :

While there were small test programs since the development of programmable computers, the tradition of using the phrase "Hello world!" how the test program was influenced by the example program in the original book The C Programming Language. An example program from this book prints “hello, peace” (without capital letters or an exclamation point), and Brian Kernigan’s memorandum, Programming in C: Tutorial, which contains the first known version, was inherited from Bell Laboratories 1974.

  main() { printf("hello, world"); } 

The first known example of the use of the words "hello" and "peace" together in computer literature occurred earlier, in Kernigan 1972. Textbook Introduction to Language B [1], with the following code:

 main( ) { extrn a, b, c; putchar(a); putchar(b); putchar(c); putchar('!*n'); } a 'hell'; b 'o, w'; c 'orld'; 
+45
Mar 02 '09 at 12:58
source share

The first C program in the book "C Programming Language" was to print "hello world!" on the screen.

Since then, it has been used as the first program to introduce the basic details of a programming language.

+10
Mar 02 '09 at 12:57
source share

From http://en.wikipedia.org/wiki/Hello_world_program :

The first known example of the use of the words "hello" and "peace" together in computer literature occurred earlier, in Kernigan 1972. Textbook Introduction to Language B [1], with the following code:

 main( ) { extrn a, b, c; putchar(a); putchar(b); putchar(c); putchar('!*n'); } a 'hell'; b 'o, w'; c 'orld'; 
+7
Mar 02 '09 at 13:00
source share

I should have been more careful with the language in my original post about this -

Of course, Barlop is right, K & R was published in 1978. Coma was not in my post. I meant that the BCPL manual with Dr. Kernigan's code for Hello World was dated 1972. Memorandum with reference to this since 1974.

Martin Richards has these documents. I have a poor photocopy of the manual and a copy of the memorandum.

I believe that the original did not have punctuation marks.

BCPL and code B appeared almost simultaneously. I always thought that the B code cited there came out first, but Martin Richards seemed to think the BCPL code was the first. Anyway, "Hello Word!" preceded by K & R, and its first documented use in code seems to have been written by Brian Kernigan at Bell Labs.

+3
Jan 20 '14 at 3:29
source share

The first time I came across it in print was (I think) the first edition of K & R, so it would have been around 1982, but I wrote my own Hello World programs long before that, since there were everyone else.

0
Mar 02 '09 at 12:59
source share

From Wikipedia

While small testing programs have existed since the development of programmable computers, the tradition of using the phrase "Hello world!" since the test message was influenced by the sample program in the original book "Programming Language C". An example program from this book prints “Hello World” (without capital letters or exclamation marks) and was inherited from Brian Kernigan’s 1974 Bell Laboratories internal memorandum, Programming in C: A Textbook, which contains the first known version:

http://en.wikipedia.org/wiki/Hello_world_program

0
Mar 02 '09 at 13:00
source share



All Articles