515
\$\begingroup\$

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with , and counting). While this is not the most interesting code golf in the common languages, finding the shortest solution in certain esolangs can be a serious challenge. For instance, to my knowledge it is not known whether the shortest possible Brainfuck solution has been found yet.

Furthermore, while all of Wikipedia (the Wikipedia entry has been deleted but there is a copy at archive.org ), esolangs and Rosetta Code have lists of "Hello, World!" programs, none of these are interested in having the shortest for each language (there is also this GitHub repository). If we want to be a significant site in the code golf community, I think we should try and create the ultimate catalogue of shortest "Hello, World!" programs (similar to how our basic quine challenge contains some of the shortest known quines in various languages). So let's do this!

The Rules

  • Each submission must be a full program.
  • The program must take no input, and print Hello, World! to STDOUT (this exact byte stream, including capitalization and punctuation) plus an optional trailing newline, and nothing else.
  • The program must not write anything to STDERR.
  • If anyone wants to abuse this by creating a language where the empty program prints Hello, World!, then congrats, they just paved the way for a very boring answer.

    Note that there must be an interpreter so the submission can be tested. It is allowed (and even encouraged) to write this interpreter yourself for a previously unimplemented language.

  • Submissions are scored in bytes, in an appropriate (pre-existing) encoding, usually (but not necessarily) UTF-8. Some languages, like Folders, are a bit tricky to score - if in doubt, please ask on Meta.
  • This is not about finding the language with the shortest "Hello, World!" program. This is about finding the shortest "Hello, World!" program in every language. Therefore, I will not mark any answer as "accepted".
  • If your language of choice is a trivial variant of another (potentially more popular) language which already has an answer (think BASIC or SQL dialects, Unix shells or trivial Brainfuck-derivatives like Alphuck), consider adding a note to the existing answer that the same or a very similar solution is also the shortest in the other language.

As a side note, please don't downvote boring (but valid) answers in languages where there is not much to golf - these are still useful to this question as it tries to compile a catalogue as complete as possible. However, do primarily upvote answers in languages where the authors actually had to put effort into golfing the code.

For inspiration, check the Hello World Collection.

The Catalogue

The Stack Snippet at the bottom of this post generates the catalogue from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

## Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

## Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:

## [><>](https://esolangs.org/wiki/Fish), 121 bytes

/* Configuration */

var QUESTION_ID = 55422; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 8478; // This should be the user ID of the challenge author.

/* App */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });  
}

getAnswers();

var SCORE_REG = /<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

var OVERRIDE_REG = /^Override\s*header:\s*/i;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {
  var valid = [];
  
  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>';
    });
    
    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });
    else console.log(body);
  });
  
  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });

  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;
    
    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

    var lang = a.language;
    lang = jQuery('<a>'+lang+'</a>').text();
    
    languages[lang] = languages[lang] || {lang: a.language, lang_raw: lang, user: a.user, size: a.size, link: a.link};
  });

  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))
      langs.push(languages[lang]);

  langs.sort(function (a, b) {
    if (a.lang_raw.toLowerCase() > b.lang_raw.toLowerCase()) return 1;
    if (a.lang_raw.toLowerCase() < b.lang_raw.toLowerCase()) return -1;
    return 0;
  });

  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }

}
body {
  text-align: left !important;
  display: block !important;
}

#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}

#language-list {
  padding: 10px;
  width: 500px;
  float: left;
}

table thead {
  font-weight: bold;
}

