416
\$\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 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

752 Answers 752

4
\$\begingroup\$

Vitsy, 18 16 bytes

"!dlroW ,olleH"Z

"!dlroW ,olleH"     Push Hello, World! to the stack.
               Z    Push the entire stack to STDOUT - equivalent to l\O

Output:

Hello, World!

Z is new syntax - it was not made for this question.

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

Purple, 62 bytes

AA1AA1AA1bA1b1Bo1bb1bbibb1Bi1b     
 ! d l r o W   , o l l e H

Purple in a Nutshell:

Purple is a self-modifying language in the same sense that self-modifying brainfuck is: The code is executed from the same array that contains data, which is infinite and otherwise initialized with zeroes. It has one instruction with three arguments: subtract the third argument from the second and store it in the first. It has two registers, a and b, which can be dereferenced as A and B to get the contents of that memory address. It also has i, the instruction pointer, o which represents the outside world (i.e., stdout in the first argument, stdin in either of the other two), and the literal 1, which cannot be the first argument.

It is as hard to read and write as it looks.

This Program:

It may seem strange that I'm entering a program that is almost more not-code than code in a contest for "shortest program", but it would be REALLY DIFFICULT to do it in less. The reason is that, when doing loops in Purple, it requires the least effort to jump to memory location 3 (because you just set i to 0), but this means you have exactly one instruction to initialize the loop. This means we need to set A to the location of the first character to be printed in a single instruction. Otherwise, we'd have to do a lot of extra work to jump somewhere else at the end of each loop. But since a starts out at zero, the only positive value we can set it to in a single instruction is 64. (i.e. the contents of the zeroth cell--the "A" itself, which is ASCII 65, minus one.)

Obviously, we're going to want to iterate backwards over the string since

  • Iterating forwards means we have to put the string AFTER position 64, thereby making the program longer.
  • It takes one fewer instruction to decrement the pointer than to increment it.

And we can shave bytes off the end of the program by decrementing the pointer before we print. In fact, we have enough space between the cell 64 and the end of the program to decrement twice between each address to be printed. Thus, the first character we need to print can be at character 62, hence, exactly 62 bytes long.

Here's The Nitty:

AA1               Set the first cell to 64
AA1AA1            This is the entry point for the loop. M[0]=M[0]-2
bA1               Point b the cell to the left of what cell 0 points to.
b1B               Set b to one more than the opposite of the character there.
o1b               Output the character M[0] pointed to (one more than the opp. of b)
b1b               Set b to the just output character.
bib               Subtract the just output character from the IP (24)
                  Until we hit the newline (ascii 10), this yields a negative.
b1B               Set b to 1 minus what b was pointing to.
                  Negative addresses are initialized to zero, so until we hit the newline
                  this will set b to 1. When we hit the newline, b will be pointing to
                  the 11th character ("1"), and this will set it to -48.
i1b               Set the instruction pointer to 1-b. 
                  Until the newline, this sets i=0, jumping back the beginning of the loop.
                  After the newline, this sets i=49, where it finds the 
                  non-instruction "W  ", and Purple halts without error in such a case.

The rest of the program is the string itself and arbitrary padding to position the characters in the right place.

EDIT: Figured out how to save 30 bytes on this program, and updated all explanations to match the new version.

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

TeaScript, 12 bytes

(using ISO/IEC 8859 character encoding)

