Page 6 of 42
Re: PureBasic 6.00 Alpha 1 released !
Posted: Fri May 28, 2021 4:15 pm
by Lord
@walbus/Saki:
cas wrote: Fri May 28, 2021 11:52 am
Code: Select all
CompilerIf #PB_Compiler_Processor=#PB_Processor_C
Debug "c backend"
CompilerElse
Debug "fasm backend"
CompilerEndIf
This was a tip by cas!
Re: PureBasic 6.00 Alpha 1 released !
Posted: Fri May 28, 2021 7:33 pm
by Aleks_Longard
Fred!
It's very cool news!!!
My very very big thanks for new compiler!
With this new PureBasic i can delete my C compiler!
Re: PureBasic 6.00 Alpha 1 released !
Posted: Fri May 28, 2021 8:34 pm
by mback2k
Thank you very much, Fred and team! In my big projects only the following constructs stopped working with the C backend:
Code: Select all
ExtractJSONStructure(JSONValue(File), @Items\ServiceProviders(), ServiceProviderItem)
gives
Code: Select all
purebasic.c:7121:19: error: expected expression before 's_serviceprovideritem'
void* p672=(void*)s_serviceprovideritem;
^~~~~~~~~~~~~~~~~~~~~
and
Code: Select all
End SendNotifyMessage_(#HWND_BROADCAST, Temp\Application, 0, #MessageWindow)
gives
Code: Select all
purebasic.c:8059:1: error: 'PB_ExitCode' undeclared (first use in this function); did you mean 'PB_ErrorCode'?
PB_ExitCode=65535;
^~~~~~~~~~~
PB_ErrorCode
Unfortunately I am unable to reproduce these errors with smaller code snippets outside of my projects context.
Re: PureBasic 6.00 Alpha 1 released !
Posted: Sat May 29, 2021 9:52 am
by mk-soft
Please report bugs in Bug C-backEnd. PB_ExitCode has already been reported.
Re: PureBasic 6.00 Alpha 1 released !
Posted: Thu Jun 03, 2021 8:20 am
by Marc56us
It would be nice if PureBasic 6.00 also modernized the IDE and help theme,
following for example the one you put for
SpiderBasic.
(The same colors for the code on this forum would also be a plus.)
https://www.spiderbasic.com/documentati ... start.html
https://www.spiderbasic.com/documentati ... _help.html
For
possible new customers, the current PB IDE and Help theme: yellow background and Courier font reminds too much of old Windows 95 programs, or even Windows 3.x.

Re: PureBasic 6.00 Alpha 1 released !
Posted: Thu Jun 03, 2021 9:47 am
by User_Russian
Marc56us wrote: Thu Jun 03, 2021 8:20 amIt would be nice if PureBasic 6.00 also modernized the IDE and help theme
I disagree!
No need to modernized. Let it be as it is now.
Re: PureBasic 6.00 Alpha 1 released !
Posted: Thu Jun 03, 2021 12:08 pm
by Lord
User_Russian wrote: Thu Jun 03, 2021 9:47 am
Marc56us wrote: Thu Jun 03, 2021 8:20 amIt would be nice if PureBasic 6.00 also modernized the IDE and help theme
I disagree!
No need to modernized. Let it be as it is now.
I agree 100%. Let the IDE as it is.
Re: PureBasic 6.00 Alpha 1 released !
Posted: Thu Jun 03, 2021 1:01 pm
by ChrisR
I agree 100% with Marc56, Like what, tastes and colors
I personally find the default theme really bland and retro for a modern language. But with the benefit of being restful for eyes.
It would be good to modernize the default theme in my opinion and to follow the Windows's theme evolutions with an entire team dedicated to ergonomics.
Re: PureBasic 6.00 Alpha 1 released !
Posted: Thu Jun 03, 2021 1:37 pm
by BarryG
ChrisR wrote: Thu Jun 03, 2021 1:01 pmthe benefit of being restful for eyes
Discussion 14 years ago about the yellow being restful ->
viewtopic.php?f=7&t=29500
Re: PureBasic 6.00 Alpha 1 released !
Posted: Tue Jun 08, 2021 6:32 am
by marcoagpinto
I sent a private e-mail to Fred weeks ago and no reply
So I will make it public:
Will 6.0 use fast strings?
Strings are currently very slow because in every access to them PB scans until it reaches the end.
The idea would be to have the size of each string stored in a 32-bit number (up to 4 GB strings) and it would only seek for the end if all the 32-bits were set to 1 (meaning that the string could be over 4 GB).
I know this will consume more RAM but it could be in a setting for users to turn it on/off.
This is an idea worth checking for.
Thank you very much!
Also, change V6.0 licence to a yearly subscription so that you can get more money for development.
EDIT:
Also add a two-pass compiler to optimise the code, such as:
x+10+5+5
would become compiled as:
x+20
Re: PureBasic 6.00 Alpha 1 released !
Posted: Tue Jun 08, 2021 8:32 am
by Keya
marcoagpinto wrote: Tue Jun 08, 2021 6:32 am
Also add a two-pass compiler to optimise the code, such as:
x+10+5+5
would become compiled as:
x+20
That would be automatically handled by the gcc C compiler.
That's one of the real beauties of the new C backend - so many optimisations from one of the smartest compilers on the planet
Re: PureBasic 6.00 Alpha 1 released !
Posted: Tue Jun 08, 2021 2:20 pm
by Keya
If you're curious about all the optimisations that our source code will now be subject to with the new C backend, thanks to one of the best optimising compilers in the world - GCC - please check out this wikipedia page:
https://en.wikipedia.org/wiki/Optimizing_compiler
This also FREES Fred from having to focus on optimisation, now that a state-of-the-art compiler takes care of that, enabling Fred to focus on things like bugfixes and new features.
It was a very brave move for Fred to move to the C backend, but I can only see it as an absolute winner

A
POWERFUL upgrade.
Re: PureBasic 6.00 Alpha 1 released !
Posted: Wed Jun 09, 2021 1:25 am
by marcoagpinto
Keya wrote: Tue Jun 08, 2021 2:20 pm
If you're curious about all the optimisations that our source code will now be subject to with the new C backend, thanks to one of the best optimising compilers in the world - GCC - please check out this wikipedia page:
https://en.wikipedia.org/wiki/Optimizing_compiler
This also FREES Fred from having to focus on optimisation, now that a state-of-the-art compiler takes care of that, enabling Fred to focus on things like bugfixes and new features.
It was a very brave move for Fred to move to the C backend, but I can only see it as an absolute winner

A
POWERFUL upgrade.
@Keya
Will it also use "fast strings" out of the box for ultra speed?
Thanks!
Re: PureBasic 6.00 Alpha 1 released !
Posted: Wed Jun 09, 2021 1:30 am
by Keya
marcoagpinto wrote: Wed Jun 09, 2021 1:25 am
@Keya
Will it also use "fast strings" out of the box for ultra speed?
I would guess no, because C uses null-terminated "C strings" - the same as Purebasic has always used.
There have been
examples posted though of "fast strings" (eg storing the length before the string), but I'd be surprised if it became native
Re: PureBasic 6.00 Alpha 1 released !
Posted: Wed Jun 09, 2021 8:16 am
by hoerbie
Hi,
I would like to ask for a new Alpha 2 version, as there are now so many [Done] Bugs.
Greets, hoerbie