490
\$\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 '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\$ 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\$ Aug 28 '15 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 '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\$
    – DELETE_ME
    May 20 '18 at 10:20

889 Answers 889

1
13 14
15
16 17
30
2
\$\begingroup\$

Visual Basic.NET, 63 bytes

Module A
Sub Main
System.Console.Write("Hello, World!")
End Sub
End Module
\$\endgroup\$
2
\$\begingroup\$

JavaScript function golf, 19 bytes

p("Hello, World!");

I made this[1] for you!

JavaScript function golf is included into the language page HTML, so use it right from the console!

If you want it as an alert, here you are (21 byte):

p2a("Hello, World!");

That said, I finally got time for improvement of the framework.

[1]: I mean, the language golfing framework.

\$\endgroup\$
6
  • 2
    \$\begingroup\$ Welcome to PPCG. This is a good start for a Golfing language, however there a lot of features of JavaScript, like Prototypes, that you might want to take advantage of (e.g. 42.s() could turn a number into a string instead of i2s(42).) If you want help or tips, feel free to visit chat.stackexchange.com/rooms/27364/… for help, tips and showcasing your language. \$\endgroup\$
    – wizzwizz4
    Jan 2 '16 at 12:39
  • \$\begingroup\$ @wizzwizz4 thanks, but my real introduction to PPCG was a question. :P Also, I have still to learn about prototypes, and I'm not active enough to chat in the PPCG rooms. \$\endgroup\$
    – user48538
    Jan 2 '16 at 12:43
  • \$\begingroup\$ @wizzwizz4 42.s() is a syntax error in some js engines, you'd have to do (42).s() which doesn't actually save anything \$\endgroup\$ Jan 2 '16 at 14:49
  • \$\begingroup\$ @SuperJedi224 That was an example. :-P \$\endgroup\$
    – wizzwizz4
    Jan 2 '16 at 15:19
  • \$\begingroup\$ @zyabin101 You don't need much reputation to chat. \$\endgroup\$
    – wizzwizz4
    Jan 2 '16 at 15:19
2
\$\begingroup\$

Boo, 22 bytes

Quoting from https://github.com/bamboo/boo/raw/master/docs/BooManifesto.pdf:

The guys who came up with “public static void main” were probably kidding, the problem is that most people didn't get it was a joke. The infamous HelloWorld in all its boo glory:

print("Hello, World!")

“public static void main”, that was a good one!

\$\endgroup\$
2
\$\begingroup\$

Brachylog, 3 bytes

@Hw

@H is the string "Hello, World!", and w is the write predicate.

\$\endgroup\$
2
\$\begingroup\$

Jolf, 7 bytes

Try it here!

ξrμ\t\x0FΉ\x1B

ξ read three characters and interprets them as a base 256 number index in a gigantic word list. 'Nuff said.

\$\endgroup\$
2
\$\begingroup\$

Detour, 19 bytes

`u
@"Hello, World!"

Try it online!

This language was not designed with strings in mind.
"How do you fit a string literal into a 2D language represented on a grid of characters?"
You don't! Just put a `, and then define what the `'s stand for on the bottom with @ signs (sigh)! This will push all its code points to the ` cell, and the u cell will print it as a string

I'll try to come up with a shorter way to fit in strings later. At least it's not Java.

\$\endgroup\$
2
\$\begingroup\$

Gogh, 14 bytes

"Hello, World!

This one is pretty self-explanatory. Gogh has self-closing strings, so if there isn't a closing double-quote, it tacks one on the end and you have yourself a string.

You can run it from the command line like this:

$ ./gogh o '"Hello, World!'
\$\endgroup\$
2
\$\begingroup\$

NTFJ, 118 bytes