table td {
  padding: 5px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/all.css?v=ffb5d0584c5f">
<div id="language-list">
  <h2>Shortest Solution by Language</h2>
  <table class="language-list">
    <thead>
      <tr><td>Language</td><td>User</td><td>Score</td></tr>
    </thead>
    <tbody id="languages">

    </tbody>
  </table>
</div>
<div id="answer-list">
  <h2>Leaderboard</h2>
  <table class="answer-list">
    <thead>
      <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr>
    </thead>
    <tbody id="answers">

    </tbody>
  </table>
</div>
<table style="display: none">
  <tbody id="answer-template">
    <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>
  </tbody>
</table>
<table style="display: none">
  <tbody id="language-template">
    <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>
  </tbody>
</table>

\$\endgroup\$
21
  • 3
    \$\begingroup\$ @isaacg No it doesn't. I think there would be some interesting languages where it's not obvious whether primality testing is possible. \$\endgroup\$ Aug 28, 2015 at 13:56
  • 6
    \$\begingroup\$ If the same program, such as "Hello, World!", is the shortest in many different and unrelated languages, should it be posted separately? \$\endgroup\$ Aug 28, 2015 at 15:33
  • 2
    \$\begingroup\$ @mbomb007 Well it's hidden by default because the three code blocks take up a lot of space. I could minify them so that they are a single line each, but I'd rather keep the code maintainable in case bugs come up. \$\endgroup\$ Aug 28, 2015 at 19:34
  • 8
    \$\begingroup\$ @ETHproductions "Unlike our usual rules, feel free to use a language (or language version) even if it's newer than this challenge." Publishing the language and an implementation before posting it would definitely be helpful though. \$\endgroup\$ Aug 29, 2015 at 23:01
  • 2
    \$\begingroup\$ @MartinEnder ... Almost. If two BF solutions have the same size, the one with smaller lexicographical order will take smaller number of bytes in Unary. Of course the smallest Unary solution translated to BF is guaranteed to be smallest. \$\endgroup\$
    – DELETE_ME
    May 20, 2018 at 10:20

970 Answers 970

1
9 10
11
12 13
33
3
\$\begingroup\$

golflua, 16 bytes

w"Hello, World!"
\$\endgroup\$
3
\$\begingroup\$

CJam, 15 bytes

"Hello, World!"

Try it online

\$\endgroup\$
3
\$\begingroup\$

XSM, 28 bytes

<print>Hello, World!</print>
\$\endgroup\$
3
  • \$\begingroup\$ This is an actual XML programming language? Wow. That's... different! \$\endgroup\$
    – galexite
    Aug 28, 2015 at 17:09
  • 1
    \$\begingroup\$ Damn it, I was hoping I could write my own... Now someone's already gone and made it :P \$\endgroup\$
    – Beta Decay
    Aug 29, 2015 at 7:12
  • \$\begingroup\$ @BetaDecay There is also xplusplus.sourceforge.net and o-xml.org \$\endgroup\$ Aug 30, 2015 at 23:15
3
\$\begingroup\$

GolfScript, 15 bytes

"Hello, World!"
\$\endgroup\$
3
\$\begingroup\$

Underload, 16 bytes

(Hello, World!)S

Underload is the Brainfuck of stack-based languages. (x) pushes the string x to the stack, and S prints the value on top of the stack.

\$\endgroup\$
3
\$\begingroup\$

Rail, 27 bytes

$'main'
 -[Hello, World!]o#

Rail is a 2D language where the instruction pointer is a train that runs on, well, rails. Execution begins from the main function, starting from the $ and initially moving southeast.

The first command encountered is -, which makes the train turn so that it's moving eastward. Then we push a string, output with o and terminate with #.

\$\endgroup\$
3
\$\begingroup\$

bc, 16 bytes

"Hello, World!"

(bc requires a trailing newline - hence 16 instead of 15)

\$\endgroup\$
3
\$\begingroup\$

Idris, 36 bytes

main:IO();main=putStr"Hello, World!"

Idris is sort of like Haskell, but top-level definitions need a type signature.

\$\endgroup\$
1
  • \$\begingroup\$ Also, it has dependent types and is a way better language xD \$\endgroup\$
    – univalence
    Nov 6, 2018 at 17:34
3
\$\begingroup\$

CoffeeScript, 21 bytes

alert "Hello, World!"

or console.log "Hello, World!", if that's closer to STDOUT for your tastes.

\$\endgroup\$
3
\$\begingroup\$

pb, 80 bytes

b[72]>b[101]>b[108]>b[108]>b[111]>b[44]>>b[87]>b[111]>b[114]>b[108]>b[100]>b[33]

Super naive. I tried to golf it down by keeping 108 (the character code for "l") in T, either by doing t[108] at the beginning of the program or t[B] after the first time it was printed, but each attempt ended up exactly the same length.

Note that pb doesn't require you to write b[32]. Any blank spaces on the canvas (with at least one non-blank space to the right of it) are automatically printed to the terminal as a space.

\$\endgroup\$
3
\$\begingroup\$

Fueue, 47 bytes

72 101 108 108 111 44 32 87 111 114 108 100 33H
\$\endgroup\$
3
\$\begingroup\$

Tcl, 19 bytes

puts Hello,\ World!

I think this can get smaller than it already is.

\$\endgroup\$
4
  • \$\begingroup\$ Is that missing the comma? \$\endgroup\$ Aug 29, 2015 at 13:00
  • \$\begingroup\$ What comma do you mean? \$\endgroup\$ Aug 29, 2015 at 13:06
  • \$\begingroup\$ I'm just guessing, but will this print "Hello World!" rather than "Hello, World!"? \$\endgroup\$ Aug 29, 2015 at 13:10
  • \$\begingroup\$ Right... Forgot that piece... \$\endgroup\$ Aug 29, 2015 at 13:12
3
\$\begingroup\$

99, 283 bytes

999 9 9
99 99999999 999 9
99
99 99999 9 999 9
99
99 99 999 999999
99
99
99 9999999 9999 999 9
99
99 99 9999999 9 999 9 999 9 999 9
99
99 99 999999 9 999999 9
99
9999
99 99999 999 999999 999 9
99
99 9999999 9999 9 999 9
99
99 99 999999 9
99
99 99 999999 999 9
99
99 99999 9999999 9
99

This was handcrafted so it is very likely suboptimal. Someone should write a metagolfer...

The following table has been quite useful writing 99 code by hand:

Variable  /9%128    Can print?

9              1 
99            11    !
999          111 
9999          87    !
99999        103 
999999         7    !
9999999       71 
99999999      71    !

All further rep-digits of 9 also yield 71 when taken modulo 128 (after dividing by 9).

\$\endgroup\$
2
  • \$\begingroup\$ All further rep-digits of 9 also yield 71 when taken modulo 128. you can't just drop these math facts like they're nothing.now i'm going to be amazed all day \$\endgroup\$ Aug 30, 2015 at 14:04
  • \$\begingroup\$ @undergroundmonorail Note that it's actually the rep-digits of 1 which do this, because the variable is divided by 9 before taking the modulo. And the reason this works is that (710 % 128) happens to be 70. \$\endgroup\$ Aug 30, 2015 at 14:09
3
\$\begingroup\$

Aheui, 177 bytes

밣밢따빠빠빠맣밤밢따다빠빠빠밠타맣맣맣받다맣밠밤따타맣밤밣따맣받발따다빠맣밦밤따다빠빠맣받다맣받타빠맣밣타빠맣받나맣희

Aheui is Befunge, but with Hangul. Test this here.

\$\endgroup\$
3
\$\begingroup\$

MicroSoft Windows HTA - 13 bytes

Hello, World!

MicroSoft Windows HTA occupies a niche between HTML and applications, where you get the simplicity and ease of HTML, with the direct access to the system API of applications, including file and system calls.

When I was first introduced to it, I wondered how I ever got along without it. I used it to make really easy intuitive interfaces for complex command line utilities.

Sadly, it's fallen by the wayside and you hardly hear about it anymore. One thing I remember about the official documentation was that they boasted how a bare Hello, World! is a legal hypertext application.

\$\endgroup\$
3
\$\begingroup\$

Swift, 22 Bytes

Before Version 2.0 (24 Bytes)

println("Hello, World!")

After Version 2.0 (22 Bytes)

print("Hello, World!")

Includes trailing newline

Top level code in the main file gets executed automatically. In playgrounds, anything at top level gets executed as well.

In version 2.0 beta 6 this is also possible:

print("Hello,", "World!")

which will print all the items provided, separated by a space, terminated by a newline. This is equal to the following (which is probably the longest Swift version of a non-ridiculous "Hello, World!" program):

print("Hello,", "World!", separator: " ", terminator: "\n")

Since version 2.0 beta 6, Swift is one of the few languages that can have a vararg parameter at any position (not just the end), due to named parameters.

\$\endgroup\$
0
3
\$\begingroup\$

FlogScript, 17 bytes

{Hello, World!}P.
\$\endgroup\$
0
3
\$\begingroup\$

Perl, 18 bytes

say"Hello, World!"

Remark:

"say" is used in Perl 6. While "print" is a Perl 5 thing. But "say" can be used in version 5.10+ when the -M5.010 switch (or -M for a higher version) is used.

Perl 5 without version switch, 20 bytes

print"Hello, World!"

Perl/Tk, 91 Bytes

Ok, this doesn't exactly print to STDOUT as was requested by the challenge. Since it creates a window with a button. So this was just added for the sake of entertainment/completeness.

use Tk;MainWindow->new->Button(-text=>"Hello, World!",-command=>sub{exit})->pack();MainLoop

Perl/Tk Hello, World!

\$\endgroup\$
3
  • 1
    \$\begingroup\$ You can shave off 2 bytes by replacing print with say, provided the OP agrees with this meta post in -M5.010 being free. \$\endgroup\$
    – Slade
    Aug 28, 2015 at 15:54
  • \$\begingroup\$ I knew "say" is used in Perl 6, but didn't realise they added it to a more recent version of Perl 5 than the one I use. So I added both to the post. \$\endgroup\$
    – LukStorms
    Aug 28, 2015 at 19:42
  • \$\begingroup\$ There is another Perl 6 answer, so maybe you could just post the Perl 5 one. \$\endgroup\$ Sep 1, 2015 at 21:41
3
\$\begingroup\$

Beam, 128 120 Bytes

'''''''''>`++++++++)@'''P''''>`++++)+@+++++++@P@+++@'P'L'''>`++++++)''P'>`++++)@''p@'p>`+++++)@'p@+++@`p@--------@''p+@H

This uses the general construct:

'''''''''              # increment store to 9
         >             # set direction right. Beginning of loop
          `            # decrement store
           ++++++++    # increment beam 8 
                   )   # set direction left if store not 0. End of loop
                    @  # Output character

