525
\$\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\$
26
  • 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\$ @aditsu Yes, because there's no way anyone to find to the shortest version in an answer of an unrelated language. \$\endgroup\$ Commented Aug 28, 2015 at 15:39
  • 3
    \$\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
  • 9
    \$\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

1021 Answers 1021

1
26 27
28
29 30
35
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\$

Рапира (Rapira), 57 26 22 bytes

OUTPUT:"Hello, World!" 

Try it online!

Or, more appropriately, (33 bytes):

ВЫВОД:"Привет Мир!" 
\$\endgroup\$
4
  • \$\begingroup\$ As far as I can tell, this defines a procedure without calling it, which violates the full program requirement. A simple output:"Hello, World!" works though. \$\endgroup\$ Commented Oct 12, 2017 at 14:39
  • \$\begingroup\$ @Dennis Okay. That saves 30 bytes, too! \$\endgroup\$ Commented Oct 12, 2017 at 17:37
  • \$\begingroup\$ The English version without the space is 4 bytes shorter... \$\endgroup\$ Commented Oct 12, 2017 at 17:38
  • \$\begingroup\$ @Dennis If you're going to use English, why bother using Рапира? \$\endgroup\$ Commented Oct 12, 2017 at 17:49
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\$ Commented Oct 25, 2017 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\$ Commented May 30, 2017 at 19:51
  • 1
    \$\begingroup\$ @BetaDecay codegolf.stackexchange.com/a/55432 and codegolf.stackexchange.com/a/103839 \$\endgroup\$ Commented May 30, 2017 at 19:52
  • 6
    \$\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\$ Commented Nov 12, 2017 at 21:32
1
\$\begingroup\$

Brain-Flak, 448 bytes

((()()()()()()()()()()())({}){}) ((()()()()()()()()()())({})({})({})({})({})({})({})({}){}) (([][][][][][])({})({})({})({})({})({})({}){}) (([][][][][][]())({})({})({})({}){}) (([][][]()())({})({})({})({})({})({}){}[()]) (([][][][])({})({})({})({}){}[()]) (([]()())({})({}){}) (([]()()()())({})({}){}) (([]()()())({})({})({})({})({})({})({})({}){}()) ((([]()()())({})({})({})({})({})({})({}){})) (([][][()()])({})({})({}){}()) ([]()())(({})({})({})({}){}()()) 

Try it online!

Newlines added for clarity

\$\endgroup\$
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\$ Commented Feb 24, 2016 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\$ Commented Feb 24, 2016 at 18:31
  • \$\begingroup\$ What if :: is within a string or two? Like exec"exec'print \"::\" ' "? \$\endgroup\$ Commented Feb 24, 2016 at 19:35
  • \$\begingroup\$ If the :: is in a string, you have to escape it like so: print "\::". \$\endgroup\$ Commented Feb 24, 2016 at 20:40
  • \$\begingroup\$ I'd probably rather use Python just for the simplicity. It's more well-known. \$\endgroup\$ Commented Feb 24, 2016 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\$ Commented Dec 6, 2017 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\$ Commented Jun 13, 2020 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\$

Yabasic, 16 bytes

May there always be BASIC in this world!

?"Hello, World!" 

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ Good old BASIC and it's ? abbreviation for PRINT! Also it's seemingly unique ability to recognize = as both assignment and test for equality. The things I got called on Reddit for suggesting modern languages could learn from this... \$\endgroup\$ Commented Apr 20, 2021 at 19:41
  • 1
    \$\begingroup\$ @CalebFuller yes, ? is single character version of print that dates back to the days where computers could only display 40 columns of text :P \$\endgroup\$ Commented Apr 27, 2021 at 3:26
  • 1
    \$\begingroup\$ Cool. Another interesting fact is that most BASIC functions (and many keywords) are 3 letters (INT, SQR, RND, REM, DIM) because the original development mainframe used 6-bit characters, and a 20 bit word, so 3 letters would fit in a single word (plus 2 spare bits for flags) An early example of Code Golf in the language design itself. \$\endgroup\$ Commented Apr 28, 2021 at 13:53
1
\$\begingroup\$

MY-BASIC, 20 bytes

Print"Hello, World!" 

Try it online!

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

