What is the most convoluted way to write hello, world?

What is the most convoluted way to write hello, world?

Other urls found in this thread:

gist.github.com/lolzballs/2152bc0f31ee0286b722
esolangs.org/wiki/Hello_world_program_in_esoteric_languages
twitter.com/SFWRedditGifs

Brainfuck:

++++++++[>++++[>++>+++>+++>+>+[.>---.+++++++..+++.>>.+.>++.

...

print("Hello world!")

Nice Python user. How'd you learn that difficult language...
Also:

Print ("hello, world?")

French or Polish.

(=

directly, using binary. However the fuck you would do that

#!/usr/bin/perl

my @letters = ('a'..'z',' ','!');
my $string;

sub create_string {
for ($i=0;$i

Salut, Le Monde
and
Witaj świecie

Honetsly I'd say Arabic is more complicated m8

مرحبا بالعالم

package com.helloworld.business;

public class Main {

public static void main(String[] args) {
Printer printerInstance = new Printer();
try {
printerInstance.print(Factory.getModel("Hello"));
printerInstance.print(Factory.getModel("Space"));
printerInstance.print(Factory.getModel("World"));
}
catch(Exception e) {

}

}

}
package com.helloworld.business;

public class Hello implements Printable {

@Override
public String print() {
return "Hello";
}

}
package com.helloworld.business;

public class Factory {
public static Printable getModel(String name) throws Exception {
switch (name) {
case "Hello":
return new Hello();
case "World":
return new World();
case "Space":
return new Space();
default:
throw new Exception("Invalid name");
}
}
}
package com.helloworld.business;

public interface Printable {
public String print();
}
package com.helloworld.business;

public class Printer {
private void print(boolean withNewLine, String what) {
if (withNewLine )
System.out.println(what);
else
System.out.print(what);
}

public void print(Printable who) {
this.print(false, who.print());
}

public void println(Printable who) {
this.print(true, who.print());
}

}

public class Space implements Printable{
public String print() {
return " ";
}
}
package com.helloworld.business;

public class World implements Printable {
public String print() {
return "World";
};
}

this is Java everybody

Good. Now do it in a way that won't trigger a stack overflow every time you call the function.

machine code.

Malbolge

(=

READY.
PRINT "HELLO, WORLD"
HELLO, WORLD
READY.
_

10 Print Hello World
20 Goto 10

>for loop

What's wrong with Python?
import string

abc = string.ascii_lowercase
hello = abc[7]+abc[4]+abc[11]*2+abc[14]
world = abc[22]+abc[14]+abc[17]+abc[11]+abc[3]
print(hello.capitalize(), world+'!')

Do it for a bootloader in 16bit assembly

Here's my attempt:

#define/**/install/**/0[x]=045;p(j);p(k);for(;;){++l;m++;++q;r++;
#define gentoo if((l-44)){p(l);p(l);break;}}m|=3;q^=27;p(m); \
r+=6;t>>=2;t+=7;p(t);p(q);p(m);p(r);p(l) ;p(s); t++;p(t) ;p(10);}
#define/**/i/**Sup Forums*Sup Forums Sup Forums /c/ /d/ /e/ /f/ Sup Forums /gif/ /h/ /hr/*/
#define/**/c/* */char/*/k/ /m/ /o/ /p/ /r/ /s/ /t/ /u/ Sup Forums /vg/*/
#define/**/Anonymous/**/1[x] b-1;i Mon b;j+=4;k++;i a=// /vr/ /w/
#define/* *Sup Forums* */=0144/* /wg/ /i/ /ic/ /r9k/ /s4s/ /cm/ /hm/ */
c x[2];i j b,No b,k b,l b,m b,q b,r b,s b,t b;main(){ //lgbt/ /y/
#define p(o) printf(x, o) //3/ /aco/ /adv/ /an/ /asp/ /biz/ /cgl/


Anonymous 12/12/16*(Mon)*19;55;11*No*57972012;

install gentoo

I will when I get home
Which is in about half an hour

Is there no Hello World Enterprise Edition?

It's the first hit on Google, my dude:
gist.github.com/lolzballs/2152bc0f31ee0286b722

It's Java, but the point was to become convoluted. If you're gonna complain that even without the extra shit, it's too convoluted, it's because it's not meant to be abused for tiny programs.

auto hello = "aGVsbG8gd29ybGQNCg==";
cout

There, easy.

bits 16
org 0x7c00

section .text
jmp 0:start
start:
mov ax, 0
mov ds, ax
mov ss, ax

mov ax, 0xb800
mov gs, ax

mov sp, 0x7c00

call clear

mov si, hwString
call puts

halt:
hlt
jmp halt

puts:
push si ; char *string
push di ; u16 vgaIndex
push bx ; char character
mov di, 0
.loop:
mov bl, [si]
cmp bl, 0
je .ret
mov [gs:di], bl
mov byte [gs:di + 1], 0x0f
inc si
add di, 2
jmp .loop
.ret:
pop bx
pop si
pop di
ret

clear:
push si ; int i
mov si, 0
.loop:
cmp si, (80 * 2 * 25)
jge .ret
mov byte [gs:si], 0
inc si
jmp .loop
.ret:
pop si
ret

hwString:
db 'Hello world!', 0

times (510 - ($ - $$)) db 0
dw 0xaa55

>tfw too intelligent for char hello[]

import java.io.OutputStream;
import java.io.PrintStream;
/**
*@author me
*/
public class Java {

private static final String STRING = "Hello World";

public static String getClassName() {
return STRING;
}

private static class Printer {

private String toBePrinted;
private final OutputStream outputStream;

public Printer() {
outputStream = System.out;
String toBePrinted = STRING;
}

private OutputStream getOutputStream() {
return outputStream;
}

public Printer(String toBePrinted) {
setToBePrinted(toBePrinted);
outputStream = System.out;
}

private void setToBePrinted(String whatWillWePrint) {
this.toBePrinted = whatWillWePrint;
}

public void print(OutputStream os) {
preparatoryPrint(new PrintStream(getOutputStream()));
}

private void preparatoryPrint(PrintStream out) {
out.print(this);
print(out);
}

private void print(PrintStream out) {
out.print(toBePrinted);
}

public String getWhatWeShallPrintThisTime() {
return this.toBePrinted;
}

@Override
public String toString() {
return "We shall print: " + getWhatWeShallPrintThisTime();
}

}

public static void main(String[] args ) throws Exception {
try {
Printer printer = new Printer(getClassName());
} catch (Exception error) {
throw new Exception("Construction of an object of the class Printer failed");
}
try {
Printer printer = new Printer(getClassName());
printer.print(System.out);
} catch (Exception error) {
throw new Exception("Some error happened");
}
}
}

you should paramerize what the printer will print.

eg a print descriptor object would be nice.

also these things should be linked using DI of course.

perl has tail call optimization so there is no stack overflow.

how the fuck does that even work?

He doesn't know, he just copied the hello world from Wikipedia

>What is the most convoluted way to write hello, world?

the python print "hello" is way more convoluted than examples presented here, it's just that the convolution is no apparently seen by the programmer.

in other words, you are all edgy teens.

Obfuscated C with inline assembly.

Like a Kloss

Let me Google that for you:

esolangs.org/wiki/Hello_world_program_in_esoteric_languages

>printer doesn't implement printable

package Earth;sub Greet{
%_=('Y','~');$_='$;=!(Middle
Earth.age~~~

Why do people make comments of things that are so blatantly obvious?

>2017
>not programming in tail
$ ./hello.tail
Hello World!
$ cat hello.tail
#!/usr/bin/tail -n+2
Hello World!

The target audience is literal retards

Why is this language so fun to learn

Scope(\) {
Method(_WAK) {
Store ("Hello World", Debug)
Return(Package(2){0x00000000,0})
}
}

So, am I a hax0r or what?

Whirl:
110001100111000111110000010001111100011000000000110000011100000110000010000
011000111100000111110000011100001111100100011001110000111111100001001111100
011000000000110000011000111110001000000000000000000001001111110000111111000
100000000000000000000000000011111000100100000000111111000100000000000001001
000011111000001110000111110010001100011000000100010000011000000000000000001
100000111001111100111111000100111001111000011100010011111110000111000110000
000000000000000000000000000001000100001111100000111000011111001100011100000
111000000010001111100000111110001000000000111000110000000000000000000000000
000000100100001111100000111000011100010000000000000100010000111110001110001
111100111111000011100001100111000111000000000001111100000111000110000110110
001000000000010000001111100000111000011111000000010001110000000000000000000
000000000000100000011111000001100

>4 contributors

Really needed that many for this

Malbolge
(=

SAME RESULT, LONGER CODE
('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=

One that brute force checks for non-trivial zeroes of the Riemann Zeta function between zero and one, and when it finds one, outputs "hello world!"

Written in JavaScript

We're talking about karlie m8

By a pajeet

#include #include #include #include #include #include #include #define MOV "movq " #define PUT1 "movq $1, " #define SYSCALL "syscall" #define SYS_ARG_SYSCALL "%rax" #define SYS_ARG_FD "%rdi" #define SYS_ARG_BUFF "%rsi" #define SYS_ARG_COUNT "%rdx" #define ASM(...) __VA_ARGS__ " ;" #define ASM_ESCAPE(arg) "%" arg char **explode(char *string, const char *delim) { char **res = (char**)malloc(sizeof(char*)*(strlen(string)+1)); char *tok; char **current = res; while(tok = strtok(string, delim)) { string = NULL; *(current++) = strdup(tok); } *current = NULL; return res; } std::string hello; std::vector hello_buffer; std::mutex hello_mutex; void hello_runner(char c) { std::lock_guard lock(hello_mutex); if(hello_buffer.size() == hello.size()) return; hello_buffer.emplace_back(c); asm volatile( ASM(PUT1 ASM_ESCAPE(SYS_ARG_SYSCALL)) ASM(PUT1 ASM_ESCAPE(SYS_ARG_FD)) ASM(MOV ASM_ESCAPE("[addr]") "," ASM_ESCAPE(SYS_ARG_BUFF)) ASM(PUT1 ASM_ESCAPE(SYS_ARG_COUNT)) ASM(SYSCALL) : : [addr] "r"(&c) : SYS_ARG_SYSCALL, SYS_ARG_FD, SYS_ARG_BUFF, SYS_ARG_COUNT, "memory" ); } int main() { char input[] = "Helol ,World!\n#LOL!"; char **exploded = explode(input, "#"); std::vector words; char **it = exploded; while(*it) { char *word = *(it++); words.emplace_back(word); free(word); } free(exploded); hello = words[0]; std::string target_string = "Hello, World!\n"; auto target = std::vector(begin(target_string), end(target_string)); while(hello_buffer != target) { hello_buffer.clear(); std::vector threads; for(char c : hello) for(char c : hello) for(char c : hello) threads.emplace_back(hello_runner, c); for(std::thread &t : threads) t.join(); } }

Machine code much?