Re: [fpc-devel] Compiler message colour scheme

2020-11-25 Thread Sven Barth via fpc-devel
Am 25.11.2020 um 15:44 schrieb Tomas Hajny via fpc-devel: On 2020-11-25 14:40, Sven Barth via fpc-devel wrote: Tomas Hajny via fpc-devel schrieb am Mi., 25. Nov. 2020, 13:31: On 2020-11-25 10:31, Nikolai Zhubr via fpc-devel wrote: > 25.11.2020 1:52, Tomas Hajny via fpc-devel:  .  . How curr

Re: [fpc-devel] Compiler message colour scheme

2020-11-25 Thread Bart via fpc-devel
On Wed, Nov 25, 2020 at 1:31 PM Tomas Hajny via fpc-devel wrote: > I get the following result (regardless from the registry setting): > > dwMode = 3 > SCM: 87 > FALSE C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test dwMode = 3 TRUE Microsoft Windows [Version 10.0.19041.630] -- Bart __

Re: [fpc-devel] Compiler message colour scheme

2020-11-25 Thread Tomas Hajny via fpc-devel
On 2020-11-25 14:40, Sven Barth via fpc-devel wrote: Tomas Hajny via fpc-devel schrieb am Mi., 25. Nov. 2020, 13:31: On 2020-11-25 10:31, Nikolai Zhubr via fpc-devel wrote: > 25.11.2020 1:52, Tomas Hajny via fpc-devel: . . How current is your Windows 10? VT100 support was added only two ye

Re: [fpc-devel] Compiler message colour scheme

2020-11-25 Thread Sven Barth via fpc-devel
Tomas Hajny via fpc-devel schrieb am Mi., 25. Nov. 2020, 13:31: > On 2020-11-25 10:31, Nikolai Zhubr via fpc-devel wrote: > > 25.11.2020 1:52, Tomas Hajny via fpc-devel: > > > > > Hi Nikolai, > > >> No problem, thanks for testing. Unfortunately, it doesn't work for me > >> under Windows (Win 10 P

Re: [fpc-devel] Compiler message colour scheme

2020-11-25 Thread Tomas Hajny via fpc-devel
On 2020-11-25 10:31, Nikolai Zhubr via fpc-devel wrote: 25.11.2020 1:52, Tomas Hajny via fpc-devel: Hi Nikolai, No problem, thanks for testing. Unfortunately, it doesn't work for me under Windows (Win 10 Pro 64-bit) either with the original version or Have you also checked with this regi

Re: [fpc-devel] Compiler message colour scheme

2020-11-25 Thread Nikolai Zhubr via fpc-devel
Hi! 25.11.2020 1:52, Tomas Hajny via fpc-devel: On 2020-11-24 19:17, J. Gareth Moreton via fpc-devel wrote: Sorry for being a bit slow - I've been doing my own work on x86. I gave your patch (and new file) a test run on x86_64-win64, and that seems to work fine. At least the warning messages i

Re: [fpc-devel] Compiler message colour scheme

2020-11-24 Thread Tomas Hajny via fpc-devel
On 2020-11-24 19:17, J. Gareth Moreton via fpc-devel wrote: Sorry for being a bit slow - I've been doing my own work on x86. I gave your patch (and new file) a test run on x86_64-win64, and that seems to work fine.  At least the warning messages in the packages appear magenta.  I'll give arm-linu

Re: [fpc-devel] Compiler message colour scheme

2020-11-24 Thread J. Gareth Moreton via fpc-devel
Sorry for being a bit slow - I've been doing my own work on x86. I gave your patch (and new file) a test run on x86_64-win64, and that seems to work fine.  At least the warning messages in the packages appear magenta.  I'll give arm-linux a test next. Gareth aka. Kit On 24/11/2020 01:21, J. G

Re: [fpc-devel] Compiler message colour scheme

2020-11-23 Thread J. Gareth Moreton via fpc-devel
I'm doing some optimisation development for x86_64 currently, so I can give it a test run if you like - got the Raspberry Pi for arm-linux and aarch64-linux too, but it might take more then a day.  I'll let you know. Gareth aka. Kit On 24/11/2020 01:13, Tomas Hajny via fpc-devel wrote: On 202

Re: [fpc-devel] Compiler message colour scheme

2020-11-23 Thread Tomas Hajny via fpc-devel
On 2020-11-24 01:14, J. Gareth Moreton via fpc-devel wrote: I'd say thie first port of call is "compiler/comphook.pas", line 258: procedure WriteColoredOutput(var t: Text;color: TOutputColor;const s : AnsiString); It looks like a simple "$if defined". Yes, and the more platforms are added, th

Re: [fpc-devel] Compiler message colour scheme

