www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Inconsistent coding style in code examples

reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
This PR:

	https://github.com/D-Programming-Language/phobos/pull/2973

introduces a code example with 2-space indentation, whereas the rest of
Phobos and dlang.org uses 4-space indentation.

I don't like this. It's inconsistent, and is detracting from the
professional look of D. It's bad enough that we are inconsistent from
one page to another, it's even worse that this PR introduces a style
inconsistency within a *single* doc page. It makes D look amateurish and
unprofessional.

Walter's reason for this is that 4-space indentation makes it look bad
on Kindle and other small-screen readers. Which is a good point, but it
shouldn't be reason for inconsistent code style throughout dlang.org.
If we decide that 4-space indentation is no good, then we should switch
*wholesale* to whatever it is we deem good. We should not be introducing
arbitrary style differences on an ad hoc basis.

So, what will it be? What coding style should we use for official
language docs? Should we use 4-space indentation or 2-space indentation?
Should we reduce the maximum line length in code samples so that they
don't look horribly on narrow-width readers? Or something else
altogether?

(Note also, that the code example in question is part of a ddoc'd
unittest, which means it is also inconsistent with the rest of Phobos
code. This is a smaller issue than inconsistency in public-facing docs,
but nonetheless, it's an annoying one.)


T

-- 
Любишь кататься - люби и саночки возить. 
Feb 10 2015
next sibling parent reply "Meta" <jared771 gmail.com> writes:
On Tuesday, 10 February 2015 at 21:00:11 UTC, H. S. Teoh wrote:
 This PR:

 	https://github.com/D-Programming-Language/phobos/pull/2973

 introduces a code example with 2-space indentation, whereas the 
 rest of
 Phobos and dlang.org uses 4-space indentation.

 I don't like this. It's inconsistent, and is detracting from the
 professional look of D. It's bad enough that we are 
 inconsistent from
 one page to another, it's even worse that this PR introduces a 
 style
 inconsistency within a *single* doc page. It makes D look 
 amateurish and
 unprofessional.

 Walter's reason for this is that 4-space indentation makes it 
 look bad
 on Kindle and other small-screen readers. Which is a good 
 point, but it
 shouldn't be reason for inconsistent code style throughout 
 dlang.org.
 If we decide that 4-space indentation is no good, then we 
 should switch
 *wholesale* to whatever it is we deem good. We should not be 
 introducing
 arbitrary style differences on an ad hoc basis.

 So, what will it be? What coding style should we use for 
 official
 language docs? Should we use 4-space indentation or 2-space 
 indentation?
 Should we reduce the maximum line length in code samples so 
 that they
 don't look horribly on narrow-width readers? Or something else
 altogether?

 (Note also, that the code example in question is part of a 
 ddoc'd
 unittest, which means it is also inconsistent with the rest of 
 Phobos
 code. This is a smaller issue than inconsistency in 
 public-facing docs,
 but nonetheless, it's an annoying one.)


 T
I hate 2-space tabs as much as I hate 8-space tabs.
Feb 10 2015
next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/10/15 1:09 PM, Meta wrote:
 I hate 2-space tabs as much as I hate 8-space tabs.
When I joined Facebook (2-space indent and 80 columns) I couldn't believe my eyes. Then I got used to it. -- Andrei
Feb 10 2015
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 2/10/2015 1:09 PM, Meta wrote:
 I hate 2-space tabs as much as I hate 8-space tabs.
You'll hate 4-space if you read it on an ereader.
Feb 10 2015
prev sibling next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/10/15 12:57 PM, H. S. Teoh via Digitalmars-d wrote:
 This PR:

 	https://github.com/D-Programming-Language/phobos/pull/2973

 introduces a code example with 2-space indentation, whereas the rest of
 Phobos and dlang.org uses 4-space indentation.

 I don't like this. It's inconsistent, and is detracting from the
 professional look of D. It's bad enough that we are inconsistent from
 one page to another, it's even worse that this PR introduces a style
 inconsistency within a *single* doc page. It makes D look amateurish and
 unprofessional.
Yah, I've adjusted spacing. That kind of change must be done wholesale if we commit to it. -- Andrei
Feb 10 2015
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/10/15 1:13 PM, Andrei Alexandrescu wrote:
 On 2/10/15 12:57 PM, H. S. Teoh via Digitalmars-d wrote:
 This PR:

     https://github.com/D-Programming-Language/phobos/pull/2973

 introduces a code example with 2-space indentation, whereas the rest of
 Phobos and dlang.org uses 4-space indentation.

 I don't like this. It's inconsistent, and is detracting from the
 professional look of D. It's bad enough that we are inconsistent from
 one page to another, it's even worse that this PR introduces a style
 inconsistency within a *single* doc page. It makes D look amateurish and
 unprofessional.
Yah, I've adjusted spacing. That kind of change must be done wholesale if we commit to it. -- Andrei
Forgot: https://github.com/D-Programming-Language/phobos/commit/38802decf57fb6e1ca81c7ee72d9b6635c0d22af
Feb 10 2015
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/10/2015 12:57 PM, H. S. Teoh via Digitalmars-d wrote:
 Walter's reason for this is that 4-space indentation makes it look bad
 on Kindle and other small-screen readers.
My Kindle 3 has a 37 character screen width when using a monospace font (i.e. code font). Trying to read code formatted to 80 columns on it is just awful. While I don't expect anyone to read Phobos source code on a Kindle, I do expect the ereader version of the documentation to be read on the Kindle (or phone or whatever ereader). Vertical space is also far more important on the small screen. Having a different whitespace convention for documentation makes sense. (Such constraints also come in to play when writing books and articles.) At one point I had done this for all the examples in the D language spec, but I've never done it for the Phobos docs.
Feb 10 2015
next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/10/15 1:20 PM, Walter Bright wrote:
 On 2/10/2015 12:57 PM, H. S. Teoh via Digitalmars-d wrote:
 Walter's reason for this is that 4-space indentation makes it look bad
 on Kindle and other small-screen readers.
My Kindle 3 has a 37 character screen width when using a monospace font (i.e. code font). Trying to read code formatted to 80 columns on it is just awful. While I don't expect anyone to read Phobos source code on a Kindle, I do expect the ereader version of the documentation to be read on the Kindle (or phone or whatever ereader). Vertical space is also far more important on the small screen. Having a different whitespace convention for documentation makes sense. (Such constraints also come in to play when writing books and articles.) At one point I had done this for all the examples in the D language spec, but I've never done it for the Phobos docs.
It's a good reason (e.g. TDPL uses 3 spaces throughout). We just can't start doing it randomly in one unrelated diff. -- Andrei
Feb 10 2015
prev sibling next sibling parent reply Steven Schveighoffer <schveiguy yahoo.com> writes:
On 2/10/15 4:20 PM, Walter Bright wrote:
 On 2/10/2015 12:57 PM, H. S. Teoh via Digitalmars-d wrote:
 Walter's reason for this is that 4-space indentation makes it look bad
 on Kindle and other small-screen readers.
My Kindle 3 has a 37 character screen width when using a monospace font (i.e. code font). Trying to read code formatted to 80 columns on it is just awful. While I don't expect anyone to read Phobos source code on a Kindle, I do expect the ereader version of the documentation to be read on the Kindle (or phone or whatever ereader). Vertical space is also far more important on the small screen. Having a different whitespace convention for documentation makes sense. (Such constraints also come in to play when writing books and articles.) At one point I had done this for all the examples in the D language spec, but I've never done it for the Phobos docs.
Kindles are supposed to be very good at resizing text for user preference. This seems like the generated format for the kindle isn't properly annotated. Please, let's not cater to kindles in ddoc. The documentation is generated first and foremost for dlang.org. If you want to write a script to make a book out of it, fine, but screwing up the web site for the sake of the few people that use kindles is ridiculous. -Steve
Feb 10 2015
parent Jacob Carlborg <doob me.com> writes:
On 2015-02-10 22:36, Steven Schveighoffer wrote:

 Please, let's not cater to kindles in ddoc. The documentation is
 generated first and foremost for dlang.org. If you want to write a
 script to make a book out of it, fine, but screwing up the web site for
 the sake of the few people that use kindles is ridiculous.
I agree. -- /Jacob Carlborg
Feb 11 2015
prev sibling parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Tuesday, 10 February 2015 at 21:21:14 UTC, Walter Bright wrote:
 On 2/10/2015 12:57 PM, H. S. Teoh via Digitalmars-d wrote:
 Walter's reason for this is that 4-space indentation makes it 
 look bad
 on Kindle and other small-screen readers.
My Kindle 3 has a 37 character screen width when using a monospace font (i.e. code font). Trying to read code formatted to 80 columns on it is just awful. While I don't expect anyone to read Phobos source code on a Kindle, I do expect the ereader version of the documentation to be read on the Kindle (or phone or whatever ereader).
Isn't this problem better solved mechanically? (If we used tabs for indentation, it would be as simple as setting the tab width...)
Feb 10 2015
next sibling parent "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Tue, Feb 10, 2015 at 09:44:17PM +0000, Vladimir Panteleev via Digitalmars-d
wrote:
 On Tuesday, 10 February 2015 at 21:21:14 UTC, Walter Bright wrote:
On 2/10/2015 12:57 PM, H. S. Teoh via Digitalmars-d wrote:
Walter's reason for this is that 4-space indentation makes it look
bad on Kindle and other small-screen readers.
My Kindle 3 has a 37 character screen width when using a monospace font (i.e. code font). Trying to read code formatted to 80 columns on it is just awful. While I don't expect anyone to read Phobos source code on a Kindle, I do expect the ereader version of the documentation to be read on the Kindle (or phone or whatever ereader).
Isn't this problem better solved mechanically?
That's what crossed my mind too... but:
 (If we used tabs for indentation, it would be as simple as setting the
 tab width...)
This would trigger another interminable thread about the merits/cons of tabs vs. spaces. :-D Given that current Phobos code standardized on 4 spaces, no tab characters, I can't see tabs ever making it into Phobos code. (It would be one giant blotch of a PR that reformats every single file in Phobos and essentially be a black-out point of `git blame`... it would be a prime example of what Andrei has been complaining about of late, that much effort is spent on trivial things that only has marginal value.) That leaves the mechanical solution, which is actually very easy. It doesn't have to be a sophisticated solution involving a full-blown D lexer. It could be as simple as substituting initial runs of spaces on each line, since we already know our input to be formatted in a certain way. Proof of concept: import std.range.primitives; auto reIndent(R)(R range, size_t inputIndent, size_t outputIndent) if (isInputRange!R && is(ElementType!R : const(char)[])) { import std.algorithm.iteration : map; import std.array; import std.regex; auto reSplitInitialSpace = regex(`^( +)(.*)`); auto reReindent = regex(" ".replicate(inputIndent)); string outIndent = " ".replicate(outputIndent); return range.map!((line) { auto m = line.match(reSplitInitialSpace); if (m) { auto newIndent = m.captures[1].replaceAll(reReindent, outIndent); return newIndent ~ m.captures[2]; } else return line; }); } void main(string[] args) { import std.algorithm.iteration : map; import std.algorithm.mutation : copy; import std.stdio; stdin.byLine .reIndent(4, 2) .map!(line => line ~ "\n") .copy(stdout.lockingTextWriter()); } Output of program, given its own source code as input: import std.range.primitives; auto reIndent(R)(R range, size_t inputIndent, size_t outputIndent) if (isInputRange!R && is(ElementType!R : const(char)[])) { import std.algorithm.iteration : map; import std.array; import std.regex; auto reSplitInitialSpace = regex(`^( +)(.*)`); auto reReindent = regex(" ".replicate(inputIndent)); string outIndent = " ".replicate(outputIndent); return range.map!((line) { auto m = line.match(reSplitInitialSpace); if (m) { auto newIndent = m.captures[1].replaceAll(reReindent, outIndent); return newIndent ~ m.captures[2]; } else return line; }); } void main(string[] args) { import std.algorithm.iteration : map; import std.algorithm.mutation : copy; import std.stdio; stdin.byLine .reIndent(4, 2) .map!(line => line ~ "\n") .copy(stdout.lockingTextWriter()); } Q.E.D. :-D So all we need to do, is to add this tool to the dlang.org repo, and run each generated code example through it, and we're done. No need to reformat the entire Phobos codebase, or any of that nonsense. T -- It won't be covered in the book. The source code has to be useful for something, after all. -- Larry Wall
Feb 10 2015
prev sibling parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Tue, Feb 10, 2015 at 02:25:01PM -0800, H. S. Teoh via Digitalmars-d wrote:
[...]
 That leaves the mechanical solution, which is actually very easy. It
 doesn't have to be a sophisticated solution involving a full-blown D
 lexer. It could be as simple as substituting initial runs of spaces on
 each line, since we already know our input to be formatted in a
 certain way.
 
 Proof of concept:
[...] Now a full-blown tools PR: https://github.com/D-Programming-Language/tools/pull/159 I was going to attempt to do a PR for dlang.org that uses this tool for the kindle targets, but the fact that (1) I don't even have kindlegen, and (2) I don't have a Windows machine to test changes to win32.mak, means I can't test anything at all, so I'm thinking twice about attempting that. T -- If you're not part of the solution, you're part of the precipitate.
Feb 11 2015
parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Wednesday, 11 February 2015 at 18:30:13 UTC, H. S. Teoh wrote:
 but the fact that (1) I don't even have kindlegen,
It's a free download. Not FOSS though, binary blob.
 and (2) I don't have a Windows machine to test changes to 
 win32.mak,
I think you can run DM make under Wine.
Feb 11 2015
parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Wed, Feb 11, 2015 at 06:32:27PM +0000, Vladimir Panteleev via Digitalmars-d
wrote:
 On Wednesday, 11 February 2015 at 18:30:13 UTC, H. S. Teoh wrote:
but the fact that (1) I don't even have kindlegen,
It's a free download. Not FOSS though, binary blob.
But what's the use if I don't have kindle for viewing the results?
and (2) I don't have a Windows machine to test changes to win32.mak,
I think you can run DM make under Wine.
Interesting. T -- The only difference between male factor and malefactor is just a little emptiness inside.
Feb 11 2015
next sibling parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Wed, 11 Feb 2015 10:51:19 -0800, H. S. Teoh via Digitalmars-d wrote:

and (2) I don't have a Windows machine to test changes to win32.mak,
I think you can run DM make under Wine.
Interesting.
yep, the whole dmd can be built under wine, using tools from dmc and dmc=20 itself. everything works like a charm (except dmd.exe itself, which is=20 broken ;-).=
Feb 11 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/11/2015 1:37 PM, ketmar wrote:
 yep, the whole dmd can be built under wine, using tools from dmc and dmc
 itself. everything works like a charm (except dmd.exe itself, which is
 broken ;-).
Bugzilla issue?
Feb 11 2015
parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Wed, 11 Feb 2015 14:21:41 -0800, Walter Bright wrote:

 On 2/11/2015 1:37 PM, ketmar wrote:
 yep, the whole dmd can be built under wine, using tools from dmc and
 dmc itself. everything works like a charm (except dmd.exe itself, which
 is broken ;-).
=20 Bugzilla issue?
sure i did, along with the patch: https://issues.dlang.org/show_bug.cgi?id=3D14097 you have seen that.=
Feb 11 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/11/2015 2:34 PM, ketmar wrote:
 On Wed, 11 Feb 2015 14:21:41 -0800, Walter Bright wrote:

 On 2/11/2015 1:37 PM, ketmar wrote:
 yep, the whole dmd can be built under wine, using tools from dmc and
 dmc itself. everything works like a charm (except dmd.exe itself, which
 is broken ;-).
Bugzilla issue?
sure i did, along with the patch: https://issues.dlang.org/show_bug.cgi?id=14097 you have seen that.
Yes, just making sure it's the same issue, and not something that hasn't been filed. Thank you.
Feb 11 2015
parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Wed, 11 Feb 2015 15:21:59 -0800, Walter Bright wrote:

 On 2/11/2015 2:34 PM, ketmar wrote:
 On Wed, 11 Feb 2015 14:21:41 -0800, Walter Bright wrote:

 On 2/11/2015 1:37 PM, ketmar wrote:
 yep, the whole dmd can be built under wine, using tools from dmc and
 dmc itself. everything works like a charm (except dmd.exe itself,
 which is broken ;-).
Bugzilla issue?
sure i did, along with the patch: https://issues.dlang.org/show_bug.cgi?id=3D14097 you have seen that.
=20 =20 Yes, just making sure it's the same issue, and not something that hasn't been filed. Thank you.
no, i didn't found anything else. with this patch dmd with wine works=20 perfectly -- no crashes since then.=
Feb 11 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/11/2015 3:34 PM, ketmar wrote:
 no, i didn't found anything else. with this patch dmd with wine works
 perfectly -- no crashes since then.
Thanks again for finding the problem and posting a fix.
Feb 11 2015
parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Wed, 11 Feb 2015 16:09:59 -0800, Walter Bright wrote:

 On 2/11/2015 3:34 PM, ketmar wrote:
 no, i didn't found anything else. with this patch dmd with wine works
 perfectly -- no crashes since then.
=20 Thanks again for finding the problem and posting a fix.
now i feel ashamed, 'cause i did that for my own profit, and you are=20 thanking me like i did a big job fixing bug that nobody except me ever=20 seen. ;-)=
Feb 12 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/12/2015 1:46 AM, ketmar wrote:
 On Wed, 11 Feb 2015 16:09:59 -0800, Walter Bright wrote:

 On 2/11/2015 3:34 PM, ketmar wrote:
 no, i didn't found anything else. with this patch dmd with wine works
 perfectly -- no crashes since then.
Thanks again for finding the problem and posting a fix.
now i feel ashamed, 'cause i did that for my own profit, and you are thanking me like i did a big job fixing bug that nobody except me ever seen. ;-)
Why you did it doesn't matter. What matters is you did it and contributed it. Also, just because it wasn't reported before doesn't mean it wasn't happening to people. The vast majority will see a bug, and just dump the compiler and move to something else. Me, for example, I very very rarely bother to report a bug in a product I use. The reason isn't because I am lazy (although I am). It's because companies make it hard to report a bug. If they want to act like they're doing me a favor by accepting a bug report, then I won't bother.
Feb 12 2015
next sibling parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Thu, Feb 12, 2015 at 12:16:38PM -0800, Walter Bright via Digitalmars-d wrote:
[...]
 Me, for example, I very very rarely bother to report a bug in a
 product I use. The reason isn't because I am lazy (although I am).
 It's because companies make it hard to report a bug. If they want to
 act like they're doing me a favor by accepting a bug report, then I
 won't bother.
What does that say about the current D bugtracker? ;-) T -- Ignorance is bliss... until you suffer the consequences!
Feb 12 2015
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/12/2015 12:20 PM, H. S. Teoh via Digitalmars-d wrote:
 On Thu, Feb 12, 2015 at 12:16:38PM -0800, Walter Bright via Digitalmars-d
wrote:
 [...]
 Me, for example, I very very rarely bother to report a bug in a
 product I use. The reason isn't because I am lazy (although I am).
 It's because companies make it hard to report a bug. If they want to
 act like they're doing me a favor by accepting a bug report, then I
 won't bother.
What does that say about the current D bugtracker? ;-)
It says it's easy to submit bug reports for D.
Feb 12 2015
parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Thu, Feb 12, 2015 at 12:55:40PM -0800, Walter Bright via Digitalmars-d wrote:
 On 2/12/2015 12:20 PM, H. S. Teoh via Digitalmars-d wrote:
