Is FreeBasic still continued to develop?

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
SARG
Posts: 1822
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

@V1ctor

Is the assembly code emitter still existing in the futur ?
If yes, for what ?
v1ctor
Site Admin
Posts: 3804
Joined: May 27, 2005 8:08
Location: SP / Bra[s]il
Contact:

Post by v1ctor »

Sure, compilation is way faster and takes lots less memory, so it may be useful to some users.

Also because we won't include gcc in Windows and DOS (too big package, IMO), so making it obligatory to users to first download and install MinGW and to configure it (set env. variable) would turn new users away from FB. In Linux and OS X (in future) that wouldn't be a problem though.

At the moment the test suite can't be even built using the gcc emitter, so there are a lot of things do to yet - and then we can try to get FB to rebuilt itself, what is never a simple task.
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Post by John Spikowski »

Victor,

Do you feel at this point in time that a Basic compiler that generates custom ASM code is a fatal effort moving forward? (like PowerBASIC)

Will Windows play a secondary role with FreeBASIC moving forward?


John
Dr_D
Posts: 2452
Joined: May 27, 2005 4:59
Contact:

Post by Dr_D »

John Spikowski wrote:Victor,

Do you feel at this point in time that a Basic compiler that generates custom ASM code is a fatal effort moving forward? (like PowerBASIC)

Will Windows play a secondary role with FreeBASIC moving forward?


John
[popeye]
I've had all I can stands, I can't stands no more!
++spinach
COCK PUNCH!
[/popeye]
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

@John

Maybe I didn't understand you, but didn't v1ctor just answer your questions? He just said that ASM emission won't be removed, because it would be a barrier-to-entry for casual programmers on Windows.

If by 'Windows playing a secondary role' you mean 'Windows generally failing to be a place for serious crossplatform development' then I guess the answer is yes? :P IMHO, of course. Linux users would really not need to worry about gcc being installed.

lol@Dr_D, as usual ;p

Oh and, great work v1ctor. I think I have something in my eye.....
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Post by John Spikowski »

Maybe I didn't understand you, but didn't v1ctor just answer your questions? He just said that ASM emission won't be removed, because it would be a barrier-to-entry for casual programmers on Windows.
So the emitter will not generate any C code the FreeBASIC user can have access to in it's journey to it's binary executable format?

What I meant by Windows taking a secondary role is that open source normally plants it's roots with an open source environment. I think Classic FB's original goal was to be a open source QuickBasic and PowerBASIC alternative. Linux wasn't even an option in those days.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

John Spikowski wrote:So the emitter will not generate any C code the FreeBASIC user can have access to in it's journey to it's binary executable format?
Again, not sure what you mean here. If you mean "easily human-readable C code" then the answer will be 'no' for anything of moderate complexity. However, you can use the same compilation option to preserve the intermediate C code as you can use to preserve the intermediate ASM (-R now I believe; it changed since I was active)
John Spikowski wrote:What I meant by Windows taking a secondary role is that open source normally plants it's roots with an open source environment. I think Classic FB's original goal was to be a open source QuickBasic and ProwerBASIC alternative. Linux wasn't even an option in those days.
Well, Windows does have MinGW. The C emitter changes nothing for the casual user, but for someone willing to install MinGW for access to GCC optimizations (or cross-compilation, God help them...) they'll have that option as well.
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

Hi, Victor, nice to see you again at the command!

I have tried the SVN version with gcc 3.4.5 with some prime sieve using a bit array .To me it did a code marginally slower an bigger than the version using GAS, i think it's not an important result as I guess my version of gcc is not updated tuned and the version of FB in SVN is a test one.

What worried to me was gcc stopping with errors that fbc did'nt catch, for example a comparison pointer - integer passes fbc but stops gcc. The problem is gcc issues the error with a line numer in the c listing you have to relate to the original fb listing. I can guess two ways to solve it: one is putting the original FB lines as comments in the c listing, another one is to make FB more rigid so nothing that could annoy gcc can pass.
Sisophon2001
Posts: 1706
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.
Contact:

Post by Sisophon2001 »

Antoni wrote:Hi, Victor, nice to see you again at the command!

