Removing 'ASCII' switch from PureBasic

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Danilo
Addict
Addict
Posts: 3037
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Removing 'ASCII' switch from PureBasic

Post by Danilo »

marroh wrote:And your other reasons like "... or when developping an user lib (everybody is unicode)" I feel as void because user libs in pb was no topic since x years. Not because the unicode / ascii thing, because the win / mac / linux thing.
PB internal libraries use the same "user libraries" system. Compiled lib (.lib/.obj) and a description file (.desc) compiled into
a PureBasic library. It seems like they write at least 4 functions in C for every PB function:
- Function()
- Function_Debug()
- Function_Unicode()
- Function_Unicode_Debug().

As far as I understand that's the main reason for removing Ascii support. 2 out of 4 above functions
could be eliminated and built-times are faster, too.
Making low-level-API PB-Libs for Ascii and Unicode is not always as easy as with PB, where you only check
"[X] Create Unicode executable", and everything just works, if coded properly.
marroh wrote:I think remove the ascii support makes PB definitely NOT modern. :(
AFAIK many new programming languages (last 15 years) are UNICODE only by default (like .NET),
so I think it is not a big problem for most people.
I remember one console application where I had to use ASCII mode explicitly, because it didn't work
otherwise. Most external console apps are ASCII only, and some have problems with UNICODE pipe stuff
or something like that. Beside that, I did always write everything for UNICODE and ASCII mode for
some years, including writing big wrappers for external libraries/DLLs, and it was never a big problem
by using all possibilities (including pseudo-types like p-ascii and p-utf8). Most of the bugs with
this stuff should be fixed already.
marroh
User
User
Posts: 72
Joined: Wed Aug 06, 2008 8:21 am

Re: Removing 'ASCII' switch from PureBasic

Post by marroh »

Danilo wrote:
marroh wrote:And your other reasons like "... or when developping an user lib (everybody is unicode)" I feel as void because user libs in pb was no topic since x years. Not because the unicode / ascii thing, because the win / mac / linux thing.
PB internal libraries use the same "user libraries" system. Compiled lib (.lib/.obj) and a description file (.desc) compiled into
a PureBasic library. It seems like they write at least 4 functions in C for every PB function:
- Function()
- Function_Debug()
- Function_Unicode()
- Function_Unicode_Debug().

As far as I understand that's the main reason for removing Ascii support. 2 out of 4 above functions
could be eliminated and built-times are faster, too.
Making low-level-API PB-Libs for Ascii and Unicode is not always as easy as with PB, where you only check
"[X] Create Unicode executable", and everything just works, if coded properly.
marroh wrote:I think remove the ascii support makes PB definitely NOT modern. :(
AFAIK many new programming languages (last 15 years) are UNICODE only by default (like .NET),
so I think it is not a big problem for most people.
I remember one console application where I had to use ASCII mode explicitly, because it didn't work
otherwise. Most external console apps are ASCII only, and some have problems with UNICODE pipe stuff
or something like that. Beside that, I did always write everything for UNICODE and ASCII mode for
some years, including writing big wrappers for external libraries/DLLs, and it was never a big problem
by using all possibilities (including pseudo-types like p-ascii and p-utf8). Most of the bugs with
this stuff should be fixed already.
Your opinion, my opinion I have addressed to Fred. And when you wrote many new programing languages does this an that... many other programing language supports also oop and builds targets for mobile devices but this means not pb should also support this. However, unicode is no option for me and so i simple said i have to stop using pb if pb no longer can builds ascii exe. And if i leave pb it is not dramatic, just a fact thats unicode is no option for me.
PureBASIC v5.41 LTS , Windows v8.1 x64
Forget UNICODE - Keep it BASIC !
Fred
Administrator
Administrator
Posts: 16620
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Removing 'ASCII' switch from PureBasic

Post by Fred »

To be more precise, we have:

Function() (ascii)
Function_UNICODE (unicode)
Function_Debug() (runtime debug)

That's for standard function using strings. Now, if we have a "threaded" version as well, we get:

Function() (ascii)
Function_THREAD() (ascii + threaded)
Function_UNICODE (unicode)
Function_UNICODE_THREAD (unicode + threaded)
Function_Debug() (runtime debug)
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Removing 'ASCII' switch from PureBasic

Post by kenmo »

No ASCII compile would be big change, but I approve if it simplifies your development and modernizes the language.

As long as there are some helper functions, I am not too worried about converting code...
In fact I have been trying to use Unicode more, forcing myself to change.

My only concern is the performance decrease that some people are reporting!
User avatar
oryaaaaa
Enthusiast
Enthusiast
Posts: 791
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: Removing 'ASCII' switch from PureBasic

Post by oryaaaaa »

I want to support ASCII / Unicode both.

I create super high quality sound player "Bug head Emperor". Ascii binary and Unicode binary,
2 package distribute.

in High quality sound player, Unicode binary is poor sound. Many users (10,000+) said
"Ascii binary is best sound, Unicode binary is poor sound"

When is the Unicode version is sound quality, includes digital noise to the stream of USB-DAC,
the sound quality will be degraded. There are users of more than 8,000 people in Japan.
1000 people in Russia, there are 2000 users in China.
This hinders the development and will be one unified to Unicode.

Please support Ascii binary and Unicode binary in PB compiler.
and check sound quality Bug head Emperor 3.42 beta.

Bughead.exe : Unicode binary
Bughead_HQ.exe: Ascii binary

Mircosoft OneDrive - Bug head
http://1drv.ms/1nBAKyD
* Please check "Bug head Emperor 3.42 beta"
* Compiler version PureBasic Ver5.30

Thank you
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Removing 'ASCII' switch from PureBasic

Post by PB »

I used to avoid Unicode like the plague until I read this article:

http://www.joelonsoftware.com/articles/Unicode.html

PureBasic is moving in the right direction. Unicode is the future.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
useful
Enthusiast
Enthusiast
Posts: 367
Joined: Fri Jul 19, 2013 7:36 am

Re: Removing 'ASCII' switch from PureBasic

Post by useful »

If this decision will be continued in the removal of restrictions on the names of identifiers (variables,procedures,macros,constants) I will be very happy :)
Dawn will come inevitably.
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: Removing 'ASCII' switch from PureBasic

Post by User_Russian »

useful, as I understand, plan to remove only support ASCII. About modernization the compiler, nothing is written. I'm not sure that the compiler will support UTF-8, but this question should answer Fred.
In version 5.30, the compiler does not support UTF-8 and is a great limitation. For example, if the source code is encoded in UFT-8 and enabled Unicode support, then this code will not compile.

Code: Select all

DataSection
  IncludeBinary "C:\Программы\Prog.exe"
EndDataSection
Description of error.
[COMPILER] Line 2: Included file Not found: C:\?????????\Prog.exe.
The same error with other Include-commands (IncludeFile, XIncludeFile and IncludePath).
If encoding is plain text, and Unicode support is disabled, there is no problem.

Removed, ASCII undesirable. Because it would limit the possibilities of the PB and complicate programming

I have no idea like Fred may think that the removal of ASCII that improving PB. :shock: :shock:
Fred wrote:- Makes PB definitely more modern.
PB does not support many modern programming techniques (for example OOP), and the removal of existing capabilities can not be considered as modern.
As for OOP, I many times to solve tasks that using OOP is easier to solve than using procedural programming. It is a pity that Fred is so bad relates to OOP. This complicates the some tasks.
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: Removing 'ASCII' switch from PureBasic

Post by Poshu »

What baffles me is that any developer still write things not in unicode. Please, remove the ascii switch, it is definitely not a problem as long as you still allow peeks/pokes to handle an ascii mode.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Removing 'ASCII' switch from PureBasic

Post by PB »

> What baffles me is that any developer still write things not in unicode

Totally agreed. From the article that I linked to above:
Joel on Software wrote:In this article I'll fill you in on exactly what every working programmer should know. All that stuff about "plain text = ascii = characters are 8 bits" is not only wrong, it's hopelessly wrong, and if you're still programming that way, you're not much better than a medical doctor who doesn't believe in germs. Please do not write another line of code until you finish reading this article.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
useful
Enthusiast
Enthusiast
Posts: 367
Joined: Fri Jul 19, 2013 7:36 am

Re: Removing 'ASCII' switch from PureBasic

Post by useful »

User_Russian wrote:...., as I understand, plan to remove only support ASCII. About modernization the compiler, nothing is written. I'm not sure that the compiler will support UTF-8, but this question should answer Fred.
....
I do not hope that Fred is this idea will be supported, but dreaming, have the full right :)
Dawn will come inevitably.
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Removing 'ASCII' switch from PureBasic

