Hello World in all programming languages available on Haiku

This a slightly stupid and mostly useless, but hopefully funny idea that originated in a recent thread: Post hello world programs in all programming languages available on Haiku. And @michel had the brilliant idea to not mention the name of the language so the other users can guess if they want.

Let’s have some fun and maybe we can discover new languages we didn’t even know existed on Haiku.

4 Likes

I’ll start with one of the more obvious ones, just to get it out of the way :wink:

#include <iostream>

int main(int argc, char** argv) {

  std::cout << "Hello World!" << std::endl;
  return 0;
  
}

I’m not sure whether this language currently builds or not, but…

Console.WriteLine("Hello World!");

You could put this inside a Main method if you wanted to, but in modern versions you don’t need to.

Edit: Didn’t see the bit about omitting the language name. Removed.

1 Like
fn main() {
    println!("Hello world!");
}
2 Likes

From the scripting side:

echo ‘Hello World!’

(which covers both the shells I have installed); and:

BEGIN {print “Hello World!”}

and:

print “Hello World!\n”;

(which probably could be at least 3 scripting languages, but I’m pretty sure only one is in Haiku Depot).

1 Like

Printf.printf “Hello, world!\n”

public class HelloWorld {
public static void main(String args) {
System.out.println(“Hello, World!”);
}
}

Is that Java programming code?

1 Like

It’s Rust :slight_smile:

1 Like

Yes, it Java programming :grin:

Clue: It’s neither Forth nor APL, though it borrows from both.

"Hello World!\n" .

Nice to see all the supported languages, still doesn’t help here though :rofl:

Well you got further then me then, I still can’t programm “Hello world!” if my life depended on it :rofl:

ends off topic

echo “Hello world”

Glad to be able to help :wink:

3 Likes

We should have a dedicated thread with hello world programs in all languages that run on Haiku :slight_smile:

2 Likes

But without the name of the language so that people have to guess what it is. Like so …

>++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<+
+.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-
]<+.
2 Likes
>++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<+
+.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-
]<+.

Oh, man. I thought my cat had walked across my keyboard and posted a message.

1 Like

That’s a great idea.

I have seen this before, but I couldn’t remember the name of the language. So I had to get some help from a well known search engine. Is the Brainf*ck compiler actually available on Haiku?

Officially, no.

Less-than-officially: Misc Haiku utilities and ports - Browse /bf at SourceForge.net

Doesn’t matter. As long as it runs on Haiku it counts :slight_smile:

To the moderators: Maybe a member of the moderator team could be so kind and move all the “Hello world” related posts from here to my newly created thread in the OT category.