Oxygen Basic
Information => Development => Topic started by: ehitam on July 19, 2014, 08:03:13 PM
-
Hello, probably first time I did serious tests of O2, it is really an amazing project, sad it don't have got as much attention as FreeBASIC.
You had been talking about C emitter and one of the main problems like how to implement dynamic strings, etc.
I used to focus on creating commercial BASIC compiler but later dropped the project as I lost the interested and moved to game development world instead. But I have a lot of good old code which can be modified to be used with O2.
To make the long story short, I can implement all the commands (obviously except the constructs like if/then/else, while/wend) and functions. Implement a dynamic string and then this can be merged with O2.
I have two questions:
1. Why not C++ instead of C?
2. Is there a list of all commands/functions like this- http://www.freebasic.net/wiki/wikka.php?wakka=CatPgFunctIndex
A list of command can really bring down the development time and make the development more organized (at least for C emitter).
-Regards,
Harsh Bhati
-
Armando I. Rivera (AIR) created a version of the C BASIC effort in C++ which he calls JADE.
(Jade’s A Developing Experiment)
JADE is a set of include files with Macros and Functions that seeks to provide a Basic-Like way of creating c++ code.
JADE Bitbucket project site (https://bitbucket.org/Airr/jade)
-
Hi Harsh,
Many thanks for your offer, I would be interested to see your compiler code.
OxygenBasic has undergone quite a few change since we last discussed the C emitter. A full recode, probably in GCC C, is on the agenda, and then the C emitter should fall into place quite easily. To make Oxygen truly cross-platform, it will have to be independent of x86, as well as the MS-specifics
I'm not familiar with C++ but I think C keeps us closest to the virtual machine.
For a list of keywords, as they relate to the compiler, take a look at src/o2keyw.bas.
The manual is located here: inf/oxygen_help.chm
-
Hello Charles, thanks for a quick reply and sorry for my late one...
That was helpful information....
I am not a C++ Wizard myself, I just use the C part of C++ with some extra goodies like managed string and ability to add function to a struct.
I'll start work back on it from Monday. My current code base revolves around translation from VSHLC(Vyal Standard High Level Code) to C++. VSHLC is a high level unambiguous notation giving simpler translation from BASIC to it.
EDIT:
Today once again I confirm how bad is the C code generated by FB. I tried to compile FB under Scientific Linux 6.5 x86_64, the c emitter is broken on old GCC because it somehow need to define multiple structs of same name :o Seriously, its C emission is far from good (not even hoping for perfection).
-
To make it worse the C code it does generated is human unreadable.
Definition of kludge if you as me. Nothing like one more abortion as you're walking out the door. :-\ After the author abandons the project it's left to a band of control freaks that have the manors of a snail.
@ehitam - Did you at AIR's JADE project?
-
...
Definition of kludge if you as me.
...
Did you at AIR's JADE project?
...
Errr, exactly what is it all supposed to mean in plain English?
-
kludge = an ill-assorted collection of parts assembled to fulfill a particular purpose.
Did you at AIR's JADE project?
Did you look at AIR's JADE project?
-
Thanks John,
No mockery meant. In fact, I wondered about this one:
... if you as me ...
I'm not only a programmer, I'm also a linguist though a deserter from that front, I must admit. :)
-
I see the problem. I forgot to turn off my Aurel translator. :o
-
I see. You're getting ready for your Polish tour.
Then I must also warn you that we don't have anything like definite/indefinite articles "the"/"a" here and our word order in a sentence is completely free. And as I noted before, some of us shake our heads to say "yes" and nod to say "no".
:D
-
I noted before, some of us shake our heads to say "yes" and nod to say "no".
I'm already trained. My wife did the same thing.
-
My wife often confuses the words "yesterday" and "tomorrow" and my youngest son is bad at "left" and "right". I'm feeling myself a little dizzy when our family gathers together in the evening.
-
kludge = an ill-assorted collection of parts assembled to fulfill a particular purpose.
Did you at AIR's JADE project?
Did you look at AIR's JADE project?
Yes I checked it, still looking into it. It is very interesting, but I am yet to get into it fully.
I also looked into Oxygen's code base, looks much more refreshing than FreeBASIC's code base. 64 bit and C emitter is still in hackish state there. I compiled GCC 4.9.1 initially only to get FreeBASIC work after attempt to manually apply the 2010 patch to GCC which recognize double definition of struct legal, I would agree that now it is proving much more worthwhile even outside need in FBC.
The problem definitely remains and I don't know how much FBC's broken C emitter can be trusted for as demanding things as Games.
-
I stuck to GCC 4.7.0 for both 32 and 64 bit for mingw compiling. I remember there was a breakage in one of the 4.8 builds for windows. It simply would not compile anything. As a newbie, I was shocked that this was possible in such a mainstream product.
-
yo banna ;D
is bpl dead ?
or hami do his hypotetical-virtual sado-mazo-generic programming ?
yo 8)