Blog post !
Re: Blog post !
A question: since PureBasic will be based on C, and it used to be based on Assembler, does this mean it won't create a FASM output anymore for compilation, and therefore our apps will run slower?
Re: Blog post !
On the contrary, C compilers tend to produce some of the best/fastest/optimised assembly output, so our apps should run even fasterBarryG wrote:A question: since PureBasic will be based on C, and it used to be based on Assembler, does this mean it won't create a FASM output anymore for compilation, and therefore our apps will run slower?
Re: Blog post !
Sooo we get support for proper unsigned data types?
Still hoping that PB structs also get an upgrade with procedure support (group data+behavior), so instead of just copying plain c structs, improve and ease
Still hoping that PB structs also get an upgrade with procedure support (group data+behavior), so instead of just copying plain c structs, improve and ease

-
- Addict
- Posts: 1517
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Blog post !
This is if compiling with the -Ofast and -flto flags. If compiling with the -O0 flag and without the -flto flag, then it run be slow.Keya wrote:On the contrary, C compilers tend to produce some of the best/fastest/optimised assembly output, so our apps should run even faster
Re: Blog post !
How is it a bad thing??? If you mean PC as in desktop computer, that's what PB already is, and changing from fasm to C compiler doesn't change that... in fact it also means it can support other architectures such as ARM/ARM64, as Fred wrote in the blog post.Lord wrote:That whole thing means that PB is going to be PC, which is a bad thing.
Or if you meant "PureBasic becomes PureC", no you'll still be writing in Basic code, not C. (You won't need to learn C, just as you haven't had to learn asm to use Purebasic in its current form)
Re: Blog post !
Well, I'm very cautiously optimistic.
It's possible (even if it's not automatically guaranteed) some of the long standing compiler bugs could go away with this.
Also it will be interesting to see what is the C (or C++ ?) compiler used on the various platform.
This could mean better interoperability with C/C++ libraries... possibly.
Another good thing is the code will be generated by a modern C compiler and should be possible to get a higher level of optimizations, and maybe even a larger support of ASM instructions (SSE/SSE2 at least ?)
PB currently generates basically 80386 code.
It remain to be seen the effect of a heavier C compiler instead of a fast assembler on the edit -> compile -> run -> edit cycle.
It's possible (even if it's not automatically guaranteed) some of the long standing compiler bugs could go away with this.
Also it will be interesting to see what is the C (or C++ ?) compiler used on the various platform.
This could mean better interoperability with C/C++ libraries... possibly.
Another good thing is the code will be generated by a modern C compiler and should be possible to get a higher level of optimizations, and maybe even a larger support of ASM instructions (SSE/SSE2 at least ?)
PB currently generates basically 80386 code.
It remain to be seen the effect of a heavier C compiler instead of a fast assembler on the edit -> compile -> run -> edit cycle.
Last edited by luis on Sun Mar 14, 2021 1:11 pm, edited 1 time in total.
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: Blog post !
There's a lot of hope for this news!
But questions about how it will be implemented, will there be a binding to a specific compiler or will we be able to choose in the settings, will the libraries be open, will there be changes in licensing, ..... ?
P.s. Will typed pointers appear?
C
PB
But questions about how it will be implemented, will there be a binding to a specific compiler or will we be able to choose in the settings, will the libraries be open, will there be changes in licensing, ..... ?
P.s. Will typed pointers appear?

C
Code: Select all
int *p;
Code: Select all
*p.i
Dawn will come inevitably.
Re: Blog post !
Will this be true with a C back-end?https://www.purebasic.com/ wrote:Very fast BASIC compiler ...
Will this be true with a C back-end?https://www.purebasic.com/ wrote:Using PureBasic is no brainer: you install the program, run the IDE and start developing your application.
Doubts are quite appropriate.

Re: Blog post !
Yes. The current form of PB is "Basic -> assembly -> executable"Lord wrote:Will this be true with a C back-end?https://www.purebasic.com/ wrote:Very fast BASIC compiler ...
The next form will be "Basic -> C -> assembly -> executable"
Again, don't worry, you won't need to learn C to program in the next version of PB, just as nobody needs to learn assembly to program in its current form. But you will be able to enjoy the benefits of a powerful and mature optimising compiler 'under the hood' creating even more efficient executables for you!
If you're worried about compilation speed, I really don't think that's going to be an issue, especially with gcc (which I'm guessing/assuming will be the C compiler). And if you don't want optimisations that can slow down compilation, you'll be able to set it to -O0 (no optimisation) during development, and only set it to -O1 or -O2 or -O3 etc for your Release build, if you wish. (I say with confidence that these options will be available to us because it's literally just a C compiler parameter flag - trivial for Fred to add support for)
For info about optimisation levels see https://www.linuxtopia.org/online_books ... ro_49.html
I couldn't be more happier or excited

-
- Addict
- Posts: 1517
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Blog post !
I'm not sure about this.Keya wrote:I say with confidence that these options will be available
The higher the level of optimization, the more rights the optimizer has to throw out code. If this is not foreseen when translating from basic to C, the code will be inoperative!
Now we do not know anything about the translation from basic to C. I hope Fred comments on this somehow?
Re: Blog post !
Yes, just as they already do with software written in C ... and PB will become C code, so I don't see how it's a problem!? And if the developer experiences problems with say -O3 they can drop back to -O2 or -O1 or -O0 etcUser_Russian wrote:I'm not sure about this. The higher the level of optimization, the more rights the optimizer has to throw out code.

Although, perhaps there might be certain functions used in PB where Fred might want to say "you can't use these (...) particular compiler flags with this particular function" though, for whatever reason, and I'm ok with that
But we're both just speculating here

Re: Blog post !
Dawn will come inevitably.
Re: Blog post !
I have a lot of include and modules in which I use inline ASM code for speed optimization.
Can I still use them for x86 and x86-64 processor architecture or do they become invalid in future PB versions?
Can I still use them for x86 and x86-64 processor architecture or do they become invalid in future PB versions?
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: Blog post !
Hi folks,
I love reading your speculative thoughts. We should perhaps keep in mind that there is still quite little to be gleaned from the official blog.
I think that too high expectations now are just as premature as concerns or fears.
Let's wait for the first BETA or ALPHA version.
As an optimistic realist, i am looking forward to this new development.
I love reading your speculative thoughts. We should perhaps keep in mind that there is still quite little to be gleaned from the official blog.
I think that too high expectations now are just as premature as concerns or fears.
Let's wait for the first BETA or ALPHA version.
As an optimistic realist, i am looking forward to this new development.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).