D`HÁM, Wld!

Compresses Hello, World!, decompresses with D (æ) function

\$\endgroup\$
  • \$\begingroup\$ This is 12 bytes, I think; there should be an unprintable in Wl. \$\endgroup\$ – ETHproductions Jan 8 '16 at 2:58
  • \$\begingroup\$ @ETHproductions you're right, whoops. I guess SE kills unprintables \$\endgroup\$ – Downgoat Jan 8 '16 at 2:58
  • 2
    \$\begingroup\$ Perhaps a hexdump would be useful (via xxd or similar). \$\endgroup\$ – primo Jan 8 '16 at 4:25
4
\$\begingroup\$

BTClang, 53 bytes

My newest invention! BTClang is short for Bitcoin language. Although it has nothing to do with bitcoins, it shares some similiarities with this language. Code:

4|$&2h
2|A%
3|Im!
3|%([F
2|!4P
2|"Cv
3|zJO
1|!M
2|!&r

Explanation:

First of all, each line of the code consists of a number, a pipe and a key. The process goes as following for the example 2|5C. We take the key (5C), and generate the SHA256-hash of it. We get this:

ad5d3cc03d8b60e308b22e27fe4bbccae6a83d5496bc5e2a36aeb76eae51aeb0

The number before the pipe says how many hexadecimal number we want to extract from the end of the hash. This number is 2, so we take two 2-digit hexadecimal numbers from the end of the hash.

We are left with ae and b0. Converting these to integers will result into 174 and 176. These will be processed with the formula n % 94 + 32, so when this is converted to a character, the character will always be a printable ASCII character with 31 < ord < 128. The hashtags are replaced with newlines.

174 % 94 + 32 = 112 (p)
176 % 94 + 32 = 114 (r)

And so on...

The final translation of the code is print("Hello, World!"), which is then evaluated as normal Python. Although this is a solution, I am pretty sure this can be golfed further. It just takes a lot of computational power...

(By the way, you can try to find sets of characters yourself with the BTClang_miner)

\$\endgroup\$
  • \$\begingroup\$ How do you choose which hexadecimal numbers? \$\endgroup\$ – Conor O'Brien Apr 8 '16 at 0:32
  • 1
    \$\begingroup\$ @CᴏɴᴏʀO'Bʀɪᴇɴ You mean from the hash? The numbers chosen are all taken from the end of the hash. So from ad5d3cc03d8b60e308b22e27fe4bbccae6a83d5496bc5e2a36aeb76eae51aeb0, the last two hexadecimal numbers are ae and b0. \$\endgroup\$ – Adnan Apr 8 '16 at 14:15
  • \$\begingroup\$ Oh, I'm an idiot. :| \$\endgroup\$ – Conor O'Brien Apr 8 '16 at 14:41
4
\$\begingroup\$

Scratch, 15 bytes

Script
(scoring used)
Makes the sprite say "Hello, World!" Can't get much simpler than that.

\$\endgroup\$
  • \$\begingroup\$ You already welcomed me in Output the Current Time \$\endgroup\$ – weatherman115 May 20 '16 at 15:25
  • \$\begingroup\$ Sorry, the review link said you were new. \$\endgroup\$ – NoOneIsHere May 20 '16 at 15:35
  • \$\begingroup\$ Is this different from codegolf.stackexchange.com/a/76182/6691 ? \$\endgroup\$ – b_jonas Apr 17 '17 at 13:31
  • \$\begingroup\$ Well, this is awkward. \$\endgroup\$ – weatherman115 Apr 17 '17 at 18:06
4
\$\begingroup\$

Go, 64 61 bytes

3 bytes thanks to George Gibson

package main
import."fmt"
func main(){Print("Hello, World!")}

Go requires an import to print to standard output, unfortunately. No trailing newline.

\$\endgroup\$
  • \$\begingroup\$ package main;fund main(){print("Hello, world!")} \$\endgroup\$ – Eric Lagergren Sep 6 '15 at 16:53
  • 1
    \$\begingroup\$ @eric_lagergren That prints to STDERR, not STDOUT. See here \$\endgroup\$ – isaacg Sep 6 '15 at 22:04
  • \$\begingroup\$ Oh gotcha. Never looked it up because I never use it. Thanks. \$\endgroup\$ – Eric Lagergren Sep 6 '15 at 22:06
  • \$\begingroup\$ Save 3 bytes by importing fmt into the global namespace with import."fmt" then just call Print("Hello, World!"). \$\endgroup\$ – George Gibson Jun 5 '16 at 9:45
  • \$\begingroup\$ @GeorgeGibson Thanks, that's a nice trick. \$\endgroup\$ – isaacg Jun 5 '16 at 17:24
4
\$\begingroup\$

68k machine code (EASy68k), 30 bytes

00000000: 303c 000d 43f9 0000 1010 4e4f ffff ffff  0<..C.....NO....
00000010: 4865 6c6c 6f2c 2057 6f72 6c64 2100       Hello, World!.

I don't know what I'm doing!

Explanation

    ORG    $1000
START:                  ; first instruction of program

    MOVE #13, D0        ; put text display task number in D0
    LEA HELLO, A1       ; load address of string to display into A1
    TRAP #15            ; activates input/output task

    SIMHALT             ; halt simulator

HELLO DC.B 'Hello, World!',0

    END    START        ; last line of source
\$\endgroup\$
4
\$\begingroup\$

Your Mom, 14 bytes

'Hello, World!

Explanation

'...
'... - Push the string. The ending ' is not needed at the end of program
     - Implicit output
\$\endgroup\$
4
\$\begingroup\$

Emojicode, 37 bytes

🏁🍇😀🔤Hello, World!🔤🍉
\$\endgroup\$
4
\$\begingroup\$

Golfuck, 39 bytes

jrseeqzjzzzsvDsj*aaa*r"s*hB(FsxahB(z*sh

Credit to primo, this is his answer, but in Golfuck.

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

Addict, 248 bytes

Addict is my new Turing-tarpit esolang, based on PRINDEAL.

a A
 i 1
 i 1
 d
a B
 A 1
 A 1
 d
a C
 B 1
 B 1
 d
a D
 C 1
 C 1
 d
a E
 D 1
 D 1
 d
E H
E H
C H
c H
E e
E e
E e
B e
i e
c e
E l
E l
E l
C l
B l
c l
c l
E o
E o
E o
D o
d o
c o
E c
C c
B c
c c
E s
c s
D H
d H
c H
c o
A o
i o
c o
c l
d e
c e
i s
c s

Test it online here!

Primer on addict

  • All memory is stored in variables. Variables can hold only non-negative integers; all variables start out at 0.
  • Addict has 4 built-in commands: decrement, increment, print a charcode, and take a charcode from input.
  • You can define your own commands with alias. This has very strict syntax:

a commandname
 command1
 command2
 command3

This creates a new command called commandname. Whenever commandname is called, the following process happens:

  • command1 is called.
  • If command1 succeeded, command2 is run.
  • If command1 failed, command3 is run.

See the GitHub repo for more information about Addict.


Act I

The first part of the program defines five commands: A, B, C, D, and E. Each one has this format:

a A
 i 1
 i 1
 d

This defines a command A which adds two to the input through the following process:

  • increment the 1st input.
  • If this succeeded, increment again. (i always succeeds unless it has no argument.)
  • Otherwise, decrement nothing. (This never gets run for the above reason.)

The next command defined is B, which adds 4 to the input:

a B
 A 1
 A 1
 d
  • Run A on the 1st input. (Always succeeds.)
  • If this succeeded, run A again. (Always gets run.)
  • Otherwise, decrement nothing. (Never gets run.)

Through the same process, C adds 8, D adds 16, and E adds 32.

Act II

The rest of the program is devoted to outputting Hello, World! in as few bytes as possible. The charcodes we need to output are 72 101 108 108 111 44 32 87 111 114 108 100 33, in that order. The shortest method I have found to output them all is to use six variables:

  • H to output 72 and 87
  • e to output 101 and 100
  • l to output 108
  • o to output 111 and 114
  • c to output 44
  • s to output 32 and 33

Here's a table of commands, and the values of the variables after each command:

Command  Output   H   e   l   o   c   s
E H              32   0   0   0   0   0
E H              64   0   0   0   0   0
C H              72   0   0   0   0   0
c H      H       72   0   0   0   0   0
E e              72  32   0   0   0   0
E e              72  64   0   0   0   0
E e              72  96   0   0   0   0
B e              72 100   0   0   0   0
i e              72 101   0   0   0   0
c e      e       72 101   0   0   0   0
E l              72 101  32   0   0   0
E l              72 101  64   0   0   0
E l              72 101  96   0   0   0
C l              72 101 104   0   0   0
B l              72 101 108   0   0   0
c l      l       72 101 108   0   0   0
c l      l       72 101 108   0   0   0
E o              72 101 108  32   0   0
E o              72 101 108  64   0   0
E o              72 101 108  96   0   0
D o              72 101 108 112   0   0
d o              72 101 108 111   0   0
c o      o       72 101 108 111   0   0
E c              72 101 108 111  32   0
C c              72 101 108 111  40   0
B c              72 101 108 111  44   0
c c      ,       72 101 108 111  44   0
E s              72 101 108 111  44  32
c s      (space) 72 101 108 111  44  32
D H              88 101 108 111  44  32
d H              87 101 108 111  44  32
c H      W       87 101 108 111  44  32
c o      o       87 101 108 111  44  32
A o              87 101 108 113  44  32
i o              87 101 108 114  44  32
c o      r       87 101 108 114  44  32
c l      l       87 101 108 114  44  32
d e              87 100 108 114  44  32
c e      d       87 100 108 114  44  32
i s              87 100 108 114  44  33
c s      !       87 100 108 114  44  33

If you can find any way to golf this program, please let me know!

\$\endgroup\$
  • \$\begingroup\$ Wow, this is a great language. Nice work! \$\endgroup\$ – Conor O'Brien Sep 27 '16 at 18:58
  • \$\begingroup\$ Seeing that 108, 111 and 114 are part of the output, maybe an alias to add 3 might help? \$\endgroup\$ – Martin Ender Sep 27 '16 at 18:58
  • \$\begingroup\$ @MartinEnder Thanks for the suggestion. An alias to add N will cost at least 17 bytes, so it'd need to save at least 5 lines (4 bytes each) to be worth it. (I originally had an alias F to add 64, but I only used it 4 times, so getting rid of it saved 1 byte.) \$\endgroup\$ – ETHproductions Sep 27 '16 at 19:01
  • \$\begingroup\$ @ConorO'Brien Thanks, I'm glad you like it! After spending a few months designing it, writing sample programs, and wishing I had time to code it, it took me about 4 hours to code: by far my shortest start-to-finish esolang implementation. ;) \$\endgroup\$ – ETHproductions Sep 27 '16 at 19:08
  • \$\begingroup\$ @Martin Using aliases for adding 2 3 6 12 24 48 seems to be about 7 bytes longer, but perhaps there's a different optimal set of aliases. I might write a brute-forcer when I have time. \$\endgroup\$ – ETHproductions Sep 29 '16 at 1:59
4
\$\begingroup\$

TP, 17,806 bytes

TP is a language I created based on using toilet paper.

The main operation is USE TP which removes a sheet (1) from the current roll (cell), each roll starts at 255 sheets. There is also GET TP which adds a new roll to the toilet paper pile. There is also the accompanying NEW TP and OLD TP which switches to a newer roll or older roll respectively. The final notable command is DIS TP which displays the ASCII value for the current roll.

This is included as tphelloworld.tp for the interpreter download.

This can definitely be shorter.

USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

GET TP
NEW TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
USE TP
DIS TP

Notes About the Interpreter

The interpreter always removes whitespace from the working line, so USE TP becomes USETP, this allows a 1 byte decrease per line. Since the interpreter uses Python, I believe newline style (CR+LF, LF) doesn't matter. A thing that I'm trying to think of a way to do is add a separator (command; command). If I figure out a way to implement that, then the filesize can be drastically reduced.

\$\endgroup\$
  • \$\begingroup\$ Doing a quick estimate you can probably get this down to around 6500 bytes. I would write it up but I can't at the current time (if I get some time this weekend I'll run through it). \$\endgroup\$ – Teal pelican Nov 18 '16 at 16:00
  • \$\begingroup\$ Nice! I'm surprised anyone actually cares about this. \$\endgroup\$ – ender_scythe Nov 18 '16 at 17:51
  • 6
    \$\begingroup\$ damn, that's a lot of trees cut down... \$\endgroup\$ – FlipTack Nov 18 '16 at 18:27
  • \$\begingroup\$ @Flp.Tkc Maybe I should make a version where you plant trees? \$\endgroup\$ – ender_scythe Nov 18 '16 at 18:33
  • \$\begingroup\$ Calculation for chars(6405 bytes) H=(255-72)*"USE TP "+"DIS TP " e="GET TP NEW TP "(255-101)*"USE TP "+"DIS TP " l="GET TP NEW TP "+(255-108)*"USE TP "+"DIS TP " l="DIS TP " o="GET TP NEW TP "+(255-111)*"USE TP "+"DIS TP " ,="OLD TP OLD TP OLD TP "+(72-44)*"USE TP "+"DIS TP " =(44-32)*"USE TP "+"DIS TP " W="NEW TP "+(101-87)*"USE TP "+"DIS TP " o="NEW TP NEW TP DIS TP " r="GET TP NEW TP "+(255-114)*"USE TP "+"DIS TP " l="OLD TP OLD TP DIS TP " d=(108-100)*"USE TP "+"DIS TP " !="OLD TP "+(87-33)*"USE TP "+"DIS TP " \$\endgroup\$ – Teal pelican Nov 21 '16 at 9:03
4
\$\begingroup\$

Beam, 312 161 bytes

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

Try it online!

Beam is a 2D language similar to Befunge. Thanks to @MickyT for helping me golf it down.

Beam is based on several memory components:

  • The beam, the main integer value
  • The store, a secondary integer value
  • The memory, an array of integer storage

I've only used the beam and the store here.

Used commands:

  • + and - increment and decrement the beam by 1, respectively.
  • @ outputs the beam as an ASCII character.
  • ' and ` increment and decrement the store by 1, respectively.
  • ) sends the beam to the left if the store's value is not 0.
  • > sends the beam to the right. Combined with ), this is used here to make a loop.
  • L sets the beam to the store's value (0 in this case).
  • H halts the program. Not sure if this is necessary.