Effectively translates to 9 * 8. The store needs to be odd before entering the loop otherwise it will end up being an infinite loop. The Esolangs has examples of this at the bottom in the constants section.

P is used to save to l, o and memory slots 0, 1 and 2.
p is used to retrieves those values to the beam.

The following snippet should run Beam programs, but it hasn't been put through the ringer yet, so is likely to have some bugs.

var ITERS_PER_SEC = 100000;
var TIMEOUT_SECS = 50;
var ERROR_INTERRUPT = "Interrupted by user";
var ERROR_TIMEOUT = "Maximum iterations exceeded";
var ERROR_LOSTINSPACE = "Beam is lost in space";

var code, store, beam, ip_x, ip_y, dir, input_ptr, mem;
var input, timeout, width, iterations, running;

function clear_output() {
document.getElementById("output").value = "";
document.getElementById("stderr").innerHTML = "";
}

function stop() {
running = false;
document.getElementById("run").disabled = false;
document.getElementById("stop").disabled = true;
document.getElementById("clear").disabled = false;
document.getElementById("timeout").disabled = false;
}

function interrupt() {
error(ERROR_INTERRUPT);
}

function error(msg) {
document.getElementById("stderr").innerHTML = msg;
stop();
}

function run() {
clear_output();
document.getElementById("run").disabled = true;
document.getElementById("stop").disabled = false;
document.getElementById("clear").disabled = true;
document.getElementById("input").disabled = false;
document.getElementById("timeout").disabled = false;

code = document.getElementById("code").value;
input = document.getElementById("input").value;
timeout = document.getElementById("timeout").checked;
	
code = code.split("\n");
width = 0;
for (var i = 0; i < code.length; ++i){
	if (code[i].length > width){ 
		width = code[i].length;
	}
}
console.log(code);
console.log(width);
	
running = true;
dir = 0;
ip_x = 0;
ip_y = 0;
input_ptr = 0;
beam = 0;
store = 0;
mem = [];
	
input = input.split("").map(function (s) {
		return s.charCodeAt(0);
	});
	
iterations = 0;

beam_iter();
}

