Author Topic: OxygenBasic includes  (Read 23632 times)

0 Members and 1 Guest are viewing this topic.

JRS

  • Guest
OxygenBasic includes
« on: September 10, 2013, 08:01:13 AM »
I feel that having a stable set of include files for OxygenBasic is just as important as formal documentation if not more. I think it would be another tragedy to go down the same path as FreeBASIC and PowerBASIC with custom includes. Charles made the wise decision early on to support C/C++ native Windows include files. We have only seen spotty use of this feature when it should be the language standard and all earlier O2 BASIC style include files retired. I don't think this is going to require a life long commitment but it will require a serious effort to shake out the bugs and fill the holes so stock includes can be used.

My hope was that José Roca would see the value in O2 and take the lead with this effort as he is the most qualified. I don't have any false expectations and hope time will heal his wounds. He has mentioned on his forum about retirement and his lack of interest in open source. Anything is possible and I hope the beauty of O2 can do it's magic and get him to fall in love with a BASIC compiler once again.

I would like to get a list of essential C/C++ headers that make up core Windows development. Getting COM working well with O2 will be a requirement but I don't see it taking center stage and only seasoned programmers using it.

« Last Edit: September 10, 2013, 08:27:34 AM by JRS »

JRS

  • Guest
Re: OxygenBasic includes
« Reply #1 on: September 10, 2013, 02:10:35 PM »
José,

This is an open source project. I'm doing my best to help Charles mature his compiler and expand his user base. I'm sorry that all the hard work you put in to the PowerBASIC product didn't pan out. The whole PB thing is a nightmare and a mess. I lost both my parents and wife in a two month period last yesar. I know what loss feels like but I'm not going to allow myself to end up a casualty as well burying myself in grief. I strive to surround myself with projects that take a creative approach and aren't afraid to break the mold. Charles is that type of author. He has surrounded himself with good people like Eros and others and the ride is more important than the destination.

I think getting involved in the O2 project will be healing experience for you and allow you to continue doing what you enjoy most. You have already mastered the Windows API, help us make use of that knowledge with O2.

John

JRS

  • Guest
Re: OxygenBasic includes
« Reply #2 on: September 12, 2013, 05:18:58 PM »
I have been thinking about the best way to test the C/C++ header files with OxygenBasic. Since we already have examples posted by Charles and others using O2 WinAPI32 .inc files, I thought I would try the equivalent Windows .h files and see if the same examples still work. If anyone has a better way to approach this, I'm open to suggestions.
« Last Edit: September 12, 2013, 05:34:16 PM by JRS »

Charles Pegge

  • Guest
Re: OxygenBasic includes
« Reply #3 on: September 13, 2013, 05:21:09 AM »
The full win api is a monster. We only need a fraction of 1% of its vast bulk to run all the examples and tools, so I am still in favour of maintaining a small win library. Then maybe suggest the MingW headers for more comprehensive scope. If you want to code anything in Windows you have to dig into the msdn docs
even if you have all the headers on-board.

Peter

  • Guest
Re: OxygenBasic includes
« Reply #4 on: September 13, 2013, 06:23:48 AM »
Quote
The full win api is a monster.


I do not think is a monster.
I do not think we use 1% therefrom. 1% is only CreateWindowEx
Those api is our life and should be very big in size.
I cannot get enough api declaration, i love it all.

Convenience is the first step for self-destruction!

JRS

  • Guest
Re: OxygenBasic includes
« Reply #5 on: September 13, 2013, 08:04:54 AM »
Quote
The full win api is a monster.

I was surprised when PowerBASIC came out with dead code removal. I had always thought that PB being a hand crafted compiler that it didn't compile unneeded code from includes. I guess I was wrong.

I have been thinking about this idea for some time and want to run it by everyone. How about using SQLite to store the include file definitions and have a utility that parses your code and builds a custom O2 .inc from the DB. The nice thing is the Win32DB could be used by multiple languages and the parser would be the only thing unique to each language.

Comments?


Peter

  • Guest
Re: OxygenBasic includes
« Reply #6 on: September 13, 2013, 08:30:10 AM »
 bad idea so far I can see.   :'(

Charles Pegge

  • Guest
Re: OxygenBasic includes
« Reply #7 on: September 13, 2013, 09:09:03 AM »
Mingw is a good source of Windows headers. There is also the full Microsoft SDK for Windows download. I often refer to version 6.0A which might be a little behind. But they are multi-megabyte and don't need to be included in the base package.

JRS

  • Guest
Re: OxygenBasic includes
« Reply #8 on: September 13, 2013, 11:55:55 AM »
Charles,

Another possibility is to use Daniel Corbier uCalc Transformer to convert Windows include files to a O2 friendlier format.

John

JRS

  • Guest
Re: OxygenBasic includes
« Reply #9 on: September 13, 2013, 06:55:31 PM »
Charles,

I did a few compares between the PB include files and the O2 current set. It looks like it would easier to convert the PB includes rather than the C/C++ headers. I'm working on a SB script to parse and write a new include file. The COM stuff will require more research on my part before attempting a conversion.

John

kryton9

  • Guest
Re: OxygenBasic includes
« Reply #10 on: September 13, 2013, 11:47:31 PM »
We have an include file nightmare if you ask me. Everyone seems to have their own include files.  I think the 3 include files that I brought from VB6 that Charles cleaned up should be the most inclusive to date, but even so... I think that o2 should be based on a cross platform compiler, something like gcc or llvm(is not vitual machine as the name implies) or freepascal compiler. My two cents for what is worth.

GCC and LLVM both have front end systems, I don't know about freepascal. I have tried studying gcc and llvm front end code and it is over my head I am sorry. But every so many months, I go and look at it to see if I can make better sense.

Just found this site for future reference:
http://www.ibm.com/developerworks/library/os-createcompilerllvm1/
« Last Edit: September 14, 2013, 12:09:25 AM by kryton9 »

JRS

  • Guest
Re: OxygenBasic includes
« Reply #11 on: September 14, 2013, 12:05:48 AM »
Quote
We have an include file nightmare if you ask me. Everyone seems to have their own include files.

The ones I'm building for the OxygenBasic project doesn't have any MY associated with it. As soon as I get the PB2O2 include file converter working I'll post the source and what files I have converted. Any help you can provide reviewing them for final submission would be great.




kryton9

  • Guest
Re: OxygenBasic includes
« Reply #12 on: September 14, 2013, 12:14:01 AM »
John, here is the latest that I cleaned up and broke into parts: Constants, Types and Functions and have used it to test many things without errors so far, but since it is such a big api, have only touched upon the major things so far. Hope it helps.

Files unzipped:
WinApiVB6.inc
WinConsts.inc
WinTypes.inc
WinFuncs.inc

Just updated: forgot to put WinApiVB6.inc in there, this is the file that would be used in project source code, it will sub link the other includes in needed order.

X
« Last Edit: September 14, 2013, 12:23:28 AM by kryton9 »

JRS

  • Guest
Re: OxygenBasic includes
« Reply #13 on: September 14, 2013, 12:21:07 AM »
Thanks!

I'm thinking that pulling from multiple resources to build the final O2 includes may have a benefit. (cross check and if conflicts occur, write something out to a conversion log file)

SB has some neat text processing features along with dynamic matrix creation that may reduce/eliminate multi-pass processing.

kryton9

  • Guest
Re: OxygenBasic includes
« Reply #14 on: September 14, 2013, 12:24:19 AM »
Just updated the previous message John, I forgot to include the main include file. All updated now.
http://www.oxygenbasic.org/forum/index.php?topic=849.msg7011#msg7011