Post by luis »

A big LOL at all the misuse of the "modernization" word.
You could say PB has been "modernized" by adding unicode if that were missing, because it's undoubtedly needed today and indeed it would modernize the language. Or if PB were introducing x64 code generation, an enormous step forward for an indie compiler.

Removing stuff from a compiler does not "modernize" it and should be plain obvious, it just remove features and in some way make it less legacy compatible if you want. Removing something seldom needed anymore can be justifiable and saw as a way to streamline the compiler, making it easy to maintain or whatever. Anything you want but does not modernize it at all since nothing is added that was missing before. The compiler is still the same with less capabilities.

So please stop talking about modernization, especially when PB is still generating sometime wrong code for basic logical expressions after 10+ years of life, because it just sounds comical, at least to me.

And about all the incredulity about people not wanting to use unicode in some cases. There is nothing to be scandalized about.
Just read again the posts explaining the reasons. No one is saying this thing will make impossible to use PB with ascii data.
Just less easy, maybe a little slow, maybe requiring some more code, maybe a little more bloated, etc. All this would be avoidable using ascii as it is available now.

I don't understand why you can't simply state your concrete reasons pro and against, using your own words if possible instead of quotations, and let others do the same without labeling them as dinosaurs wanting to program in ascii with CP/M-80, as they were missing something you acutely grasped. They have their reasons, and collect them here is the purpose of this thread.
"Have you tried turning it off and on again ?"
A little PureBasic review
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Removing 'ASCII' switch from PureBasic

Post by wilbert »

Fred, if you are considering to make this switch to unicode only, please also consider to raise the minimum requirements of the 5.40 release to include SSE2.
SSE2 has been around for 14 years and all x86-64 CPUs are supporting it. You could probably improve the speed of several parts of PB significantly by using SSE2 optimized routines.
Windows (x64)
Raspberry Pi OS (Arm64)
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: Removing 'ASCII' switch from PureBasic

Post by Poshu »

luis wrote:things
Well, pro reasons are obvious :
_make some truly international programs
_make some use of those nice standards
_Less work for pb's team

Con is obvious also:
_I don't want to learn anything new and I fear it'll break my software even though I didn't even tried to compile it in unicode.
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: Removing 'ASCII' switch from PureBasic

Post by User_Russian »

Not all applications can be compiled in Unicode without substantial modifications to the code.
Example. http://www.purebasic.fr/english/viewtop ... 33#p450133
And what for is necessary Unicode if the application (eg DLL) enough ASCII? In order to work with strings become even slower?

Do not write that Unicode is cool! Not all applications really need Unicode!
Post Reply