function beam_iter() {
while (running) {
	var inst; 
	try {
		inst = code[ip_y][ip_x];
	}
	catch(err) {
		inst = "";
	}
	switch (inst) {
		case ">":
			dir = 0;
			break;
		case "<":
			dir = 1;
			break;
		case "^":
			dir = 2;
			break;
		case "v":
			dir = 3;
			break;
		case "+":
			++beam;
			break;
		case "-":
			--beam;
			break;
		case "@":
			document.getElementById("output").value += String.fromCharCode(beam);
			break;
		case ":":
			document.getElementById("output").value += beam+"\n";
			break;
		case "/":
			switch (dir) {
				case 0:
					dir = 2;
					break;
				case 1:
					dir = 3;
					break;
				case 2:
					dir = 0;
					break;
				case 3:
					dir = 1;
					break;
			}
		case "\\":
			switch (dir) {
				case 0:
					dir = 3;
					break;
				case 1:
					dir = 2;
					break;
				case 2:
					dir = 1;
					break;
				case 3:
					dir = 0;
					break;
			}
			break;
		case "!":
			if (beam != 0) {
				switch (dir) {
				case 0:
					dir = 1;
					break;
				case 1:
					dir = 0;
					break;
				case 2:
					dir = 3;
					break;
				case 3:
					dir = 2;
					break;
				}
			}
			break;
		case "?":
			if (beam == 0) {
				switch (dir) {
				case 0:
					dir = 1;
					break;
				case 1:
					dir = 0;
					break;
				case 2:
					dir = 3;
					break;
				case 3:
					dir = 2;
					break;
				}
			}
			break;
		case "|":
			switch (dir) {
			case 0:
				dir = 1;
				break;
			case 1:
				dir = 0;
				break;
			}
			break;
		case "_":
			switch (dir) {
			case 0:
				dir = 1;
				break;
			case 1:
				dir = 0;
				break;
			}
			break;
		case "H":
			stop();
			break;
		case "S":
			store = beam;
			break;
		case "L":
			beam = store;
			break;
		case "s":
			mem[beam] = store;
			break;
		case "g":
			store = mem[beam];
			break;
		case "P":
			mem[store] = beam;
			break;
		case "p":
			beam = mem[store];
			break;
		case "u":
			if (beam != store) {
				dir = 2;
			}
			break;
		case "n":
			if (beam != store) {
				dir = 3;
			}
			break;
		case "`":
			--store;
			break;
		case "'":
			++store;
			break;
		case ")":
			if (store != 0) {
				dir = 1;
			}
			break;
		case "(":
			if (store != 0) {
				dir = 0;
			}
			break;
		case "r":
			if (input_ptr >= input.length) {
				beam = 0;
			} else
			{
				beam = input[input_ptr];
				++input_ptr;
			}
			break;
		}
	// Move instruction pointer
	switch (dir) {
		case 0:
			ip_x++;
			break;
		case 1:
			ip_x--;
			break;
		case 2:
			ip_y--;
			break;
		case 3:
			ip_y++;
			break;
	}
	if (running && (ip_x < 0 || ip_y < 0 || ip_x >= width || ip_y >= code.length)) {
		error(ERROR_LOSTINSPACE);
	}
	++iterations;
	if (iterations > ITERS_PER_SEC * TIMEOUT_SECS) {
		error(ERROR_TIMEOUT);
	}
}
}
<div style="font-size:12px;font-family:Verdana, Geneva, sans-serif;">Code:
    <br>
    <textarea id="code" rows="3" style="overflow:scroll;overflow-x:hidden;width:90%;">'''''''''>`++++++++)@'''P''''>`++++)+@+++++++@P@+++@'P'L'''>`++++++)''P'>`++++)@''p@'p>`+++++)@'p@+++@`p@--------@''p+@H</textarea>
    <br>Input:
    <br>
    <textarea id="input" rows="2" style="overflow:scroll;overflow-x:hidden;width:90%;"></textarea>
    <p>Timeout:
        <input id="timeout" type="checkbox" checked="checked">&nbsp;
        <br>
        <br>
        <input id="run" type="button" value="Run" onclick="run()">
        <input id="stop" type="button" value="Stop" onclick="interrupt()" disabled="disabled">
        <input id="clear" type="button" value="Clear" onclick="clear_output()">&nbsp; <span id="stderr" style="color:red"></span>
    </p>Output:
    <br>
    <textarea id="output" rows="6" style="overflow:scroll;width:90%;"></textarea>
</div>

\$\endgroup\$
3
\$\begingroup\$

BitShift, 216 211 209 bytes

Introducing my first esolang;
BitShift is a language which can only operate on 1 value, and use a limited set of bit-shifting instructions to modify it.
Therefore it's challenging to write programs and it's not great for golfing.

A valid Hello, World! is 209 bytes long, and this is believed optimal. Generated by this metagolf.

10111110111110101001011001001010111011111010011010100101011001000100101011001000001100101011111110011010100101100110010001000100101011110100110110101001000010001010110111101110111101010001000010101111101101010

You can test it here.

\$\endgroup\$
3
\$\begingroup\$

Simplex, 16 bytes

"Hello, World!"g

g is the standard output mechanism.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Thanks for using Simplex :D \$\endgroup\$ Oct 26, 2015 at 11:21
3
\$\begingroup\$

pl, 13 bytes

Hello, World!

Yes, it works. Try it online.

Explanation

In pl, all printable ASCII chars (between 0x20 and 0x7E in CP437) are reserved for variable names. Normally, these chars push the contents of that variable onto the argument stack. BUT, if the variable doesn't actually exist, pl assumes that this is actually the start of a string literal. The string literal is closed when it encounters a variable that exists or a function char. In this case, since none of these variables have been defined, Hello, World! gets pushed onto the stack as a string and printed implicitly at the end.

\$\endgroup\$
3
\$\begingroup\$

Whenever, 25 bytes

Whenever is a programming language which has no sense of urgency. It does things whenever it feels like it, not in any sequence specified by the programmer. Since Whenever code is not necessarily executed sequentially, lines of code become more like "to-do" lists, which the language interpreter may tackle in any order it likes.

1 print("Hello, World!");
\$\endgroup\$
3
\$\begingroup\$

PlatyPar, 14 bytes

"Hello, World!

In PlatyPar (my language that is still in development), parens, quotes, brackets, etc. are automatically closed at the end of the line. Additionally, the last item on the stack (in this case, "Hello, World!") is implicitly printed.

Try it here!

\$\endgroup\$
3
\$\begingroup\$

VHDL, 98 bytes

entity m is
end;architecture a of m is
begin
process
begin
report"Hello, World";end process;end a;

At least it's not Java...

\$\endgroup\$
1
  • \$\begingroup\$ class a{public static void main(String[]a){System.out.print("Hello, World!");}} Nope, you've been Java'd. Also this appears to print "Hello World", not "Hello, World!" \$\endgroup\$ Mar 25, 2016 at 23:56
3
\$\begingroup\$

Y 16 bytes

No, not http://foldoc.org/Y or https://github.com/ConorOBrien-Foxx/Y although we probably need an entry for both of them as well...

Y is a stack-oriented FORTH-type programming language by Thomas Fischbacher derived from Wouter van Oortmerssen's "FALSE". Like FALSE, Y is cryptic to the extreme. According to the readme it is much more powerful because "virtually all of the example programs in 'Kernighan & Ritchie - Programming in C' can be done in Y in a fraction of time and code."

"Hello, World!"`
\$\endgroup\$
3
\$\begingroup\$

