437
\$\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\$
  • 2
    \$\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\$ – Martin Ender Aug 28 '15 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\$ – aditsu quit because SE is EVIL Aug 28 '15 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\$ – Martin Ender Aug 28 '15 at 19:34
  • 7
    \$\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\$ – Martin Ender Aug 29 '15 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\$ – user202729 May 20 '18 at 10:20

781 Answers 781

1
8 9
10
11 12
27
3
\$\begingroup\$

Threead, 16 bytes

"Hello, World!"o

Try it online!

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Traffic, 191 bytes

##########################
#+#+#+#+#*#+#+#+#*#*#+#+#+#
#7#9#9#9#3#4#3#8#3#3#9#9#3
#2#9#9#9#7#4#2#7#7#8#9#9#3
#0#2#9#9#3#0#0#0#3#3#9#1#0
#$#$#$#$#$#$#$#$#$#$#$#$#$#

 C C C C C C C C C C C C C

Traffic is a 2D language modelled after cars moving around streets. Each car holds a value (acting as a variable).

This language is as bad at dealing with "strings" as Brainfuck is, so this is kinda bulky.

How it works

An ungolfed/more "proper" version of the above would look like this:

###########################
# # # # # # # # # # # # # #
#7#9#9#9#3#4#3#8#3#3#9#9#3#
#2#9#9#9#7#4#2#7#7#8#9#9#3#
#+#+#+#+#*#+#+#+#*#*#+#+#+#
# # # # # # # # # # # # # #
#0#2#9#9#3#0#0#0#3#3#9#1#0#
#$#$#$#$#$#$#$#$#$#$#$#$#$#

 C C C C C C C C C C C C C

In this program, 13 cars are defined: all the digits directly adjacent to a $ (in the #$# constructions) become cars with that initial value. So the program begins with cars that have values 0 2 9 9 3 0 0 0 3 3 9 1 0. The cars' initial directions are away from the $.

The streets are defined as the space between #s; #s comprise the walls that cars can't pass through.

All the cars move upwards. They pass over the literal, ignoring it because they haven't seen an operator to use yet. Once the reach the top, they'll each see an operator (either + or *). On the next step, they'll all turn around because they hit a dead end.

Now when walking back downwards, they will observe the literal, since they have operators to use. After fully walking over each literal (i.e. reaching the start point again), each car performs its operation using the literal and assumes the result of the operation. This results in each car containing the ASCII value of a character in Hello, World!: 72 101 108 108 111 44 32 87 111 114 108 100 33.

Then they all step on the $. The $ is a street exit, and one of a few valid characters usable for those. The $ means to output the specified value and destroy the car. The output value for each $ is C, meaning to output the ASCII character given by the car's value.

After all cars hit their respective $s, there won't be any cars left in the field. Thus, the program terminates.

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

PUPPY, 369 bytes

WOOFBARKWOOFBARKWOOFWOOFBARKWOOFBARKWOOFWOOFWOOFWOOFBARKBARKBARKBARKBARK WOOFBARKWOOFBARKWOOFWOOFBARKW OOFBARK  WOO Fwoofbarkbarkwoofwoofwoofwoofwoofwoofwoofwoofwoofbarkwoofwoofwoofbark woofbarkbark BARKWOOFWOOFBARKWOOFBARKBARKWOOFWOOFBARKBARKBARKWOOFBAR KWOOFWOOFBARKBARKBARKWOO FBA rkwoof woofwoof barkbarkbarkwoofbarkwoofbarkwoofwoofbarkwoofbarkbarkbarkwoofwoofbar k

The language that can only be read by puppies.

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

;# 1142 bytes

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#

;# isn't Turing Complete and doesn't meet the site's standard for a valid language but why not?

; adds one to the accumulator

# outputs the accumulator mod 127

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ isn't Turing Complete and doesn't meet the site's standard it does, since this is kolmogorov-complexity. \$\endgroup\$ – Erik the Outgolfer May 7 '17 at 17:49
  • \$\begingroup\$ @EriktheOutgolfer yeah yeah, you know what I mean. \$\endgroup\$ – caird coinheringaahing May 15 '17 at 19:14
3
\$\begingroup\$

Ook!, 779 bytes

Ook! Ook! Ook! Ook! Ook? Ook. Ook! Ook! Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook? Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook! Ook! Ook. Ook? Ook! Ook! Ook. Ook? Ook! Ook! Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook? Ook! Ook? Ook. Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook! Ook! Ook. Ook! Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook. Ook? Ook. Ook? Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook! Ook.

Based on the shortest Brainfuck Hello World :)

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Folders (pure), 195 folders

