Author Topic: OxygenBasic includes  (Read 23634 times)

0 Members and 2 Guests are viewing this topic.

Aurel

  • Guest
Re: OxygenBasic includes
« Reply #45 on: October 01, 2013, 11:52:35 AM »
Return to topic...
So on this way any of Peter or my program which use custom include not work.
And we be forced to use mingw headers,right?
hey don't get me wrong i really don't have nothing against C emiter but i doubt that things are
so simple like you think.
Even simple command print "" depend on win api (messagebox) and how gcc know how to
translate this simple command to gtk based widget .... ::)

Emil_halim

  • Guest
Re: OxygenBasic includes
« Reply #46 on: October 01, 2013, 12:17:12 PM »
what do you mean by custom include , if it was a basic syntax code so no problem C emitter will translate it
to c behind your sens .

you will not forced to use gcc header , it is so simple ,you write a basic sytax code and get exe file , so
no problem od intermdiate processes.

print commend will emit tp printf if your programe will be console programe or MessageBox in windows or what
else in othere system i mean coresponding in gtk based widget.

 

Aurel

  • Guest
Re: OxygenBasic includes
« Reply #47 on: October 01, 2013, 12:25:23 PM »
Quote
what else in othere system i mean coresponding in gtk based widget.
ok then... ;)
If this thing will work i would like to see some day that oxygen work on my SliTaz ;D

kryton9

  • Guest
Re: OxygenBasic includes
« Reply #48 on: October 01, 2013, 12:52:43 PM »
Emil and John, yes I was reading again the front end stuff for gcc and I think you guys are right. Writing a c emitter would be the most flexible because you could use any c compiler, even ones for microcontrollers!

Emil_halim

  • Guest
Re: OxygenBasic includes
« Reply #49 on: October 02, 2013, 08:37:48 AM »
Hi kryton9,

the major opinion here is Charles ' one , he the only man will decide the direction of this topic.

hope if he has a time and confined , he will start that as soon as possible.   

Aurel

  • Guest
Re: OxygenBasic includes
« Reply #50 on: October 02, 2013, 10:54:18 AM »
So as conclusion...
C emitter will be only usefull if we want use another platform
where we can compile our programs written in oxygen....

Peter

  • Guest
Re: OxygenBasic includes
« Reply #51 on: October 02, 2013, 11:06:01 AM »
Another platform ?

There is only Windows.

JRS

  • Guest
Re: OxygenBasic includes
« Reply #52 on: October 02, 2013, 11:08:56 AM »
If Charles wants cross platform and interoperability, C (ANSI/ISO) is the only way to get there. IMHO

It may be a good time to fork O2 within the project as a Windows JIT ASM BASIC compiler and create a new branch as a O2C translator.

I still think writing the O2C translator in ScriptBasic would get it working faster and with more help from the group. (at least the first pass)


« Last Edit: October 02, 2013, 12:03:10 PM by John »

kryton9

  • Guest
Re: OxygenBasic includes
« Reply #53 on: October 02, 2013, 12:40:38 PM »
John or Charles, do you guys have any idea the route FreeBasic is taking towards being a gcc compiled language?

JRS

  • Guest
