# Hello World - but alphabetically

This challenge sounds too simple to not already exist, so let me know if it is a duplicate.

Print Hello, world!

## The rules

Your code has to be in "byte order". This means that every character / byte has a higher or equal byte value than the preceding character / byte.

Exceptions to this rule are the whitespace characters, which may occur anywhere.

The usual loopholes are not allowed.

Edit: Using built-in functions / constants resolving to Hello, world! is not allowed.

Edit 2: The output may be a(n anonymous) function returning the string, an expression resolving to the string, or any other way you think should be allowed.

### example

HW is valid: 0x48 (H) <= 0x57 (W)
print is invalid: 0x72 (r) > 0x69 (i)
but PRint is valid: 0x50 (P) <= 0x52 (R) <= 0x69 (i) <= 0x6e (n) <= 0x74 (t)

## The scoring

This is so the score is the number of characters / bytes. The lower the score, the higher the ranking.

• There are many languages with 1-byte Hello World built-ins. Some may even print Hello World for an empty program. – Dennis Mar 18 '17 at 20:09
• Very closely related. (The difference is that that one allows each line to be sorted independently, and that it's primarily scored by the number of lines.) – Martin Ender Mar 18 '17 at 20:09
• @Dennis Added an extra rule because of that! Thanks – Charlie Mar 18 '17 at 20:14
• Still trivial in 23, Headsecks, and Lenguage, but much longer than a couple of bytes. – Dennis Mar 18 '17 at 20:29
• Default output like ans = Hello, world! is that OK? Otherwise, MATLAB and Octave won't be able to attempt this... disp, printf and eval are all in non-alphabetical order. – Stewie Griffin Mar 18 '17 at 20:34

# WhiteSpace, 146 bytes

Since all whitespace may occur everywhere, this is is just the golfed Hello World program. Since whitespace doesn't show properly here, take the following program and replace all . by spaces, > by tabs and ; by newlines.

...;..>>..>.>.;..>>>>;...>;...>>>;...>..;..>>.>..;..>>..>.>>;..>>>>>>>;...>..;...>;.;...>>>.;..>>...>>;;..;.;.;>.>;...>>.>.>>;>...>;..;.;;;..>;;;;


# Note

I didn't golf this, LukStorms did. His answer can be found here.

• It's not in byte order. – Matthew Roh Mar 19 '17 at 3:46
• Indeed, but whitespace didn't have to be in byte order; it could appear everywhere – Luke Mar 19 '17 at 7:31
• Oh. Good abuse of the rules then – Matthew Roh Mar 19 '17 at 7:47
• Exactly. That's also part of the reason this is community wiki. – Luke Mar 19 '17 at 7:48

# Headsecks - 124 82 chars

Thanks to @MartinEnder for pointing me to a smaller hello-world!

Headsecks looks to be the right language for the job, because its brainfuck except that it takes each character mod 8.

 +19AISYchpx£¨°»ÁËÐÞàèðøĀĈĐĘĦīİĸŀňŐŘŠŨųŻƀƈƐƘƠƪƲƺǁǏǒǟǣǫǴǸȃȈȐțȤȫȴȼɀɋɓɜɠɫɱɹʃʉʑʞʣʩʴʺ˂ˏ


You can try it by going here: https://repl.it/G2I5/1, then here: https://sange.fi/esoteric/brainfuck/impl/interp/i.html

• You need to post an actual Headsecks interpreter that will run this, not a Python program to convert to BF and a BF interpreter. Since the program contains non-ASCII, the interpreter you link to needs to handle non-ASCII Headsecks programs. – mbomb007 Mar 22 '17 at 16:15
• @mbomb007 there used to be an interpreter, but it 404s now :( esolangs.org/wiki/Headsecks – Maltysen Mar 22 '17 at 20:40
• github.com/TieSoul/Multilang/blob/master/headsecks.py – mbomb007 Mar 22 '17 at 20:48
• @mbomb007 that one handles unicode codepoints, but not the weird wrapping tricks that the bf helloworld uses. I'll try to look for another one, or just rollback to my earlier, longer, answer. – Maltysen Mar 22 '17 at 20:59
• Maybe someone should create an implementation, then have Dennis put it on TIO. Also, someone should edit Esolangs. I was going to, but idr my login info. – mbomb007 Mar 22 '17 at 21:02

# CJam, 784 bytes

"

"
"
"')er~


Try it online!

Not winning anything with that byte count, but this was still fun to make.

Explanation

The first large string encodes Hello, world! using only whitespace. Each character is mapped to a tab, a space, and a number of linefeeds equal to its codepoint minus 32.

Next, the string is transliterated by replacing tabs with ' and linefeeds with ). This results in many sequences of a literal space character followed by some number of increments. The string is eval'ed with ~`, pushing the spaces and incrementing them to proper characters.

The stack is implicitly output at the end of the program.

• Excellent, finally a truly clever answer! – ETHproductions Mar 22 '17 at 18:23