Re: DMD now has colorized syntax highlighting in error messages

2017-05-18 Thread MysticZach via Digitalmars-d-announce
On Thursday, 18 May 2017 at 01:52:17 UTC, Adam D. Ruppe wrote: On Tuesday, 16 May 2017 at 14:17:41 UTC, Adam D. Ruppe wrote: Similarly, what I want to see in the future is highlighting of specific parts of code where the error applies. Fear me. I combined Walter's code with my own to form

Re: DMD now has colorized syntax highlighting in error messages

2017-05-17 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 14:17:41 UTC, Adam D. Ruppe wrote: Similarly, what I want to see in the future is highlighting of specific parts of code where the error applies. Fear me. I combined Walter's code with my own to form some kind of Voltron! https://github.com/dlang/dmd/pull/6806

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Random D user via Digitalmars-d-announce
On Sunday, 14 May 2017 at 14:07:20 UTC, Walter Bright wrote: https://github.com/dlang/dmd/pull/6777 It turned out to be unexpectedly easy to implement. Nice. But color highlighting should always be configurable (otherwise it's half done), because there are a lot of people who like colors,

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 15:38:53 UTC, Walter Bright wrote: It includes DOS and Windows consoles. Only under specific circumstances. On the VGA hardware, underline shares a bit with blue and needs a register tweaked to make it visible (the default 16 color VGA text mode does NOT display

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Walter Bright via Digitalmars-d-announce
On 5/16/2017 8:25 AM, Adam D. Ruppe wrote: It's also possible to use underlining. Yeah, on some systems, but not really on Windows or even all linux terminals. Color has broader support, though you do want to be careful not to *depend* on color either. I've never met an ASCII console that

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, May 16, 2017 08:11:21 Walter Bright via Digitalmars-d-announce wrote: > On 5/16/2017 7:17 AM, Adam D. Ruppe wrote: > > So again it is NOT color that bothers me. It is OVERUSE of color for > > stuff that isn't important to read the message which dilutes the > > meaning of color. It

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 15:11:21 UTC, Walter Bright wrote: error: undefined identifier maybe Colorizing code distinguishes it from text. What's important there? The generic syntax that you get from a syntax highlighter or the fact that it is the user input? Drawing attention to

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, May 16, 2017 at 08:11:21AM -0700, Walter Bright via Digitalmars-d-announce wrote: > On 5/16/2017 7:17 AM, Adam D. Ruppe wrote: > > So again it is NOT color that bothers me. It is OVERUSE of color for > > stuff that isn't important to read the message which dilutes the > > meaning of

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Walter Bright via Digitalmars-d-announce
On 5/16/2017 7:17 AM, Adam D. Ruppe wrote: So again it is NOT color that bothers me. It is OVERUSE of color for stuff that isn't important to read the message which dilutes the meaning of color. It isn't special anymore. Perhaps. I know I have some trouble distinguishing code from explanatory

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Mike James via Digitalmars-d-announce
On Sunday, 14 May 2017 at 14:07:20 UTC, Walter Bright wrote: https://github.com/dlang/dmd/pull/6777 It turned out to be unexpectedly easy to implement. The only downside is now we have to rather tediously tweak the error message texts so they use backticks. The next step is Color D...

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 14:04:34 UTC, Walter Bright wrote: With all the complaints about color, note that dmd already has been using color in error messages for years with no complaints My complaint isn't about the presence of color* but rather about the OVERUSE of it. The old way of

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Walter Bright via Digitalmars-d-announce
On 5/16/2017 1:07 AM, Ali Çehreli wrote: Color is informative to humans, so I'm all for it. I agree with others that it may be hard to please everyone. Is it possible to use the default scheme of the terminal? With all the complaints about color, note that dmd already has been using color in

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Joakim via Digitalmars-d-announce
On Monday, 15 May 2017 at 08:08:20 UTC, Paolo Invernizzi wrote: On Monday, 15 May 2017 at 04:33:39 UTC, ketmar wrote: On Monday, 15 May 2017 at 03:09:09 UTC, Walter Bright wrote: On 5/14/2017 7:44 PM, ketmar wrote: sorry for being rude, Then please do not post rude comments. We expect

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Ali Çehreli via Digitalmars-d-announce
On 05/14/2017 07:07 AM, Walter Bright wrote: https://github.com/dlang/dmd/pull/6777 It turned out to be unexpectedly easy to implement. The only downside is now we have to rather tediously tweak the error message texts so they use backticks. Color is informative to humans, so I'm all for it.

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Jacob Carlborg via Digitalmars-d-announce
On 2017-05-15 23:33, Adam D. Ruppe wrote: On Monday, 15 May 2017 at 15:40:58 UTC, Walter Bright wrote: That's why such needs to be turned into a generic module, instead of constantly being reinvented. What I'm saying is that it IS a generic module... in fact, there's several of them:

Re: DMD now has colorized syntax highlighting in error messages

2017-05-15 Thread Walter Bright via Digitalmars-d-announce
On 5/15/2017 8:35 AM, Adam D. Ruppe wrote: On Monday, 15 May 2017 at 14:18:30 UTC, Walter Bright wrote: I eventually want to make the console color package into a generic module, it could improve a number of console apps. FYI we already have a few D modules that do console color (among other

Re: DMD now has colorized syntax highlighting in error messages

2017-05-15 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 15 May 2017 at 14:31:20 UTC, Walter Bright wrote: I'm glad this sparks interest in improving the error message display, this is good. I've been meaning to do this for years... I want overload resolution and template constraints to tell which conditions were passed, failed, and

Re: DMD now has colorized syntax highlighting in error messages

2017-05-15 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 15 May 2017 at 14:18:30 UTC, Walter Bright wrote: I eventually want to make the console color package into a generic module, it could improve a number of console apps. FYI we already have a few D modules that do console color (among other things) like consoled or my terminal.d.

Re: DMD now has colorized syntax highlighting in error messages

2017-05-15 Thread Walter Bright via Digitalmars-d-announce
On 5/15/2017 6:10 AM, Adam D. Ruppe wrote: Suppose I, or someone else, were to write a PR eliminating your syntax highlighting in favor of semantic highlighting - colorizing to add more detail about the error message instead of about the lexer's output. Will you accept it? I'm glad this sparks

Re: DMD now has colorized syntax highlighting in error messages

2017-05-15 Thread Walter Bright via Digitalmars-d-announce
On 5/15/2017 1:05 AM, Jonathan M Davis via Digitalmars-d-announce wrote: I haven't gotten the chance to look at the dmd error messages yet to see how they look, They're a little garish at the moment, but that's just to make sure it's working correctly. I expect to tune it a bit, especially

Re: DMD now has colorized syntax highlighting in error messages

2017-05-15 Thread Adam D. Ruppe via Digitalmars-d-announce
On Sunday, 14 May 2017 at 14:07:20 UTC, Walter Bright wrote: The only downside is now we have to rather tediously tweak the error message texts so they use backticks. It also dilutes the meaning of color. I've been wanting to see highlighted matches and failures in overload resolution and

Re: DMD now has colorized syntax highlighting in error messages

2017-05-15 Thread Paolo Invernizzi via Digitalmars-d-announce
On Monday, 15 May 2017 at 04:33:39 UTC, ketmar wrote: On Monday, 15 May 2017 at 03:09:09 UTC, Walter Bright wrote: On 5/14/2017 7:44 PM, ketmar wrote: sorry for being rude, Then please do not post rude comments. We expect professional decorum here. sorry. i never got any money for using

Re: DMD now has colorized syntax highlighting in error messages

2017-05-15 Thread Jacob Carlborg via Digitalmars-d-announce
On 2017-05-15 01:17, Vladimir Panteleev wrote: No problem, it could only print out the line if the output is a terminal, same as for how it decides whether to output colors by default. Ah, that would be fine. -- /Jacob Carlborg

[OFF TOPIC] Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Russel Winder via Digitalmars-d-announce
On Sun, 2017-05-14 at 20:09 -0700, Walter Bright via Digitalmars-d- announce wrote: > On 5/14/2017 7:44 PM, ketmar wrote: > > sorry for being rude, > > Then please do not post rude comments. We expect professional decorum > here. But in politics lying and being rude is completely the norm. Also,

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Walter Bright via Digitalmars-d-announce
On 5/14/2017 7:44 PM, ketmar wrote: sorry for being rude, Then please do not post rude comments. We expect professional decorum here.

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Russel Winder via Digitalmars-d-announce
On Mon, 2017-05-15 at 05:44 +0300, ketmar via Digitalmars-d-announce wrote: > […] > sorry for being rude, but this is exactly the example of things > programmers > like to write: fun, quite easy, and absolutely useless. most of the > time it > will be filtered away by ide/editor, and otherwise

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread ketmar via Digitalmars-d-announce
Walter Bright wrote: https://github.com/dlang/dmd/pull/6777 It turned out to be unexpectedly easy to implement. The only downside is now we have to rather tediously tweak the error message texts so they use backticks. sorry for being rude, but this is exactly the example of things

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Basile B. via Digitalmars-d-announce
On Sunday, 14 May 2017 at 23:17:42 UTC, Vladimir Panteleev wrote: On Sunday, 14 May 2017 at 19:11:32 UTC, Basile B. wrote: Yes +1 for configurable. IDEs already parse and make things clickable. It's not just +1, it's mandatory. If you implement this you must add a new compiler switch. No

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Vladimir Panteleev via Digitalmars-d-announce
On Sunday, 14 May 2017 at 19:11:32 UTC, Basile B. wrote: Yes +1 for configurable. IDEs already parse and make things clickable. It's not just +1, it's mandatory. If you implement this you must add a new compiler switch. No problem, it could only print out the line if the output is a

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread MysticZach via Digitalmars-d-announce
On Sunday, 14 May 2017 at 16:25:36 UTC, Walter Bright wrote: On 5/14/2017 9:04 AM, Andre Pany wrote: Thanks a lot. In my opinion these kind of changes are small but have huge impact on the acceptance of a language. I agree. A couple other improvements needed for error messages: In the PR

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread cym13 via Digitalmars-d-announce
On Sunday, 14 May 2017 at 19:11:32 UTC, Basile B. wrote: On Sunday, 14 May 2017 at 17:54:38 UTC, Jacob Carlborg wrote: On 2017-05-14 18:25, Walter Bright wrote: 1. print out the offending line I hope this one will be optional/configurable. I don't think it necessary to print the offending

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Basile B. via Digitalmars-d-announce
On Sunday, 14 May 2017 at 17:54:38 UTC, Jacob Carlborg wrote: On 2017-05-14 18:25, Walter Bright wrote: 1. print out the offending line I hope this one will be optional/configurable. I don't think it necessary to print the offending line within an editor/IDE. They usually can already map

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Jacob Carlborg via Digitalmars-d-announce
On 2017-05-14 18:25, Walter Bright wrote: 1. print out the offending line I hope this one will be optional/configurable. I don't think it necessary to print the offending line within an editor/IDE. They usually can already map the error to the offending line. -- /Jacob Carlborg

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Walter Bright via Digitalmars-d-announce
On 5/14/2017 9:04 AM, Andre Pany wrote: Thanks a lot. In my opinion these kind of changes are small but have huge impact on the acceptance of a language. I agree. A couple other improvements needed for error messages: 1. print out the offending line 2. have a clickable link to a more

Re: DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Andre Pany via Digitalmars-d-announce
On Sunday, 14 May 2017 at 14:07:20 UTC, Walter Bright wrote: https://github.com/dlang/dmd/pull/6777 It turned out to be unexpectedly easy to implement. The only downside is now we have to rather tediously tweak the error message texts so they use backticks. Thanks a lot. In my opinion these

DMD now has colorized syntax highlighting in error messages

2017-05-14 Thread Walter Bright via Digitalmars-d-announce
https://github.com/dlang/dmd/pull/6777 It turned out to be unexpectedly easy to implement. The only downside is now we have to rather tediously tweak the error message texts so they use backticks.