462
\$\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
  • 2
    \$\begingroup\$ @isaacg No it doesn't. I think there would be some interesting languages where it's not obvious whether primality testing is possible. \$\endgroup\$ – Martin Ender Aug 28 '15 at 13:56
  • 6
    \$\begingroup\$ If the same program, such as "Hello, World!", is the shortest in many different and unrelated languages, should it be posted separately? \$\endgroup\$ – aditsu quit because SE is EVIL Aug 28 '15 at 15:33
  • 2
    \$\begingroup\$ @mbomb007 Well it's hidden by default because the three code blocks take up a lot of space. I could minify them so that they are a single line each, but I'd rather keep the code maintainable in case bugs come up. \$\endgroup\$ – Martin Ender Aug 28 '15 at 19:34
  • 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\$ – 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

815 Answers 815

1
21 22
23
24 25
28
1
\$\begingroup\$

cQuents, 15 bytes

Hello, World!?0

Try it online!

Explanation

Hello, World!    Literal "Hello, World!"
             ?   Mode ? (query)
              0  Necessary for interpreter
                 Because there is no input for query mode, only print literals
\$\endgroup\$
1
\$\begingroup\$

nouse, 321 bytes

I can't figure out from the spec how to specify operands in Line Noise syntax. If anyone knows please comment.

Here is the Assembly syntax version:

cut 0,72,write 0,paste 0
cut 0,101,write 0,paste 0
cut 0,108,write 0,write 0,paste 0
cut 0,111,write 0,paste 0
cut 0,44,write 0,paste 0
cut 0,32,write 0,paste 0
cut 0,87,write 0,paste 0
cut 0,111,write 0,paste 0
cut 0,114,write 0,paste 0
cut 0,108,write 0,paste 0
cut 0,100,write 0,paste 0
cut 0,33,write 0,paste 0
swap 0
\$\endgroup\$
1
\$\begingroup\$

@, 2 bytes

The language is made of a tree of function calls. Each character (with some exceptions) represents a function that may take as many or few arguments as it likes. Arguments are then read from directly after it in the code.

ħ

The ħ builtin returns the string "Hello, World!"

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

Aheui, 147 144 bytes

발따밤따빠받나파빠밣다빠밦다빠받타밢밢따밦다밤밣따밦밦따빠밣다파받따빠받다파빠빠밠타밣밢따아멓희
\$\endgroup\$
1
\$\begingroup\$

Ly, 19 18 bytes

"!dlroW ,olleH"[o]

First submission in my new language!

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

Positron, 21 bytes

print@"Hello, World!"

Try it online!

Just to get this out there :)

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

Emmental, 68 bytes

#0#10#33#100#108#114#111#119#32#44#111#108#108#101#72...............

From the esolangs.org page.

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

HTML & JS (w/ jQuery), 85 bytes

<b><script src="//code.jquery.com/jquery.min.js"><script>$("b").html("Hello, World!")
\$\endgroup\$
1
\$\begingroup\$

Caker, 294 bytes

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

Looks like alot of zeros...

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

SE, 66 61 bytes

array h is [H e l l o , _space W o r l d !] end
do>with h end

T h i s _space e s o l a n g _space i s _space b a d _space a t _space o u t p u t ! (This esolang is bad at output!)