On Thu, Feb 12, 2015 at 12:16:38PM -0800, Walter Bright via Digitalmars-d wrote:
[...]
Me, for example, I very very rarely bother to report a bug in a
product I use. The reason isn't because I am lazy (although I am).
It's because companies make it hard to report a bug. If they want to
act like they're doing me a favor by accepting a bug report, then I
won't bother.
What does that say about the current D bugtracker? ;-)
It says it's easy to submit bug reports for D.
Generally, I agree. But OTOH, we *did* have people complaining on the forums every now and then that they found bugzilla hard to use, unfriendly, requires signing up for Yet Another Account, ad nauseaum. Would *you* go through the trouble of signing up for bugzilla if you were only a casual user of D? T -- There's light at the end of the tunnel. It's the oncoming train.
Feb 12 2015
parent Walter Bright <newshound2 digitalmars.com> writes:
On 2/12/2015 1:03 PM, H. S. Teoh via Digitalmars-d wrote:
 On Thu, Feb 12, 2015 at 12:55:40PM -0800, Walter Bright via Digitalmars-d
wrote:
 It says it's easy to submit bug reports for D.
Generally, I agree. But OTOH, we *did* have people complaining on the forums every now and then that they found bugzilla hard to use, unfriendly, requires signing up for Yet Another Account, ad nauseaum. Would *you* go through the trouble of signing up for bugzilla if you were only a casual user of D?
The reason bugzilla requires a signup is because whatever is posted there shows up to the public without any moderation, so it is ripe for being a spam delivery system. I.e. it's more than just a bug *reporting* system. If it was a reporting system only, then an email address would be more appropriate.
Feb 12 2015
prev sibling parent reply "weaselcat" <weaselcat gmail.com> writes:
On Thursday, 12 February 2015 at 20:22:42 UTC, H. S. Teoh wrote:
 On Thu, Feb 12, 2015 at 12:16:38PM -0800, Walter Bright via 
 Digitalmars-d wrote:
 [...]
 Me, for example, I very very rarely bother to report a bug in a
 product I use. The reason isn't because I am lazy (although I 
 am).
 It's because companies make it hard to report a bug. If they 
 want to
 act like they're doing me a favor by accepting a bug report, 
 then I
 won't bother.
