Anyone interested in porting of the FreeBASIC compiler?

I wanted to do but seems not easy. The gfxlib2 we could use the opengl render, I think, since we don’t have X11. We could treat Haiku as a Unix to minimize the works. The compiler could be the easy part, but the rtlib is not. I don’t know anything about development on Haiku yet.

Please have a look into this:

We need to create a new src/rtlib/haiku and port the code above for FreeBSD to Haiku.

This needs an Haiku experts. I’m just a hobbyist liked to hack. These low level stuffs are beyond my ability. Anyone interested?

I don’t know much more than you about those graphics libraries but I’m writing a Yab to C++ trans-piler. Would something like Yab satisfy your programming needs?

1 Like

Hi have start to port freebasic, but it isn’t easy for me. I am also a Hobby coder.

What kind of program do you want to program?

Yab can be good engough for that.

Does Yab means Yabasic? I prefer FreeBASIC because it has OOP support. FreeBASIC also compiles into a standalone binary. Yabasic seems to be interpreted even though it was said that you could bind the interpreter into the script to create an executable.

Yes yab is based on yabasic. It is a interpteter. You can run yab as script or bind it to the yab binary as executeable file.

Yab is not only a yabasic port, you can use api commands to create programs and games in the style of haiku.

I like and love it.

An other interesting interpreter are egsl - easy game scripting with lua, but it does not run anymore.

The egsl ide are written in yab (for haiku)

Native executables are on the way. My transpiler is an export engine to C++ syntax so you won’t need the interpreter any more for binding. However, in order to make nonstructured commands work (like “on n gosub”), the possibility of OOP is not there.

i try to use freebasic with dosbox in haiku-os,but failed.
and it can not configure and make install clean from the source.
then, is there another language for layman with haiku?

If you are interested on Basic for Haiku YAB is available GitHub - HaikuArchives/Yab: Yab is a complete BASIC programming language for Haiku

yab… pkgman install yab-ide will install yab, the documentation and a very powerful ide programmed in yab.

https://yab.orgfree.com has more information, the forum has several examples and code snippets.

Yab is available in Haikudepot with the version 1.8.1.

More Information can be found onto

Https://yab.besly.de

i install yab-IDE , and how to translate yabasic code into machine code ? then, haiku can run it directly.
or any other language for layman?

Yab is interpreted. I started to write a Yab to C++ transpiler until it looked like nobody would use it. The code it generates is not pretty. If completed, it could support all but maybe 2 or 3 commands that require the interpreter.

3 Likes

yab is like any basic, it is interpreted. use #!yab as the first line of code and set the file to executable. then one only needs to double-click like any other program to have it run. Look at the example code to see how well yab integrates with Haiku.

A yab to c++ transpiler would be great. It would let one use basic to code and get the speed and performance of c++ code after compiling.

1 Like

it seems like yabasic is suitable to be the macro command with libreoffice.
this is important for complication office work

You cn also use the buildfactory.
Regards lorglas

Do you have an example. I think, it’s not implemented at the moment.

Regards lorglas

Would be a useful tool, no doubt. Optimizing and cleaning up resulting code can be done in a next version. Just release it & keep up the good work.

It’s open-source. Feel free to fork it on GitHub.

1 Like