3
\$\begingroup\$

Write a program that prints "Hello, world!" without using any kinds of literals. Don't use string literals, numeric literals, byte literals, char literals, etc. Default values are allowed in languages that have them.

Printing data from external files/websites/arguments is not encouraged.

edit: probably don't use Boolean literals either.

double edit: I don't necessarily want the code to be obfuscated. results that are clearly understandable are better.

triple edit: this is not duplicate because the other questions require obfuscated answers or are code-golf.

\$\endgroup\$

closed as too broad by Dennis Jan 2 '17 at 1:26

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    \$\begingroup\$ hmm? searching for "hello world literals" doesn't result in anything too similar. Am I missing something? \$\endgroup\$ – Pyromuffin Jun 2 '14 at 11:25
  • 2
    \$\begingroup\$ for instance alert(atob((function SGVsbG8sIHdvcmxk(){}).name)) copied from codegolf.stackexchange.com/a/22559/21348 \$\endgroup\$ – edc65 Jun 2 '14 at 11:53
  • 2
    \$\begingroup\$ Dang, hope this gets edited and reopened so I can post my answer. \$\endgroup\$ – histocrat Jun 2 '14 at 13:22
  • 4
    \$\begingroup\$ This is definitely not a duplicate of the linked question. Of my Julia solution, the Cobra solution, and the JavaScript solution by user23057, none is "obfuscated" - they may need a few tricks to get the whole expression, but anybody looking at them could guess pretty quickly that they would output "Hello, world!". None of them attempts to be particularly short, nor do they avoid certain letters or numbers as per the requirements of linked challenge. \$\endgroup\$ – Glen O Jun 2 '14 at 14:33
  • 2
    \$\begingroup\$ Furthermore, the JSfuck solution is very long. As such, the only answer that is even remotely code-golfish is the HQ9+ solution, which is of course just demonstrating one of the very few capabilities of the language. \$\endgroup\$ – Glen O Jun 2 '14 at 14:36
3
\$\begingroup\$

JSfuck

Try it in any javascript console. Edit To avoid the array literal. Shorter too.

a=Array();
a[(!a+a)[+a]+([!a]+a[a])[+!+a+[+a]]+(!a+a)[!+a+!+a]+(!!a+a)[+a]+(!!a+ 
a)[!+a+!+a+!+a]+(!!a+a)[+!+a]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]+(a[(!a+a)[+a]+([!a]+a[a])[+!+a+[+a]]+(!a+a)[!+a+!+a]+(!!a+a)[+a]+(!!a+a)[!+a+
!+a+!+a]+(!!a+a)[+!+a]]+a)[!+a+!+a+!+a]+(!!a+a[(!a+a)[+a]+([!a]+a[a])[+!+a+[+a]]
+(!a+a)[!+a+!+a]+(!!a+a)[+a]+(!!a+a)[!+a+!+a+!+a]+(!!a+a)[+!+a]])[+!+a+[+a]]+(!a
+a)[!+a+!+a]+(!!a+a[(!a+a)[+a]+([!a]+a[a])[+!+a+[+a]]+(!a+a)[!+a+!+a]+(!!a+a)[+a
]+(!!a+a)[!+a+!+a+!+a]+(!!a+a)[+!+a]])[+!+a+[+a]]+(!!a+a)[+!+a]]()[+!+a+[!+a+!+a
]]+(!!a+a[(!a+a)[+a]+([!a]+a[a])[+!+a+[+a]]+(!a+a)[!+a+!+a]+(!!a+a)[+a]+(!!a+a)[
!+a+!+a+!+a]+(!!a+a)[+!+a]])[!+a+!+a+[+a]])()
\$\endgroup\$
  • \$\begingroup\$ There are other array literals in there as well, e.g. several instances of [+a]. \$\endgroup\$ – Martin Ender Jun 2 '14 at 11:41
  • \$\begingroup\$ O well,it was just for fun. I don't see a construction containing a variable as a 'literal'. Anyway I followed your avdice and copied an old answer, see my comment above \$\endgroup\$ – edc65 Jun 2 '14 at 12:00
2
\$\begingroup\$

