502
\$\begingroup\$

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

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

The Rules

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

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

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

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

For inspiration, check the Hello World Collection.

The Catalogue

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

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

## Language Name, N bytes

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

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

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

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

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

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

/* Configuration */

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

/* App */

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

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

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

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

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

getAnswers();

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

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

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

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

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

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

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

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

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

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

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

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

table thead {
  font-weight: bold;
}

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

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

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

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

931 Answers 931

1
12 13
14
15 16
32
3
\$\begingroup\$

Coq, 20 30 bytes

Check"Hello, World!".

TRYITONLINE

But you have to first define what string is using this bit of code:

Require Import Coq.Strings.String.
Declare Scope string_scope.
Delimit Scope string_scope with string.
Bind Scope string_scope with string.
Local Open Scope string_scope.
Register string as core.string.type.
Register EmptyString as core.string.empty.
Register String as core.string.string.

And i think this is probably the shortest answer.

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

Exceptionally, 17 bytes

P"Hello, World!"/

Attempt This Online!

Explanation

P "Hello, World!"  ' Print that string
/                  ' Divide the register (initially 0) by itself to exit the program
\$\endgroup\$
3
\$\begingroup\$

SPDT, 756 bytes

p 0
r 0 0 1 2
r 1 0 2 3
r 4 0 2 3
r 3 0 2 5
r 5 0 2 6
r 6 0 2 7
r 7 0 2 8
r 8 0 2 9
r 9 0 2 10
r 10 0 2 11
r 11 0 2 12
r 12 0 2 13
r 13 0 2 14
r 14 0 2 15
r 15 0 2 4
r 5 0 2 16
r 8 0 2 16
r 11 0 2 16
r 12 0 2 16
r 4 0 2 16
r 8 0 2 17
r 11 0 2 17
r 12 0 2 17
r 13 0 2 17
r 5 0 2 18
r 6 0 2 18
r 7 0 2 18
r 8 0 2 18
r 9 0 2 18
r 11 0 2 18
r 12 0 2 18
r 14 0 2 18
r 15 0 2 18
r 3 0 2 19
r 6 0 2 19
r 7 0 2 19
r 8 0 2 19
r 9 0 2 19
r 12 0 2 19
r 14 0 2 19
r 11 0 2 20
r 13 0 2 20
r 5 0 2 21
r 6 0 2 21
r 7 0 2 21
r 8 0 2 21
r 9 0 2 21
r 10 0 2 21
r 12 0 2 21
r 13 0 2 21
r 14 0 2 21
r 15 0 2 21
r 4 0 2 21
r 3 0 2 22
r 5 0 2 22
r 6 0 2 22
r 7 0 2 22
r 8 0 2 22
r 11 0 2 22
r 12 0 2 22
r 13 0 2 22
r 14 0 2 22
r 15 0 2 22
l 23
l 22
l 21
l 20
l 19
l 18
l 17
l 16

Try it: https://radvylfprograms.com/spdt


SPDT is an esolang I've been wanting to make for a while now. Aside from I/O, it consists entirely of Single Pole Double Throw, or Form C, relays. This answer, which is possibly imperfectly golfed since I used a custom transpiler with macros to generate it, consists of relays forming a loop counting from 1 to 13, then back 1, infinitely. For each of these states, it uses relays to only light up the bits which are on in that character of Hello, World!, producing the following output:

An animated GIF, showing 13 frames, with each consisting of 8 boxes representing bits, which represent the characters in "Hello, World!"

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

ABC, 21 bytes

WRITE "Hello, World!"

Try it online!

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

A Language Programmed While Listening to Godspeed You! Black Emperor, 93 bytes

charms 72. 101. 108. 108. 111. 44. 32. 119. 111. 114. 108. 100. 33. 10﹔
print﹔
give up﹔

This is an esolang, and the goal of the language was to make it as annoying as possible to program.

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

CATHY, 175 bytes

catHYcAthycAthYcAthYcaTHycathycAthYcAthYcAthycatHycaTHycaThYcaTHycathYcatHycatHYcaTHycaTHYcAthycathYcatHycatHYcatHycatHYcatHYcatHYcatHYCatHycathYcathYcaThYCAthyCATHycATHycAtHy

