129
\$\begingroup\$

Write a program that prints "Hello, World!". But also, if you take only the first, third, fifth, etc. characters of your program, the resulting program should still print "Hello, World!".

If your program is:

abc
def

It should output "Hello, World!", but so should

acdf

No solutions with fewer than 2 characters.

\$\endgroup\$
  • 2
    \$\begingroup\$ Can there be whitespace around the output? \$\endgroup\$ – vroomfondel Jun 26 '17 at 20:20
  • 18
    \$\begingroup\$ Amazing first post! \$\endgroup\$ – Adám Jun 26 '17 at 22:49
  • 11
    \$\begingroup\$ Seeing all the answers with "HHeelllloo" reminded me of speaking Whale. \$\endgroup\$ – Brian Minton Jun 27 '17 at 4:19
  • 32
    \$\begingroup\$ Pro tip for avoiding "Hello, World!" built-ins in challenges like this: use a slightly different string of similar complexity like "Greetings, Earthlings!" \$\endgroup\$ – Martin Ender Jun 27 '17 at 7:15
  • 6
    \$\begingroup\$ "No solutions with fewer than 2 characters." Amazing. \$\endgroup\$ – Robert Grant Jun 28 '17 at 9:10

71 Answers 71

196
\$\begingroup\$

Python 3, 61 bytes

rant="partisn't"
print(("HHeelllloo,,  WWoorrlldd!!"""[::2]))

Try it online!

Abusing the fact that print is a function in Python 3 :)

The least partisan solution you'll find here on PPCG.

Becomes

rn=print
rn("Hello, World!"[:])
\$\endgroup\$
  • 49
    \$\begingroup\$ This is beautiful. \$\endgroup\$ – musicman523 Jun 26 '17 at 22:30
  • 1
    \$\begingroup\$ @musicman523 But, Doesn't REPL surround the text with single-quotes in that case. \$\endgroup\$ – officialaimm Jun 27 '17 at 2:38
  • 1
    \$\begingroup\$ @officialaimm Yes, I suppose it does \$\endgroup\$ – musicman523 Jun 27 '17 at 3:25
  • 1
    \$\begingroup\$ @yamboy1 Try deleting every other letter \$\endgroup\$ – vroomfondel Jun 27 '17 at 3:49
  • 1
    \$\begingroup\$ I did not know [:] actually worked :o Nice! \$\endgroup\$ – HyperNeutrino Jul 15 '17 at 2:07
56
\$\begingroup\$

Cardinal, 29 bytes

%
"
H
e
l
l
o
,
 
W
o
r
l
d
!

Try it online!

Removing every other character removes all the linefeeds, which still results in Hello, World!:

%"Hello, World!

Try it online!

The reason this works is that % creates four instruction pointers, moving in each of the four cardinal directions. IPs that leave the source code are simply removed. So in the first case, only the south-going IP remains and in the second case, only the east-going IP remains, all the others are simply dropped. In either case, the executed program is then just "Hello, World!. The " toggles to string mode where each cell is simply printed to STDOUT. We don't need to terminate the string, because leaving the source code still terminates the program.