For more info, visit the Esolangs wiki page. Suggestions welcome!

\$\endgroup\$
  • \$\begingroup\$ Looking at the constants at the bottom of the esolangs page, you could make use of the beam bouncing. For example 72 could be built like '''''>`++++++++) \$\endgroup\$ – MickyT Sep 5 '15 at 2:03
  • \$\begingroup\$ Using constants like that (assuming I got it right) reduces it to 136. Probably better ways to do this still. '''''>``++++++++)@'''''''>``++++)+@''>``++)+@@+++@L''''''>``----)@''>``----)@''''''>``-----)@'''>``++++++++)@+++@------@''>``---)@L''''''>``+++)@ \$\endgroup\$ – MickyT Sep 5 '15 at 2:32
  • \$\begingroup\$ @MickyT There's no better way to get someone interested in an obscure esolang than to post an ungolfed solution in that language... ;) BTW, are all the double graves supposed to be single? \$\endgroup\$ – ETHproductions Sep 5 '15 at 15:10
  • \$\begingroup\$ @MickyT Actually, each of the graves will be run through twice in each loop (right at the beginning and right at the end), so there needs to be twice as many apostrophes beforehand. I'll update the post once I fix this. \$\endgroup\$ – ETHproductions Sep 5 '15 at 15:22
  • \$\begingroup\$ Oops, I miscounted the decrementers in the loop. Counted them once instead of twice on the turn around and I escaped them wrong when I posted to the comment. \$\endgroup\$ – MickyT Sep 5 '15 at 19:25
