Programming languages on Haiku?

Let’s not forget shell scripts. I’ve seem impressive programs written entirely in bash.

But we have other shells available too. Fish continues to intrigue me.

1 Like

Java is also in a good state in Haiku.

1 Like

Latest (two weeks old) version of Rebol 3 is available for Haiku.

3 Likes

But consider BaCON instead.

1 Like

As others have mentioned, most languages will work to some degree. The problem is that very few languages will work with the Be API. If you want to make a GUI application, you will have to do it in C++ or Yab, or use one of the cross-platform toolkits.

1 Like

Some languages have Be / Haiku API binding, as you mentioned. Other languages usually allow foreign C / C++ calls, so they can link against system libraries together with their API.

However, in this case some glue code is necessary to make programming in these languages like actually programming. Without that, the code looks like a program in target language that writes another program in C / C++ language, which actually is being executed.

A wrapper will almost certainly be needed for most C++ classes, for allocation of the class instance object and tying the virtual functions to the other language’s callback functions. That and the usually awkward translation from the C++ model, make for an experience that’s really only for people who are really into that kind of thing - if you just want to write an application, Haiku has C++.

(Though, honestly, I have an API application that I use a lot, that I have rewritten in several languages, and C++ was the only one I gave up on. I’m weak on modern C++ memory management, was probably part of the problem.)

1 Like

Looks like some of the files are being installed/packaged in the wrong directory. You can fix this by copying or symlinking them into the right place with a command like: cp -s /system/lib/chicken/11/* /system/non-packaged/lib/chicken/11

1 Like

Belatedly: confirmed! Chicken successfully compiles executables after symlinking the libraries like that. Can’t make them stand-alone because libchicken.a isn’t included, but hey, one more compiler that can be used on Haiku. Thank you so much.

(Edit: you still have to install chicken_devel in addition to chicken to make executables.)

2 Likes

It’s kinda the policy to package shared libraries instead of static ones, so yes, to be able to access chicken shared libraries on compile time the _devel package is required, nice to see it’s doing it’s job though! +1

3 Likes