Fundamentals 4 min read

Exploring the Weirdest Esoteric Programming Languages and Their Hello World Tricks

This article surveys several bizarre esoteric programming languages—Piet, Shakespeare, Whitespace, JSFuck, and Malbolge—explaining their unique concepts and providing Hello World examples to illustrate how each language operates.

21CTO
21CTO
21CTO
Exploring the Weirdest Esoteric Programming Languages and Their Hello World Tricks

Below is a roundup of some bizarre, esoteric programming languages, each with a brief description and a “Hello World” example.

1. Piet

Piet is a language where programs are bitmap images; the interpreter reads color transitions to determine operations. To output “Hello World”, a small image is created where the color changes encode the required instructions.

2. Shakespeare

The Shakespeare language makes source code look like a Shakespearean play. Control flow is expressed with stage directions such as “Let us proceed” and conditional keywords like “if so”.

Variable, Definition

Act I: Hamlet's insults and flattery.
Scene I: The insulting of Romeo.

Juliet:
Am I better than you?

Hamlet:
If so, let us proceed to scene III.

3. Whitespace

Whitespace uses only spaces, tabs and linefeeds as syntax; different lengths and types of whitespace encode commands. The following snippet prints “Hello World”.

T    L
S S S S T    T    S S T    S T    L
...
L

4. JSFuck

JSFuck is an obfuscated subset of JavaScript that uses only six characters: [, ], (, ), ! and +. The example below evaluates to the string “y”.

(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+(+!+[])+(+[])+(+[])+(+[]))])[+!+[]+[+[]]]

Other fragments show how to produce “a” and the number 9.

(![]+[])[+!![]]   // Returns a
!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]   // Returns 9

5. Malbolge

Malbolge is intentionally designed to be almost impossible to program in; most code is generated by other programs. The following example outputs “Hello World”.

(=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

malbolgeJSFuckWhitespaceesoteric programmingPietShakespeare language
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.