4
\$\begingroup\$

uBASIC, 21 bytes

1PRINT"Hello, World!"

uBASIC is the most basic BASIC.

Exits with an error (no trailing newline).

It took me until just now to realize I don't need a space between 1 and PRINT...

Try it online!

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

T-SQL, 20 bytes

print'Hello, World!'

Try it online

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

OIL, 15 bytes

Hello, World!
4

OIL is a self-modifying turing-machine-like programming language with random access, and weak typing. The first line does nothing, because it's not one of the integers currently defined as commands, so it is just skipped. The second line is a 4, the print command, which takes one argument (the next line) and prints the value at that location. Since the next line doesn't exist, it's uninitialized and defaults to 0, which causes OIL to print the contents of the 0th line, Hello, World!.

\$\endgroup\$
4
+100
\$\begingroup\$

Klein, 48 + 3 + 3 = 54 bytes

89*55+:*:(1+:7+:::(3+:(485*+48*699*+):3+))148*+@

Try it online!

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

Klein, 50 + 6 = 56 bytes

+3 bytes due to the -A flag.

+3 bytes for 000 topology (though in my testing, pretty much all valid topoligies work)

89*45:**:(1+:7+::3+:(492+*84*9:*6+):3+6:3**)84*1+@

(Eligible for the bounty) Probably not optimal, but it's a start.

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