2020-11-23 Thread J. Gareth Moreton via fpc-devel
I'd say thie first port of call is "compiler/comphook.pas", line 258: procedure WriteColoredOutput(var t: Text;color: TOutputColor;const s : AnsiString); It looks like a simple "$if defined". Gareth aka. Kit On 24/11/2020 00:08, Ryan Joseph via fpc-devel wrote: On Nov 23, 2020, at 1:33 AM

Re: [fpc-devel] Compiler message colour scheme

2020-11-23 Thread Ryan Joseph via fpc-devel
> On Nov 23, 2020, at 1:33 AM, Michael Van Canneyt via fpc-devel > wrote: > > I ran the compiler on linux through a ssh session: > > The colors display just fine, so I see no reason to disable on darwin except > that the termio unit is not found... If Florian wants to provide some explanatio

Re: [fpc-devel] Compiler message colour scheme

2020-11-23 Thread Michael Van Canneyt via fpc-devel
On Sun, 22 Nov 2020, Jonas Maebe via fpc-devel wrote: On 22/11/2020 17:42, Sven Barth via fpc-devel wrote: Am 22.11.2020 um 17:40 schrieb J. Gareth Moreton via fpc-devel: Most modern Macs are Unix-based, so the escape sequences should work, right? Granted, I think we need someone with a Mac

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Sven Barth via fpc-devel
Am 23.11.2020 um 01:59 schrieb J. Gareth Moreton via fpc-devel: I'm glad there's still interest in pure functions.  It may be a while though, and I'm being tempted with a bounty and Patreon pledges to implement "static single assignment" into the Free Pascal Compiler.  That will take some resea

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Alexander Grotewohl via fpc-devel
devel on behalf of J. Gareth Moreton via fpc-devel Sent: Sunday, November 22, 2020 7:59 PM To: Ryan Joseph via fpc-devel Cc: J. Gareth Moreton Subject: Re: [fpc-devel] Compiler message colour scheme I'm getting there. I keep getting distracted or lost though! Hardware failures don't h

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
I'm getting there.  I keep getting distracted or lost though! Hardware failures don't help! I'm trying a different approach this time and writing a whitepaper like I've done with my more major changes for Free Pascal, so I can describe its uses and how it works etc.  It can be updated of cours

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Ryan Joseph via fpc-devel
> On Nov 22, 2020, at 10:09 AM, J. Gareth Moreton via fpc-devel > wrote: > > Personally I'd write the function as something like "function > GenerateColorCode(codes: array of Byte): ansistring;", mostly in anticipation > of pure functions, because then the compiler can just replace the call

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
But to go back to the point I originally raised, Kirinn raised a good point about those who have white rather than black backgrounds, or any colour so long as it's /not/ black! Yellow is very hard to see against a bright white backdrop, while red, medium/dark green and magenta can be seen on mo

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
Personally I'd write the function as something like "function GenerateColorCode(codes: array of Byte): ansistring;", mostly in anticipation of pure functions, because then the compiler can just replace the call with the relevant string at compile time, but that's a long way off! Gareth aka. K

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Ryan Joseph via fpc-devel
> On Nov 22, 2020, at 9:29 AM, Florian Klämpfl via fpc-devel > wrote: > > Because I have no Mac so I couldn't test it. I see. It's this easy. const ANSI_FORE_BLACK = 30; ANSI_FORE_RED = 31; ANSI_FORE_GREEN = 32; ANSI_FORE_YELLOW = 33; ANSI_

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
That's a fair point. Good call. Gareth aka. Kit On 22/11/2020 15:44, Kirinn via fpc-devel wrote: The feature request was here: https://bugs.freepascal.org/view.php?id=37331 It's magenta because GCC etc use magenta for warnings too. Actually, for those of us with white terminal backgrounds, y

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Jonas Maebe via fpc-devel
On 22/11/2020 17:42, Sven Barth via fpc-devel wrote: > Am 22.11.2020 um 17:40 schrieb J. Gareth Moreton via fpc-devel: >> Most modern Macs are Unix-based, so the escape sequences should work, >> right? Granted, I think we need someone with a Mac or a Mac virtual >> machine to test it for sure. > >

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Sven Barth via fpc-devel
Am 22.11.2020 um 17:40 schrieb J. Gareth Moreton via fpc-devel: Most modern Macs are Unix-based, so the escape sequences should work, right? Granted, I think we need someone with a Mac or a Mac virtual machine to test it for sure. Considering that Jonas doesn't support the textmode IDE on macO

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Sven Barth via fpc-devel
Am 22.11.2020 um 17:19 schrieb J. Gareth Moreton via fpc-devel: I believe that to enable colour on a Windows console, you need to use an API function, which can get a bit clumsy because there isn't an equivalent to \e[0m to reset to default, so you have to retrieve the current console colour

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
Most modern Macs are Unix-based, so the escape sequences should work, right? Granted, I think we need someone with a Mac or a Mac virtual machine to test it for sure. Gareth aka. Kit On 22/11/2020 16:29, Florian Klämpfl via fpc-devel wrote: Am 22.11.2020 um 17:23 schrieb Ryan Joseph via fpc-d

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Florian Klämpfl via fpc-devel
Am 22.11.2020 um 17:23 schrieb Ryan Joseph via fpc-devel: On Nov 22, 2020, at 8:57 AM, Jonas Maebe via fpc-devel wrote: It's only enabled on Linux and Windows currently. Why is that? Mac has colors in the terminal also. Because I have no Mac so I couldn't test it. __

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Ryan Joseph via fpc-devel
> On Nov 22, 2020, at 8:57 AM, Jonas Maebe via fpc-devel > wrote: > > It's only enabled on Linux and Windows currently. Why is that? Mac has colors in the terminal also. Regards, Ryan Joseph ___ fpc-devel maillist - fpc-devel@lists.freep

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
I believe that to enable colour on a Windows console, you need to use an API function, which can get a bit clumsy because there isn't an equivalent to \e[0m to reset to default, so you have to retrieve the current console colour beforehand.  Windows 10 /might/ accept the ANSI escape sequences,

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
Fair enough then!  I always thought yellow was for warnings, red was for errors and white was for notes, but if GCC says otherwise, I can't argue! Gareth aka. Kit On 22/11/2020 16:08, Sven Barth via fpc-devel wrote: Am 22.11.2020 um 15:59 schrieb J. Gareth Moreton via fpc-devel: Hi everyone,

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Sven Barth via fpc-devel
Am 22.11.2020 um 16:44 schrieb Kirinn via fpc-devel: The feature request was here: https://bugs.freepascal.org/view.php?id=37331 It's magenta because GCC etc use magenta for warnings too. Actually, for those of us with white terminal backgrounds, yellow text would be hard to see, while green,

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Sven Barth via fpc-devel
Am 22.11.2020 um 15:59 schrieb J. Gareth Moreton via fpc-devel: Hi everyone, This might be me being a little bit picky, but I noticed the new colouring scheme for words like "Warning" and "Error" in the output logs.  Is there any particular reason why "Warning" is in magenta?  Normally the co

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Kirinn via fpc-devel
The feature request was here: https://bugs.freepascal.org/view.php?id=37331 It's magenta because GCC etc use magenta for warnings too. Actually, for those of us with white terminal backgrounds, yellow text would be hard to see, while green, red, and magenta appear quite well against both a bla

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Sven Barth via fpc-devel
Michael Van Canneyt via fpc-devel schrieb am So., 22. Nov. 2020, 17:03: > > > On Sun, 22 Nov 2020, Jonas Maebe via fpc-devel wrote: > > > On 22/11/2020 16:03, Ryan Joseph via fpc-devel wrote: > >> What version of the trunk is this in and what's the flag to enable it? > My trunk is maybe 30 days o

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Michael Van Canneyt via fpc-devel
On Sun, 22 Nov 2020, Jonas Maebe via fpc-devel wrote: On 22/11/2020 16:03, Ryan Joseph via fpc-devel wrote: What version of the trunk is this in and what's the flag to enable it? My trunk is maybe 30 days old and I don't see any way to get the colors. It's only enabled on Linux and Windows

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Jonas Maebe via fpc-devel
On 22/11/2020 16:03, Ryan Joseph via fpc-devel wrote: > What version of the trunk is this in and what's the flag to enable it? My > trunk is maybe 30 days old and I don't see any way to get the colors. It's only enabled on Linux and Windows currently. Jonas _

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
I'm using the latest trunk on arm-linux.  I'm pretty sure it's in the FPC source and not some quirk with the Raspian OS's terminal because the escape sequences appear in the "Console In/Output" debug window in Lazarus. Gareth aka. Kit On 22/11/2020 15:03, Ryan Joseph via fpc-devel wrote: On

Re: [fpc-devel] Compiler message colour scheme

2020-11-22 Thread Ryan Joseph via fpc-devel
> On Nov 22, 2020, at 7:59 AM, J. Gareth Moreton via fpc-devel > wrote: > > Hi everyone, > > This might be me being a little bit picky, but I noticed the new colouring > scheme for words like "Warning" and "Error" in the output logs. Is there any > particular reason why "Warning" is in mag

[fpc-devel] Compiler message colour scheme

2020-11-22 Thread J. Gareth Moreton via fpc-devel
Hi everyone, This might be me being a little bit picky, but I noticed the new colouring scheme for words like "Warning" and "Error" in the output logs.  Is there any particular reason why "Warning" is in magenta?  Normally the convention is that it's yellow (and "Error" in red).  Granted, it'