Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs

Dashboard
Notifications
Mark all as read
Challenges

"Hello, World!"

+20
−0

Introduction

The classic "Hello, World" challenge. What more can I say?

Rules

  • Program takes no input.
  • Program outputs Hello, World! with an optional trailing newline. No other output is accepted.

Shortest submission in bytes wins.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?
+8
−0

Vyxal, 2 bytes KH Th …

11mo ago

+7
−0

Shakespeare Programming Langua …

11mo ago

+6
−0

PHP, 13 bytes Hello, Wo …

11mo ago

+5
−0

HQ9+, 1 byte H Oblig …

11mo ago

+5
−0

[Common Lisp], 26 22 bytes …

11mo ago

+4
−0

QBASIC, 17, 16 bytes ?" …

8mo ago

+4
−0

C# 9, 38 bytes System.C …

9mo ago

+4
−0

Perl 5 `-E`, 18 bytes ``` …

3mo ago

+4
−0

[Python 2], 20 bytes …

11mo ago

+3
−0

[C# (.NET Core)], 60 bytes …

22d ago

+3
−0

05AB1E, 7 bytes ”Ÿ™,‚ï! …

9mo ago

+3
−0

LOLCODE, 37 bytes HAI 1 …

11mo ago

+3
−0

[C++ (gcc)], 43 bytes …

11mo ago

+8
−2

Javascript V8, 888 bytes ```j …

11mo ago

+3
−0

R, 20 bytes ``` cat("Hello …

11mo ago

+3
−0

[Bash], 18 bytes ec …

11mo ago

+3
−0

SOGL, 10 bytes ╥‰⅜,(ε ‘ū …

11mo ago

+2
−0

///, 13 bytes ``` Hello, W …

4mo ago

+2
−0

[PowerShell], 15 bytes …

7mo ago

+2
−0

[RoadLang], 59 bytes …

11mo ago

+2
−0

AppleScript, 15 bytes " …

11mo ago

+2
−0

[JavaScript (V8)], 28 bytes …

11mo ago

+2
−0

[ARBLE], 15 bytes " …

11mo ago

+2
−0

Japt, 11 bytes `HÁM, WŽ …

11mo ago

+4
−1

Raku, 19 bytes ``` "Hello, W …

11mo ago

+1
−0

[Unlambda], 40 bytes `` …

23d ago

+1
−0

[Haskell], 25 bytes …

29d ago

+1
−0

Turing Machine.io, 202 bytes …

2mo ago

+1
−0

Scala, 42 bytes object>e …

3mo ago

+1
−0

