Share your repls and programming experiences

← Back to all posts
The most complicated "hello world" program in a single line

First, I went through all the characters in "hello world" and used `ord` to find their numerical values. Using the argcount of a bunch of `lambda`s, I got a list of numbers 1 through 7. Using that list, I simply did some maths to get the numbers and printed them as ascii using `chr`.

I wrapped this in a couple `lambda`s using `globals().update` to set variables inline (repl.it recently updated to `python 3.8` so I could have used the `:=` operator however it appears not to work in list comprehension) and bam.

(ignore the syntax errors, it still runs)

AaravKyparlis (0)

MarcusWeinberger (589)

@AaravKyparlis that's strange, for me, it's almost instant

AaravKyparlis (0)

@MarcusWeinberger I probably have a laggy computer

Generally, it's supposed to be "Hello world!", so it's missing a capital H, and an exclamation mark, "!"

Zexogon (874)

“Code was built to be efficient and sleek. so let’s go in the exact opposite direction!”
(This really cool omg)

LiamDonohue (289)

im a cool kid

no i am

No exclamation mark, 0/10

lungera (1)

You should try Brainf.

IsackSan (4)

nice but overcomplicated.. Like my life!

at least this actually makes sense

Oh boy, that's like reverse code golf. I love it

ChezCoder (1552)

i really dont know what to say...

sugarfi (582)

1810 bytes just to print "hello":

``x=list(str(sum([*map(lambda x:sum([*map(int,(bin(ord(x))[2:]))]),'hello world!')])*(1<<1|1)));y=x[9//2//(9//2)];x[654**0<<1]=x[3>>1];x[(10^1)&1]=eval(chr(ord('Y')+(2<<4)),locals());x=__import__('htam'[::~0]).sqrt(int('abc'[:8*(2>>3)].join(x)));x=int(x//4*(2<<2>>1))+[~~(1&1&1&1&1&1&1)];x*=len(hex(3735928559)[[*[2<<1>>1]]:]);print(chr(x),file=getattr(__import__(chr(ord('S')+(2<<4))+'y'+chr(ord('t')-1)),'stdout'),end='');x=str(6+(2&3^2&3))+[*map(str,[*[int(str(6))+(6//2)]])];y=int((int(x)|[*[4*((34^34)|1<<3)]]));i=sum([*[*[*[y if ~((int(x)*c)>y) else 0 for c in range(5^5,int(str(10)*2,base=2<<1>>1),5%2)]]]]);i=int(str(i)[:~0]);z=getattr(__import__(chr(int('12'[:5&abs(~0)]*(1<<1|1)))+chr(i+(1<<2|1<<1|1)+int(hex(7)[2:],base=16))),'sys');getattr(z,'stdo'+chr(10**(1<<1)+(8*9-(7*9)+8))+chr(10**(1<<1)+(8*9-(7*9)+7))).write.__call__(chr(i));d={'ba'+[*[chr(ord('S')+(2<<4))]]+chr(int(bin(5)[2:])):2};x=ord(getattr(__builtins__,'ch'+chr(ord('R')+[*[2<<4]])).__call__(ord('0')+(2<<(int(str(ord('e')),**d))-(2<<1))));x=eval(compile('x','','eval'),globals())*(eval(type(5).__name__)(chr(eval(compile('x','','eval'),globals()))));x=int(x-(round.__call__(x//((7>>1)&2),-1)));a={'end':'end'[:2-(~~2)]};print(chr(x)*2,**{**a,**{'file':getattr(__import__(chr(ord('S')+((2<<5)//2))+chr(ord('n')+int(str(10)*2,base=2)+5%2)+chr(ord('S')+((2<<5)//2))),'_'*2+'stdo'+'u'+chr(ord('n')-ord('n')+ord('t'))+'_'*2)}});x=str(ord.__call__(chr(ord('0')+(2<<(int(str(ord('e')),base=2)%2+eval('~'*5+chr(48))))))*(1<<(5&(1<<0))));x=eval('__builtins__.__dict__')['chr'].__call__(int(x)+int(x[:[*[(5&1&1&1)+1]]])+int(x[:[*]]));d={};print(x,file=getattr(eval('s',d) if not exec('import '+ord('y').__getattribute__('__repr__').__call__().replace('1','s').replace('2','y')+';s=sys',d) else None,'stdout'),end='');``

Try it online!

Coder100 (10634)

such verbose

``````while True and "verbose is verbose" and "this is as verbose as I can get":