SE stands for self-explanitory, not Stack Exchange :(.

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

Joy, 24 bytes

"Hello, World!"putchars.
\$\endgroup\$
1
  • 1
    \$\begingroup\$ You forgot the exclamation mark! \$\endgroup\$ – kirbyfan64sos Nov 21 '15 at 4:36
1
\$\begingroup\$

D, 55 53 52 bytes

import std.stdio;void main(){"Hello, World!".write;}
\$\endgroup\$
2
  • 1
    \$\begingroup\$ You can save 2 bytes, by removing \n \$\endgroup\$ – Khaled.K Apr 30 '17 at 23:08
  • 1
    \$\begingroup\$ Capitalization is important. (i.e. change world to World). And won't "Hello, World!".write work? \$\endgroup\$ – Zacharý May 9 '17 at 0:46
1
\$\begingroup\$

JoshScript, 596 bytes

JOSHJoshJoshJoshJoshJoshJoshJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshJoshJOSHJOshJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOshJOshJOSHJOSHJOSHJOshjosHjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshJOshjosHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOshjoshjoshjoshjoshjoshjoshjoshjoshjoshjoshJoshJoshjoshJOshJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOshJOSHJOSHJOSHJOshjoshjoshjoshjoshjoshjoshJOshjoshjoshjoshjoshjoshjoshjoshjoshJOshjosHjosHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOSHJOsh

JoshScript is an esoteric language that is made up entirely of joshes.

JoshScript is pretty easy to learn, below is the usage of JoshScript v1.01

JOSH increases the value by 1

josh decreases the value by 1

Josh multiplies the value by 2

josH divides the value by 2 and rounds down to the nearest integer

JOsh outputs the current value

joSH takes input and sets the value to the ascii repr. of the char

im not josh-obsessed i promise

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

PATH, 113 bytes

/++}+++++++}+++++}<$+++++++<
\+}++}++++++{{{{{-^}++.}+++.+++++++..+++.}++.}++++.}+++.{{{.+++.------.--------.}}+.

Try it online!

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

BrainFlump, 362 bytes

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++:..+++.-------------------------------------------------------------------.------------.+++++++++++++++++++++++++++++++++++++++++++++++++++++++.++++++++++++++++++++++++.+++.;.--------.-------------------------------------------------------------------.

Try it online!

Should be shorter once we fix loops, but that's it for now.

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

Nhohnhehr, 181 bytes

+-----------+
|$010010000\|
|1100101011\|
|0110001101\|
|1000110111\|
|1001011000\|
|0100000010\|
|1011101101\|
|1110111001\|
|0011011000\|
|1100100001\|
|00001  @  \|
+-----------+

Try it online!

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

Bitwise, 149 bytes

MOV 1 &1 &1
OUT &72 1
OUT &101 1
OUT &108 1
OUT &108 1
OUT &111 1
OUT &44 1
OUT &32 1
OUT &87 1
OUT &111 1
OUT &114 1
OUT &108 1
OUT &100 1
OUT &33 1

Pretty simple - just prints integer literals (&x) as ASCII characters. MOV 1 &1 &1 sets the 1st register to 1, so that each line can save 1 byte (using 1 instead of &1). The second variable to OUT is not optional. If the second variable (register/frame register/literal) is true, the character will be printed, otherwise it will not.

Try it online!

\$\endgroup\$
0
1
\$\begingroup\$

Archway2, 182 bytes

                   \
 /
  >++>+++>+++>+<<<<-/>+>+>->+<<<<<-\>>.>---.+++++++..+++.>>++++.------------.<-.<.+++.------.--------.>>+.
  \    \
\++++>
++++++++/                         /

Try it online!

This program was derived from the Hello, World! program that I wrote for TIO. I realized that the code not inside the sub-loops can be aligned with the code inside the sub-loops removing some redundant direction changing. Unrolling the loop consisting of only a < to <<<< saves many bytes by not requiring the spaces to support the positioning of the reflectors. Flipping the main loop to go around the bottom of the program instead of the top allows the first few instructions of the main loop to be put on its own line while still being reachable from the start of the program. This lets us move the sub-loop closer to the edge of the program saving bytes.

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

Symbolic Python, 200 bytes

Managed to cut down 16 bytes from my original example on the wiki. Note that the unprintable on line two is \xc2\x8d.

This can definitely be shorter, but it took me long enough. I'll come back to it another time.

__=-~(_==_)
__=`_`[~__]+`_>_`[__::__]+`''`[-__::~__**__]
_=_==_
___='%'+__[-_]
__,_=___+__[-~_]+__[_]*-~_+__[_>_]+', '+___+__[_>_]+`_`[_]+__[-~_-_]+__[~_]+'!',-~-~_
___=_*_<<_
_=__%(___,___+_*-~-~_)

Try it online!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Cool, but JSF*ck is better. \$\endgroup\$ – Cyoce Oct 25 '17 at 23:07
1
\$\begingroup\$

Python 1, 20 bytes

print"Hello, World!"

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ This is a duplicate of a previous answer... I'll find it \$\endgroup\$ – Beta Decay May 30 '17 at 19:51
  • 1
    \$\begingroup\$ @BetaDecay codegolf.stackexchange.com/a/55432 and codegolf.stackexchange.com/a/103839 \$\endgroup\$ – ETHproductions May 30 '17 at 19:52
  • 5
    \$\begingroup\$ To any delete-voters, this is a valid answer in a language that hasn't yet been used. It is no longer a duplicate to the two pointed out by ETHproductions. It may not be particularly interesting, but that is no reason to delete this answer. \$\endgroup\$ – caird coinheringaahing Nov 12 '17 at 21:32
1
\$\begingroup\$

Excel VBA, 15 Bytes

Anonymous VBE immediate window function that takes no input and outputs Hello, World! to the VBE immediate window.

?"Hello, World!
\$\endgroup\$
1
\$\begingroup\$

Quetzalcoatl 17 15 bytes

"Hello, World!"

EDIT

I completely redesigned the language. The program pushes "Hello, World!" to stack, and implicitly prints.


P.S. I wrote Quetzalcoatl.

\$\endgroup\$
5
  • \$\begingroup\$ So you added ::. Does printing with slicing like this a=[1];::a[::] still work? \$\endgroup\$ – mbomb007 Feb 24 '16 at 18:16
  • \$\begingroup\$ Yes it does. I specifically made sure it did. I just replace :: with print, and [print with [:: before I use exec. I am just assuming nobody makes arrays out of print statements, like [print 'a', print 'b']. \$\endgroup\$ – NoOneIsHere Feb 24 '16 at 18:31
  • \$\begingroup\$ What if :: is within a string or two? Like exec"exec'print \"::\" ' "? \$\endgroup\$ – mbomb007 Feb 24 '16 at 19:35
  • \$\begingroup\$ If the :: is in a string, you have to escape it like so: print "\::". \$\endgroup\$ – NoOneIsHere Feb 24 '16 at 20:40
  • \$\begingroup\$ I'd probably rather use Python just for the simplicity. It's more well-known. \$\endgroup\$ – mbomb007 Feb 24 '16 at 20:42
1
\$\begingroup\$

Verbosity, 382 bytes

Include<Integer>
Include<MetaFunctions>
Include<Output>
Include<String>
Integer:DefineVariable<o;1>
Output:DefineVariable<P;0>
String:DefineVariable<s;"Hello, World!">
String:RedefineVariable<s;String:RemoveCharactersFromStart<s;o>>
String:RedefineVariable<s;String:TakeFirstCharacters<s;o>>
Output:DisplayAsText<P;s>
DefineMain<> [
MetaFunctions:ExecuteScript<MetaFunctions@FILE>
]

Try it online!

Ungolfed

Include<Integer>
Include<MetaFunctions>
Include<Output>
Include<String>

Integer:DefineVariable<one; 1>
Output:DefineVariable<STDOUT; 0>
String:DefineVariable<string; "Hello, World!">

String:RedefineVariable<string; String:RemoveCharactersFromStart<string; one>>
String:RedefineVariable<string; String:TakeFirstCharacters<string; one>>

Output:DisplayAsText<STDOUT; string>

DefineMain<> [
	MetaFunctions:ExecuteScript<MetaFunctions@FILE>
]

Try it online!

I proudly present yet another language: Verbosity. Who needs to be good at code golfs, when you have a language like this?

\$\endgroup\$
1
  • \$\begingroup\$ I'm somewhat impressed at how it manages to error out on all my attempts to "obviously" shorten it. \$\endgroup\$ – Ørjan Johansen Dec 6 '17 at 1:21
1
\$\begingroup\$

Whispers, 29 bytes

> "Hello, World!"
>> Output 1

Try it online!

An even newer language than Verbosity.

How it works

> "Hello, World!" - Line 1
>                 - Yield a constant value, which is...
  "Hello, World!" -   The string "Hello, World!"

>> Output 1       - Line 2
>>                - Replace numbers with line references
   Output         - Output the value...
          1       - ...on line 1
\$\endgroup\$
1
\$\begingroup\$

Assembunny, 100 bytes

out 72
out 101
out 108
out 108
out 111
out 44
out 32
out 119
out 111
out 114
out 108
out 100
out 33

I think I could have miscounted.

Explanation

This code uses the extra signal generator instruction out x from day 25 for output.

This is the output:

  Dec  72 101 108 108 111  44  32 119 111 114 108 100  33
  Hex  48  65  6C  6C  6F  2C  20  77  6F  72  6C  64  21
ASCII   H   e   l   l   o   ,       w   o   r   l   d   !
\$\endgroup\$
1
\$\begingroup\$

face, 41 bytes

(Hello, World!
)\$*m%*7%+%%%,c'$,ioow%$%o

Explanation:

(...)   comment, skipped over by interpreter but used to embed string in source
\$*     assign $ to a pointer to the source code and * to a pointer to the IP
m%*     malloc space for %, a variable which will be used to store the length
7%+%%%  set % to 14 in a roundabout way (% = 7, % += %), the length of the string
,c'$,i  step into char mode to increment $, setting the start of the string
oo      set o to stdout
w%$%o   fwrite(str, 14, stdout), throwing the return value into %

Try it online!

\$\endgroup\$
0
1
\$\begingroup\$

Ace, 1 byte

H

Try it online!

This is a golfing language I am currently in the process of making, so I thought I'd post it here. It's based on Aceto. I wasn't quite satisfied with what Aceto had to offer but I really liked using it so I decided I'd make my own language and include more builtins and NOT RUN THE IP ON A HILBERT CURVE. It currently has ~30 commands and I am improving it every day. I plan to get it officially on TIO by August 2018

\$\endgroup\$
1
  • \$\begingroup\$ It's now 2020. Have you added it to TIO yet? \$\endgroup\$ – pppery Jun 13 '20 at 1:00
1
\$\begingroup\$

Clean, 30 bytes

module m
Start="Hello, World!"

Try it online!

TIO link is 3 bytes longer to match TIOs file name: main.icl

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

shortC, 26 21 19 16 bytes

AR"Hello, World!

Just to showcase the language.

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

Dreaderef, 31 bytes

This file contains unprintables. Here is a reversible hexdump created with xxd:

00000000: 2206 4806 6506 6c06 6c06 6f06 2c06 2006  ".H.e.l.l.o.,. .
00000010: 5706 6f06 7206 6c06 6406 2106 5c6e 22    W.o.r.l.d.!.\n"

Try it online!

How does it work?

The reason this file is so unreadable is because it makes use of string literals to golf the code. The preprocessor expands string literals into their respective character values. The actual numbers this represents are:

6 72 6 101 6 108 6 108 6 111 6 44 6 32 6 87 6 111 6 114 6 108 6 100 6 33 6 10

6 is the command associated with chro (char output). So this code looks like this:

chro 72
chro 101
chro 108
chro 108
chro 111
chro 44
chro 32
chro 87
chro 111
chro 114
chro 108
chro 100
chro 33
chro 10
\$\endgroup\$
1
21 22
23
24 25
28

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.