NTFJ is an esoteric programming language intended to be a Turing tarpit. It is stack-based, and pushes bits to the stack, which can be later coalesced to an 8-bit number. I believe that this is the optimal, using a loop. (Maybe something can be done by hard-coding @ into the string, which would allow for us to double the l. I haven't checked, but I believe this would come out as more bytes.)

Anyhow, this is the full code:

~~#~~~~#~##~~#~~~##~##~~~###~~#~~##~####~#~#~###~~#~~~~~~~#~##~~~##~####~##~##~~~##~##~~~##~~#~#~#~~#~~~@(*~##~#~~~@^)

Or, more readable:

~~#~~~~#~##~~#~~~##~##~~~###~~#~~##~####~#~#~###~~#~~~~~~~#~##~~~##~####~##~##~~~##~##~~~##~~
#~#~#~~#~~~@(*~##~#~~~@^)

All the ~s push 0 and the #s push 1. The interesting part is the output loop:

@(*~##~#~~~@^)
@              Coalesce to bit (top 8 items); is 0 on an empty stack
 (           ) Skip the inside if the top of the stack is not truthy.
  *            Output as character.
   ~##~#~~~@   Push 104 to the stack
            ^  Jump to index 104, which is right here --.
^._____________________________________________________/

The interpreter is here, but with no permalinks as of yet.

Boring Loop-less version, 130 bytes:

~#~~#~~~@*~##~~#~#@*~##~##~~@*~##~##~~@*~##~####@*~~#~##~~@*~~#~~~~~@*~#~#~###@*~##~####@*~###~~#~@*~##~##~~@*~##~~#~~@*~~#~~~~#@*

Doubling (:) the l character, 122 bytes:

~#~~#~~~@*~##~~#~#@*~##~##~~@:**~##~####@*~~#~##~~@*~~#~~~~~@*~#~#~###@*~##~####@*~###~~#~@*~##~##~~@*~##~~#~~@*~~#~~~~#@*
\$\endgroup\$
2
\$\begingroup\$

Scratch, 2 blocks

enter image description here

Self explanatory really.

\$\endgroup\$
4
2
\$\begingroup\$

Verilog, 60 bytes

module m;initial
begin
$write("Hello, World!");end
endmodule

Try it online here.

\$\endgroup\$
1
  • \$\begingroup\$ The initial block doesn't need begin & end. \$\endgroup\$
    – user94681
    Jun 22 '20 at 22:46
2
\$\begingroup\$

JavaScript (Node.js), 28 bytes

console.log("Hello, World!")
\$\endgroup\$
2
2
\$\begingroup\$

Javascript (Nashorn), 22 bytes

Nashorn is the JS engine that comes built in to Java.

print('Hello, World!')
\$\endgroup\$
2
\$\begingroup\$

.kill();, 39 bytes

Try it here! Github.

SFTp^B2lA=ZkW`j\9@+*+@9\j`WkZ=Al2B^pTGT

Alright, so I made another monster! This is how this works. First, the code is iterated through, and a resulting string is made. First, let's look at the first character and some related information:

char: S
opposite char: T
average char floored: (@S + @T) / 2 = (83 + 84) / 2 = 83.5 => 83 = S
index: 0
result: S

Each character in the new string is calculated by averaging the values of the current char and the char that lies the same distance from the end of the string; this value is incremented by the index (starting at zero) then floored. The resulting character is appended to the result.

Once this result is made, we look for a valid base64 string in it. This is what that result looks like:

SGVsbG8sIFdvcmxkIQ==?UOs#yq'vZ_,Rc!4xky

This will result in the string SGVsbG8sIFdvcmxkIQ== being found as the base 64 string for "Hello, World!", and is thus outputted.

(When no such string is found, then a more complicated algorithm ensues that transpiles this to JavaScript, so this is most definitely turing-complete and thus a valid language.)

\$\endgroup\$
2
\$\begingroup\$

Pickle, 34 bytes

cbuiltins\nprint\n\x8c\rHello, World!\x85R.

Replace the escape sequences by their appropriate character code.

Surprise. Python's default serialization implementation actually uses an interpreter over a stack-based language. Just call pickle.load on it to run it.

\$\endgroup\$
2
\$\begingroup\$

UGL, 80 bytes

cuu$u$$$$$$*$d*O$*u$*u$O$@++u$O$O^^+$O@@$$uu**dO%$$*$**$O@$*$u*dddO%$OuuuO%OdOuO

Try it online!

With comments:

#H  e   l   l   o   ,     W  o   r   l   d   !
#72 101 108 108 111 44 32 87 111 114 108 100 33
cuu$u$$$$$$*$d*O  #print H  72        (stack:2 3 3 3 3 3 3)
$*u$*u$O$@        #print e  101       (stack:101 2 3 3 3 3 101)
++u$O$O           #print ll 108 108   (stack:101 2 3 3 108)
^^+$O@@           #print o  111       (stack:108 111 101 2 3 3)
$$uu**dO          #print ,  44        (stack:108 111 101 2 3)
%$$*$**$O@        #print    32        (stack:32 108 111 101 3)
$*$u*dddO         #print W  87        (stack:32 108 111 101)
%$O               #print o  111       (stack:32 108 101 111)
uuuO              #print r  114       (stack:32 108 101)
%O                #print l  108       (stack:32 101)
dO                #print d  100       (stack:32)
uO                #print !  33        (stack:)
\$\endgroup\$
1
  • \$\begingroup\$ Which part is the actual 80-byte source code? The non-space prefixes of the lines? Might be best to include that separately for clarity. \$\endgroup\$ Apr 26 '16 at 11:39
2
\$\begingroup\$

Tellurium, 17 bytes

µHello, World!~^

Well, this is pretty easy to explain.

  • µ starts reading the string
  • ~ stops reading the string, and stores it in the selected cell.
  • ^ outputs the selected cell's value, which is currently "Hello, world!"

Alternate version (5 bytes)

This one uses the preinitialized variable !o, which expands to "Hello, World!".

µ!o~^
\$\endgroup\$
7
  • \$\begingroup\$ OP says you can use languages made after this challenge. \$\endgroup\$ Jun 2 '16 at 19:37
  • \$\begingroup\$ @EʀɪᴋᴛʜᴇGᴏʟғᴇʀ Yeah, I know, but using a builtin Hello World seems kind of like cheating. \$\endgroup\$
    – m654
    Jun 3 '16 at 11:11
  • 2
    \$\begingroup\$ 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! \$\endgroup\$ Jun 3 '16 at 11:14
  • 2
    \$\begingroup\$ Unlike our usual rules, feel free to use a language (or language version) even if it's newer than this challenge. 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. \$\endgroup\$ Jun 3 '16 at 11:15
  • \$\begingroup\$ @EʀɪᴋᴛʜᴇGᴏʟғᴇʀ Oh, I didn't notice that :P \$\endgroup\$
    – m654
    Jun 3 '16 at 11:15
2
\$\begingroup\$

Oration, 28 bytes

listen
capture Hello, World!

Fun to write.

\$\endgroup\$
8
  • \$\begingroup\$ You can include the 32-byte version: Literally, print("Hello, World!"). \$\endgroup\$ Feb 26 '16 at 19:37
  • \$\begingroup\$ Ooh nice, thanks @CᴏɴᴏʀO'Bʀɪᴇɴ . \$\endgroup\$
    – Riker
    Feb 26 '16 at 21:37
  • \$\begingroup\$ Can I figuratively print something? :P \$\endgroup\$
    – Downgoat
    Apr 12 '16 at 4:22
  • \$\begingroup\$ @Downgoat yes, but the compiler ignores such frivolity. \$\endgroup\$
    – Riker
    Apr 12 '16 at 15:27
  • \$\begingroup\$ Can't you remove \nthat's it? \$\endgroup\$ Jun 17 '16 at 10:48
2
\$\begingroup\$

DOG, 20 bytes

bark "Hello, World!"
\$\endgroup\$
2
\$\begingroup\$

Casio BASIC, 15 bytes

There is a TI-BASIC answer, but no Casio BASIC ? what a shame !

Fortunately, I went here

"Hello, World!"

Unlike in TI-BASIC, you can't thug around the closing " (you still can with parentheses tho). However, lowercase letters are 1 byte long (on recent models, it might not have been the case with previous ones, but writing lowercase letters was a PITA anyway).

\$\endgroup\$
2
\$\begingroup\$

Cow, 1539 Bytes

MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO MoO MoO MoO MoO MoO MoO Moo Moo MoO MoO MoO Moo OOO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo Moo MoO MoO MoO Moo MOo MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo Moo OOO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo
\$\endgroup\$
7
  • \$\begingroup\$ ...I count 1539 bytes. \$\endgroup\$ Jul 24 '16 at 15:40
  • \$\begingroup\$ What? O.o I don't. \$\endgroup\$
    – Ronronner
    Jul 24 '16 at 16:34
  • \$\begingroup\$ Well, unless this is in a special encoding, there are 1539 characters thus 1539 bytes. \$\endgroup\$ Jul 24 '16 at 16:39
  • \$\begingroup\$ I've correct it. \$\endgroup\$
    – Ronronner
    Jul 24 '16 at 17:01
  • 2
    \$\begingroup\$ 261 bytes, which is a trivial variant of the brainfuck solution. I'm sure COW can do better, I just don't know what methods could be used to beat recurrence relations \$\endgroup\$
    – ASCII-only
    Jul 27 '17 at 23:51
2
\$\begingroup\$

Jellyfish, 15 bytes

P"Hello, World!

Try it online!

Not terribly interesting, but for completeness' sake...

\$\endgroup\$
2
\$\begingroup\$

Caker, 294 bytes

ωΩθΩθθΩθΩθθθΘΩθθΩθθΩθΩθΩθΘθθΩθΩθθΩθθΘΩθθΩθΩθθΩθθΘΩθθΩθΩθθθθΘθΩθΩθθΩθθΘΩθΩθθθθθΘΩθΩθΩθΩθΩθθθΘθθΩθΩθθθθΘθθθΩθθΩθΩθΘΩθθΩθΩθθΩθθΘΩθθΩθθΩθΩθθΘΩθΩθθθθΩθΘ

Explanation:

  • ω flip the cell at the left of the tape head if the current cell is 0, at the right otherwise
  • Ω move the tape head leftward if the current cell is 0, rightward otherwise
  • θ push the current bit on the print stack
  • Θ print the character in the print stack and clear the print stack
\$\endgroup\$
1
  • \$\begingroup\$ -1 language name makes me want cake :P \$\endgroup\$
    – Downgoat
    Aug 15 '16 at 19:54
2
\$\begingroup\$

Ru, 15 bytes

“Hello, World!”

Body must be at least 30 characters; you entered 29.

\$\endgroup\$
2
\$\begingroup\$

S.I.L.O.S, 19 bytes

print Hello, World!

Seems legit!

\$\endgroup\$
3
  • 2
    \$\begingroup\$ This is a 19 bytes. \$\endgroup\$ Sep 16 '16 at 0:00
  • \$\begingroup\$ @ConorO'Brien whops, I can progam, but I can't count to 19.... :( \$\endgroup\$ Sep 16 '16 at 1:13
  • 4
    \$\begingroup\$ Ironic... the nineteenth byte ;) \$\endgroup\$ Sep 16 '16 at 1:22
2
\$\begingroup\$

Logicode, 121 bytes

var a=11011
var l=@(a+00)
var o=a+11
out @1001000+@(a+01)+l+l+@o+@101100+@10000+@1010111+@o+@1110010+l+@1100100+@10001

As Logicode works on binary strings, it's pretty hard to convert stuff to ASCII. In comes the @ operator!

It basically converts a binary string to its ASCII counterpart, so something like @1001000 turns into H (1001000 is 72 in binary, and H's ASCII code is 72).

\$\endgroup\$
1
  • 2
    \$\begingroup\$ This prints Hmllo,World on TIO. \$\endgroup\$
    – Dennis
    Dec 3 '16 at 0:51
2
\$\begingroup\$

INTERCALL, 311 bytes

INTERCALL IS A ANTIGOLFING LANGUAGE
SO THIS HEADER IS HERE TO PREVENT GOLFING IN INTERCALL
THE PROGRAM STARTS HERE:
PUSH LXXII
PRINT
PUSH CI
PRINT
PUSH CVIII
PRINT
PRINT
PUSH CXI
PRINT
PUSH XLIV
PRINT
PUSH XXXII
PRINT
PUSH LXXXVII
PRINT
CALL ONE VII
PUSH CXIV
PRINT
CALL ONE V
PUSH C
PRINT
PUSH XXXIII
PRINT
END

It can probably be more golfed, but coding in INTERCALL is very hard.

CALL ONE jump to a line, execute it and return to the line after the calling line.

\$\endgroup\$
1
  • \$\begingroup\$ remove the AND's for more golfing \$\endgroup\$ Sep 25 '16 at 1:22
2
\$\begingroup\$

stacked, 18 bytes

'Hello, World!'out

Try it here!

Introducing my newest creation, stacked! It's a stack based language. Creative, I know. But this pushes 'Hello, World!' to the stack the outputs it. Simple enough!

\$\endgroup\$
2
\$\begingroup\$

WSF, 223 bytes

Stack Exchange cannot display this code properly, so here is a reversible xxd hexdump:

00000000: 2020 2020 2020 2020 2020 2020 2020 2020                  
00000010: 2020 2020 0a20 200a 2020 2020 2020 2020      .  .        
00000020: 2020 2020 2020 200a 2020 2020 2020 2020         .        
00000030: 2020 2020 2020 2020 2020 2020 200a 2020               .  
00000040: 2020 2020 200a 2020 0920 0920 0920 0920       .  . . . . 
00000050: 2009 0a09 200a 2020 2020 0909 200a 2020   ... .    .. .  
00000060: 0909 2020 2020 2020 2020 2020 2020 2020  ..              
00000070: 0909 0909 2020 2020 2020 0909 200a 2020  ....      .. .  
00000080: 2020 0909 0920 0920 2020 2020 2020 2020    ... .         
00000090: 2020 2020 2020 2020 2020 2020 2020 2020                  
000000a0: 2020 2020 2020 0909 200a 0909 2020 2020        .. ...    
000000b0: 2020 0909 2009 2009 2009 2009 2009 2009    .. . . . . . .
000000c0: 0909 2009 2009 2009 2009 2009 2009 2009  .. . . . . . . .
000000d0: 2009 0909 200a 2020 0909 200a 0909 0a     ... .  .. ....

Ruby inspected string:

"                    \n  \n               \n                     \n       \n  \t \t \t \t  \t\n\t \n    \t\t \n  \t\t              \t\t\t\t      \t\t \n    \t\t\t \t                               \t\t \n\t\t      \t\t \t \t \t \t \t \t\t\t \t \t \t \t \t \t \t \t\t\t \n  \t\t \n\t\t\n"
\$\endgroup\$
1
  • \$\begingroup\$ There's a 174 byte one on TIO \$\endgroup\$
    – ASCII-only
    Aug 21 '17 at 12:16
2
\$\begingroup\$

Befunge-93, 21 bytes

"!dlroW ,olleH">:#,_@

Try it online!

Explanation

"!dlroW ,olleH"   Push the string onto the stack in reverse. Note that there is an
                    implicit null terminator since an empty stack will always pop zero.

>                 Start the output loop.
 :                Duplicate the character at the top of the stack.
  #               Skip the following operation to the right.    
    _             Test if the character is null, dropping the duplicate copy.
   ,              If not, branch left and write the character to stdout.
  #               Skip the following operation to the left.
>                 Reverse direction and repeat the loop with the next character.
     @            Once the null is reached, branch right and exit.
\$\endgroup\$
2
\$\begingroup\$

Del|m|t, 29 + 1 = 30 bytes

Try it online!

=#:#Hello, World!#/#2#>#?#9#"

...With # passed as a command line argument.

This is a new language that I recently created, which uses regex to parse its source code. I highly recommend that you read the documentation and tutorial.

Explanation:

The regex passed as an argument acts as a delimiter (hence the name), which parses the code into tokens, which are read as commands based on their ASCII values.

Because the regex is #, the tokens are =, :, Hello, World!, /, 2, >, ?, 9, and "

These correspond to commands depending on their ASCII values mod 32:

(=) 29    29 pops the top value of the stack, and skips that many instructions.
          Right now, the top is 0, so it's a no-op. Later, we will use it to
          skip the following part that pushes the string

(:) 26, (H...) "H..."    26 pushes the next token as a string backwards onto the stack

(/) 15    Duplicates the top of the stack, so we have 2 copies of the top character.
(2) 18    Nots the top of the stack. It the top was 0, it is now 1

(>) 30, (?) 31    Iff the top of the stack is non-0, exit the program

(9) 25    Print the character
(") 2     Push 2 - This is used to skip the String pushing part when we...
          
          Go back to the start of the program and repeat
\$\endgroup\$
0
1
13 14
15
16 17
30

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.