I have tried the SVN version with gcc 3.4.5 with some prime sieve using a bit array .To me it did a code marginally slower an bigger than the version using GAS, i think it's not an important result as I guess my version of gcc is not updated tuned and the version of FB in SVN is a test one.

What worried to me was gcc stopping with errors that fbc did'nt catch, for example a comparison pointer - integer passes fbc but stops gcc. The problem is gcc issues the error with a line numer in the c listing you have to relate to the original fb listing. I can guess two ways to solve it: one is putting the original FB lines as comments in the c listing, another one is to make FB more rigid so nothing that could annoy gcc can pass.
I would think the second must be the case, just as it is with the ASM emitter.

I will try the C emitter tomorrow and see how it looks on Linux, but I am sure there is lots of work left to complete.

Garvan
marcov
Posts: 3484
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Post by marcov »

cha0s wrote:@John
ws playing a secondary role' you mean 'Windows generally failing to be a place for serious crossplatform development' then I guess the answer is yes? :P IMHO, of course. Linux users would really not need to worry about gcc being installed.
Well, if I'm evil, I could state it like this:

On Linux, base installs are free of gcc, but contain the libc runtime in one version. GCC means installaling is an free additional package of the vendor but with dependancies (binutils etc)

On Windows, the base install is free of MSVC, but contains the msvcrt runtime in several versions. MSVC is a free additional package from the same vendor. (VS express or platform SDK)

On OS X, the base install is free of gcc, but contain the runtime in several versions. The compiler (binutils) means installing one free additional package (XCode) from the same vendor

So where is this gigantic difference now?

The only differences I can see is that Linux allows the packages to install during install time, while the others need to do it afterwards, but that Linux fragments the build tools over multiple packages, while OS X and Windows have just one. Another one is that Linux generally doesn't install libc's to keep older programs running.
v1ctor
Site Admin
Posts: 3804
Joined: May 27, 2005 8:08
Location: SP / Bra[s]il
Contact:

Post by v1ctor »

Antoni, yeah, there shouldn't be ever a single warning at the gcc side, that's the idea. There are many things to do yet, like getting the test suit to build, plus bootstrapping the compiler in -gen gcc mode.

Otherwise FB would be just a dumb/lazy translator, like most (all?) BASIC to C translators out there.
John Spikowski
Posts: 453
Joined: Dec 24, 2005 2:32
Location: WA - USA
Contact:

Post by John Spikowski »

Otherwise FB would be just a dumb/lazy translator, like most (all?) BASIC to C translators out there.
If allowing C (includes and source) withing Basic code is dumb then I need to look up the word in the dictionary again. :-)
marcov
Posts: 3484
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Post by marcov »

John Spikowski wrote:
Otherwise FB would be just a dumb/lazy translator, like most (all?) BASIC to C translators out there.
If allowing C (includes and source) withing Basic code is dumb then I need to look up the word in the dictionary again. :-)
In English an adjective generally only has bearing on the noun following it. Which, in this case, is "translator", not to the whole sentence that describes the whole process.
vdecampo
Posts: 2992
Joined: Aug 07, 2007 23:20
Location: Maryland, USA
Contact:

Post by vdecampo »

John Spikowski wrote:
Otherwise FB would be just a dumb/lazy translator, like most (all?) BASIC to C translators out there.
If allowing C (includes and source) withing Basic code is dumb then I need to look up the word in the dictionary again. :-)
dumb/lazy translator = One to one BASIC line to C equivalent. No higher level code optimizations, code constructs, or implementations.

-Vince
SARG
Posts: 1822
Joined: May 27, 2005 7:15
Location: FRANCE

Post by SARG »

I just did a test with the SVN version (thanks Imortis) and found this issue (using pelles C not GCC) so I'm not sure that's a bug.

Code: Select all

Type ttest1
	aint As Integer
	bus As ushort
End Type
Gives the following code :

Code: Select all

	typedef struct _TTEST1 {;  <--- 'the ";" generates an error
		#line 0 "test1.bas"
		integer AINT;
		#line 0 "test1.bas"
		ushort BUS;
	#line 0 "test1.bas"
	} TTEST1;
By the way, is it possible to use (easily) Pelles C or an other compiler ?

And why not open a special topic (sticky) on the gcc emitter.
Post Reply