What does that say about the current D bugtracker? ;-) T
D bug tracker is easy to use to the point where sometimes I think I might be submitting too many reports.
Feb 12 2015
parent "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Thu, Feb 12, 2015 at 10:47:28PM +0000, weaselcat via Digitalmars-d wrote:
 On Thursday, 12 February 2015 at 20:22:42 UTC, H. S. Teoh wrote:
On Thu, Feb 12, 2015 at 12:16:38PM -0800, Walter Bright via Digitalmars-d
wrote:
[...]
Me, for example, I very very rarely bother to report a bug in a
product I use. The reason isn't because I am lazy (although I am).
It's because companies make it hard to report a bug. If they want to
act like they're doing me a favor by accepting a bug report, then I
won't bother.
What does that say about the current D bugtracker? ;-) T
D bug tracker is easy to use to the point where sometimes I think I might be submitting too many reports.
Don't worry, you won't outdo bearophile, our resident bugbear. ;-) T -- If it's green, it's biology, If it stinks, it's chemistry, If it has numbers it's math, If it doesn't work, it's technology.
Feb 12 2015
prev sibling next sibling parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Thursday, 12 February 2015 at 20:16:40 UTC, Walter Bright 
wrote:
 Me, for example, I very very rarely bother to report a bug in a 
 product I use. The reason isn't because I am lazy (although I 
 am). It's because companies make it hard to report a bug. If 
 they want to act like they're doing me a favor by accepting a 
 bug report, then I won't bother.
