May 15, 2017
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 it is *harder* to
> read,
> 'cause it will almost certainly not match editor's syntax coloring
> settings,
> so reader will have to mentally strip the colors first.

Also the default colours chosen by the developer usually work well for the them and their (and if you are lucky reviewers) terminal settings and are totally useless for a huge section of using audience (most of whom remain silent for various reasons). Take Git for example. I end up having to run:

git … | more

to get rid of the colours. The default colours might work for the Git developers but fail dismally for me. I cannot be bothered to get into the detail of how to change the Git colouring so I use more to get rid of it.

I like having colours, for exactly the same reason colouring is good in source code editing, they can apply semantic (albeit often syntactic) coding, but all too often the colour choices are dreadful and too difficult to change. Hence all too often I have to:

emacs --color=no

I still like colouring, it is just that mostly it is done for a given terminal setting, and/or in a way too difficult to change locally.

> while much harder task -- showing which exactly template failed in
> template
> constraint -- is very hard to implement (i tried it, i know it), but
> will
> immediately benefit *anyone*, and will be really useful.
> 
> i'm not trying to say that you should drop the things you like to
> work on,
> and switch to the things i like, of course. but this patch, IMO,
> doesn't
> deserve a dedicated NG post.
> 
> sorry again, i'm frustrated by dmd inability to generate valid .o
> file from
> completely valid source, so can be harsh today.
-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

May 14, 2017
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.

May 15, 2017
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, as yet, software development is not a profession. I think "respect for others" and "empathy" are better lines to take.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

May 14, 2017
On Mon, May 15, 2017 at 04:06:29AM +0100, Russel Winder via Digitalmars-d-announce wrote: [...]
> Also the default colours chosen by the developer usually work well for the them and their (and if you are lucky reviewers) terminal settings and are totally useless for a huge section of using audience (most of whom remain silent for various reasons). Take Git for example. I end up having to run:
> 
> git … | more
> 
> to get rid of the colours. The default colours might work for the Git developers but fail dismally for me. I cannot be bothered to get into the detail of how to change the Git colouring so I use more to get rid of it.

	git config --global color.ui false

I sure hope this is also configurable with dmd, otherwise I may find myself having one less reason to use it.


> I like having colours, for exactly the same reason colouring is good in source code editing, they can apply semantic (albeit often syntactic) coding, but all too often the colour choices are dreadful and too difficult to change. Hence all too often I have to:
[...]

I hate colors, for the reason you stated above: they usually clash with my choice of terminal default color settings.  Also, I find colors a big distraction to the eye when I'm trying to focus.  I don't even like syntax highlighting for that reason. My take on it is that if I can't parse the code with a glance, then either (1) my grasp of the language is so poor I really shouldn't be coding in that language, or (2) the code is so unreadably poorly-formatted it's time to fix the formatting before proceeding any further.


T

-- 
Skill without imagination is craftsmanship and gives us many useful objects such as wickerwork picnic baskets.  Imagination without skill gives us modern art. -- Tom Stoppard
May 15, 2017
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 D, so i'm certainly not a professional ('cause professionals are the people which get payment for their work). sorry again for polluting NG with my unprofessional writings. i will stop doing that immediately after this post.
May 15, 2017
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
May 15, 2017
On 2017-05-15 05:06, Russel Winder via Digitalmars-d-announce wrote:

> Also the default colours chosen by the developer usually work well for
> the them and their (and if you are lucky reviewers) terminal settings
> and are totally useless for a huge section of using audience (most of
> whom remain silent for various reasons). Take Git for example. I end up
> having to run:
>
> git … | more
>
> to get rid of the colours. The default colours might work for the Git
> developers but fail dismally for me. I cannot be bothered to get into
> the detail of how to change the Git colouring so I use more to get rid
> of it.

If you want to completely remove the colors in the Git output, add this:

[color]
    ui = off

To ~/.gitconfig

-- 
/Jacob Carlborg
May 15, 2017
On Sunday, May 14, 2017 21:07:57 H. S. Teoh via Digitalmars-d-announce wrote:
> I hate colors, for the reason you stated above: they usually clash with my choice of terminal default color settings.  Also, I find colors a big distraction to the eye when I'm trying to focus.  I don't even like syntax highlighting for that reason. My take on it is that if I can't parse the code with a glance, then either (1) my grasp of the language is so poor I really shouldn't be coding in that language, or (2) the code is so unreadably poorly-formatted it's time to fix the formatting before proceeding any further.

LOL. To each their own. I remember a coworker who never used colors with vim, and I found it really hard to read his screen. Even if it's not necessary, I find that having syntax highlighting really helps, and in some cases it pretty much screams at you that you screwed up (e.g. unterminated string literals). But it also depends on the colors. If the colors aren't configurable, then it's pretty easy for it to be a big problem. There is no "one size fits all" for colors, though some color schemes will work better in general than others.

I haven't gotten the chance to look at the dmd error messages yet to see how they look, but if the colors are decent, then I'd expect them to help a lot of people (especially with more complicated error messages). But given that it's the command line, I don't know how they'd be very configurable (certainly not like you could do with an IDE), though as long as there's a way to turn them off, then worst case, you end up with what we had before.

- Jonathan M Davis

May 15, 2017
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 D, so i'm certainly not a professional ('cause professionals are the people which get payment for their work). sorry again for polluting NG with my unprofessional writings. i will stop doing that immediately after this post.

Rude or not, I think ketmar is right...

/P
May 15, 2017
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 constraint checks (this has been on my todo list for a while since every attempt so far has failed; as I'm sure you know, it isn't trivial to implement in the current compiler). Such highlights would now have to compete with unnecessary syntax coloration; you can't visually scan for color anymore since it doesn't mean anything special.

Terminal color choices are also painful, though I kinda believe this is the terminal's fault. I ended up doing hacky code in mine to ensure a legible palette, but still, not everyone has done that.


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?