Programming challenge: can you code a hello world program as a Palindrome?

Posted by Assaf Lavie on Stack Overflow See other posts from Stack Overflow or by Assaf Lavie
Published on 2009-03-18T19:28:01Z Indexed on 2010/05/04 21:48 UTC
Read the original article Hit count: 371

So the puzzle is to write a hello world program in your language of choice, where the program's source file as a string has to be a palindrome.

To be clear, the output has to be exactly "Hello, World".


Edit:

Well, with comments it seems trivial (not that I thought of it myself of course [sigh].. hat tip to cobbal).

So new rule: no comments.


Edit:

I feel kind of bad editing someone else's question to say this, but it will eliminate a lot of non-palindromes that keep popping up, and I'm tired of seeing the same simple mistake over and over.

The following is NOT a palindrome:

()()

The following IS a palindrome:

())(

Brackets, parenthesis, and anything else that must match are a major barrier to palindrome-ing, yes, but that doesn't mean you can ignore them and post non-palindrome answers.


Languages represented thus far:

C, C++, Bash, elisp, C#, Perl, sh, Windows shell, Java, Common Lisp, Awk, Ruby, Brainfuck, Funge, Python, Machine Language, HQ9+, Assembly, TCL, J, php, Haskell, io, TeX, APL, Javascript, mIRC Script, Basic, Orc, Fortran, Unlambda, Pseudo-code, Befunge, CFML, Lua, INTERCAL, VBScript, HTML, sed, PostScript, GolfScript, REBOL, SQL

© Stack Overflow or respective owner

Related posts about puzzle

Related posts about language-agnostic