Maybe print the Bugzilla URL on compiler ICEs? :) I think gcc does that.
Feb 12 2015
next sibling parent ketmar <ketmar ketmar.no-ip.org> writes:
On Thu, 12 Feb 2015 21:12:26 +0000, Vladimir Panteleev wrote:

 On Thursday, 12 February 2015 at 20:16:40 UTC, Walter Bright wrote:
 Me, for example, I very very rarely bother to report a bug in a product
 I use. The reason isn't because I am lazy (although I am). It's because
 companies make it hard to report a bug. If they want to act like
 they're doing me a favor by accepting a bug report, then I won't
 bother.
=20 Maybe print the Bugzilla URL on compiler ICEs? :) =20 I think gcc does that.
and as far as i know that never helps much. 'cause what people see is the=20 page with registration form, and chances are that they will stop right=20 there. and if someone is ready to register, i bet that he will find=20 bugzilla on his own. i.e. this may help some people, but don't much. and ldc and gdc will be=20 forced to patch that thing out. ;-)=
Feb 12 2015
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/12/2015 1:12 PM, Vladimir Panteleev wrote:
 On Thursday, 12 February 2015 at 20:16:40 UTC, Walter Bright wrote:
 Me, for example, I very very rarely bother to report a bug in a product I use.
 The reason isn't because I am lazy (although I am). It's because companies
 make it hard to report a bug. If they want to act like they're doing me a
 favor by accepting a bug report, then I won't bother.
