what's the best language to write the best "Hello World" program?
print "Hello World!"
what's the best language to write the best "Hello World" program?
print "Hello World!"
Any language that isn't retarded
Hello, world!
It's H9+, and also a quine.
MSIL.
std::cout
Doesn't compile
int main() { puts("Hello World!"); }
Probably Python
print ("hello world")
>choose python
>hello world takes 7 seconds to print
>open terminal
>type echo "Hello World"
can't get more effective than that
puts
public class Hello {
static class HelloWorldClass {
public HelloWorldClass(){}
public String getHelloWorld(){
String hello = "Hello";
String wordl = "World";
return "Hello World";
}
}
public static void main(String[] args){
HelloWorldClass helloWorldClass = new HelloWorldClass();
String helloWorld = helloWorldClass.getHelloWorld();
System.out.println(helloWorld);
}
}
cat
Hello World
-[------->+-.-[->+++++++.+++++++..+++.[--->+-----.---[->+++.-[--->+---.+++.------.--------.
unfortunately, helloworld is all you can do in brainfuck
How?
print("hello, world!")
Save it as hello.py and run it
one line
Any assembler language. Honestly if all you want to do is something that simple then you don't deserve anything else.
Malbolge
(=
>not writing a mandelbrot set viewer in brain fuck
esoteric.sange.fi
package main
import "fmt"
func main() {
fmt.Println("MAGA2016")
}
(princ "Hello world!")
const int main[] = {
-443987883, 440, 113408, -1922629632,
4149, 899584, 84869120, 15544,
266023168, 1818576901, 1461743468, 1684828783,
-1017312735
};
gist.github.com
Java of course
what?
I am very interested, does the compiler not care that main is defined as an array and that there is no 'int main()'?
class HelloWorld { public static void main(String[] args) { System.out.println("Hello World™"); } }
Powershell
"Hello World!"
/thread
BASIC is so good. I always wanted to get into programming, but I always found it difficult whenever I tried. Then I installed Brandy, the BBC basic interpreter for linux, and I was soon doing all kinds of programming stuff.
The 80s was probably a great time, since every home microcomputer came with BASIC.
Tried it, got a segmentation fault using g++
ASM
section .text
global _start ;must be declared for linker (ld)
_start: ;tell linker entry point
mov edx,len ;message length
mov ecx,msg ;message to write
mov ebx,1 ;file descriptor (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel
section .data
msg db 'Hello, world!',0xa ;our dear string
len equ $ - msg ;length of our dear string
fn main() {
println!("Hello World!");
}
...
#include
#include
using namespace std;
int main(){
cout
>std::
>no using namespace std
pleb
Where the hell do you get conio.h?
my error
using namespace std is for script kiddies
Platform specific, the int[] is just x64 machine code for linux system calls. The first known instance of this kind of program was the first ever winner of the IOCCC: ioccc.org