HQ9+ - 1 char

H

:)

Has this being a code golf, I won hands down. Is this good enough? But, well. This is good enough for popularity contest.

\$\endgroup\$
  • 1
    \$\begingroup\$ try again but with something that isn't HQ9+ \$\endgroup\$ – Pyromuffin Jun 2 '14 at 11:19
  • \$\begingroup\$ I wouldn't count this "language" with an objective argument that it's not turing complete. In fact, it can't compute anything at all. \$\endgroup\$ – orion Jun 2 '14 at 11:20
  • \$\begingroup\$ But it has H as "default value" right? So it's pretty much legal. I suppose. \$\endgroup\$ – Realdeo Jun 2 '14 at 11:22
  • \$\begingroup\$ Yes. Of course it's an interesting esoteric construct and welcome unless explicitly prohibited by the original poster. It's just not a proper language because it doesn't do what programming languages do. It's as much a language as any purpose-built program you can compile :) \$\endgroup\$ – orion Jun 2 '14 at 11:24
  • 2
    \$\begingroup\$ HQ9+ is no longer funny \$\endgroup\$ – Martin Ender Jun 2 '14 at 11:25
1
\$\begingroup\$

Cobra

struct Hello
    var i
struct B
    var i
struct X
    var i
struct M
    var i
struct World
    var i
class Program
    def main
        hello = Hello().toString
        comma = Convert.toString(Convert.toChar(((Convert.toChar(X().toString) to int)-(Convert.toChar(B().toString) to int))+(Convert.toChar(X().toString) to int)-(Convert.toChar(B().toString) to int)))
        world = World().toString.toLower
        exclaim = Convert.toString(Convert.toChar(((Convert.toChar(X().toString) to int)-(Convert.toChar(B().toString) to int))+(Convert.toChar(X().toString) to int)-(Convert.toChar(M().toString) to int)))
        print hello+comma, world+exclaim

This uses the default .toString method, and some character code arithmetic.

\$\endgroup\$
  • 1
    \$\begingroup\$ nice job. this is the first non trivial and non obfuscated result. \$\endgroup\$ – Pyromuffin Jun 2 '14 at 11:52
1
\$\begingroup\$

Julia

Hello(x)=x
world(y)=y
k=int(ones())[]
show(Hello)
print(collect(summary([]))[end-k-k])
print(char((k+k)^(k+k+k+k+k)))
show(world)
print(!)

What it's doing: printing function names, rather than literals. Also, using int(ones())[] to get a 1, which is necessary to get the space without too much hassle (space is character 32, which is being obtained as 2^5), and using summary([]) and then getting the third-last character in order to get the comma.

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

Python 3.4(.0)

If you look in the right places, you can find the string "Hello, world!" somewhere.

Note: None is a keyword and not a literal in Python, according to the documentation.

from test import test_wsgiref

for binstring in test_wsgiref.hello_app(None, lambda x, y: None):
    print(binstring.decode())
\$\endgroup\$
1
\$\begingroup\$

JavaScript

i did not use any custom literals if it counts. (implying Function.name doesn't exist)

function Hello(){}
function World(){}

var hello_str = uneval(Hello),
    world_str = uneval(World),
    _1 = (+new Date())/(+new Date()),
    _2 = _1+_1,
    _4 = _2*_2,
    _8 = _2*_4;

alert([
     hello_str.substr(_8, _8 - _2),
     world_str.substr(_8, _8 - _2) 
        + String.fromCharCode(_8 * _4 + _1)   
]);

try: http://jsfiddle.net/pykP8/

\$\endgroup\$
  • \$\begingroup\$ I'm getting really nitpicky now, but is function Hello(){} a function literal? ;) \$\endgroup\$ – Martin Ender Jun 2 '14 at 13:18
  • \$\begingroup\$ indeed it is! but can you do anything without summoning a javascript object? if i'm not mistaken, everything is a property of window (more or less). \$\endgroup\$ – bebe Jun 2 '14 at 14:46
  • \$\begingroup\$ you can use built-in functions instead of defining your own \$\endgroup\$ – Martin Ender Jun 2 '14 at 15:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.