Maybe print the Bugzilla URL on compiler ICEs? :) I think gcc does that.
Right on dlang.org under [Resources] there's [Bug Tracker]. I don't believe that's making it difficult to file a bug report.
Feb 12 2015
parent Jacob Carlborg <doob me.com> writes:
On 2015-02-12 23:29, Walter Bright wrote:

 Right on dlang.org under [Resources] there's [Bug Tracker]. I don't
 believe that's making it difficult to file a bug report.
I had no idea that link existed :) -- /Jacob Carlborg
Feb 13 2015
prev sibling parent reply ketmar <ketmar ketmar.no-ip.org> writes:
On Thu, 12 Feb 2015 12:16:38 -0800, Walter Bright wrote:

 Why you did it doesn't matter. What matters is you did it and
 contributed it. Also, just because it wasn't reported before doesn't
 mean it wasn't happening to people. The vast majority will see a bug,
 and just dump the compiler and move to something else.
that's exactly why i'm ashamed. 'cause i knew about this bug for almost a=20 year and a half, yet never tried to find out what was wrong until i have=20 to write some windows code, which was very uncomfortable to do in virtual=20 machine. i.e. i knew that the bug exists (but didn't know why) and don't=20 bothered to report it.
 Me, for example, I very very rarely bother to report a bug in a product
 I use. The reason isn't because I am lazy (although I am). It's because
 companies make it hard to report a bug. If they want to act like they're
 doing me a favor by accepting a bug report, then I won't bother.
