523
\$\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 = (function(){
  var headerTag     = String.raw `h\d`
  var score         = String.raw `\-?\d+\.?\d*` // with negative/floating-point support
  var normalText    = String.raw `[^\n<>]*` // no HTML tag, no newline
  var strikethrough = String.raw `<s>${normalText}</s>|<strike>${normalText}</strike>|<del>${normalText}</del>`
  var noDigitText   = String.raw `[^\n\d<>]*`
  var htmlTag       = String.raw `<[^\n<>]+>`

  return new RegExp(
  String.raw  `<${headerTag}>`+
  String.raw    `\s*([^\n,]*[^\s,]),.*?`+
  String.raw    `(${score})`+
  String.raw    `(?=`+
  String.raw      `${noDigitText}`+
  String.raw      `(?:(?:${strikethrough}|${htmlTag})${noDigitText})*`+
  String.raw      `</${headerTag}>`+
  String.raw    `)`
  );
})();

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,
      });
    
  });
  
  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('<i>' + a.language + '</i>').text().toLowerCase();
    
    languages[lang] = languages[lang] || {lang: a.language, user: a.user, size: a.size, link: a.link, uniq: lang};
  });

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

  langs.sort(function (a, b) {
    if (a.uniq > b.uniq) return 1;
    if (a.uniq < b.uniq) 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}

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

#language-list {
  padding: 10px;
  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/primary.css?v=f52df912b654">
<div id="language-list">
  <h2>Winners 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><a href="{{LINK}}">{{SIZE}}</a></td></tr>
  </tbody>
</table>
<table style="display: none">
  <tbody id="language-template">
    <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td><a href="{{LINK}}">{{SIZE}}</a></td></tr>
  </tbody>
</table>

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

1000 Answers 1000

1
7 8
9
10 11
34
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\$
6
  • \$\begingroup\$ Wow, this is a great language. Nice work! \$\endgroup\$ Commented Sep 27, 2016 at 18:58
  • \$\begingroup\$ Seeing that 108, 111 and 114 are part of the output, maybe an alias to add 3 might help? \$\endgroup\$ Commented Sep 27, 2016 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\$ Commented Sep 27, 2016 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\$ Commented Sep 27, 2016 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\$ Commented Sep 29, 2016 at 1:59
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\$
10
  • \$\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
    Commented Sep 5, 2015 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
    Commented Sep 5, 2015 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\$ Commented Sep 5, 2015 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\$ Commented Sep 5, 2015 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
    Commented Sep 5, 2015 at 19:25
4
\$\begingroup\$

*><>, 21 bytes

"!dlrow ,olleH"Ool?u;

Try it out on the online interpreter here.

*><> (pronounced "Starfish") is an esolang based on ><>, developed by redstarcoder. Its aim is to add some useful features which are missing from base ><>, such as file IO, time functionality, and an interesting feature called 'dive/rise', which is used here.

If the 'dive' command, u is encountered, no instructions other than directional modifiers are executed until a 'rise' command, O, is encountered. Encountering a dive whilst already diving, or a rise when not diving, is treated as a no-op.

"!dlrow ,olleH"Ool?u;   

"!dlrow ,olleH"         Push "Hello, world!" to the stack in reverse.
               O        Rise - a no-op on first iteration
                o       Output top of stack as ASCII character
                 l?u    If length of stack is non-zero, dive
                    ;   End program execution
\$\endgroup\$
1
  • \$\begingroup\$ I love ><> and been interested in *><> so using the dive command for a huge benefit which I haven't seen before is great :) \$\endgroup\$ Commented Dec 19, 2016 at 14:47
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\$
0
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\$
7
  • \$\begingroup\$ You do have to add 3 for the topology you are using and 3 for the -A flag, (but so does everyone else, so it shouldn't hurt you) \$\endgroup\$
    – Wheat Wizard
    Commented May 18, 2017 at 19:09
  • \$\begingroup\$ @WheatWizard Yep, just added that in. \$\endgroup\$
    – Okx
    Commented May 18, 2017 at 19:11
  • \$\begingroup\$ tio.run/##DcgxDoAgEATA78BuTA45EbbSx1gYjf/… \$\endgroup\$
    – Dennis
    Commented May 18, 2017 at 22:59
  • \$\begingroup\$ @WheatWizard It appears to work with an empty argument as well. tio.run/##DcgxEoAgEAPA70AyFsiJkEofY@Ho@P8usuU@73V/… \$\endgroup\$
    – Dennis
    Commented May 19, 2017 at 0:58
  • \$\begingroup\$ @Dennis Would that be +2 bytes then? \$\endgroup\$
    – Okx
    Commented May 19, 2017 at 6:15
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\$

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\$
0
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\$
4
  • 2
    \$\begingroup\$ Welcome to the site! \$\endgroup\$
    – DJMcMayhem
    Commented May 25, 2017 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
    Commented Jul 17, 2017 at 20:52
  • \$\begingroup\$ So I am. I shall fix this. \$\endgroup\$
    – Bakna
    Commented Jul 17, 2017 at 20:53
  • \$\begingroup\$ You can save 10 bytes: PROGRAM-ID.H.PROCEDURE DIVISION.DISPLAY'Hello, World!'. \$\endgroup\$
    – SirBogman
    Commented Jul 21, 2020 at 22:03
4
\$\begingroup\$

Numberwang, 77 bytes

69696969696969693696969623673363316969696968359533059595636969663633563583193

Try it online!

Just incrementing and decrementing the pointer by certain amounts.

\$\endgroup\$
1
  • \$\begingroup\$ [Brainfuck translation, 72](220200949409153121212000717002230663002330030931131130003633113112300093) \$\endgroup\$
    – ASCII-only
    Commented Apr 14, 2018 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\$
1
  • \$\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
    Commented Aug 24, 2017 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\$

095, 16 bytes

'Hello, World!'s

First answer in my attempt at making a programming language! Pushes Hello, World! to the stack and then prints.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Welcome to PPCG! \$\endgroup\$ Commented Jan 25, 2018 at 20:43
4
\$\begingroup\$

AlphaBeta, 68 bytes

kjjjggDLeaCLcbbbCLLaaaCLjjjggDLjhhDLsFihhDLCLaaaCLdaaaaCLdaaCLsFiiDL

Try it online!

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

Atari Logo, 21 bytes

Code:

PRINT [HELLO, WORLD!]

Result:

enter image description here

\$\endgroup\$
4
\$\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
\$\endgroup\$
4
\$\begingroup\$

ELVM-IR, 116 68 66 65 bytes

.data
.string"Hello, World!"load B,A
putc B
add A,1jne 0,A,13exit

Thanks to @ASCII-only for golfing off 48 50 51 bytes!

Try it online!

Background

Running the above program with eli <file> interprets it, but elc -<target> <file> is where the real magic happens: it translates ELVM-IR source code to any of the supported backends!

Try it online!

The ELVM toolchain also supports compiling (a subset of) C and its standard library to ELVM-IR.

Try it online!

\$\endgroup\$
7
  • \$\begingroup\$ 78 bytes \$\endgroup\$
    – ASCII-only
    Commented Apr 11, 2018 at 4:41
  • \$\begingroup\$ 68 bytes \$\endgroup\$
    – ASCII-only
    Commented Apr 11, 2018 at 4:56
  • \$\begingroup\$ 40% shorter now. Thank you! \$\endgroup\$
    – Dennis
    Commented Apr 11, 2018 at 5:18
  • \$\begingroup\$ golfed another two bytes off :P \$\endgroup\$
    – ASCII-only
    Commented Apr 13, 2018 at 4:57
  • \$\begingroup\$ Looks weird, but it works. Thanks! \$\endgroup\$
    – Dennis
    Commented Apr 13, 2018 at 5:20
4
\$\begingroup\$

Nikud, 672 bytes

ֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֲֳֳֳֳֳֳֳֳֳֳֳֳֳֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶֶַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַַָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָָ

Try it online

Even though it has tons of bytes, it's top 3 in width, as all the characters are diacritical marks.

There isn't much useful to explain. The character codes are put in reverse order into the stack using mostly אֱ (push 1), אֶ (dup) and אַ (add). Then אֵ (print as char) is called 13 times.

Another thing that adds to the byte count is that each character is represented by 2 bytes in UTF-8. So it's actually 336 characters.

\$\endgroup\$
1
  • \$\begingroup\$ I think this can be golfed more using multiplication. \$\endgroup\$ Commented Jun 14, 2018 at 5:17
4
\$\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
\$\endgroup\$
4
\$\begingroup\$

𒅴 𒆰, 21 bytes

𒁺("Hello, World!")

Try it online!

This is a language written in Cuneiform, and uses Sumerian words as keywords.

At its heart, this is just a translation of Python into Sumerian, but in the future there will be new features added, such as the Babylonian numeral system (which works in base 60).

Because it relies heavily on unicode, this is not going to be a very good golfing language.

\$\endgroup\$
1
  • \$\begingroup\$ You could always translate from unicode to a golfier encoding :P \$\endgroup\$
    – ASCII-only
    Commented Dec 26, 2018 at 0:10
4
\$\begingroup\$

axo, 22 bytes

"!dlroW ,olleH"[>[(#<\

Try it online!

Pushes "Hello, World!" to the stack "!dlroW ,olleH"

Duplicates top of stack afterward, which results in "HHello, World!" [

Moves to the right >.

Duplicates it again, which results in "HHHello, World!" [

Outputs "H" while popping from the stack, so the stack is "HHello, World!" (

Pops the top of the stack, results in "Hello, World!" #

Moves left <

Pops the top of the stack, results in "ello, World!" #

Outputs "e" while popping from the stack, which results in STDOUT being "He" and the stack being "llo, World!" (

Duplicates the top of the stack, resulting in the stack being "lllo, World!" [

Moves right. >

And I'm sure you can figure out the rest. If you can't, I'll update a more indepth-explanation soon.

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

]=[, 164 bytes

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

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

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

\$\endgroup\$
4
  • \$\begingroup\$ There's something amusing about the fact that the ]=[ interpreter at the link is written in the 12-basic interpreter. \$\endgroup\$
    – snail_
    Commented May 31, 2018 at 20:18
  • \$\begingroup\$ Permalink no longer works \$\endgroup\$
    – ASCII-only
    Commented Dec 26, 2018 at 1:07
  • \$\begingroup\$ now I can't find the interpreter... \$\endgroup\$
    – 12Me21
    Commented Dec 28, 2018 at 3:18
  • \$\begingroup\$ I was looking through some old files and I found the interpreter, finally. \$\endgroup\$
    – 12Me21
    Commented Mar 13, 2019 at 21:32
4
\$\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
\$\endgroup\$
1
  • \$\begingroup\$ Can you assume that regs like cx are already cleared? \$\endgroup\$
    – ceilingcat
    Commented May 7, 2019 at 5:32
4
\$\begingroup\$

Triangular, 55 bytes

6\6+@*8\C::6--::@\@#2"+3^82*@3/#-<*#+/@"#+F<3/3@@#-7:*<

This one took a while. Also will be very difficult to golf, since there is zero no-ops in it, meaning you'll have to save 10 bytes to get it to a size 9 triangle in order to save any bytes

This expands out into this size 10 triangle:

         6
        \ 6
       + @ *
      8 \ C :
     : 6 - - :
    : @ \ @ # 2
   " + 3 ^ 8 2 *
  @ 3 / # - < * #
 + / @ " # + F < 3
/ 3 @ @ # - 7 : * <

How it works

Note: this ignores all control flow characters and just looks at what gets run in order

66* Push 36
:: Duplicate it twice
2*# Output H, popping it
3*  Multiplies by 3, yielding 108
:   Duplicates
-7# Outputs e, popping it
@@  Outputs l twice, without popping it
3+@ Outputs o, without popping it
" Swaps, putting 36 at the top of the stack
:: Duplicates it twice
8+@  Outputs comma, without popping
C-#  Outputs space, popping the top of the stack
2*F+# Outputs W, popping it
"     Swaps back around, putting 111 at the top of the stack
@     Outputs o, without popping
3+@   Outputs r, without popping
6-@   Outputs l, without popping
8-#   Outputs d, whilst popping
3-@   Subtracts 3 from 36, giving !, and outputs it
6     Pushes 6, which does nothing

Try it Online!

\$\endgroup\$
3
  • \$\begingroup\$ Rearranging the structure, I can get you 3 no-ops, though really it's only one byte TIO. Only 7 more to go! \$\endgroup\$
    – Jo King
    Commented Aug 25, 2019 at 21:40
  • \$\begingroup\$ 2 more. Halfway there. \$\endgroup\$
    – Jo King
    Commented Aug 25, 2019 at 21:50
  • \$\begingroup\$ Ok, I've got all the characters onto the stack in a size 9 triangle, but I dont have any space to put a loop to print all of them. Maybe could be golfed slightly more to fit it in TIO \$\endgroup\$
    – EdgyNerd
    Commented Aug 26, 2019 at 6:10
4
\$\begingroup\$

Cascade, 23 bytes

}ro
"""
l,H
d e
!Wl
"ol

Try it online!

This is about as compressed as it is possible to get. The } instruction is the put instruction, but it doesn't really matter what it does since we're just using it to execute the three of the instructions below it, all of which are ".

First we execute the left, which wraps around to be the rightmost column, printing Hello. Then right (which is the center column), printing , Wor. Finally directly below in the left column, we print ld!, terminating the string literal early rather than wrapping, to avoid printing the } as well.

\$\endgroup\$
1
7 8
9
10 11
34

Your Answer

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

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