this post was submitted on 13 Nov 2024
816 points (96.0% liked)

Greentext

4409 readers
1366 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] lurklurk@lemmy.world 28 points 3 days ago (25 children)

Hello World

30 minutes of boilerplate

writing imports

$ cat <<EOF > Hello.java
public class Hello {
  public static void main(String args[]) {
    System.out.println("Hello world!");
  }
}
EOF
$ java Hello.java
Hello world!

ok

[–] sugar_in_your_tea@sh.itjust.works 18 points 3 days ago* (last edited 3 days ago) (5 children)

Python:

print("Hello world!")
[–] dch82@lemmy.zip 12 points 3 days ago* (last edited 3 days ago) (4 children)

C:

#include <stdio.h>

int main() {
    printf("Hello World!");
    return(0);
}

EDIT: POSIX-compatible shell:

echo "Hello World!"
[–] derpgon@programming.dev 4 points 2 days ago (1 children)
[–] PushButton@lemmy.world 3 points 2 days ago

Rust:

Still fighting the burrito check fil er
load more comments (2 replies)
load more comments (2 replies)
load more comments (21 replies)