Note that the same idea works in Beeswax, using * instead of % and ` instead of " (this is because Beeswax was largely inspired by Cardinal but uses a hexagonal grid).

Try it online! (vertical) | | Try it online! (horizontal)

\$\endgroup\$
49
\$\begingroup\$

C, 125 bytes

xpxuxtxs( ) { }xuxs ( ) { } main( ) {puts ( "Hello, World!" ) ; } mxaxixn ( ) {xpxuxtxs ( " H e l l o ,   W o r l d ! " ) ; }

Try it online!

With even characters removed:

xxxx(){}us(){}mi(){us("el,Wrd");}main(){puts("Hello, World!");}

Try it online!

\$\endgroup\$
31
\$\begingroup\$

Actually, 2 bytes

HH

Explanation:

H, as you might expect, pushes Hello, World! to the stack.

The main program (HH) will encounter the first H and push Hello, World! to the stack. On the second H, however, it will try to use two arguments (as the stack needs to be empty to push Hello, World!) and fail. However, this error will be ignored and then Hello, World! will be implicitly printed.

The second program (H) will push Hello, World! once, and that will be impliclty printed.

This is similar to Fatalize's 2-byte answer, but this doesn't really "cheat".

Try it online!

\$\endgroup\$
  • 4
    \$\begingroup\$ Nice solution, but I think this shouldn't count since it's too much like a one-character solution. \$\endgroup\$ – Leo Tenenbaum Jun 26 '17 at 20:54
  • 32
    \$\begingroup\$ @LeoTenenbaum Why not? It conforms to the rules perfectly fine. \$\endgroup\$ – Okx Jun 26 '17 at 21:06
  • 2
    \$\begingroup\$ What you explain isn't the case, H would only push Hello, World! on an empty stack, and if the stack isn't empty, it would expect 2 arguments, so there will be an error, and errors are ignored. And no Actually doesn't implicitly print only the topmost element. \$\endgroup\$ – Erik the Outgolfer Jun 27 '17 at 7:30
  • \$\begingroup\$ @EriktheOutgolfer Oops. Will fix. \$\endgroup\$ – Okx Jun 27 '17 at 9:37
  • \$\begingroup\$ This is why Actually is my favorite golfing language. It's at the perfect level of stupid. \$\endgroup\$ – RShields Jul 3 '17 at 0:07
22
\$\begingroup\$

Lua, 89 bytes

--- [ [
print("Hello, World!")
--[[ ] ]
pCrAiLnCtU(L"AHTeOlRlFoE,L IWNoEr:lDd !:"D)
---]]

Try it online! As the syntax highlighting shows, this is massive comment abuse.

Alternate:

--[[pit"el,Wrd"
-[]]print("Hello, World!")--]

Try it online!

And for convenience, a program to convert a program into every other character form: Try it online!

\$\endgroup\$
  • \$\begingroup\$ I like this one! The commenting format of Lua seems similar to T-SQL, I'm going to try and work on one for that language. \$\endgroup\$ – BradC Jun 26 '17 at 21:11
  • 3
    \$\begingroup\$ This sort of trick should work for any language with both block comments and line comments (C, JS, etc) \$\endgroup\$ – CalculatorFeline Jun 26 '17 at 21:25
  • 2
    \$\begingroup\$ CALCULATORFELINE:D :D \$\endgroup\$ – Riking Jun 28 '17 at 1:50
  • 2
    \$\begingroup\$ HHeelllloo WWoorrlldd!! is kinda boring :P \$\endgroup\$ – CalculatorFeline Jun 28 '17 at 15:34
19
\$\begingroup\$

Retina, 39 bytes


HHeelllloo,,  WWoorrlldd!!


(.).x?
$1

Try it online!

Taking every other character gives:


Hello, World!
()x
1

Try it online!

The first program creates a string with the greeting duplicated. Then it replaces each pair of characters with the first character. There is also an empty stage that replaces all empty strings with empty strings in between, but that doesn't do anything. The second program fails to match the letter "x" so it doesn't replace anything after creating the greeting.

Perhaps more amusingly, if the third stage is changed slightly the first set of characters doesn't have to be the same message. This could lead to many identical length solutions such as full and halved.

\$\endgroup\$
17
\$\begingroup\$

Charcoal, 25 bytes

H→e→l→l→o→,→ →W→o→r→l→d→!

Try it online!

If you remove the even characters, you just remove the arrow commands that indicate the direction of the next text, and that leaves the following code:

Hello, World!

Try it online!

That also prints the greeting.

\$\endgroup\$
17
\$\begingroup\$

Haskell, 85 bytes

{--}main=putStr"Hello, World!"--} m a i n = p u t S t r " H e l l o ,   W o r l d ! "

Try it online!

Every second character removed:

{-mi=uSrHlo ol!-}main=putStr"Hello, World!"

Try it online!

This exploits the two comment formats in Haskell: {- -} for in-line or multi-line comments and -- to comment the rest of the line.

\$\endgroup\$
16
\$\begingroup\$

Javascript, 67 bytes

/**/alert`Hello, World`// * / a l e r t ` H e l l o ,   W o r l d `

Every second letter removed:

/*aetHlo ol`/*/alert`Hello, World`

Just like Laikoni's Haskell answer, this exploits comments.

\$\endgroup\$
  • \$\begingroup\$ Nice answer, +1! Saved 2 bytes by creating a port of your answer in my Java 8 answer, and an additional byte when I changed // * / to //**/ (which unfortunately isn't possible in your case due to /**/alert`Hello, World` being an odd amount of bytes, instead of even like in my case. \$\endgroup\$ – Kevin Cruijssen Jun 27 '17 at 9:54
14
\$\begingroup\$

Brachylog, 4 bytes

Ḥ~wḤ

Try it online!

Explanation

~w writes its right variable to STDOUT, and ignores its left argument. is "Hello, World!", so this prints Hello, World!.

If we only take the first and third chars, we get Ḥw. In that case w writes its left variable and ignores its right variable, so it also prints Hello, World!.

2 bytes

ḤḤ

Try it online!

This is technically a valid answer, but this unifies the output variable of the program instead of printing to STDOUT, so I guess the 4 bytes program is more in the spirit of the challenge.

\$\endgroup\$
  • \$\begingroup\$ I do not think the 2 byte answer is 'technically' valid, as the challenge states print. \$\endgroup\$ – Okx Jun 26 '17 at 21:56
  • 1
    \$\begingroup\$ @Okx print, as in onto a piece of paper? \$\endgroup\$ – theonlygusti Jun 27 '17 at 10:39
  • \$\begingroup\$ @theonlygusti It means print to STDOUT. \$\endgroup\$ – Okx Jun 27 '17 at 10:40
  • 5
    \$\begingroup\$ @theonlygusti Sigh... that's what's meant by print by default. \$\endgroup\$ – Okx Jun 27 '17 at 10:42
  • 3
    \$\begingroup\$ @Okx you're trying to be pedantic to invalidate a solution, but actually there's nothing invalid about it. The challenge only says "output." \$\endgroup\$ – theonlygusti Jun 27 '17 at 10:43
11
\$\begingroup\$

Haskell, 102 bytes

The full program:

main= putStr"Hello, World!";;
putSt   x ="p u t S t r  \" H e l l o ,   W o r l d !\"";
mmaaiin = main

and with every other character removed:

mi=ptt"el,Wrd";ptt x=putStr "Hello, World!";main=mi
\$\endgroup\$
  • \$\begingroup\$ You can take off 2 bytes by removing the spaces between p u t S t r and \". \$\endgroup\$ – Wheat Wizard Feb 16 '18 at 19:54
11
\$\begingroup\$

x86 machine code, 162 bytes

demo

PROG.COM Download and run it in MS-DOS emulator, DOSBox for example.

90 B3 B4 B4 02 90 90 B3 B2 B2 48 90 90 B3 CD CD 21 90 90 B3 B2 B2 65 90 
90 B3 CD CD 21 90 90 B3 B2 B2 6C 90 90 B3 CD CD 21 90 90 B3 CD CD 21 90 
90 B3 B2 B2 6F 90 90 B3 CD CD 21 90 90 B3 B2 B2 2C 90 90 B3 CD CD 21 90 
90 B3 B2 B2 20 90 90 B3 CD CD 21 90 90 B3 B2 B2 77 90 90 B3 CD CD 21 90 
90 B3 B2 B2 6F 90 90 B3 CD CD 21 90 90 B3 B2 B2 72 90 90 B3 CD CD 21 90 
90 B3 B2 B2 6C 90 90 B3 CD CD 21 90 90 B3 B2 B2 64 90 90 B3 CD CD 21 90 
90 B3 B2 B2 21 90 90 B3 CD CD 21 90 90 B3 CD CD 20 90

after removal MINI.COM Download

90 B4 02 90 B2 48 90 CD 21 90 B2 65 90 CD 21 90 B2 6C 90 CD 21 90 CD 21 
90 B2 6F 90 CD 21 90 B2 2C 90 CD 21 90 B2 20 90 CD 21 90 B2 77 90 CD 21 
90 B2 6F 90 CD 21 90 B2 72 90 CD 21 90 B2 6C 90 CD 21 90 B2 64 90 CD 21 
90 B2 21 90 CD 21 90 CD 20

How to run?

Install DOSBox, for Ubuntu/Debian

sudo apt install dosbox

Run it

dosbox

In DOSBOX

mount c /home/user/path/to/your/directory
c:
PROG.COM
MINI.COM

How does it works?

Machine operation codes represents assembly language instructions.

In MS-DOS to print char you will set registers and make interrupt. AH register will be 0x02, DL register contains your char. Interrupt vector is 0x21.

mov ah,0x2  ;AH register to 0x2 (B4 02)
mov dl,0x48 ;DL register to "H" (B2 48)
int 0x21    ;0x21 interrupt     (CD 21)

MS-DOS COM file tiny model is good choise, because it doesn't have any headers. It is limited by 64K, but in our case it doesn't matters.

To stop program use 0x20 interrupt

int 0x20    ;0x20 interrupt     (CD 20)

Magic

If you want to execute 0xAB opcode command with one parameter 0xCD, you write

AB CD

In PROG.COM

90 B3 AB AB CD 90
nop         ; No operation (90)
mov bl,0xb4 ; BL register to AB (B3 AB)
AB CD command (AB CD)
nop         ; No operation (90)

In MINI.COM

90 AB CD
nop         ; No operation (90)
AB CD command (AB CD)

It is equal machine codes, if you don't use BL register.

Generator

Convert text file with hex to hex binary

cat hex_file | xxd -r -p > exec.com

function byte2hex(byte){
	var ret=byte.toString(16).toUpperCase();
	return ret.length==1 ? "0"+ret : ret;
}

function str2hex(str){
	var ret = [];
	for(var i=0;i<str.length;i++){
		ret.push(byte2hex(str.charCodeAt(i)));
	}
	return ret;
}

function genCode(hexArr){
	var ret = [["B4","02"]];
	for(var i=0;i<hexArr.length;i++){
		if(hexArr[i]!=hexArr[i-1]){
			ret.push(["B2",hexArr[i]]);
		}
		ret.push(["CD","21"]);
	}
	ret.push(["CD","20"]);

	return ret;
}


function magicCode(str){
	var ret=[""];
	var code=genCode(str2hex(str));

	for(var i=0;i<code.length;i++){
		ret.push("90 B3 "+code[i][0]+" "+code[i][0]+" "+code[i][1]+" 90");
		if(i%4==3){ret.push("\n");}
	}
	return ret.join(" ");
}

function magicCodeMinified(str){
	var ret=[""];
	var code=genCode(str2hex(str));

	for(var i=0;i<code.length;i++){
		ret.push("90 "+code[i][0]+" "+code[i][1]);
		if(i%8==7){ret.push("\n");}
	}
	return ret.join(" ");
}

var str=prompt("string","Hello, world!");
var out="PROG.COM\n" + magicCode(str)+"\n\nMINI.COM\n"+magicCodeMinified(str);

document.write(out.replace("\n","<br>"));
alert(out);

\$\endgroup\$
  • \$\begingroup\$ Remove all ` 90 90` for -52 bytes. \$\endgroup\$ – NieDzejkob Dec 22 '18 at 19:37
  • \$\begingroup\$ Also the nop at the very end will never be reached. \$\endgroup\$ – NieDzejkob Dec 22 '18 at 20:00
10
\$\begingroup\$

Pyth, 31 bytes

p% 2"HHeelllloo,,  WWoorrlldd!!

Try it online!

Becomes

p "Hello, World!

Thanks to @CalculatorFeline for pointing out an error and removing one byte.

\$\endgroup\$
  • \$\begingroup\$ Characters kept start from the first, not the second. You can drop the leading space. \$\endgroup\$ – CalculatorFeline Jun 26 '17 at 20:54
  • \$\begingroup\$ Ah, thanks @CalculatorFeline. I read "Take" as "Remove" in the spec. \$\endgroup\$ – vroomfondel Jun 26 '17 at 20:55
8
\$\begingroup\$

V, 32 bytes

i;H;e;l;l;o;,; ;w;o;r;l;d;!;<esc>;Ó;

Note that <esc> is a single character, e.g. 0x1b

Try it online!

Removing every other character gives:

iHello, world!<esc>Ó

Try it online!

\$\endgroup\$
7
\$\begingroup\$

05AB1E, 29 bytes

”™ ,ï‚‚ï ! ”# ¦2 ä ø¨øJð ý

Try it online!

Explanation

”™ ,ï‚‚ï ! ”                # push the string "Weekly Hello , Changed World ! "
               #               # split on spaces
                               # RESULT: ['Weekly','Hello',',','Changed','World','!','']
                ¦              # remove the first element (Weekly)
                 2ä            # split in 2 parts
                               # RESULT: [['Hello', ',', 'Changed'], ['World', '!', '']]
                   ø           # zip
                               # RESULT: [['Hello', 'World'], [',', '!'], ['Changed', '']]
                    ¨          # remove the last element
                     ø         # zip
                               # RESULT: [['Hello', ','], ['World', '!']]
                      J        # join each inner list
                       ðý      # join on space

After removing every other character we are left with the code

”Ÿ™,‚ï!” 2äøøðý

Try it online!

Explanation

”Ÿ™,‚ï!”       # push the string "Hello, World!"
        2ä     # split in 2 parts
               # RESULT: ['Hello, ', 'World!']
          ø    # zip, as the string has an odd length the space is lost
               # RESULT: ['HW', 'eo', 'lr', 'll', 'od', ',!']
           ø   # zip again
               # RESULT: ['Hello,', 'World!']
            ðý # join on space
\$\endgroup\$
7
\$\begingroup\$

Mathematica, 62 bytes

P0r0i0n0t0@0"0H0e0l0l0o0,0 0W0o0r0l0d0!0"Print@"Hello, World!"

It returns "0H0e0l0l0o0,0 0W0o0r0l0d0!0" Null P0r0i0n0t0[0], and prints Hello, World! as a side effect. When run as a program (not in the REPL), the return value will not be printed.

After removing every other character:

Print@"Hello, World!"rn@Hlo ol!

It returns Null ol! rn[Hlo], and prints Hello, World!.

\$\endgroup\$
7
\$\begingroup\$

Jelly, 26 25 bytes

““3ḅaė;œ»ḷ“ 3 ḅ a ė ; œ »

Try it online!

After removing every second character, we're left with the following code.

“3a;»“3ḅaė;œ»

Try it online!

How it works

““3ḅaė;œ»ḷ“ 3 ḅ a ė ; œ »  Main link.

““3ḅaė;œ»                  Index into Jelly's dictionary to yield
                           ["", "Hello, World!"]. 
          “ 3 ḅ a ė ; œ »  Index into Jelly's dictionary to yield.
                          " FullERebitingBEfluffiest adoptable".
         ḷ                 Take the left result.
“3a;»“3ḅaė;œ»  Main link.

“3a;»          Index into Jelly's dicrionary to yield " N-".
               Set the argument and the return value to the result.
     “3ḅaė;œ»  Index into Jelly's dicrionary to yield "Hello, World!".
               Set the return value to the result.
\$\endgroup\$
7
+100
\$\begingroup\$

Cubically v2.1, 222 bytes

+0503 @@6 :22 //1 +050501 @@6 :55 +0502 @@6@6 :33 //1 +050502 @@6 :55 +03 //1 +04 @@6 :55 //1 +03 @@6 :55 +01 //1 +0504 @@6 :33 //1 +050502 @@6 :55 +01 //1 +050502 @@6 :55 +0502 @@6 :11 //1 +050501 @@6 :55 +01 //1 +03 @@6

Try it online!

Every other letter:

+53@6:2/1+551@6:5+52@66:3/1+552@6:5+3/1+4@6:5/1+3@6:5+1/1+54@6:3/1+552@6:5+1/1+552@6:5+52@6:1/1+551@6:5+1/1+3@6

Try it online!

\$\endgroup\$
6
\$\begingroup\$

CJam, 32 bytes

"HHeelllloo,,  WWoorrlldd!! "2 %

Try it online!

Taking every other character gives:

"Hello, World!" 

Try it online!

\$\endgroup\$
  • \$\begingroup\$ Note the trailing space on the alternated version. \$\endgroup\$ – CalculatorFeline Jun 26 '17 at 20:59
6
\$\begingroup\$

Help, WarDoq!, 2 bytes

Hi

Try it online!

H prints Hello, World!, i is a no-op.

Help, WarDoq! can add two numbers and test for primes, so it is considered as a valid programming language per this meta post.

\$\endgroup\$
  • \$\begingroup\$ why was this downvoted? \$\endgroup\$ – Uriel Jul 1 '17 at 22:33
  • \$\begingroup\$ NOP and massive spaces are against the spirit. \$\endgroup\$ – RShields Jul 3 '17 at 0:09
  • 1
    \$\begingroup\$ +1 because of the novelty on how the resulting source code re-emphasizes the message that gets output. \$\endgroup\$ – TOOGAM Jul 4 '17 at 9:53
6
\$\begingroup\$

///, 25 bytes

H\e\l\l\o\,\ \W\o\r\l\d\!

Try it online!

With every other character removed:

Hello, World!
\$\endgroup\$
6
\$\begingroup\$

PHP, 53 bytes

#
echo date(
$e_c_h_o='\H\e\l\l\o\,\ \W\o\r\l\d\!
');

With every other character removed:

#eh ae
echo'Hello, World!';
\$\endgroup\$
6
\$\begingroup\$

Octave, 49 45 bytes

Saved 4 bytes since Octave doesn't require brackets to do indexing.

'HHeelllloo,,  WWoorrlldd!! ' (1:2 : 3 ^ 3)''

Try it online!

And the reduced one:

'Hello, World!'(:    )'

Try it online!

Explanation:

The initial code has the letters in the string duplicated, so that we're left with Hello, World! when every second is removed. Some spaces are added to ensure the brackets and apostrophes are kept.

The indexing is really 1:2:end. There are 27 characters, and we can't use end or 27 since we must remove a character, so we go with 3 ^ 3 instead. When we remove every third character, the indexing becomes (:) (and some additional spaces).

(:) means "flatten and turn into a vertical vector". So, we need to transpose it, using '. We don't need to transpose the string in the original code, but double transposing works, so the first string is transposed twice using '', and the second is transposed just once.

\$\endgroup\$
6
\$\begingroup\$

APL (Dyalog), 35 34 bytes

-1 thanks to Martin Ender.

'0H0e0l0l0o0,0 0W0o0r0l0d0!0'~ ⍕ 0

Try it online!

'0H0e0l0l0o0,0 0W0o0r0l0d0!0' the message with zeros as removable filler characters

~ except

 formatted (stringified)

0 number zero

Leaving just the odd characters, this becomes 'Hello, World!' .

\$\endgroup\$
5
\$\begingroup\$

T-SQL, 75 bytes

---
PRINT 'Hello, World!'
/*
-P-R-I-N-T-'-H-e-l-l-o-,- -W-o-r-l-d-!-'
---*/

Single- and multi-line comment abuse, inspired by CalculatorFeline's LUA version.

After removal of all even-numbered characters, some of which are line breaks:

--PIT'el,Wrd'/
PRINT'Hello, World!'--/
\$\endgroup\$
5
\$\begingroup\$

Javascript, 73 bytes

a ='a0l0e0r0t0`0H0e0l0l0o0,0 0W0o0r0l0d0!0`0/0/';eval(a.replace(/0/g,''))

Constructs a string a with the content a0l0e0r0t0`0H0e0l0l0o0,0 0W0o0r0l0d0!0`0/0/, then removes all 0's to give alert`Hello, World!`//, which is eval'd.

Taking every other character of the program gives

a=alert`Hello, World!`//;vlarpae//,')

which alerts Hello, World using template string syntax the same way as what was eval'd in the full program, then stores the result of the call in a and includes the insightful comment //;vlarpae//,').

\$\endgroup\$
5
\$\begingroup\$

><>, 47 bytes

Original:

| v~" H e l l o ,   W o r l d ! "

~o<< ;!!!? l

With every second character removed:

|v"Hello, World!"
o<;!?l

Try them online: original, modified

The original program pushes the characters of "Hello, World!" to the stack (in reverse order) interspersed with spaces, then alternately prints a character and deletes one until the length of the stack is zero. The second program does the same, except the deletion instructions ~ are gone.

If you don't mind halting with an error, we can take a leaf out of Martin Ender's Cardinal book: the modified code is

\"!dlroW ,olleH"!#o#

and the original is the same but with newlines inserted between all the characters, for 39 bytes. Try them online: original, modified.

\$\endgroup\$
5
\$\begingroup\$

,,,, 34 bytes

 2"Hteoltlaol,l yWhourmladn!! "⟛

On removing the even numbered characters...

 "Hello, World!"

Explanation

With all the characters:

 2"..."⟛

               no-op
 2             push 2 to the stack
  "..."        push "Hteoltlaol,l yWhourmladn!! " to the stack
       ⟛      pop 2 and the string and push every 2nd character of the string
               implicit output

Without the even numbered characters:

 "..."

               no-op
 "..."         push "Hello, World!" to the stack
               implicit output
\$\endgroup\$
  • 5
    \$\begingroup\$ This implies you don't need to say this is non-competing. \$\endgroup\$ – FryAmTheEggman Jun 26 '17 at 20:54
  • 2
    \$\begingroup\$ But you're supposed to keep all of the even-indexed characters... (0-indexed)... \$\endgroup\$ – HyperNeutrino Jun 26 '17 at 21:06
  • \$\begingroup\$ Whoops, fixed. Just add another character lol. \$\endgroup\$ – totallyhuman Jun 26 '17 at 21:15
4
\$\begingroup\$

Brainfuck, 155 bytes

- - < - < < + [ + [ < + > - - - > - > - > - < < < ] > ] < < - - . < + + + + + + . < < - . . < < . < + . > > . > > . < < < . + + + . > > . > > - . < < < + .

Try it online!

Every second character removed:

--<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++.<<-..<<.<+.>>.>>.<<<.+++.>>.>>-.<<<+.
\$\endgroup\$
4
\$\begingroup\$

Jelly, 32 bytes

 2“HHeelllloo,,  WWoorrlldd!! ”m

Try it online!

-2 bytes thanks to @totallyhuman's answer

Now mine is a dupe >.<

Go upvote that one too :D

\$\endgroup\$

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.