&. |

A software developer’s musings on software development

You Won't Believe How Many Hello World Programs Can Fit On A T-Shirt!

Warning: I wrote this blog in 2016. That is a long time ago, especially on the internet. My opinions may have changed since then. Technological progress may have made this information completely obsolete. Proceed with caution.

I’ve designed a t-shirt that is especially for programmers. It contains the simple hello world application, written in forty-seven different programming languages.

Click or Tap or Otherwise Activate This Hyperlink to Buy!

T-Shirt with Hello World in Forty-Seven Languages

Below is the “key”, for anyone interested. A few of these aren’t technically programming languages (like binary, QR), and a few are just frameworks within another language (like Angular, Swing). I’ve ordered one of the shirts myself and it looks pretty nice—I had to make sure of that before I offered it for sale. I’ll probably work on a version that works against a dark background, when I get the time.

Binary

0110100001100101011011000110110001101111001000000111011101101111011100100110110001100100

Java

public class Main {
  public static void main(String[] args) {
    System.out.print("hello world");
  }
}

AngularJS

<input type="text" ng-model="sometext" />
<h1>hello {{ sometext }}</h1>

Scala

object HelloWorld extends App {
  println("hello world")
}

XSLT

<?xml version="1.0"?>
<greeting>hello world</greeting>

Fortran

program hello
  print *, "hello world"
end program hello

Haskell

main = putStrLn "hello world"

8086 Assembler

.model small
.stack 100h
.data
msg  db  'hello world$'
.code
start:
  mov  ah, 09h
  lea  dx, msg
  int  21h
  mov  ax, 4C00h
  int  21h
end start

php

<?php echo 'hello world' ?>

Go

package main
import "fmt"
func main() {
  fmt.Println("hello world")
}

Lisp

(print "hello world")

Flex (MXML)

<?xml version="1.0"?>
<Application xmlns="http://www.adobe.com/2006/mxml">
  <Label text="hello world" />
</Application>

Hex

68 65 6c 6c 6f 20 77 6f 72 6c 64

ActionScript

createTextField("hello", 0, 0, 0, 100, 100);
hello.text = "hello world"

.bat

@echo off
echo hello world

Perl/Python/Swift

print "hello world";

Cobol

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
  DISPLAY 'hello world'.
  STOP RUN.

Visual Basic

Imports System
Public Module modmain
   Sub Main()
     Console.WriteLine ("hello world")
   End Sub
End Module

Prolog

write('hello world'),nl.

HTML

<html><body>
hello world
</body></html>

R

state start:
  pstr("hello world\n");
  halt;

lolcode

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

SQL

SELECT 'hello world' AS hello

Java (Swing)

javax.swing.JOptionPane.showMessageDialog(null, "hello world");

Scheme

(let ((hello-world (lambda() (display "hello world")(newline))))
  (hello-world))

C

#include <cstdio>
int main() {
   puts("hello world");
}

Ruby

puts 'hello world'

Pascal

program HelloWorld;
begin
  writeln('hello world');
end.

Mathematica

Print["hello world"]

Basic

10 PRINT "hello world"

ColdFusion

<cfoutput>hello world</cfoutput>

jQuery

$(function(){$('body').text('hello world');});

Brainf***

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Whitespace

···→··→ ···↲
→   ↲
·····→  →   ··→ ·→  ↲
→   ↲
·····→  →   ·→  →   ··↲
→   ↲
·····→  →   ·→  →   ··↲
→   ↲
·····→  →   ·→  →   →   →   ↲
→   ↲
·····→  ·→  →   ··↲
→   ↲
·····→  ·····↲
→   ↲
·····→  →   →   ·→  →   →   ↲
→   ↲
·····→  →   ·→  →   →   →   ↲
→   ↲
·····→  →   →   ··→ ·↲
→   ↲
·····→  →   ·→  →   ··↲
→   ↲
·····→  →   ··→ ··↲
→   ↲
·····→  ····→   ↲
→   ↲
··↲
↲
↲

Smalltalk

Transcript show: 'hello world'.

C Sharp

public class Hello {
  public static void Main() {
    System.Console.WriteLine("hello world");
  }
}

Lua

#!/usr/bin/lua
print("hello world")

Javascript

document.write('hello world');

ASP.net

<% HelloWorldLabel.Text = "hello world"; %>
<html><body>
<asp:Label runat="server" id="HelloWorldLabel"></asp:Label>
</body></html>

Piet

Hello World program in Piet

Objective C

#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
  NSLog (@"hello world");
  return 0;
}

Ada

with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
  Put_Line("hello world");
end Hello;

QR

QR Code encoding the text Hello World

c++

#include <iostream>
int main() {
  cout << "hello world" << endl;
}

MATLAB

disp('hello world');