Memescript, 820 bytes

what the frick frack backtrack snick snack quarterback diddily dack diddily dack quarterback diddily dack diddily dack backtrack diddily dack backtrack diddily dack biofeedback quarterback diddily dack diddily dack quarterback quarterback diddily dack quarterback diddily dack diddily dack patty wack quarterback diddily dack slack mack frick frack thumbtack snick snack snick snack quarterback diddily dack patty wack sidetrack quarterback diddily dack snick snack patty wack patty wack biofeedback quarterback diddily dack diddily dack sidetrack diddily dack sidetrack quarterback diddily dack diddily dack patty wack quarterback diddily dack patty wack slack mack quarterback diddily dack patty wack crackerjack quarterback diddily dack slack mack frick frack thumbtack snick snack patty wack quarterback diddily dack

Explanation:

what the                     open program
frick frack backtrack        push 10
snick snack quarterback      multiply by 7 (70)
diddily dack diddily dack    add 2 (72)
quarterback diddily dack     print as char ('H')
diddily dack backtrack       add 10 (82)
diddily dack backtrack       add 10 (92)
diddily dack biofeedback     add 9 (101)
quarterback diddily dack     print as char ('e')
diddily dack quarterback     add 7 (108)
quarterback diddily dack     print as char ('l')
quarterback diddily dack     print as char ('l')
diddily dack patty wack      add 3 (111)
quarterback diddily dack     print as char ('o')
slack mack                   pop
frick frack thumbtack        push 11
snick snack snick snack      multiply by 4 (44)
quarterback diddily dack     print as char (',')
patty wack sidetrack         subtract 12 (32)
quarterback diddily dack     print as char (' ')
snick snack patty wack       multiply by 3 (96)
patty wack biofeedback       subtract 9 (87)
quarterback diddily dack     print as char ('W')
diddily dack sidetrack       add 12 (99)
diddily dack sidetrack       add 12 (111)
quarterback diddily dack     print as char ('o')
diddily dack patty wack      add 3 (114)
quarterback diddily dack     print as char ('r')
patty wack slack mack        subtract 6 (108)
quarterback diddily dack     print as char ('l')
patty wack crackerjack       subtract 8 (100)
quarterback diddily dack     print as char ('d')
slack mack                   pop
frick frack thumbtack        push 11
snick snack patty wack       multiply by 3 (33)
quarterback diddily dack     print as char ('!')
\$\endgroup\$
4
\$\begingroup\$