Kotlin, 50 48 bytes

fun main(a:Array<String>)=print("Hello, World!")
\$\endgroup\$
0
3
\$\begingroup\$

Fuzzy Octo Guacamole, 15 bytes

"Hello, World!"

This is a new language I created with inspiration from @Conor's NTFJ, @MatinBüttner's Brian and Chuck, and a couple others.

It has 2 stacks.

This is fairly simple and only uses one stack though.

The "..." denotes a string literal that is pushed to the stack.

Then implicit output.

\$\endgroup\$
0
3
\$\begingroup\$

Commercial, 75 bytes

I post a link to my implementation, but there is a link to the esolang page in the README

"Hello, World!" - Satisfied Consumer of x
x has been selling out worldwide!

This code is equivalent to the following pseudocode

Put "Hello, World!" in x
Print the value of x
\$\endgroup\$
1
  • \$\begingroup\$ like the theme lol \$\endgroup\$ Sep 16, 2016 at 1:16
3
\$\begingroup\$

Pyramid, 587 294 bytes

(72)[
no
+<
]
=
a
<
=
np
<
=
(29)[
no
+<
]
=
a
<
=
np
+<
=
a
++++++<
=
np
<
=
a
<
=
np
+<
=
a
++<
=
np
<
=
(67)[
no
-<
]
=
a
<
=
np
-<
=
a
-----------<
=
np
<
=
(55)[
no
+<
]
=
a
<
=
np
<
=
(24)[
no
+<
]
=
a
<
=
np
<
=
a
+++<
=
np
<
=
a
------<
=
np
<
=
a
--------<
=
np
<
=
(67)[
no
-<
]
=
a
<

Yikes... this is a monstrosity. This is now less of a monstrosity, but still crazy big for "Hello, World!".

The new byte count was because for-loops were implemented in Pyramid (YES!)

Pyramid is a stack-based language, which was built on Stackylogic. You should probably go and click on the link before you go to the Github page, because you'll understand the what the commands mean on the GH page better.

There's 250 104 lines of code here, if you're interested.

\$\endgroup\$
2
  • \$\begingroup\$ link 404 why :(? \$\endgroup\$ Sep 23, 2016 at 3:09
  • \$\begingroup\$ @DestructibleWatermelon Oh yeah, that's because I stopped working on Pyramid. \$\endgroup\$
    – clismique
    Sep 23, 2016 at 6:40
1
9 10
11
12 13
33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.