<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Oliver Ohrt’s Weblog</title><description>Oliver Ohrt&apos;s blog.</description><link>https://blog.ohrt.dev/</link><atom:link href="https://blog.ohrt.dev/rss.xml" rel="self" type="application/rss+xml"/><item><title>Hello world</title><link>https://blog.ohrt.dev/2026/Sep/16/hello-world/</link><guid isPermaLink="true">https://blog.ohrt.dev/2026/Sep/16/hello-world/</guid><description>A placeholder while I build the blog.</description><pubDate>Wed, 16 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;!-- Placeholder text: adapted from Wikipedia&apos;s &quot;Hello, world&quot; article
     (CC BY-SA 4.0), https://en.wikipedia.org/wiki/Hello,_world
     Image by Brian Kernighan, CC BY-SA 3.0, via Wikimedia Commons. --&gt;
&lt;p&gt;A “&lt;strong&gt;Hello, world&lt;/strong&gt;” program is usually a simple computer program that outputs a message similar to “Hello, world”. The text may be printed out or displayed on a screen (often a console). A small piece of code in most general-purpose programming languages, this program is used to illustrate a language’s basic syntax. Such a program is often the first written by a student of a new programming language,&lt;sup&gt;&lt;a href=&quot;#user-content-fn-langbridge&quot; id=&quot;user-content-fnref-langbridge&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; but it can also be used as a sanity check to ensure that the computer software intended to compile or run source code is correctly installed, and that its operator understands how to use it.&lt;/p&gt;
&lt;h2 id=&quot;history&quot;&gt;History&lt;/h2&gt;
&lt;p&gt;&lt;img alt=&quot;A program to output &amp;quot;hello, world&amp;quot;, handwritten in the C language and signed by Brian Kernighan (1978)&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;960&quot; height=&quot;1052&quot; src=&quot;https://blog.ohrt.dev/_astro/kernighan-hello-world.DCfWtMLr_ZDiQ5r.webp&quot; &gt;&lt;/p&gt;
&lt;p&gt;While several small test programs have existed since the development of programmable computers, the tradition of using the phrase “Hello, world” as a test message was influenced by an example program in the 1978 book &lt;em&gt;The C Programming Language&lt;/em&gt;,&lt;sup&gt;&lt;a href=&quot;#user-content-fn-kr&quot; id=&quot;user-content-fnref-kr&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;2&lt;/a&gt;&lt;/sup&gt; with likely earlier use in BCPL. The example program from the book prints &lt;code&gt;&quot;hello, world&quot;&lt;/code&gt;, and was inherited from a 1974 Bell Laboratories internal memorandum by Brian Kernighan, &lt;em&gt;Programming in C: A Tutorial&lt;/em&gt;:&lt;sup&gt;&lt;a href=&quot;#user-content-fn-ctut&quot; id=&quot;user-content-fnref-ctut&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;c&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;( ) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        printf&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;hello, world&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the above example, the &lt;code&gt;main( )&lt;/code&gt; function defines where the program should start executing. The function body consists of a single statement, a call to the &lt;code&gt;printf()&lt;/code&gt; function, which stands for “&lt;em&gt;print f&lt;/em&gt;ormatted”; it outputs to the console whatever is passed to it as the parameter, in this case the string &lt;code&gt;&quot;hello, world&quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The C-language version was preceded by Kernighan’s own 1972 &lt;em&gt;A Tutorial Introduction to the Language B&lt;/em&gt;,&lt;sup&gt;&lt;a href=&quot;#user-content-fn-langb&quot; id=&quot;user-content-fnref-langb&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;4&lt;/a&gt;&lt;/sup&gt; where the first known version of the program is found in an example used to illustrate external variables:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;main( ) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    extrn a, b, c;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    putchar(a); putchar(b); putchar(c); putchar(&apos;!*n&apos;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;a &apos;hell&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;b &apos;o, w&apos;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;c &apos;orld&apos;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The program above prints &lt;em&gt;hello, world!&lt;/em&gt; on the terminal, including a newline character. The phrase is divided into multiple variables because in B, a character constant is limited to four ASCII characters. The previous example in the tutorial printed &lt;em&gt;hi!&lt;/em&gt; on the terminal, and the phrase &lt;em&gt;hello, world!&lt;/em&gt; was introduced as a slightly longer greeting that required several character constants for its expression.&lt;/p&gt;
&lt;p&gt;The Jargon File reports that “hello, world!” instead originated in 1967 with the language BCPL.&lt;sup&gt;&lt;a href=&quot;#user-content-fn-jargon&quot; id=&quot;user-content-fnref-jargon&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;5&lt;/a&gt;&lt;/sup&gt; Outside computing, use of the exact phrase began over a decade prior; it was the catchphrase of New York radio disc jockey William B. Williams beginning in the 1950s.&lt;sup&gt;&lt;a href=&quot;#user-content-fn-nyt&quot; id=&quot;user-content-fnref-nyt&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;6&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;h2 id=&quot;variations&quot;&gt;Variations&lt;/h2&gt;
&lt;p&gt;“Hello, world” programs vary in complexity between different languages. In some languages, particularly scripting languages, the “Hello, world” program can be written as one statement, while in others (more so many low-level languages) many more statements can be required. For example, in Python, to print the string &lt;em&gt;Hello, world&lt;/em&gt; followed by a newline, one only needs to write &lt;code&gt;print(&quot;Hello, world&quot;)&lt;/code&gt;. In contrast, the equivalent code in C++&lt;sup&gt;&lt;a href=&quot;#user-content-fn-cpp&quot; id=&quot;user-content-fnref-cpp&quot; data-footnote-ref=&quot;&quot; aria-describedby=&quot;footnote-label&quot;&gt;7&lt;/a&gt;&lt;/sup&gt; requires the import of the C++ standard library, the declaration of an entry point (main function), and a call to print a line of text to the standard output stream.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Adapted from &lt;a href=&quot;https://en.wikipedia.org/wiki/Hello,_world&quot;&gt;“Hello, world”&lt;/a&gt; on Wikipedia, CC BY-SA 4.0. Photo by Brian Kernighan, CC BY-SA 3.0.&lt;/em&gt;&lt;/p&gt;
&lt;section data-footnotes=&quot;&quot; class=&quot;footnotes&quot;&gt;&lt;h2 class=&quot;sr-only&quot; id=&quot;footnote-label&quot;&gt;Footnotes&lt;/h2&gt;
&lt;ol&gt;
&lt;li id=&quot;user-content-fn-langbridge&quot;&gt;
&lt;p&gt;James A. Langbridge, &lt;em&gt;Professional Embedded ARM Development&lt;/em&gt; (John Wiley &amp;#x26; Sons, 2013). &lt;a href=&quot;#user-content-fnref-langbridge&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 1&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;user-content-fn-kr&quot;&gt;
&lt;p&gt;Brian W. Kernighan and Dennis M. Ritchie, &lt;em&gt;&lt;a href=&quot;https://archive.org/details/cprogramminglang00kern&quot;&gt;The C Programming Language&lt;/a&gt;&lt;/em&gt;, 1st ed. (Prentice Hall, 1978), p. 6. &lt;a href=&quot;#user-content-fnref-kr&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 2&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;user-content-fn-ctut&quot;&gt;
&lt;p&gt;Brian Kernighan, &lt;em&gt;&lt;a href=&quot;https://web.archive.org/web/20220322215231/https://www.bell-labs.com/usr/dmr/www/ctut.pdf&quot;&gt;Programming in C: A Tutorial&lt;/a&gt;&lt;/em&gt; (Bell Labs, 1974). &lt;a href=&quot;#user-content-fnref-ctut&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 3&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;user-content-fn-langb&quot;&gt;
&lt;p&gt;S. C. Johnson and B. W. Kernighan, &lt;em&gt;&lt;a href=&quot;https://web.archive.org/web/20150611114355/https://www.bell-labs.com/usr/dmr/www/bintro.html&quot;&gt;The Programming Language B&lt;/a&gt;&lt;/em&gt; (Bell Labs). &lt;a href=&quot;#user-content-fnref-langb&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 4&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;user-content-fn-jargon&quot;&gt;
&lt;p&gt;“&lt;a href=&quot;http://www.catb.org/jargon/html/B/BCPL.html&quot;&gt;BCPL&lt;/a&gt;”, &lt;em&gt;Jargon File&lt;/em&gt;. &lt;a href=&quot;#user-content-fnref-jargon&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 5&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;user-content-fn-nyt&quot;&gt;
&lt;p&gt;“&lt;a href=&quot;https://www.nytimes.com/1986/08/04/obituaries/william-b-williams-radio-personality-dies.html&quot;&gt;William B. Williams, Radio Personality, Dies&lt;/a&gt;”, &lt;em&gt;The New York Times&lt;/em&gt;, 4 August 1986. &lt;a href=&quot;#user-content-fnref-nyt&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 6&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&quot;user-content-fn-cpp&quot;&gt;
&lt;p&gt;“&lt;a href=&quot;https://en.wikibooks.org/wiki/C%2B%2B_Programming/Examples/Hello_world&quot;&gt;C++ Programming/Examples/Hello world&lt;/a&gt;”, &lt;em&gt;Wikibooks&lt;/em&gt;. &lt;a href=&quot;#user-content-fnref-cpp&quot; data-footnote-backref=&quot;&quot; aria-label=&quot;Back to reference 7&quot; class=&quot;data-footnote-backref&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded></item></channel></rss>