Triangular, 66 bytes

8.9,*<>@5\,1*6<>-+@7\,+3@@+<>@:3_7+\,3@-*43@<>*9-@p@3+\@_3@-8@-6@<

Try it online!

How it works

Expanded:

          8
         . 9
        , * <
       > @ 5 \
      , 1 * 6 <
     > - + @ 7 \
    , + 3 @ @ + <
   > @ : 3 _ 7 + \
  , 3 @ - * 4 3 @ <
 > * 9 - @ p @ 3 + \
@ _ 3 @ - 8 @ - 6 @ <

Executed commands, ignoring directional commands:

89*@56*1-+@7+@@3+@:3_7+@4*-@3*9-@p@3+@6-@8-@3_@

Commands used, ignoring directional commands:

  • 1 to 9: push the literal value
  • +: add
  • -: subtract
  • *: multiply
  • _: divide
  • :: duplicate top of stack
  • p: pop top of stack
  • @: print top of stack as charcode

Triangular is a 2D stack-based language which uses postfix notation.

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

Husk, 8 bytes

¨H◄⁰,ω]!

Try it online!

Husk got compressed strings!

A dictionary of common n-grams for n from 1 to 9 was built using a procedure based on Huffman coding, taking frequencies of n-grams from http://norvig.com/mayzner.html. All printable ASCII characters plus newline were forced to have 1-byte encodings with codes corresponding to themselves, while newlines were encoded with . N-grams that occurr frequently at the start of words also have variants with title-case and with a leading space/newline; n-grams that occurr frequently at the end of words also have variants with a trailing space/newline.