Try it Online! -90 thanks to Steffan.

CATHY is a joke language based on a certain spam post. In normal form:

389960998265612367812323333;115τCƒ+

It pushes a huge integer, then converts to base 115 and charcodifies.

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

Algoid, 28 bytes

text.output("Hello, World!")

Now that's just boring in such a fun language... Here's a slightly longer version, let's get some colours going for 104 bytes:

algo.hide()
algo.setColor(algo.color.GREEN)
algo.setBgColor(algo.color.DARK_RED)
algo.text("Hello, World!")

See the output here

Okay I've finished for the day now :)

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

Io, 21 bytes

"Hello, World!" write
\$\endgroup\$
2
  • \$\begingroup\$ This Io (TIO) seems to have print, but not write. Is this another language with the same name? \$\endgroup\$
    – Dennis
    Feb 11, 2018 at 15:40
  • \$\begingroup\$ @Dennis It appears to have write, but it appears to write to some mysterious location/file/somewhere else instead of STDOUT \$\endgroup\$
    – ASCII-only
    Apr 13, 2018 at 8:35
2
\$\begingroup\$

Common LISP, 22 bytes

(princ"Hello, World!")
\$\endgroup\$
2
\$\begingroup\$

Burlesque, 17 bytes

,"Hello, World!"Q

The leading , tells Burlesque to ignore standard input. "Hello, World!" pushes a string to the stack, and Q formats it for display without quotes.

