I would be interested in doing some programming experiments for Haiku. What programming language do you recommend for developing applications with a graphical interface? (other than C and C++)
Tcl/Tk and Python+PyQT5 are two options that work well in my experience. The latter has a huge learning curve and an inconvenient license, but it’s there and works. Otherwise, a Haiku-native option I haven’t tried yet is yab
, a Basic dialect with native bindings. Hope this helps!
Yab basic
BaCon basic with GTK or FLTK
Nim using GitHub - filcuc/nimqml: Qt Qml bindings for the Nim programming language or nimble install x11
GTK with Vala should be good.
Any language with a binding to gobect-introspection.
Icon programming language but needs WM_DELETE_WINDOW patch.
Python with PyQT
Python with haiku_pyapi
Pascal
Are some that I have tried.
Haiku is written in C and C++, there are the main languages i think (native stuff) or yab (native too).
I’d really recommend C++, if you’re thinking of a serious project . I have written my own API interfaces for Python, Haskell, OCaml and of course there’s a lot to like about these languages, but it’s going to be extremely difficult to get full access to the API working, in any language but C++.
My thought when I started with Python was that it would be real useful for people with a casual, lightweight need for API access, but as far as I know that demand was much smaller than I thought. At first it’s enough to have some buttons and a text window, but pretty soon you want this or that refinement, and eventually you run into the “not supported” wall. Unless you’re working in C++.
I’d also recommend trying to use C++.
I know that it’s not as easy and convenient as Python,but it’s what’s supported best on Haiku currently.
I tried to do some C++ and Haiku-native app experiments myself and it took me quite long to get something that’s usable,and I get that that can be frustrating,but in the end I think the result will be best that way.
Another very promising alternative using Python is Haiku-PyAPI: GitHub - coolcoder613eb/Haiku-PyAPI: Python bindings for the Haiku API
That’s still in early development,however,and I don’t know how usable it is already.
Indeed, Haiku-PyAPI is in its early stages. I would say it’s best only for small, simple, one-off applications.
What about HaikuApiBindings for Python? I think these are much more complete?
Looks interesting, albeit it is targets Python 2.x (last changes on that repo from 2018, around Haiku beta1), so it will need some work to make it usable on with currently available Python versions on Haiku.
But I guess masochists people might be able to use the Perl version of those bindings as-is? (no idea, really, as I speak a negative amount of Perl).
Pulled a Vala project out that I done in 2015 and it just worked with some small changes.
Looked really nice on Haiku.
Vala needs updating and I see X11 bindings in the vapi directory.
I would guess, I could use Vala to do xlibe stuff too.
.
I think it’s the first I’ve heard of Vala. There seems to be some question as to whether it can be used for a C++ API. Of course you can always write a C API that calls C++ functions, but I think the question is, can you support the API virtual hook functions in the Vala object model?
When I started with an Ocaml API interface, I didn’t pay much attention to Ocaml’s OOP side - generally it’s a bit of extra scaffolding here that has little real obvious benefit. It’s eventually a good thing, because the API depends on inheritance for ordinary member functions and ideally an interface API will model that. But I still don’t have the means to make virtual functions link up automatically by naming, that has to be done explicitly.
64bit update to version 0.56.14 is available, 32bit buildmaster is down atm, should be back later (I hope )
Thank you for the update.
And yes, if I remember right, it was not easy to work with C++ code in Vala.
But now, with Xlibe, Wayland and Wine, I can drag my past into the future and be happy.
C# would be the best.