Some optimizations were performed on the resulting dictionary: for instance, the 5-gram "Hello" was removed from the dictionary since it had been encoded with three bytes, while the 4-gram "ello" is encoded with two bytes, so we can simply encode "H"+"ello" for a total of 3 bytes.

After the Huffman tree was built, codes were reassigned (mantaining their length unchanged) such that the encoded words could in some way recall their respective plaintext: most compression systems ignore this and as such their results are completely obscure to the human reader, while in this case I'm sure that most of you could guess what H◄⁰,ω]! means even if it was not presented inside this challenge. In particular, ◄⁰ encodes "ello", since stands for l (left), and looks like an o, while ω] encodes " World" since ω looks like a w and ] looks like a D (capitalization was ignored for this assignment of codes).

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

Bubblegum, 11 bytes

0000000: 15 27 4d 50 62 a9 9a 29 6b 6d e2  .'MPb..)km.

Although technically Turing complete, Bubblegum was made for constant-output challenges.

Try it online!

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

COBOL, 65 Bytes

PROGRAM-ID.H.PROCEDURE DIVISION.DISPLAY 'Hello, World!'.STOP RUN.

Just from what I remember. Probably doesn't work but I can't tell since my machines set up to run COBOL are long-gone.

\$\endgroup\$
  • 2
    \$\begingroup\$ Welcome to the site! \$\endgroup\$ – DJMcMayhem May 25 '17 at 15:39
  • \$\begingroup\$ This works just fine with GNU COBOL assuming you set the -F (or -free) flag, but you're missing a comma in your string. tio.run/##S85Pys/RTc8r/f8/… \$\endgroup\$ – Dennis Jul 17 '17 at 20:52
  • \$\begingroup\$ So I am. I shall fix this. \$\endgroup\$ – Bakna Jul 17 '17 at 20:53
4
\$\begingroup\$

,,,, 14 bytes

"Hello, World!

I finally added unclosed strings to ,,,. Took me long enough.

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

ZT, 199 bytes

The ZT programming language is quite romantic: it features little data couples (Romeos & Juliets). ZT program flow is diagonal and commands are defined only by program flow.

The webpage is at:

It has a link to is an interpreter at:

But that interpreter is broken and doesn't do jumps correctly. The website also has a link to a self extracting archive containing the documentation, the interpreter and some examples:

And that interpreter works so that's the one you need to use to test this.

I am not too confident that this is the smallest possible Hello World but it is much smaller than the one published on the website. If you have comments for golfing it please let me know.

48<>ZT<>ZT<>...>
<<ZT<>ZT<>ZT.<06
ZT<>ZT<>6F<>6C<<
<<ZT<>ZT<>ZT><03
ZT<>ZT<>20<>72<<
<>ZT<>ZT<>ZT><05
...>65<>6F<>57<<
.>ZT<>ZT<>ZT><05
....64<>6C<>2C<<
....<>ZT<>ZT><05
........21>.6C<
........<...>
\$\endgroup\$
4
\$\begingroup\$

Numberwang, 77 bytes

69696969696969693696969623673363316969696968359533059595636969663633563583193

Try it online!

Just incrementing and decrementing the pointer by certain amounts.

\$\endgroup\$
  • \$\begingroup\$ [Brainfuck translation, 72](220200949409153121212000717002230663002330030931131130003633113112300093) \$\endgroup\$ – ASCII-only Apr 14 '18 at 7:36
4
\$\begingroup\$

Sqirrel - Peter, 903 bytes