Re: OxygenBasic includes
« Reply #54 on: October 02, 2013, 01:11:48 PM »
They are farther along then we are.  :-[

Joshy (J.Peters) has FreeBASIC running on ARM using the C emitter.


JRS

  • Guest
Re: OxygenBasic includes
« Reply #55 on: October 03, 2013, 09:00:06 AM »
Is the plan to emit low level C code as translated ASM in O2 like the FreeBASIC project? I would think it would be more useful to have a BASIC to C translator that generates C code that can be expanded on at that level. Both FB and BaCon generate C code that is unusable other than to compile to a binary. Do we really want to paint ourselves into the same corner?

Many of us are BASIC programmers first and wannabe C/C++ programmers for the portability, speed and access to the vast library base available. Static linking is another plus for porting BASIC code to C. I don't see a huge difference syntactically between BASIC and C. With all the free extension libraries for C available, many of the missing pieces in C that BASIC provides as standard equipment can be emulated. (runtime library extension)

If I were to create a SB2C translator, I would use the scriba -C output (pre-tokenized binary source) and use that to convert to C. SB has already done most of the work for me (parse, lex, ...) and has created an efficient source base to translate to C. Personally I don't see the point of doing this for SB because I can create a SB extension module in C that can solve any bottleneck an interpreter might inject.

I would like to see O2 create a library that can be static linked with C before taking on any epic adventures of a O2 to C translator.
« Last Edit: October 03, 2013, 09:19:40 AM by John »

Charles Pegge

  • Guest
Re: OxygenBasic includes
« Reply #56 on: October 03, 2013, 12:46:06 PM »
Keeping the C output as close as possible to the original code is certainly desirable. It gets a little complex around string operations. - I have been paying close attention to Patrice's manual translation of PB code to VC10.

Some Oxygen constructs are quite hard to translate directly to C, so we may have to do some feature-pruning. (But I think I am the only one who might feel the loss so far :))

Static libraries appear to be compiler-specific. So to take advantage of these, the C translator has to be implemented first.
« Last Edit: October 03, 2013, 01:11:30 PM by Charles Pegge »

JRS

  • Guest
Re: OxygenBasic includes
« Reply #57 on: October 03, 2013, 01:32:17 PM »
I think O2's ability to create virtual DLLs is a missed opportunity by the other language developers. Maybe I shouldn't say anything and be selfish, non-contributing and someone that only cares about themselves. I'm not sure if the other 35 non-posting members here fit the bill or not. All they are is a record in the MySQL database taking up space. I have no idea why people join forums and never post. Members here actually had to send Charles an e-mail to register and they have elected not to post. Guests have all the features of the site except posting rights. If someone (non-posting members welcome) can tell me why this is, I may be able to sleep tonight.

Maybe we need to be like the Jose Roca forum and not allow searching of posts or downloading attachments unless you're a member. We can also make the requirement that O2 examples are shareware and free but can only be used with O2. Hmmm, did I leave anything out?

Quote from: Patrice - JRS forum
And you know what, when it comes to advanced graphics, i can see the difference between 32 and 64-bit.

The 32 bit geniuses are waking up to reality. How refreshing. I have been running nothing but 64 bit apps for over 2 years on my development desktop PC. I have been running 64 bit hosting servers for over 5 years. The sad thing is there is so much invested in 32 bit no one wants to switch.

I encourage all my clients to spec. nothing but 64 bit business applications if they aren't interested in going shopping again a couple years.

 




 
« Last Edit: October 03, 2013, 08:24:11 PM by John »

kryton9

  • Guest
Re: OxygenBasic includes
« Reply #58 on: October 03, 2013, 06:25:22 PM »
Interesting discussion about some of the behind scene stuff guys. I enjoy reading about these things. Even if I am not at that level, each time one reads such a thread you get little ah ahh moments of understanding a bit.

About forum membership, I can imagine how frustrating it is to run a forum, let alone all the ones you do John. I am surprised there are not that many posts on the scriptbasic forums as that seems to be a widely used and popular language, you would think the forums for it would be a busy place.

The most active forum I have been on was the old iBasic forums and after that I would say the thinBasic forums.

I am sure once oxygen is at a release version and documented, a lot of users will join then and these forums will be busy.

I am also surprised that we are not seeing behind the scene discussions at the ALLBasic forums. If I were a low level guy, it would be neat to hang out and discuss things with other guys at the same level.

JRS

  • Guest
Re: OxygenBasic includes
« Reply #59 on: October 03, 2013, 07:18:16 PM »
Quote
I am also surprised that we are not seeing behind the scene discussions at the ALLBasic forums. If I were a low level guy, it would be neat to hang out and discuss things with other guys at the same level.

I'm glad someone gets it.