\$\endgroup\$
2
  • \$\begingroup\$ Yes, otherwise Burlesque will add "". \$\endgroup\$
    – Lynn
    Oct 23, 2015 at 21:25
  • \$\begingroup\$ Sure, that works just as well! The , primitive (it's sort of like a flag, I guess?) is there for historic reasons; Q is a new-ish synonym for sh which was longer. \$\endgroup\$
    – Lynn
    Oct 23, 2015 at 21:46
2
\$\begingroup\$

RPython, 60 bytes

def e():print'Hello, World!';return 0
target=lambda*_:e,None
\$\endgroup\$
2
\$\begingroup\$

awk, 25 bytes

END{print"Hello, World!"}
\$\endgroup\$
4
  • \$\begingroup\$ I know little of awk, but I think you can remove the END part. (It's June I know). \$\endgroup\$ Jun 2, 2016 at 19:30
  • \$\begingroup\$ Actually, if you use END, it requires some kind of input... the input can be empty but it seems to be needed on my version of AWK. You do need a label, though, otherwise nothing will happen. BEGIN works, but it adds 2 bytes. :( \$\endgroup\$ Jul 19, 2016 at 13:11
  • 1
    \$\begingroup\$ You're both right(ish). If you can invoke the one blank line of input rule you don't need the END, otherwise you must use BEGIN not END. \$\endgroup\$ Mar 19, 2017 at 8:53
  • 1
    \$\begingroup\$ If the one-blank-input rule is allowed, this works too $0="Hello World!" \$\endgroup\$
    – cnamejj
    Apr 14, 2021 at 10:06
2
\$\begingroup\$

Erlang, 63 bytes

Save as h.erl, then compile with erl -s h m, I think.

-module h.
-export[m/0].
m()->io:fwrite("Hello, World!").
\$\endgroup\$
2
\$\begingroup\$

Glypho, 480 bytes

In the "shorthand" format, it's 120 bytes:

1d+d1+d*+ddd++ddd++1+d11+d*d++d11+1+d++d1-dd+++d1<d>+-d++11+d*d*d+<d>d+d+d<d>+d+1+d1-dd+++d1-<d>+d*1+11+1+d+d*d+<d-+>[o]

An example conversion to "true" Glypho (using the translation of the Java interpreter, which differs slightly from that documented in the esolangs.org page) is:

v># #  :: < <   <v#  #*>*> ##:#**#,<,<: : > > *  *v>>v # ##,#, + +:++: ++ ##
*<<*,^,^<<#v<<v#v::v< < <,, +,+,+>>+*,,*+*+*,,*>**^v#  #,,:^#vv#>+>+ << >  >, , ++*>:
:v<v<^#^#v::v>::>v**v # #::>^>+>>:>:>>>*>>##>*^ *# #  vv ,::,<<>:++
*vv*v:v:^vv< > > ,,>>:>: << >+>>^ ^ ^^*^+,+,#::#*:*::  :v v  ,   # #<<#<#**#^,^,+##+**
+**+,:,:::>*<^v< v v+^+^*^^*+<<++##+v#v#++<>:< :* **+ +   ^ *  *<+<+<  *vv+<:^^:::
^+*<<***<^+  ++:+:^##^:>:>+::< > >#>># *  >,>, :^ ^>>^##<#,<,*^   *<:<

(using Windows line terminators \r\n) where I tried to disguise it as a 2D language for the Programming Language Quiz.

The basic approach is to push onto the stack a 0 followed by the codepoints in reverse order, and then print them with the loop [o]. In order to golf the pushing, I first push 11 and then I can push a new 11 whenever I want with <d>; the final <d-+> replaces that 11 on the bottom of the stack with the desired 0.

I experimented with various values on the bottom of the stack, and 11 is the only one for which my brute-force searcher was able to find expressions for each of the characters which were no more than 11 bytes each. (12 bytes was taking too long).

\$\endgroup\$
1
  • \$\begingroup\$ Quick translation from my CSL answer (i.e. super suboptimal), 456 \$\endgroup\$
    – ASCII-only
    Apr 13, 2018 at 6:32
2
\$\begingroup\$

23, 52 bytes

17,13,72,101,108,108,111,44,32,87,111,114,108,100,33

This uses 23.dezsy notation: 17,13 prints the 13 integers that follow as characters.

Try it online here. (Don't forget to replace the example with the above source code.)

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

Maxima, 23 bytes

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

UNBABTIZED

:72.:101.:108.:108.:111.:44.:32.:87.:111.:114.:108.:100.:33

:x prints x as a character and . acts as a statement separator.

The official interpreter is written for Python 2.2. You can use it in modern versions of Python by prepending the line

# coding: latin1
\$\endgroup\$
2
\$\begingroup\$

az, 16 bytes

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

Cardinal, 15 bytes

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

LMNtal, 35 bytes

io.use.io.print("Hello, World!",_).

A weird programming language from Japan that seems to be inspired by Prolog.

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

Fishing, 37 bytes

v+CCCCCCCCCCCCCCCC
  `Hello, World!`N

I don't think there's anything to golf beyond the example listed on the esolangs page, so I didn't really write this myself. Hence, community wiki.

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

HPPPL, 44 43 bytes

HP Prime Programming Language for the HP Prime color graphing calculator.

export h()begin print("Hello, World!");end;

(golfed down by one byte, thanks to kirbyfan64sos!)

Output:

Hello, World! HPPPL

This is a full program that you call by entering h to start it.

If you just want to have the output to the terminal, then a shorter (22 bytes) version in Home Mode works, too:

print("Hello, World!")

A free emulator is available here: http://www.hp-prime.de/en/category/13-emulator

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Is the space between the right parenthesis and begin needed? \$\endgroup\$ Sep 1, 2015 at 13:55
  • \$\begingroup\$ @kirbyfan64sos Thanks for the hint. No, it’s not necessary. \$\endgroup\$
    – M L
    Sep 1, 2015 at 14:30
2
\$\begingroup\$

RUBE, 47 bytes

A cellular automaton-based language about warehouses, crates, dozers, and conveyor belts:

2
1
766
2c4
256
07f
662
cfc
466
85c
OOO
ccc
===

It turns out stacking all the crates on top of each other like 2\n1\n6\n... is also 57 bytes, and is "simpler", but I didn't want to stretch the page. :)

Update: stacking the crates into a rectangle is shorter! Who'd've thought?

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

Doorspace, 92 bytes

The language is also known as Qugord.

~group h from %2 to %14 affect h into "Hello, World!" each h into 0 task give 0 to 1 publish

or

~group h from 0 to %12 affect h into "Hello, World!" each h into 0 task give 0 to %0 publish

It's seriously bugging me that this has a horizontal scrollbar because of a single character. I don't see how to shorten it any further though.

This solution is mostly a golfed version of the "Hello, World!" example on the esolangs page. The important concepts of the language are that it operates on an infinite main array, initialised to zeroes; and then there's also an output array, which is reset every time you print its contents. If you know what the commands mean, the code is actually quite readable if split across several lines (which is not valid in the language):

group h from %2 to %14 
affect h into "Hello, World!" 
each h into 0 task 
  give 0 to 1 
  publish

The first line defines a "group tag" h, which is some subarray of the main array. In this case, it addresses the cells at indices 2 to 14 (leaving 2 cells for future use).

The second line writes the character codes of Hello, World! into these 13 cells.

The third line defines a foreach loop over the cells in h, which works by copying the current value into the specified cell (0) and then executing the code after it.

The fourth line is executed once for each character code (which we find in cell 0). It moves the character code from the 0th cell of the main array to the 0th cell of the output array (which we index relatively by looking at index 1 on the main tape, which is zero).

The fifth line prints everything in the output array up to the last non-zero element (i.e. just the first cell in our case).

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

Parenthetic, 1036 Bytes

This can undoubtedly be done better, but it's about the best I can come up with at the moment.

((()()())(()()()())((()()(()))((())()()()())((())()()()()()()()())))((()()())(()(())())((()(()))(()()()())((())()()()())))((()()())(()()(()()))((()()(()))(()()()())((())()()())))((()()())(()(()())())((()()(()))(()(())())((())()()())))((()(())()(()))((()((()))())((()(())(())())((()()(()))(()(())())((())()())))((()((()))())((()(())(())())((()(()))(()()(()()))((())()()()()())))((()((()))())((()(())(())())(()(()())()))((()((()))())((()(())(())())(()(()())()))((()((()))())((()(())(())())((()(()))(()(()())())((())()()())))((()((()))())((()(())(())())((()(()))(()()()())((())()()()()()()()()()()()())))((()((()))())((()(())(())())(()()()()))((()((()))())((()(())(())())((()(()()))(()()(()()))((())()()()()()()()()())))((()((()))())((()(())(())())((()(()))(()(()())())((())()()())))((()((()))())((()(())(())())((()(()))(()(()())())((())()()()()()())))((()((()))())((()(())(())())(()(()())()))((()((()))())((()(())(())())((()(()))(()()(()()))((())()()()())))((()((()))())((()(())(())())((()(()))(()()()())((())())))(()((())))))))))))))))))

General Steps

Define A 32
Define B 36
Define C 32 * 3
Define D 36 * 3
Build a list of chars with (A*2)(C+5)(D)(D)(D+3)(A+12)(A)(C-9)(D+3)(D+6)(D)(C+4)(A+1)
Output list + empty set as string

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

l33t, 104 bytes

7 99999998 1 7 9991 1 7 6 1 1 7 2 1 5 0 7 99997 1 8 92 1 6 0 8 995 1 7 995 1 7 2 1 8 5 1 8 7 1 5 0 7 0 1

I've been using the Ruby interpreter which seems to insert an 10 (END) at the end of the code implicitly.

l33t is supposed to look like l33t-5p34k. However, it is interpreted by simply summing the digits in each "word" and turning that into an opcode. So for golfing all we want is those digits. Golfing l33t like this is definitely living on the edge though. Quoting from the language spec:

It is possible to program in l33t just using numbers, i.e. not forming letters in l33t 5p34k. However, programmers who do this are teh sUxX0r, and the interpreter is well within its rights to format your hard drive for attempting this.

As for the language itself, it's basically a Brainfuck-derivative. The main differences are that the source code is living on the tape as well (with an independent memory and instruction pointer), and that you define an offset whenever you move forward, backward, increment or decrement (so you can make larger jumps and increment more efficiently). Therefore, the techniques used in the short Brainfuck solutions don't help much here.

I started out with the naive solution (increment/decrement to value, print, repeat). That was 105 bytes. I managed to shave off one byte by computing the symbols , ! on a different memory cell than the letters (because the offsets from o to ,, space to W and d to ! are expensive. I think I might be able to save a few more by jumping into the program memory, but I'll have to try that tomorrow.

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

Wake, 16 bytes

:"Hello, World!"

Not much room for golfing.

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

ShortScript, 2 bytes

By using the function from the standard library:

$H

And by not using it:

→Hello, World!
\$\endgroup\$
6
  • \$\begingroup\$ That library seems to be missing from your reference implementation on Esolang. \$\endgroup\$
    – Dennis
    Sep 4, 2015 at 14:17
  • \$\begingroup\$ Yes, I the current version is a bit buggy \$\endgroup\$ Sep 4, 2015 at 16:58
  • \$\begingroup\$ I have updated the esolangs page. Now it will work. \$\endgroup\$ Sep 4, 2015 at 17:48
  • \$\begingroup\$ That implementation doesn't seem to print the exclamation point. \$\endgroup\$
    – Dennis
    Sep 4, 2015 at 17:58
  • \$\begingroup\$ I will fix it tomorrow, when I am at PC. \$\endgroup\$ Sep 5, 2015 at 21:02
2
\$\begingroup\$

Scheme, 24 26 25 bytes

(write "Hello, World!")

(display"Hello, World!")

simple but no one has done it in this language yet.

edit: fixed the quotes being printed.

\$\endgroup\$
5
  • \$\begingroup\$ i changed the code a little so it doesn't show the quotes \$\endgroup\$
    – Buzz
    Aug 31, 2015 at 14:20
  • \$\begingroup\$ Are the quote marks necessary in case of display? The H in Hello needs to be upper-case btw. \$\endgroup\$
    – CodeManX
    Sep 3, 2015 at 0:16
  • \$\begingroup\$ @CoDEmanX Yeah the quotes are necessary. Otherwise it thinks its a variable. \$\endgroup\$
    – Buzz
    Sep 3, 2015 at 13:30
  • \$\begingroup\$ Sure you can't get rid of the space before "? \$\endgroup\$
    – Lynn
    Sep 4, 2015 at 14:08
  • \$\begingroup\$ That space can be removed. Normally scheme needs the spaces to tell two things apart. but in this case it doesn't need it \$\endgroup\$
    – Buzz
    Sep 4, 2015 at 14:28
2
\$\begingroup\$

Sieve, 69 bytes

+|72|.+|101|.+|108|..>+|111|.>+|44|.-|32|.+|87|.<.+++.<.-|100|.-|33|.

Sieve is a BF-like programming language. It adds a special command |X|, called a sieve, that executes the command before it until the selected tape unit is equal to the number within the sieve. +|72|. outputs the character 72, which is an "H".

Here's an alternative with the same byte count:

+|72|.+|101|.+|108|..>+|111|.>+|44|.-|32|.>+|87|.<<.+++.<.-|100|.>>+.

The only change is that it saves 32 (space) and uses it later to print 33 (!).

\$\endgroup\$
5
  • \$\begingroup\$ Can you save some bytes by leaving the cell of the space untouched for World and then going back to it to print ! with a simple +.? \$\endgroup\$ Sep 5, 2015 at 21:24
  • \$\begingroup\$ @MartinBüttner Yes, oops. \$\endgroup\$ Sep 5, 2015 at 21:26
  • \$\begingroup\$ @MartinBüttner Actually, the byte count is the same. \$\endgroup\$ Sep 5, 2015 at 21:29
  • \$\begingroup\$ +|72|.+|101|.>+|108|..>+|111|.>+|44|.-|32|.+|87|.<.+++.<.<-.-|33|. for 66 \$\endgroup\$
    – Sp3000
    Sep 6, 2015 at 5:33
  • \$\begingroup\$ @Sp3000 Welp, already getting my butt kicked at my own language. \$\endgroup\$ Sep 6, 2015 at 20:07
1
12 13
14
15 16
32

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.