i may never agree on some bugreports, but i feel that D community is very=20 warm in accepting bug reports. and most of them either getting fixed, or=20 at least i'm told why they aren't a bugs. i mean that reporting bugs to D=20 bugzilla has the very visible effect, and it's great.=
Feb 12 2015
parent Walter Bright <newshound2 digitalmars.com> writes:
On 2/12/2015 1:21 PM, ketmar wrote:
 i may never agree on some bugreports, but i feel that D community is very
 warm in accepting bug reports. and most of them either getting fixed, or
 at least i'm told why they aren't a bugs. i mean that reporting bugs to D
 bugzilla has the very visible effect, and it's great.
I agree. It's easy to report bugs, and we don't try and hide them.
Feb 12 2015
prev sibling next sibling parent reply "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Wednesday, 11 February 2015 at 18:53:41 UTC, H. S. Teoh wrote:
 But what's the use if I don't have kindle for viewing the 
 results?
You can find .mobi viewers online. Amazon provides some as well, I think.
Feb 11 2015
parent Walter Bright <newshound2 digitalmars.com> writes:
On 2/11/2015 2:15 PM, Vladimir Panteleev wrote:
 On Wednesday, 11 February 2015 at 18:53:41 UTC, H. S. Teoh wrote:
 But what's the use if I don't have kindle for viewing the results?