A couple notes about my golfing:

  • The examples have punctuation at the end of sentences but the spec doesn't say that it should be there so I left it off.
  • The spec says The request consists firstly of the text "I wish I had a " then is followed by a thing. and list of the variable-things you can use: ... an Apple which is inconsistent so I used "I wish I had a Apple" because it is shorter.
  • The spec says Here is [nr] [thing][s] Set the var to NR. Add an 's' if needed and even though the examples use Fishes the only ones that should be valid are Fish and Fishs and I chose Fish because I don't think it needs to be plural and it is shorter.
  • There is an exit command but the spec doesn't say what happens if the flow reaches the end of the text so I am assuming the program ends and I didn't use the exit command.

Here is my attempt:

I wish I had a Fish
Here is 72 Fish
I wish I had a Fish
Now everyone has it
I wish I had a Fish
Here is 101 Fish
I wish I had a Fish
Now everyone has it
I wish I had a Apple
Here is 108 Apples
I wish I had a Apple
Now everyone has it
I wish I had a Apple
Now everyone has it
I wish I had a Forrest
Here is 111 Forrests
I wish I had a Forrest
Now everyone has it
I wish I had a Fish
Here is 44 Fish
I wish I had a Fish
Now everyone has it
I wish I had a Fish
Here is 32 Fish
I wish I had a Fish
Now everyone has it
I wish I had a Fish
Here is 87 Fish
I wish I had a Fish
Now everyone has it
I wish I had a Forrest
Now everyone has it
I wish I had a Fish
Here is 114 Fish
I wish I had a Fish
Now everyone has it
I wish I had a Apple
Now everyone has it
I wish I had a Fish
Here is 100 Fish
I wish I had a Fish
Now everyone has it
I wish I had a Fish
Here is 33 Fish
I wish I had a Fish
Now everyone has it
\$\endgroup\$
  • \$\begingroup\$ If I count correctly, that's 66 more bytes for the version with correct punctuation and grammar. I.e. an apple, 100 fishes, etc. and a dot at the end of each line. \$\endgroup\$ – Cœur Aug 24 '17 at 13:15
4
\$\begingroup\$

ADJUST, 281 bytes

 ;I-      &  e$      &  m-        &  g2Ph$      &  a2$      &  n$      &  e2+-      &  g2Ph$      &  OPh$      &  m-      &  e-      &  n-
}     AgR};      AgR};      A=AgR};         AgR};       AgR};      AgR};        AgR};         AgR};        AgR};      AgR};      AgR};      AC

Try it online!

Diagonal }; turn IP right. I-, e$, m-, etc. create ascii code in the accumulator and push it on both stacks. A print char. gR};& move IP to the first line. = swap stacks. C exit.

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

Japt, 15 14 11 bytes

(using the ISO/IEC 8859 character encoding)

Japt is a shortened version of JavaScript. Interpreter

`HÁM, Wld!

There's an unprintable char in there, so here's a hexdump:

60 48 C1 4D 2C 20 57 8E 6C 64 21
`  H  Á  M  ,     W  .  l  d  !

Recently, @Vɪʜᴀɴ has helped me add in the shoco library for compressing strings. Using backticks around a string tells the interpreter to automatically decompress the string, and when a backtick is needed at the end of a program, you can leave it off. Thus, Japt now beats or ties all languages that don't have some sort of built-in to obtain "Hello, World!". (Including Pyth :D)

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

Broccoli, 23 bytes:

(print "Hello, World!")

Broccoli is a random language I ran across whilst recording the PPCG podcast. I promised that I would post an answer in it, so here it is. The better way of writing this (in 28 bytes) would be:

(print "Hello, World!" endl)

But since the newline is optional, this works.

\$\endgroup\$
  • \$\begingroup\$ Just finished the PPCG podcast this morning! Is there documentation available for Broccoli? \$\endgroup\$ – Esolanging Fruit Feb 11 '18 at 6:47
  • \$\begingroup\$ @EsolangingFruit I'm glad to hear it! :) There is a little bit of documentation in the folder, but it's pretty minimal. Mostly examples. But there is also a project to re-write it. You can ask for ask for help from the people there or in chat or on github. \$\endgroup\$ – DJMcMayhem Feb 11 '18 at 7:12

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.