[C# (.NET Core)], 67 bytes …

22d ago

+1
−0

Rockstar, 19 bytes say …

3mo ago

+1
−0

PureScript, 25 bytes ``` m …

3mo ago

+1
−0

Swift, 23 bytes ```swift p …

3mo ago

+1
−0

Kotlin, 34 bytes ```kotlin …

3mo ago

+1
−0

[Forth (gforth)], 16 bytes …

4mo ago

+1
−0

HTML, 26 13 bytes ``` Hell …

2mo ago

+0
−0

[Seriously], 1 byte H …

20d ago

+0
−0

[shortC], 16 bytes AJ"H …

30d ago

+0
−0

[jq] `--null-input` `--raw-out …

2mo ago

+0
−0

[SQLite], 21 bytes sele …

2mo ago

+0
−0

[Emoji], 24 bytes 💬Hell …

2mo ago

+0
−0

[Sclipting], (UTF-16) 18 bytes …

2mo ago

+0
−0

[Java (JDK)], 80 bytes …

3mo ago

+0
−0

[Chef], 558 485 bytes H …

2mo ago

+0
−0

[Forget], 319 bytes pus …

3mo ago

+0
−0

Lean, 64 bytes ```lean def …

3mo ago

+0
−0

[!@#$%^&()+], 17 bytes …

3mo ago

+0
−0

[Pyth], 14 bytes "Hello …

3mo ago

+0
−0

Bash, 21 Bytes ```bash pri …

3mo ago

+0
−0

[Charcoal], 13 bytes He …

3mo ago

+0
−0

Java, 37 Bytes ```java v-> …

3mo ago

+0
−0

[Lua], 20 bytes pri …

3mo ago

1 comment thread

General comments (6 comments)

52 answers

+8
−0

Vyxal, 2 bytes

KH

This pushes the string "Hello, World!" to the stack and automatically prints it.

Also, this is the first answer on the site! Woo!

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+7
−0

Shakespeare Programming Language, 974 bytes

Only 973 bytes away from winning.

a.Ajax,.Puck,.Act I:.Scene I:.[Enter Puck and Ajax]Puck:You is the cube ofa big big cat.Ajax:You is the sum ofI a big big big cat.Speak thy!You is the sum ofthe sum ofthe sum ofI a big big big big big cat a big big cat a cat.Speak thy!You is the sum ofthe sum ofyou a pig a big big big cat.Speak thy!Speak thy!You is the sum ofthe sum ofyou a big cat a cat.Speak thy!You is the sum ofthe sum ofthe sum ofyou a pig a big pig the cube ofa big big pig.Speak thy!You is a big big big big big cat.Speak thy!You is the sum ofthe sum ofthe sum oftwice I a big big big pig a big big big big big pig a pig.Speak thy!You is the sum ofthe sum ofthe sum ofyou a big big big cat a big big big big big cat a big big big big pig.Speak thy!You is the sum ofthe sum oftwice I a big big big big pig a big cat.Speak thy!You is the sum ofthe sum ofyou a big pig a big big pig.Speak thy!You is the sum ofyou a big big big pig.Speak thy!You is the sum ofa big big big big big cat a cat.Speak thy!

Spent a good amount of time golfing this. I'm sure there's a few optimizations I've missed, but I don't understand the word "big" anymore.

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (2 comments)
+6
−0

PHP, 13 bytes

Hello, World!

PHP by default prints all source to output until it encounters <? or <?php.

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (2 comments)
+5
−0

Common Lisp, 26 22 bytes

(princ"Hello, World!")

-4 bytes thanks to @Sisyphus‭

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (1 comment)
+5
−0

HQ9+, 1 byte

H

Obligatory HQ9+ answer.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+4
−0

Perl 5 -E, 18 bytes

say"Hello, World!"
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+4
−0

QBASIC, 17, 16 bytes

?"Hello, World!"

This should work on almost any BASIC interpreter.

Thanks to manassehkatz, for the space.

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (4 comments)
+4
−0

C# 9, 38 bytes

System.Console.Write("Hello, World!");

C# Version 9 introduced Top level statements.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+4
−0

Python 2, 20 bytes

print"Hello, World!"

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+8
−2

Javascript V8, 888 bytes

                                  $=-~[]
                                 *~-((~-~
                                [])**  -~-
       ~[]);        _$=$+       ~[];$$_=_$
      +$;$$={      }+[];_$$      =![]+[];
     $_=!![]+[    ];$=$$[$+_$    ]+$$[-~
    []]+(_$$[![  ]+[]]+[])[-~  []]+_$$[
   _$-~[]]+$$[$+$]+$_[-~[]]+$_[_$]+$$[
  $+$+~[]]+$$[$+_$-~[]]+$$[-~[]]+$_[-
 ~[]];$$='\\x';_=(_$**(_$+_$-~[]))+
_$**(_$-~[]);__=_+_/_$;$[$][$](_$$[-
 ~[]]+_$$[_$]+_$$[_$+_$]+$_[-~[]]+
  $_[+[]]+"('"+$$+(_+_$**(_$-~[])
   )+$$+(__+$$_)+$$+(__+[])[+[]]
   +({  }+[           ])[   $$_
  ]+$$  +(__         +[])   [+[]
 ]+({    }+[]      )[$$_     ]+$$
+(__     +[])      [+[]]     +_$$
[+[]     ]+$$      +_/_$     +$$+
(__-     _$+~      [])+      $$+(
__+[     ])[+      []]+      _$$[
+[]]     +$$+      (__+     __/$$_
)+$$     +(__      +[])     [+[]]+
({}+[])  [$$_]+$$+ (__+_$+  _$)+"')")()

Absolutely the shortest possible, no doubt about it. Try it online!. It won't work in the online one, copy it from there and paste it in the developer console if you are on chrome (as it uses the alert function). Please excuse my absolutely awful ascii art.

I also now see that this output isn't accepted (needs the comma and exclamation mark)... lol now it's time to figure out how I did this months ago so I can fix it ...

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (3 comments)
+3
−0

LOLCODE, 37 bytes

HAI 1
VISIBLE "Hello, World!"
KTHXBYE

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+3
−0

R, 20 bytes

cat("Hello, World!")

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (2 comments)
+3
−0

C++ (gcc), 43 bytes

#import<ios>
main(){puts("Hello, World!");}

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (3 comments)
+3
−0

SOGL, 10 bytes

╥‰~⅜,(ε	‘ū

Try it here!

Built-in compression of "hello"; ", "; "world"; "!", with first letters of words uppercased.

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

General comments (2 comments)
+3
−0

C# (.NET Core), 60 bytes

class a{static void Main(){Console.Write("Hello, World!");}}

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+3
−0

05AB1E, 7 bytes

”Ÿ™,‚ï!

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+3
−0

Bash, 18 bytes

echo Hello, World!

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+2
−0

RoadLang, 59 bytes

wagwan my slime
man say"Hello, World!"
chat wit u later fam

My first RoadLang answer! And probably the first one on this site!

Removing any of the words says "Aight the lad's lost the plot", so I think this is the most minimal answer I can get here.

Thanks to Quintec for patching string parsing so that this works.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+2
−0

///, 13 bytes

Hello, World!

Someone had to.

18 bytes using replacement

/x/H/xello, World!

23 bytes using two-layer replacement

/a/Hello, World!//b/a/b

a is replaced with Hello, World! in /b/a/b, creating /b/Hello, World!/b which prints Hello, World! at the end.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+2
−0

PowerShell, 15 bytes

"Hello, World!"

Try it online!

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!