You can find .mobi viewers online. Amazon provides some as well, I think.
1. I've seen Kindles at the pawn shop for $35. 2. Kindle apps are downloadable from Amazon for most platforms.
Feb 11 2015
prev sibling parent Mike Parker <aldacron gmail.com> writes:
On 2/12/2015 3:51 AM, H. S. Teoh via Digitalmars-d wrote:
 On Wed, Feb 11, 2015 at 06:32:27PM +0000, Vladimir Panteleev via Digitalmars-d
wrote:
 On Wednesday, 11 February 2015 at 18:30:13 UTC, H. S. Teoh wrote:
 but the fact that (1) I don't even have kindlegen,
It's a free download. Not FOSS though, binary blob.
But what's the use if I don't have kindle for viewing the results?
Amazon has free Kindle apps for several platforms.
Feb 12 2015
prev sibling parent "Mengu" <mengukagan gmail.com> writes:
On Tuesday, 10 February 2015 at 21:00:11 UTC, H. S. Teoh wrote:
 This PR:

 	https://github.com/D-Programming-Language/phobos/pull/2973

 introduces a code example with 2-space indentation, whereas the 
 rest of
 Phobos and dlang.org uses 4-space indentation.

 I don't like this. It's inconsistent, and is detracting from the
 professional look of D. It's bad enough that we are 
 inconsistent from
 one page to another, it's even worse that this PR introduces a 
 style
 inconsistency within a *single* doc page. It makes D look 
 amateurish and
 unprofessional.

 Walter's reason for this is that 4-space indentation makes it 
 look bad
 on Kindle and other small-screen readers. Which is a good 
 point, but it
 shouldn't be reason for inconsistent code style throughout 
 dlang.org.
 If we decide that 4-space indentation is no good, then we 
 should switch
 *wholesale* to whatever it is we deem good. We should not be 
 introducing
 arbitrary style differences on an ad hoc basis.

 So, what will it be? What coding style should we use for 
 official
 language docs? Should we use 4-space indentation or 2-space 
 indentation?
 Should we reduce the maximum line length in code samples so 
 that they
 don't look horribly on narrow-width readers? Or something else
 altogether?

 (Note also, that the code example in question is part of a 
 ddoc'd
 unittest, which means it is also inconsistent with the rest of 
 Phobos
 code. This is a smaller issue than inconsistency in 
 public-facing docs,
 but nonetheless, it's an annoying one.)


 T
as a ruby dev, i'm fine with 2-space indentation and as a python dev i'm fine with 4-space indentation with 80 chars limit. no tabs please
Feb 13 2015