Author Topic: At your service  (Read 1968 times)

0 Members and 1 Guest are viewing this topic.

ehitam

  • Newbie
  • *
  • Posts: 7
At your service
« 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

John

  • Hero Member
  • *****
  • Posts: 2803
Re: At your service
« Reply #1 on: July 19, 2014, 10:48:35 PM »
Armando I. Rivera (AIR) created a version of the C BASIC effort in C++ which he calls JADE.

Quote
(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

Charles Pegge

  • Author
  • *****
  • Posts: 3282
    • Oxygen Basic
Re: At your service
« Reply #2 on: July 20, 2014, 08:24:18 AM »
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

ehitam

  • Newbie
  • *
  • Posts: 7
Re: At your service
« Reply #3 on: July 26, 2014, 05:47:21 AM »
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).

John

  • Hero Member
  • *****
  • Posts: 2803
Re: At your service
« Reply #4 on: July 26, 2014, 06:07:31 AM »
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?
« Last Edit: July 26, 2014, 06:16:11 AM by John »

Mike Lobanovsky

  • Hero Member
  • *****
  • Posts: 1600
    • FBSL
Re: At your service
« Reply #5 on: July 26, 2014, 06:53:04 AM »
...
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?
Mike
(3.4GHz Intel Core i5 Quad w/ 16GB RAM, 2 x nVidia GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

John

  • Hero Member
  • *****
  • Posts: 2803
Re: At your service
« Reply #6 on: July 26, 2014, 10:08:13 AM »
kludge = an ill-assorted collection of parts assembled to fulfill a particular purpose.

Quote
Did you at AIR's JADE project?

Did you look at AIR's JADE project?

Mike Lobanovsky

  • Hero Member
  • *****
  • Posts: 1600
    • FBSL
Re: At your service
« Reply #7 on: July 26, 2014, 11:01:09 AM »
Thanks John,

No mockery meant. In fact, I wondered about this one:

Quote
... if you as me ...

I'm not only a programmer, I'm also a linguist though a deserter from that front, I must admit. :)
Mike
(3.4GHz Intel Core i5 Quad w/ 16GB RAM, 2 x nVidia GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

John

  • Hero Member
  • *****
  • Posts: 2803
Re: At your service
« Reply #8 on: July 26, 2014, 11:12:53 AM »
I see the problem. I forgot to turn off my Aurel translator.  :o

Mike Lobanovsky

  • Hero Member
  • *****
  • Posts: 1600
    • FBSL
Re: At your service
« Reply #9 on: July 26, 2014, 11:25:02 AM »
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
Mike
(3.4GHz Intel Core i5 Quad w/ 16GB RAM, 2 x nVidia GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

John

  • Hero Member
  • *****
  • Posts: 2803
Re: At your service
« Reply #10 on: July 26, 2014, 11:30:50 AM »
Quote
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.

Mike Lobanovsky

  • Hero Member
  • *****
  • Posts: 1600
    • FBSL
Re: At your service
« Reply #11 on: July 26, 2014, 12:01:54 PM »
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.
Mike
(3.4GHz Intel Core i5 Quad w/ 16GB RAM, 2 x nVidia GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

ehitam

  • Newbie
  • *
  • Posts: 7
Re: At your service
« Reply #12 on: July 27, 2014, 04:53:35 AM »
kludge = an ill-assorted collection of parts assembled to fulfill a particular purpose.

Quote
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.

Charles Pegge

  • Author
  • *****
  • Posts: 3282
    • Oxygen Basic
Re: At your service
« Reply #13 on: July 27, 2014, 06:33:38 AM »
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.

Aurel

  • Guest
Re: At your service
« Reply #14 on: July 28, 2014, 05:31:13 AM »
yo banna  ;D
is bpl dead ?
or hami do his hypotetical-virtual sado-mazo-generic programming ?
yo  8)