Skip to content

Instantly share code, notes, and snippets.

@crischutu07
Last active May 19, 2023 14:18
Show Gist options
  • Save crischutu07/2bd753ae126693830c83cfdc98679bab to your computer and use it in GitHub Desktop.
Save crischutu07/2bd753ae126693830c83cfdc98679bab to your computer and use it in GitHub Desktop.

Hello World in Common Programming Language

• Python 3.10

print("Hello, World!")

• Lisp

(print "Hello, World!")

• Groovy

println "Hello, World!"

• Lua

os.write("Hello, World!")

• JavaScript

console.log("Hello, World!");

• TypeScript

console.log("Hello, World!");

• Ruby

puts "Hello, World!"

• Haskell

putStrLn "Hello, World!"

• Bash/sh

echo "Hello, World!"

• zsh (Z-Shell)

<<< "Hello, World!"

• Windows Command Prompt

ECHO "Hello, World!"

• Pascal

WriteLn('Hello, World!');

• Elixir

IO.puts "Hello, World!"

• Fortan

print *, "Hello, World!"
end

• SQL

CREATE TABLE "Hello, World!" (phrase TEXT)
.tables

• Swift

import Foundation

print("Hello, World!")

• PHP (No HTML)

<?php
echo 'Hello, World!';
?>

• Kotlin

fun main(args : Array<String>) {
  println("Hello, World!");
}

• Rust

fn main() {
  println!("Hello, World!");
}

• D

import std.stdio;

void main() {
  writeln("Hello, World!");
}

• Perl

use strict;
use warnings;

print("Hello, World!");

• Dart

void main(){
  print("Hello, World!");
}

• C

#include <stdio.h> 

int main() {
  printf("Hello, World!");
  return 0; // Could remove this return status code, the code is fine without that.
}

• Clojure

ns clojure.examples.hello
   (:gen-class))
(defn hello-world []
   (println "Hello, World!"))
(hello-world)

• C++

#include <iostream>

int main() {
  std::cout<<"Hello, World!";
}

• Objective C

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        NSLog(@"Hello, World!");
    }
    return 0;
}

• Java

class HelloWorld {
  public static void Main(String args[]) {
  System.out.println("Hello, World!");
  }
}

• C# (C-Sharp)

using System;

namespace HelloWorld {
  class HelloWorldProgram {
    static void Main(string[] args) {
      Console.WriteLine("Hello, World!");
    }
  }
}

• x86 Assembly

    global  _start

    section  .text:
  _start: mov     rax, 1
    mov    rdi, 1
    mov    rsi, message
    mov    rdx, 13
    syscall
    mov    rax, 60
    xor    rdi, rdi
    syscall

    section .data
message: db      "Hello, World!", 10 

Hello World in Forbidden Progamming Language (we don't use much)

• Cobol

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOWORLD.

PROCEDURE DIVISION.
DISPLAY "Hello, World".
STOP RUN.

• Befunge

 "!dlroW ,olleH">:v
              ^,_@

• Brainfuck

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

• Javascript Fuck (jsfuck)

// console.log("Hello, World!");
([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(![]+[])[+!+[]+!+[]]+(!![]+[])[+!+[]+!+[]+!+[]].(![]+[])[+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(![]+[+[]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!+[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(!+[]+[])[+!+[]]])[[+!+[]+!+[]]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[[+!+[]]+[+!+[]+!+[]+!+[]]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(![]+[])[+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(!+[]+[])[+!+[]]]()[[+!+[]]+[+!+[]+!+[]]]+(+([+!+[]]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!+[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(!+[]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!+[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(!+[]+[])[+!+[]]]+[])[[+!+[]]+[+!+[]]]+(!![]+[])[+!+[]+!+[]+!+[]]]]([+!+[]+!+[]]+[+!+[]])[+!+[]]+(!![]+[])[+!+[]+!+[]+!+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+[[]][([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]([[]])+[]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+!+[]]]+(+([+!+[]+!+[]+!+[]]+[+!+[]+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!+[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(!+[]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!+[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(!+[]+[])[+!+[]]]+[])[[+!+[]]+[+!+[]]]+(!![]+[])[+!+[]+!+[]+!+[]]]]([+!+[]+!+[]+!+[]]+[+!+[]+!+[]+!+[]])+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(!+[]+[])[+!+[]]+(![]+[])[+!+[]+!+[]]+([][[]]+[])[+!+[]+!+[]]+!([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(![]+[])[+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]]+[+[]]]+(!+[]+[])[+!+[]]]()[[+!+[]]+[+!+[]+!+[]]]+([+[]]+![]+[][(![]+[])[+[]]+(![]+[])[+!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[[+!+[]+!+[]]+[+[]]]+;```

• COW

OOOMoOMoOMoOMoOMoOMoOMoOMoOMMMmoOMMMMMMmoOMMMMOOMOomOoMoOmoOmoomOo
MMMmoOMMMMMMmoOMMMMOOMOomOoMoOmoOmoomOoMMMmoOMMMMMMmoOMMMMOOMOomOo
MoOmoOmoo

• Malbolge

D'`%^9>!Z5G92x654d2b0p_Lm%k)5hDV1#zRawvu):rwpunm3kSinmlkdib(IHdc\"!Y^]\[ZYXQu8NSLpJINGFjJC+G@d>&<;:9>=6Z498165.-Q10/.'&J*)(!g}Cd"!xw=*

• Binary

01001000011001010110110001101100011011110010110000100000010101110110111101110010011011000110010000100001

• LOLCODE

HAI
  CAN HAS STDIO?
  VISIBLE "Hello, World!"
KTHXBYE

• ArnoldC

IT'S SHOW TIME
  TALK TO THE HAND "Hello, World!"
YOU HAVE BEEN TERMINATED

• HolyC

U0 Main(){
  "Hello, World!";
}
Hello;

• BASIC

PRINT "Hello, World!"
GOTO 10

• Dragon

show "Hello, World!"

• Emojicode

🏁 🍇
  😀 🔤Hello, World!🔤❗️
🍉

All the code here, may not correctly, contribute your correct code on those above code so i can put a correct change here

@leap0x7b
Copy link

D isn't a forbidden programming language, move that to most used programming language.

@crischutu07
Copy link
Author

D isn't a forbidden programming language, move that to most used programming language.

done :)

@crischutu07
Copy link
Author

crischutu07 commented Mar 18, 2023

i think i will also sort the most used tab from the short hello world to the longest
example:

print("Hello World")

then the complicated one

#include <iostream>

using namespace std;

int main(){
  std::cout<<"Hello World";
}

@priyanuj-gogoi
Copy link

In Dart, print() function is used for output text.
You have made a typo and wrote printf() instead.

void main() {
  print('Hello world!');
}

In C++, you can remove this line from the current Hello world code and the code will
execute just fine.

using namespace std;

^^^ Only required when you write the code like this:

#include <iostream>

using namespace std;

int main() {
  cout << "Hello world!";
}

@crischutu07
Copy link
Author

Thanks for correcting me, also the C++ code i don’t know i actually put namespace on this before i create the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment