FreeBasic is going 64 bit

Started by Paul Squires, October 29, 2013, 07:59:44 PM

Previous topic - Next topic

Paul Squires

The development branch in the Git repository has some pretty active development of 64 bit code. That is very promising and encouraging for the future of FreeBasic. Below are snippets from the changelog and ToDo files:

Version 0.91.0:

[added]
- 64bit support (-arch x86_64) based on -gen gcc: INTEGER/POINTER = 64bit, LONG = 32bit DWORD. Compiler #define: __FB_64BIT__
- -arch 32|64 options to support easy switching between 32bit and 64bit, by selecting a default arch that supports 32/64 bits respectively.

o 64bit
  - May have to specify C++ mangled name for new/new[]/delete/delete[] operators
    manually instead of using env.target.size_t, because our C++ mangling won't
    be fully compatible. On Linux, new probably uses size_t, which is unsigned long,
    but none of FB types will be mangled as long on 64bit. It could work on Win64
    at least, if new uses a long long param there...
  - FB includes must be adjusted for 64bit compatibility (if the corresponding
    library even is available on 64bit)
  - rtlib's ThreadCall implementation is currently x86-only
Paul Squires
PlanetSquires Software

Jim Dunn

I can't believe it... I was *sure* that PowerBASIC would have 64-bit before FreeBasic... I mean... wow...

And, the best part, is that if you build your product on FreeBasic, you have the underlying compiler code, in case of... an accident...
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."

Paul Squires

FreeBasic went through a period of explosive growth a few years ago. The original author was extremely active along with a talented core group of developers. However, the main author (v1ctor) left the project to do more real world work and only occasionally checked in from time to time. People thought the project would die but wouldn't you know, other developers came along and picked up where he left off. Now FreeBasic has many features that people doubted would ever happen. That's the power of open source. I fear that PowerBASIC may not fare as well especially with the code base being in assembly language. Can you imagine how large and complicated that code base must be? How many ASM programmers in the world would want to take on that challenge? That person would have to be compensated extremely well and does PB have the resources to attract such a person? Who knows. Time will tell I guess but it's already been a year......

Of course, I have a huge investment in PB code (like most people here). The problem is do we stick with the nostalgia of PowerBASIC or move on to something else. Personally, do I have the will and desire to learn something else? I would consider switching languages but only if I knew a core group of PB'ers were switching to the same language. We could use some peer support because I imagine it would be a huge and difficult (and emotionally draining) exercise. For example, where would we be without Jose's header includes? Sure, FreeBasic has WinAPI headers translated but nothing to the extent that Jose has. Do I, you, us have the desire to switch to the C family of languages? CLang looks interesting as does "D". PureBasic? (not me), .Net (I looked at it but it is big and slow and I am not sold on it).

We all have decisions to make. I know that after investing 25 years in BASIC, I don't know if I have the desire, drive and motivation to change. Like I said, I would only change 100% to another language if I knew I was part of a group of us doing so.

I love programming. I find it relaxing and stimulating for the mind. I would hate to give it up completely. I also don't want to spend the next 20 years of my life working in a dead language.

Hypothetically, if you guys had a gun to your head and was forced to switch to another programming language, what language would you choose?

Paul Squires
PlanetSquires Software

Israel Vega Alvarez

#3
 I am now learning C#.  Mainly in my job company is required because Basic (PowerBasic) is not Standard language. I not like working with  for(x=1;x<=100;x++);     or    {    }  or case sensitive...but now I see a need. I was do productive with PB. I keep hoping a change in PB because I can be more productive.   Also FreeBasic is good...and have Firefly Visual Designer, but I have that learning C#.


Paul Squires

I spent a month last January learning C#. I almost convinced myself that C# would be my new language. I lost interest in programming over the summer but now I am back in the programming groove.
Paul Squires
PlanetSquires Software

David Kenny

Hmm,  started using C# and lost interest in programming... now back to PowerBasic and back in the programming groove again.

I think I'm spotting a couple cause and effects in there. ;)

Jim Dunn

After Microsoft dropped C# for tablets, I quit it.
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."

Marc van Cauwenberghe

#7
Hmmm,

I would go for Livecode. I know probably never heard of it. I have been investing some time in the language ever since it went open source. It is a sort of basic (has a very peculiar syntax, not for anyone) but for me it has the advantage that it compiles to Windows, Mac os, Android, iOs and Linux. And it has a good support for GUI and graphic related things which I can't get to work in powerbasic.
As an alternative I would go for a C dialect like C++

Marc

Brice Manuel

Quoteyou have the underlying compiler code, in case of... an accident...
This is why so many developers will NOT use a language (or even a product) unless it is open source.  Even with PureBasic, Fred is on record as saying it would be released as open source if he ever abandoned the language.  Given that the Amiga version of PureBasic was made open source, Fred has a track record of keeping his word.  Fred is also a VERY young guy, so will hopefully be sticking around for a long time.


QuoteSure, FreeBasic has WinAPI headers translated but nothing to the extent that Jose has.
Sapero's API headers for Paul Turley's languages were pretty good, but not as good as Jose's.  But, Sapero's headers are what I am using for non-PowerBASIC projects.


QuoteI love programming. I find it relaxing and stimulating for the mind. I would hate to give it up completely. I also don't want to spend the next 20 years of my life working in a dead language.
I agree 100%.

James Fuller

FreeBasic:
If I'm not mistaken without specifying to generate "c" it translates to gas assembler.
You will always have the issue of translating header files. If one of the open source libraries get's updated someone has to update the headers for FreeBasic.

I agree with Patrice; C++ is the way to go but as I have said many times I very much dislike the nomenclature with all is ; {}.....

Tooting my own horn I find bc9Basic to fulfill my needs of BASIC with the power of C++.

James

Brice Manuel

Quote from: James Fuller on October 31, 2013, 07:17:29 AM
Tooting my own horn I find bc9Basic to fulfill my needs of BASIC with the power of C++.
I am familiarizing myself with BCX for an upcoming project.

Nathan Durland

Quote from: TechSupport on October 30, 2013, 09:35:28 PM
Hypothetically, if you guys had a gun to your head and was forced to switch to another programming language, what language would you choose?

For me, it would have to be something with easy access (ODBC/ADO) to various databases.  The combination of PowerBASIC & SQLTools is the very lifeblood of what I have to do here.

I've tinkered with C# and VB.net.  I'm certainly not ready to start deploying any new projects using those tools.  FF/PB is still the most rapid deployment platform for me.

Regarding 64 bit, I'm sure it will come, but I'm not in a hurry.  All the support libraries I use (SQLTools, VPE, etc) would also have to be updated, as well.

Eddy Van Esch

Quote from: TechSupport on October 30, 2013, 09:35:28 PM
what language would you choose?
To be honest, I wouldn't know at this moment.
But I would first look at languages/compilers that can produce stand-alone executables. I don't want the hassle of run-time libraries and/or dot-whatever frameworks. Not so much the distribution or installation of these, but coping with the different versions of it. Dll hell as it were...
A single exe with, if required, a few of your own dll's is so much easier to manage.

A second argument would be the availability of the compiler in the future. Of course, you never can tell. Even with giants like M$. I guess open source would be a plus for this.

C/C++/C#  have never appealed to me. I just don't like the syntax. It is too complicated for my simple brain .. :)
If I can, I would stick with BASIC like languages. So Freebasic could be a good choice. Maybe PureBasic?
Did anyone try RealBasic (now Xojo)?
Eddy

Paul Squires

Quote from: Brice Manuel on October 31, 2013, 07:36:43 AM
Quote from: James Fuller on October 31, 2013, 07:17:29 AM
Tooting my own horn I find bc9Basic to fulfill my needs of BASIC with the power of C++.
I am familiarizing myself with BCX for an upcoming project.

I might also take a look at Jame's creation.
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Nathan Durland on October 31, 2013, 11:43:06 AM
All the support libraries I use (SQLTools, VPE, etc) would also have to be updated, as well.

That's a good point. Luckily for me, I am not overly dependent on any one library so I am not too concerned about availablility of 64 bit versions. It sure is a limiting factor though if you want to move to 64 bit.
Paul Squires
PlanetSquires Software