Commentator, 197 bytes

 {- -}!/*{-{- {- -}! /* /*/* /*-}-}# {- -}!/*{- e#-}///*{-e#-}//{-# -}!{-# e#-}///*{-{-/* /*{-e#-}// /*-}-} /*# {- -}!/* 

Try it online!

I'm genuinely surprised it took me this long to make a somewhat golfed Hello, World! program in Commentator.

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

Rust, 34 bytes

fn main(){print!("Hello, World!")} 

Short, Sweet, and simple.

I do not believe it's possible to make this program any smaller. If someone does, congratulations.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ This has already been done, and with less bytes (actually, it's the exact same submission, but you miscounted here). \$\endgroup\$ Commented Feb 2, 2018 at 16:32
  • \$\begingroup\$ Nice to know. I'm new enough that I don't know if a search function exists for searching the answers (If one does, i can't find it) \$\endgroup\$ Commented Feb 2, 2018 at 16:51
  • \$\begingroup\$ Some challenges, including this one, have a Javascript leaderboard snippet included in the question. (When there isn't, I don't know how to search well either.) \$\endgroup\$ Commented Feb 2, 2018 at 17:29
  • 2
    \$\begingroup\$ @ØrjanJohansen Searching for "Rust" answers on this question seems to work. \$\endgroup\$ Commented Feb 2, 2018 at 19:38
1
\$\begingroup\$

17, 71

777{44 $ 5g $ 66 : : $ $ 69 : $ 1f $ 52 $ $ 6c $ $ 5f $ 1g $ a $ 0 @} 

Explantation:

Pushes ascii values for Hello World!(in base 17). Then store 17 at 0, to make it exit by relying on the fact that if it tries to pop at number and the stack is empty it return 17 to save two characters.

\$\endgroup\$
1
  • \$\begingroup\$ 17 in 71... nice. waiting on that 54 byte golf though :) \$\endgroup\$ Commented Nov 29, 2021 at 14:55
1
\$\begingroup\$

Ook!, 1426 bytes

Ook! is a joke esoteric programming language created by David Morgan-Mar. It is identical to Brainfuck, except that the instructions are changed into Orangutan words. It represents the first, although unfortunately not the last, in a long line of trivial Brainfuck command substitutions. As such, it is a member of the TrivialBrainfuckSubstitution family of programming languages.

Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. 
\$\endgroup\$
1
1
\$\begingroup\$

R16K1S60 Assembly, 56 Bytes

a: mov bx, .b .l: mov ax, [bx] send 4, ax add bx, 1 cmp bx, .c jne .l .h: hlt jmp .h .b: dw "Hello, World!" .c: dw 14 

Writes output to screen peripheral the R16K1S60 in ASCII. Runs on The Powder Toy save 2012356. (See link in header for info)

Note: How exactly should this be scored? I'm assuming just score the size of the ASM.

\$\endgroup\$
3
  • \$\begingroup\$ The link is a 404. I'd score the length of the resulting machine code, if that's a thing. \$\endgroup\$ Commented Feb 8, 2018 at 15:35
  • \$\begingroup\$ I'll try and get the length. I'll also fix the link. \$\endgroup\$ Commented Feb 8, 2018 at 15:36
  • \$\begingroup\$ Code is 56 bytes compiled. I'll fix the byte count. However, i'm afraid a hexdump is beyond my reach at the moment, i don't know how the R16K1S60 encodes instructions on FILT, only that it uses 16 of the 48 available bits for it's word. \$\endgroup\$ Commented Feb 8, 2018 at 15:40
1
\$\begingroup\$

Momema, 63 bytes

0-9*072*0101*0108*0108*0111*044*032*087*0111*0114*0108*0100*033 

Try it online!

This is a golfed version of the Hello World program given by TIO. The only difference is that we store the value -9 (the cell which is memory-mapped for character-based I/O) in cell 0, and then use *0 (the value of cell 0) instead of -9 everywhere. This wouldn't save bytes except that Momema will parse a leading 0 on a string literal as a separate number, so you can write e.g. *0108 instead of -9 108. This saves a byte for every write.

As hinted above, the program consists of a series of writes of various codepoints to -9 (the address which is memory-mapped to perform character-based I/O). In ungolfed form, it looks like:

0 -9 *0 72 *0 101 *0 108 *0 108 *0 111 *0 44 *0 32 *0 87 *0 111 *0 114 *0 108 *0 100 *0 33 
\$\endgroup\$
1
\$\begingroup\$

Crayon, 16 Bytes

"Hello, World!"q 

Try it online!

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Welcome to PPCG! \$\endgroup\$ Commented Feb 12, 2018 at 12:07
1
\$\begingroup\$

Felix, 21 bytes

print"Hello, World!"; 

Try it online!

Somebody linked to this language on PPCG and I thought it was interesting. In the interest of getting to know the language, I thought I'd write some programs in it.

The Felix docs all use print$ x instead of print x because print is a procedure and not a keyword, so use of the Haskell-style low-precedence application operator $ allows a slightly more natural syntax (compare print (1 + foo(5)); with print$ 1 + foo(5);. I'm not sure I agree completely with this, but it's just a convention and as I'm on PPCG I can break it without feeling guilty.

print is Felix's function to output something, with no trailing newline.

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

Brat, 17 bytes

p "Hello, World!" 

Try it online!

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

NEUPL, 14 bytes

"!dlrow ,olleH 

Try it online

Explanation:

"!dlrow ,olleH " Begin pushing characters to the stack. ! Push the character "!" to the stack. d Push the character "d" to the stack. l Push the character "l" to the stack. r Push the character "r" to the stack. o Push the character "o" to the stack. w Push the character "w" to the stack. Push the character " " to the stack. , Push the character "," to the stack. o Push the character "o" to the stack. l Push the character "l" to the stack. l Push the character "l" to the stack. e Push the character "e" to the stack. H Push the character "H" to the stack. Implicitly stop pushing characters to the stack. Implicitly pop and print each character in the stack. 
\$\endgroup\$
1
\$\begingroup\$

Dreaderef, 42 bytes

"??	?\r?0"-1"Hello, World!\n" 

Try it online! This file contains unprintables. Hexdump:

00000000: 2201 1004 013f 0704 3f09 3f07 5c72 063f "....?..?.?.\r.? 00000010: 0201 1510 0130 222d 3122 4865 6c6c 6f2c .....0"-1"Hello, 00000020: 2057 6f72 6c64 215c 6e22 World!\n" 

There already is a Dreaderef submission, but this uses a different approach (looping through memory rather than printing out each character directly).

Ungolfed:

CODE. ; Dereference the string pointer 0. deref 16 4 ; End the program if the value pointed to is zero 3. deref ? 7 6. bool ? 9 9. ? 7 13 ; Black magic 12. chro ? ; Increment the string pointer 14. add 1 21 16 ; Go back to the beginning 18. deref 100 -1 DATA. 21. "Hello, World!\n" 
\$\endgroup\$
1
26 27
28
29 30
35

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.