Some languages, like Folders, are a bit tricky to score

I'm not sure how it translates to bytes, but we can just count the number of folders: (src)

$ ls -l -R . | grep -c ^d
195
$ ls -l -R . | grep :$
./New folder:
./New folder/New folder:
./New folder/New folder/New folder:
./New folder/New folder/New folder (2):
./New folder/New folder/New folder (3):
./New folder/New folder/New folder (4):
./New folder/New folder (2):
./New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder/New folder (2):
./New folder/New folder (2)/New folder/New folder (3):
./New folder/New folder (2)/New folder/New folder (4):
./New folder/New folder (2)/New folder/New folder (5):
./New folder/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy:
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy/New folder (2)/New folder (4)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (10):
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (10)/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (11):
./New folder/New folder (2)/New folder (3)/New folder - Copy (11)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (11)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (11)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (11)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (11)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (11)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (11)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (12):
./New folder/New folder (2)/New folder (3)/New folder - Copy (12)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (12)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (12)/New folder/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (12)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (12)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (12)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (12)/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (2)/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (3)/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2)/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (4)/New folder (2)/New folder (4)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (5):
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (5)/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (6):
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (6)/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder/New folder (4)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder (2)/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (7)/New folder (2)/New folder (4)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8):
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2)/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2)/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2)/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (8)/New folder (2)/New folder (4)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (9):
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder/New folder (3):
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder/New folder (3)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder/New folder (4):
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder/New folder (4)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder (2):
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder (2)/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder (2)/New folder/New folder:
./New folder/New folder (2)/New folder (3)/New folder - Copy (9)/New folder (2)/New folder (2):

Folders (concise), 2 folders + (5 + 13) bytes

./Setup
./Setup/Hello, World!
| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ Welcome to PPCG! / Using inline code formatting can be quite hard to read, I edited the answer. \$\endgroup\$ – user202729 Feb 2 '18 at 10:29
  • \$\begingroup\$ Does this include the comma? I don't see one in your concise version but I don't have a folders installation to check. \$\endgroup\$ – Potato44 Feb 6 '18 at 22:21
  • \$\begingroup\$ According to the original site, (and by the number of folders) it is with the comma. I fixed my concise example. \$\endgroup\$ – Eran W Feb 7 '18 at 0:44
  • 1
    \$\begingroup\$ Easier way to count: find * -type f | wc -l (counts lines of output) \$\endgroup\$ – Peter Cordes Apr 13 '18 at 2:57
  • \$\begingroup\$ Right, It is shorter by one character... But I could use -lR \$\endgroup\$ – Eran W Apr 14 '18 at 8:21
3
\$\begingroup\$

Wumpus, 19 bytes

"!dlroW ,olleH"l&o@

Try it online!

