"Hello, World!"
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.
Shakespeare Programming Langua …
4y ago
Vyxal, 2 bytes KH Th …
4y ago
PHP, 13 bytes Hello, Wo …
4y ago
HQ9+, 1 byte H Oblig …
4y ago
[Common Lisp], 26 22 bytes …
4y ago
QBASIC, 17, 16 bytes ?" …
4y ago
C# 9, 38 bytes System.C …
4y ago
Javascript V8, 888 bytes ```j …
4y ago
Perl 5 `-E`, 18 bytes ``` …
3y ago
[Python 2], 20 bytes …
4y ago
[C# (.NET Core)], 60 bytes …
3y ago
05AB1E, 7 bytes ”Ÿ™,‚ï! …
4y ago
LOLCODE, 37 bytes HAI 1 …
4y ago
[C++ (gcc)], 43 bytes …
4y ago
R, 20 bytes ``` cat("Hello …
4y ago
[Bash], 18 bytes ec …
4y ago
SOGL, 10 bytes ╥‰⅜,(ε ‘ū …
4y ago
///, 13 bytes ``` Hello, W …
3y ago
[PowerShell], 15 bytes …
3y ago
[RoadLang], 59 bytes …
4y ago
AppleScript, 15 bytes " …
4y ago
[JavaScript (V8)], 28 bytes …
4y ago
[ARBLE], 15 bytes " …
4y ago
Japt, 11 bytes `HÁM, W …
4y ago
Raku, 19 bytes ``` "Hello, W …
4y ago
J, 15 bytes ``` 'Hello, Wo …
3y ago
[dc], 16 bytes [Hello, …
3y ago
[Seriously], 1 byte H …
3y ago
[Unlambda], 40 bytes `` …
3y ago
[Haskell], 25 bytes …
3y ago
Turing Machine.io, 202 bytes …
3y ago
Scala, 42 bytes object>e …
3y ago
[C# (.NET Core)], 67 bytes …
3y ago
Rockstar, 19 bytes say …
3y ago
PureScript, 25 bytes ``` m …
3y ago
Swift, 23 bytes ```swift p …
3y ago
Kotlin, 34 bytes ```kotlin …
3y ago
[Forth (gforth)], 16 bytes …
3y ago
HTML, 26 13 bytes ``` Hell …
3y ago
[C (gcc)], 30 bytes …
6mo ago
[K (oK)], 15 bytes "Hel …
6mo ago
[AWK], 2 bytes $0 Tr …
6mo ago
C (gcc), 46 bytes ```cpp pri …
2y ago
Z80 Assembler, 50 bytes ``` …
2y ago
JavaScript V8, 26 bytes ``` …
2y ago
SOS, 155 Bytes !+!-!!+! …
2y ago
[shortC], 16 bytes AJ"H …
3y ago
[jq] `--null-input` `--raw-out …
3y ago
[SQLite], 21 bytes sele …
3y ago
[Emoji], 24 bytes 💬Hell …
3y ago
[Sclipting], (UTF-16) 18 bytes …
3y ago
[Java (JDK)], 80 bytes …
3y ago
[Chef], 558 485 bytes H …
3y ago
[Forget], 319 bytes pus …
3y ago
Lean, 64 bytes ```lean def …
3y ago
[!@#$%^&()+], 17 bytes …
3y ago
[Pyth], 14 bytes "Hello …
3y ago
Bash, 21 Bytes ```bash pri …
3y ago
[Charcoal], 13 bytes He …
3y ago
Java, 37 Bytes ```java v-> …
3y ago
[Lua], 20 bytes pri …
3y ago
61 answers
C (gcc), 46 bytes
printf(char*);main(){printf("Hello, World!");}
printf(char*);
(14 bytes) is better than
#include <stdio.h>\n
(19 bytes)
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
General Sebast1an | (no comment) | Oct 5, 2021 at 07:56 |
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.
PHP, 13 bytes
Hello, World!
PHP by default prints all source to output until it encounters <?
or <?php
.
C# 9, 38 bytes
System.Console.Write("Hello, World!");
C# Version 9 introduced Top level statements.
0 comment threads
QBASIC, 17, 16 bytes
?"Hello, World!"
This should work on almost any BASIC interpreter.
Thanks to manassehkatz, for the space.
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 ...
C# (.NET Core), 60 bytes
class a{static void Main(){Console.Write("Hello, World!");}}
0 comment threads
AppleScript, 15 bytes
"Hello, World!"
No, I'm not joking. This ridiculous language for a code golf actually beats some of the more normal languages.
0 comment threads
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.
1 comment thread