Introducing the first 2D language on a triangular grid! (Unfortunately, you're not seeing much of that grid in this answer...)

Explanation

"!dlroW ,olleH"   Like in many other Fungeoids, this pushes the individual code
                  points of the string to the stack.
l                 Push the stack depth, 13.
&o                Print 13 characters.
@                 Terminate the program.
| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Forked, 42 bytes

89*@AA*i@7+@@3+@4B*@C'!sF+!@3+@6'@8'!3B*!&

Try it online!

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

AlphaBeta, 68 bytes

kjjjggDLeaCLcbbbCLLaaaCLjjjggDLjhhDLsFihhDLCLaaaCLdaaaaCLdaaCLsFiiDL

Try it online!

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Dodos, 167 164 160 159 bytes

	* 2
	1 0 4
	L
	L
	1 *
	4 3 1
	2 1 1
	2 2 3
	1 *
	4 *
	L
	+ 0 0 4
	3 1 1
L
	3 1 4
*
	2 4
+
	dot
i
	+ j
j
	
	dip + dab
0
	
	
	
	
	
1
	i + 0
2
	i 1
3
	i 2
4
	i 3

@Thanks to @Leo for golfing off 1 byte!

Try it online!

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

x86/x86_64 on Linux, 34 32 31 bytes

00:      e8 0d 00 00 00          call   <+0x12>
05:      48 65 6c 6c 6f 2c 20 57 6f 72 6c 64 21
                                 "Hello, World!"
12:      59                      pop    %ecx
13:      6a 01                   push   $0x1
15:      5b                      pop    %ebx
16:      6a 0d                   push   $0xd
18:      5a                      pop    %edx
19:      6a 04                   push   $0x4
1b:      58                      pop    %eax
1c:      cd 80                   int    $0x80
1e:      c3                      ret

Main differences between this one and grc's version: mine makes no assumption of prior register contents, works in both x86 and x86_64 modes and does a ret in lieu of a sys_exit() syscall.

If you want to Try it online!, compile and run the following C program.

const char main[]="\xe8\r\0\0\0Hello, World!Yj\1[j\rZj\4X\xcd\x80\xc3";

Note that Windows Services for Linux currently doesn't seem to support this type of syscall.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ The difference is that yours is a function, @grc's is code that only works from _start in a static executable (where Linux does give you zeroed registers), and runs sys_exit when it's done. (And BTW, this won't work in 64-bit PIE executables (so your sample caller fails on many recent Linux distros where gcc -pie is the default, or any other context where the code is outside the low 32 bits. int 0x80 truncates pointers to 32 bits) \$\endgroup\$ – Peter Cordes Apr 13 '18 at 4:31
  • \$\begingroup\$ If you make position-dependent code, you could use mov $msg, %ecx (5 bytes) instead of call/pop. Put msg after the ret in your function. You can also save instructions (but not code size) by using lea 3(%ebx), %eax (3 bytes) instead of push/pop, after getting a known value of ebx=1. (Still portable between ia32 and x86-64 with the same machine code, because lea 3(%rbx),%eax is safe. Tips for golfing in x86/x64 machine code). Other than position-dependent mov r32, imm32, I don't see a way to make this shorter. \$\endgroup\$ – Peter Cordes Apr 13 '18 at 4:36
  • \$\begingroup\$ Here's a 30-byte version godbolt.org/g/xAcGMg (position-dependent, and avoiding push/pop in favour of xor-zero/inc and LEA). Note that as a function, it clobbers EBX, thus violating the standard calling convention. That's fine for asm functions, though, but maybe something to mention when you're showing how to use it as a C main. The CRT code that calls main doesn't actually break if main clobbers EBX on my system, last I checked, but it could. \$\endgroup\$ – Peter Cordes Apr 13 '18 at 4:46
  • \$\begingroup\$ *window subsystem for linux \$\endgroup\$ – ASCII-only Apr 17 '18 at 11:10
3
\$\begingroup\$

Aubergine, 29 bytes

-a1=oA-a1:bA=iB\0!dlroW ,olleH

Where \0 is a null byte

Try it online!

Explanation

-a1                             Decrement a (now points to H)
   =oA                          Output *a (loop starts here)
      -a1                       Decrement a
         :bA                    If *a is not 0 (we're not at null byte), jump to b (which is 0). IP then moves by 3, so IP starts at 3 next tick
            =iB                 Else move IP to *b, which is the character code of `-`, moving us out of bounds and ending execution without error.
               \0!dlroW ,olleH
| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Meq, 145 111 bytes

.==++>:+>+>[:++++++++>]:=+>====++++>===++>.===+++++++>:=+>:=++++>:++++++++>:>===+++rp>p>>p>p>p>p>p>p>p>p>p>p>p!

Thanks Steadybox for saving 34 bytes

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Welcome to PPCG! As far as I can tell, this is just the HW from the esolangs page (which seems to print Hello World) with two characters dropped. Does this actually print the correct punctuation of Hello, World!? \$\endgroup\$ – Martin Ender Mar 16 '18 at 9:41
  • \$\begingroup\$ @MartinEnder It does not, it prints Helo World. (And the original prints Hello World.) \$\endgroup\$ – Ørjan Johansen Mar 16 '18 at 9:56
  • 1
    \$\begingroup\$ .==++>:+>+>[:++++++++>]:=+>====++++>===++>.===+++++++>:=+>:=++++>:++++++++>:>===+++rp>p>>p>p>p>p>p>p>p>p>p>p>p! should work. \$\endgroup\$ – Steadybox Mar 16 '18 at 10:37
3
\$\begingroup\$

Rockstar, 21 bytes

Shout "Hello, World!"

Yeah, kinda boring... oh well.

| improve this answer | |
\$\endgroup\$
  • 5
    \$\begingroup\$ You can save 2 bytes by using Say instead of Shout. \$\endgroup\$ – RamenChef Sep 27 '18 at 13:58
3
\$\begingroup\$

Pikachu, 1562 bytes

So simple even Pikachu can do it!

pi pi pika pi pi pika pi pi pika pi pikachu
pi pika
pi pika pikachu
pi pika pika pikachu
pi pika pi pi pika pi pi pika pi pikachu
pi pikachu pi pikachu
pikachu pikachu pi pikachu
pika pi
pika pi
pi pikachu pi pikachu
pi pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pika pi
pi pikachu pi pikachu
pi pi pika pi pi pika pi pika pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pika pi
pi pikachu pi pikachu
pi pi pika pi pi pika pi pika pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pika pi
pi pikachu pi pikachu
pi pi pika pi pi pika pi pi pika pi pika pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pi pi pika pi pi pikachu
pi pikachu pi pikachu
pi pi pika pi pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pi pi pika pi pikachu
pi pikachu pi pikachu
pikachu pi pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pi pika pi pi pika pi pi pika pi pikachu
pi pikachu pi pikachu
pika pi pi pika pi pi pika pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pika pi
pi pikachu pi pikachu
pi pika
pi pika pi pi pika pi pi pika pi pi pika pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pi pika pi pi pika pi pi pika pi pi pika pi pi pika pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pika pi
pi pika pi pi pika pi pi pika pi pikachu
pi pika pi pikachu
pikachu pikachu pi pikachu
pikachu pikachu pika pikachu
pika pi
pi pi pika pi pikachu
pi pika
pi pikachu pi pikachu
pika pi
pi pika pi pikachu
pikachu pikachu pi pikachu

Try it at Trove42! (Copy and paste above text)

Commented

# H
pi pi pika pi pi pika pi pi pika pi pikachu         # push 9 to `pi` stack 
pi pika                                             # copy top of `pi` stack, 9, to `pika` stack
pi pika pikachu                                     # push 1 to `pika` stack 
pi pika pika pikachu                                # add top two elements of `pika` stack
                                                    # push result, 10, to `pika` stack 
pi pika pi pi pika pi pi pika pi pikachu            # push 9 to `pi` stack 
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 72, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 72, 
                                                    # to ASCII, 'H', and print

# e                                                 
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 100, to `pi` stack
pi pi pikachu                                       # push 1 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 101, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 101, 
                                                    # to ASCII, 'e', and print

# l
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 100, to `pi` stack
pi pi pika pi pi pika pi pika pi pikachu            # push 8 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 108, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 108, 
                                                    # to ASCII, 'l', and print

# l
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 100, to `pi` stack
pi pi pika pi pi pika pi pika pi pikachu            # push 8 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 108, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 108, 
                                                    # to ASCII, 'l', and print

# o
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 100, to `pi` stack
pi pi pika pi pi pika pi pi pika pi pika pi pikachu # push 11 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 101, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 111, 
                                                    # to ASCII, 'o', and print

# "," (comma)
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pi pika pi pi pikachu                            # push 4 to `pi` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 40, to `pi` stack
pi pi pika pi pi pikachu                            # push 4 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 44, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 44, 
                                                    # to ASCII, ',', and print

# " " (space)
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pi pika pi pikachu                               # push 3 to `pi` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 40, to `pi` stack
pikachu pi pi pikachu                               # push 2 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 32, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 32, 
                                                    # to ASCII, ' ', and print

# W
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pika pi pi pika pi pi pika pi pikachu            # push 8 to `pi` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 80, to `pi` stack
pika pi pi pika pi pi pika pi pikachu               # push 7 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 87, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 87, 
                                                    # to ASCII, 'W', and print

# o
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 100, to `pi` stack
pika pi                                             # copy top of `pi` stack, 100, to `pika` stack
pi pika pi pi pika pi pi pika pi pi pika pi pikachu # push 11 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 111, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 101, 
                                                    # to ASCII, 'o', and print

# r
pika pi                                             # copy top of `pika` stack, 100, to `pi` stack
pi pika pi pi pika pi pi pika pi pi pika pi pi pika pi pikachu  # push 14 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 114, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 114, 
                                                    # to ASCII, 'r', and print

# l
pika pi                                             # copy top of `pika` stack, 100, to `pi` stack
pi pika pi pi pika pi pi pika pi pikachu            # push 8 to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 101, to `pi` stack 
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 101, 
                                                    # to ASCII, 'e', and print

# d
pikachu pikachu pika pikachu                        # convert top of `pika` stack, 100, 
                                                    # to ASCII, 'd', and print

# "!" (exclaimation point)
pika pi                                             # copy top of `pika` stack, 10, to `pi` stack
pi pi pika pi pikachu                               # push 3 to `pi` stack
pi pika                                             # copy top of `pi` stack, 3, to `pika` stack
pi pikachu pi pikachu                               # multiply top two elements of `pi` stack
                                                    # push result, 30, to `pi` stack
pika pi                                             # copy top of `pika` stack, 3, to `pi` stack
pi pika pi pikachu                                  # add top two elements of `pi` stack
                                                    # push result, 33, to `pi` stack
pikachu pikachu pi pikachu                          # convert top of `pi` stack, 33, 
                                                    # to ASCII, '!', and print
| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

A Pear Tree, 25 bytes

print'Hello, World!'#»G²Ú

Try it online!

A Pear Tree programs are written in an arbitrary ASCII-consistent 8-bit character set; for codepoint 128 and above, the interpreter cares about the codepoint numerically, not the represented character. TIO uses Latin-1, so the above program is actually a Latin-1 decoding of the codepoints that make it up.

Explanation

print'Hello, World!' should be fairly self-explanatory. However, there is some choice available here; print"Hello, World!" would have been the same length, but leads to the resulting checksum being less printable.

The checksum is the interesting part of the program. In this program, that's the #»G²Ú at the end. For golfing, you'd want the shortest workable checksum, which is normally 4 or 5 bytes long. (It's a 32-bit checksum, so 4 bytes would normally be enough, but the checksum is also executed as code, and thus needs to be a valid command; the # starts a comment, so # plus 4 bytes is normally enough to add a checksum to anything.) The checksum doesn't have to cover the whole code, but does have to cover a prefix of the part of the code that actually runs; adding comments at the end is terser than adding them at the start, and we want to execute the entire program, so for this program, I caused the checksum to cover the entire program.

Although a Hello World program doesn't benefit much from the checksumming, we could have made use of the checksum behaviour to embed the Hello World program into a larger document or write multiple copies of the program so that if one gets corrupted, the others can still run. This makes A Pear Tree considerably more robust than most languages are.

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Bitwise Cyclic Tag But Way Worse, 324 bytes

1111111111111111111111111111111111111111111111111111111110110101101010101110101101101110111010101110111010101110111110101101110101010110101010101011011011110111011111011110101101011101110101011101011010101011010101011n0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Try it online!

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

]=[, 164 bytes

[=======[==]]=[[=[[=]]=[[=[[========]]][]=[]=[[=[=[=]]][]=[[====[====]]=[[===[==]]=[[========[=======]]=[]=[[=[=[====]]=[[=[[========]]=[[=[[]]=[[===[===]]=[[=[]]=[

]=[ was a language which only uses the symbols ], =, and [.

The ]=[ interpreter is written in 12-Basic.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ There's something amusing about the fact that the ]=[ interpreter at the link is written in the 12-basic interpreter. \$\endgroup\$ – snail_ May 31 '18 at 20:18
  • \$\begingroup\$ Permalink no longer works \$\endgroup\$ – ASCII-only Dec 26 '18 at 1:07
  • \$\begingroup\$ now I can't find the interpreter... \$\endgroup\$ – 12Me21 Dec 28 '18 at 3:18
  • \$\begingroup\$ I was looking through some old files and I found the interpreter, finally. \$\endgroup\$ – 12Me21 Mar 13 '19 at 21:32
3
\$\begingroup\$

legit, 1 commit, 67 bytes (commit messages), 179 + 3 = 182 bytes (repository)

Commit tree:

* 63c5d78 "!dlroW ,olleH" put put put put put put put put put put put put put

The program is quite boring -- commits are expensive, and the messages are compressed, so there's little incentive to use proper control flow.

The program in its proper representation consists of 4 files:

.git/HEAD (21 bytes, an empty file here is still accepted by the interpreter, but git does not recognize the repository):

ref:refs/heads/master

.git/refs/heads/master (40 bytes):

63c5d7873f5b0ede65885bfdfd5c935827d6752a

.git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 (15 bytes, xxd):

00000000: 78da 2b29 4a4d 5530 6000 000a 2c02 01    x.+)JMU0`...,..

.git/objects/63/c5d7873f5b0ede65885bfdfd5c935827d6752a (103 bytes, xxd):

00000000: 78da 04c1 4501 c030 0c00 c0bd a722 0e4a  x...E..0.....".J
00000010: 4137 6366 f0df bbf6 dcf7 f983 80a1 f89e  A7cf............
00000020: be07 6c34 52d7 32c6 b6e1 beb1 dab3 ef09  ..l4R.2.........
00000030: 9b41 3bb6 a83a 347d 8fe6 b1ac ff6f 3a1f  .A;..:4}.....o:.
00000040: f090 6763 c705 31a4 2415 cae5 5252 4cc9  ..gc..1.$...RRL.
00000050: 29ca 0f57 d0c9 cfc9 49f5 5052 2828 2d21  )..W....I.PR((-!
00000060: 1503 00bd ca30 75                        .....0u
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ hmm seems like you should measure repository size using a tar instead? \$\endgroup\$ – ASCII-only May 4 '19 at 1:01
  • \$\begingroup\$ @ASCII-only Is there precedent for this? Also, tar on my machine always creates at least 10240-byte files minimum, which removes almost all possibilities for golfing. Moreover, the filenames literally can't store any extra information - they are hashes of the content (after decompressing with zlib). \$\endgroup\$ – NieDzejkob May 4 '19 at 7:59
  • \$\begingroup\$ hmm. well the structure needs to be counted somehow. maybe some kind of tar archive instead? \$\endgroup\$ – ASCII-only May 4 '19 at 10:04
  • \$\begingroup\$ @ASCII-only I've found the relevant meta post for multi-file programs and linked it in the header of my answer. Can you take a look? \$\endgroup\$ – NieDzejkob May 4 '19 at 10:07
  • \$\begingroup\$ Looks fine now, but still feel like that's a bit hacky (e.g. it's impossible to make it work with 1-byte filenames) :/ IMO the best way to do this would be to count the bytes of a shell script to create the appropriate structure \$\endgroup\$ – ASCII-only May 4 '19 at 10:10
3
\$\begingroup\$

32 bit SPARC machine language on SunOS, 48 45 bytes

0x00:  40 00 00 02    call 0x8            ! PC relative jump, return addr to %o7
0x04:  82 10 20 04    mov  4, %g1         ! delay slot; select write() syscall
0x08:  90 10 20 01    mov  1, %o0         ! stdout is fd=1
0x0c:  92 03 E0 20    add  %o7, 32, %o1   ! put addr of string in %o1
0x10:  94 10 20 0d    mov  13, %o2        ! length of string
0x14:  91 D0 20 08    ta   %icc, %g0 + 8  ! call write()
0x18:  82 10 20 01    mov  1, %g1         ! select exit() syscall
0x1c:  91 D0 20 08    ta   %icc, %g0 + 8  ! call exit()
0x20:  48 65 6c 6c    "Hello, World!"
       6f 2c 20 57
       6f 72 6c 64
       21

Porting to 64 bit SPARC requires changing the argument of the trap instruction from 8 to 64.

To try this on a SunOS machine, compile and run the following C program.

const char main[]="\x40\x00\x00\x02\x82\x10\x20\x04\x90\x10\x20\x01\x92\x03\xe0\x20\x94\x10\x20\x0d\x91\xd0\x20\x08\x82\x10\x20\x01\x91\xd0\x20\x08Hello, World!";
| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Bootable x86 machine code, 512 bytes

Hexdump:

31 c9 8e d9 be 10 7c b1  0d ac b4 0e cd 10 e2 f9  |1.....|.........|
48 65 6c 6c 6f 2c 20 57  6f 72 6c 64 21 00 00 00  |Hello, World!...|
*
00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|

* represents 464 bytes of padding required to place the bootable flag (55 aa) at offset 510.

This is the same as the following assembler code, which can be assembled using nasm hello.asm -f bin -o hello.bin, assuming the assembler code is in a file called hello.asm

[ORG 0x7C00]
[BITS 16]

    xor cx, cx      ; Set cx to 0
    mov ds, cx      ; Set ds to cx (0)
    mov si, msg     ; Set si to the address of the message
    mov cl, 13      ; Set cx to 13 (the size of the message)
print_loop:         ; For each character in the message:
    lodsb           ;   Set al to the character
    mov ah, 0x0E    ;   Set ah to 0x0E
    int 0x10        ;   Call interrupt 0x10 (video services) with ah set to 0x0E (print al to screen)
    loop print_loop ;   Decrement cx and continue the loop if cx > 0

msg:
    db 'Hello, World!' 

times 510 - ($-$$) db 0
db 0x55
db 0xAA

Running

The code can be runned with QEMU using the following command, assuming the binary code is saved in a file called hello.bin:

qemu-system-x86_64 -drive format=raw,file=hello.bin
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Can you assume that regs like cx are already cleared? \$\endgroup\$ – ceilingcat May 7 '19 at 5:32
3
\$\begingroup\$

VBA, 15

?"Hello, World!

Try it, for instance, in the "Immediate" panel of the development window in MS Excel.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I see. I'll try Brandy \$\endgroup\$ – Beta Decay Aug 28 '15 at 15:01
  • \$\begingroup\$ Nope, returns with "Type mismatch: number wanted" \$\endgroup\$ – Beta Decay Aug 28 '15 at 15:01
  • \$\begingroup\$ @BetaDecay I can post a screenshot if you like \$\endgroup\$ – Jerry Jeremiah Aug 30 '15 at 23:05
  • 1
    \$\begingroup\$ @edc65 This still works (least in my VBA7 version) if you remove the trailing quote saving you 1 byte: ?"Hello, World! \$\endgroup\$ – i_saw_drones May 7 '19 at 21:21
  • 1
    \$\begingroup\$ @i_saw_drones amazing! VBA is really forgiving (or really a mess). Thanks for the hint \$\endgroup\$ – edc65 May 8 '19 at 14:15
3
\$\begingroup\$

Nandy, 159B

Simply sets the stack to bits 0 and 1 and then puts them in the output stack.

o::#o>oo>o>oooo>oo>oo>o>o>o>o>oo>o>oo>ooo>oo>o>oo>ooo>oo>o>oooo>oo>o>o>oo>oooo>o>oooooo>o>o>o>o>ooo>o>oo>o>oooo>o>ooo>oo>o>oo>oo>o>oo>ooo>oo>oo>o>oooo>o>oooo>o
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Wow, I'm surprised anyone noticed this language. This can probably be golfed quite a lot if you use a loop to output at the end \$\endgroup\$ – EdgyNerd Aug 31 '19 at 12:51
  • \$\begingroup\$ But how? Can you present you program? (I actually found your language by looking at your TIO request.) \$\endgroup\$ – user85052 Aug 31 '19 at 13:15
  • \$\begingroup\$ I don't think using a loop at the end would be any shorter since it would be the same amount of bytes to output as it is to dupe a bit \$\endgroup\$ – Jo King Sep 8 '19 at 8:11
3
\$\begingroup\$

Verbosity v2, 152 bytes

IncludeTypePackage<OutputSystem>
IncludeTypePackage<StringArray>
outpu=OutputSystem:NewOutput<DEFAULT>
OutputSystem:DisplayAsText<outpu;"Hello, World!">

Try it online!

Introducing Verbosity v2! This is a short as it gets, as variable names must be 5 characters or more. The ungolfed version isn't much different:

IncludeTypePackage<OutputSystem>
IncludeTypePackage<StringArray>

output = OutputSystem:NewOutput<DEFAULT>

OutputSystem:DisplayAsText<output; "Hello, World!">

Try it online!

And it's pretty obvious how it works.

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Keg, 15 8 bytes

«H%c¡|,!

Try it online!

Wow. It's been a while since I posted this. And boy oh boy how Keg has changed.

Explained

« #Start a special compressed string
H% #String compression code (SCC) for "Hello"
c¡ #SCC for "World"
|,! #Join "Hello" and "World" with a `,` and `!` to create "Hello, World!"
« #Close the special compressed string and implicitly print

Old Program

Hello\, World\!

Keg is a newly created stack-based, golfing language, which focuses on only having symbols as functions and keywords. As such, alphanumeric characters are pushed to the stack as letters (even spaces are pushed, meaning that they aren't NOPs).

Symbols that would normally be commands can be escaped using \'s.

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Poetic, 324 bytes

the i/o case of HELLO
a good i/o drill is:say a HELLO
i said HELLO,saying it in Poetic
i code in Poetic,a good way to write a poem
a special piece for you
a special piece in machine writing for you
i already think i do pretty well writing for the machine poem
Poetic program syntax is nice
a perfect sorta poem and a program

Try it online!

This is nothing original, it's a straight port of the brilliant brainfuck answer from @KSab...but it turns out that it's the shortest representation of Hello, World! that I can find in Poetic. If anyone can golf this, please let me know; I'm definitely interested if someone can beat this solution!

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Intcode, 201 bytes

72,4,0,-1,1101,1,100,3,4,3,1101,100,8,3,4,3,4,3,1101,100,11,3,4,3,1101,40,4,3,4,3,1101,30,2,3,4,3,1101,80,7,3,4,3,1101,100,11,3,4,3,1101,100,14,3,4,3,1101,100,8,3,4,3,1101,98,2,3,4,3,1101,30,3,3,4,3,99

And this kids is why we don't golf using languages made up for programming competitions.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ mmm undefined behavior \$\endgroup\$ – Unrelated String Dec 5 '19 at 6:31
  • \$\begingroup\$ Invalid opcodes are just NOPs in my interpreter \$\endgroup\$ – Lyxal Dec 5 '19 at 6:33
  • \$\begingroup\$ @UnrelatedString I mean, they haven't said what to do with undefined ops \$\endgroup\$ – Lyxal Dec 5 '19 at 6:34
  • \$\begingroup\$ Outgolfed \$\endgroup\$ – pppery Dec 27 '19 at 2:19
3
\$\begingroup\$

Plain English 901 308 bytes:

To run:
Start up.
Put "Hello, World!" in a b buffer.
Call "kernel32.dll" "GetStdHandle" with -11 returning a h number.
Call "kernel32.dll" "WriteFile" with the h
and the b's first and the b's length
and a r number's whereabouts and 0 returning the r.
Call "kernel32.dll" "CloseHandle" with the h.
Shut down.

ungolfed, with comments and error traps:

To run:
  Start up.
  Put "Hello, World!" in a buffer.
  Write the buffer to stdout.
  Shut down.

To write a buffer to stdout:
  Clear the i/o error.
  Get stdout returning a standard handle.
  If the i/o error is not blank, exit.
  Call "kernel32.dll" "WriteFile" with the standard handle
    and the buffer's first and the buffer's length
    and a number's whereabouts and 0 returning the number.
  Call "kernel32.dll" "CloseHandle" with the standard handle.
  If the number is not 0, exit.
  Put "Error writing to the standard error stream." into the i/o error.

To get stdout returning a standard handle:
  \ std_input_handle = -10; std_output_handle = -11
  Call "kernel32.dll" "GetStdHandle"
    with -11 [std_output_handle]
    returning the standard handle.
  If the standard handle is -1 [invalid_handle_value],
    put "Error opening the standard output stream." into the i/o error; exit.

The Plain English IDE is available at github.com/Folds/english. The IDE runs on Windows. It compiles to 32-bit x86 code.

Write a buffer to stdout and Get stdout returning a standard handle seem like good candidates for adding to Plain English's library. Similar routines already exist for stderr.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Seems like a very interesting language, but very verbose. Wow! \$\endgroup\$ – Neil A. Jun 28 '17 at 6:35
  • \$\begingroup\$ Is there a character I am missing? It shows up as 307/899 bytes for me, respectively \$\endgroup\$ – Neil A. Jun 28 '17 at 6:37
  • \$\begingroup\$ @NeilA. - Your counts are probably correct. I estimated the byte counts by adding up the (1-based) indexes of the character positions after the last character on each line. It is likely that this process resulted in an extra character being counted after the last line. This process also assumes that the lines can be separated using one byte (such as a space or line feed) instead of the actual two-byte CRLF that is used when the editor saves the file. But since Plain English is designed to successfully compile the file if the CRLFs were replaced by spaces, the latter issue is not a problem. \$\endgroup\$ – Jasper Jun 28 '17 at 15:45
  • \$\begingroup\$ @NeilA. -- My first stab at the problem was much shorter (about 76 bytes), but it launched a complete CGI environment and output to that environment's stdout. This version outputs in the stdout that the user starts in. If I make Plain English treat stdout as nicely as it treats stderr, this version can be shortened to about 88 bytes. \$\endgroup\$ – Jasper Jun 28 '17 at 15:55
  • \$\begingroup\$ @programmer5000 -- According to the rules of this challenge, "The program must not write anything to STDERR." \$\endgroup\$ – Jasper Jul 19 '17 at 15:28
3
\$\begingroup\$

naz, 64 bytes

9a8m1o3d4m5a1o7a2o3a1o3d7a1o9s3s1o3m9s1o9a9a6a1o3a1o6s1o8s1o3d1o

naz is my new language where every command is given by a number and a letter. Programs operate on a single register whose value can be between -127 and 127, inclusive.

This program uses the instructions for add, subtract, multiply, and divide to set the register to the ASCII value of each character in the string Hello, World!, then outputs that character with the o instruction. In the case of the Ls in Hello, once the register is set to the correct value, 2o is used to output twice instead of just once.

| improve this answer | |
\$\endgroup\$
  • 3
    \$\begingroup\$ Welcome to the site :) \$\endgroup\$ – FlipTack Jan 1 at 11:57
2
\$\begingroup\$

Common LISP, 22 bytes

(princ"Hello, World!")
| improve this answer | |
\$\endgroup\$
1
8 9
10
11 12
27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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