www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Flame bait: D vs. Rust vs. Go Benchmarking

reply "CJS" <Prometheus85 hotmail.com> writes:
This isn't a constructive link, but this benchmark of D vs. Rust 
vs. Go just hit the reddit/programming front page.

Spoiler: D came out pretty well, but for some reason ldc gave 
significantly better results than gdc. It's unclear why since the 
author didn't release any code. Unfortunately the original post 
was written before the author tried ldc, so most of the post has 
the impression that D compilers/runtime/libraries currently 
aren't that much better than Rust. Which, unfortunately, he 
blamed on the GC.

original: 
http://togototo.wordpress.com/2013/07/23/benchmarking-level-generation-go-rust-haskell-and-d/

reddit link: 
http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/
Jul 23 2013
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 7/23/2013 9:16 PM, CJS wrote:
 This isn't a constructive link, but this benchmark of D vs. Rust vs. Go just
hit
 the reddit/programming front page.

 Spoiler: D came out pretty well, but for some reason ldc gave significantly
 better results than gdc. It's unclear why since the author didn't release any
 code. Unfortunately the original post was written before the author tried ldc,
 so most of the post has the impression that D compilers/runtime/libraries
 currently aren't that much better than Rust. Which, unfortunately, he blamed on
 the GC.

 original:
 http://togototo.wordpress.com/2013/07/23/benchmarking-level-generation-go-rust-haskell-and-d/


 reddit link:
 http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/

Please post your comment here to Reddit!
Jul 23 2013
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 7/23/13 9:23 PM, Walter Bright wrote:
 reddit link:
 http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/

Please post your comment here to Reddit!

Did. I tried to provide positive feedback. I'm mildly miffed how the text is so much at odds with the numbers - literally as if the text was written beforehand and the numbers collected at the last minute. Andrei
Jul 23 2013
next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 7/25/2013 6:48 PM, Nick Sabalausky wrote:
 Not to slam Rust or the Rust people, but I wouldn't call that an example
 of "class" so much as "new age nazi": where everything is
 incontrovertibly wonderful in it's own special way and any opinion
 contrary to that is categorically invalid and not to be tolerated (or
 must, at least, be first run through a rose-tinted castration filter).

 Referring to those two quotations as "throw[ing] random slander" is
 outright hyperbole and very much an overreaction. I'm *very* glad that
 we've been mature enough here to allow real, frank discussion and not
 descend into the self-righteous, almost Orwellian, whitewash trap of
 "happy...or else".

I tend to agree. I enjoy a bit of rough and tumble with ideas, along with hyperbole and excursions into excess, and even the occasional angry outburst. Where I draw the line, though, is bullying any member of our community. Fortunately, uncivil behavior has been extremely rare, and I am very proud of our community as a result.
Jul 25 2013
prev sibling next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 7/26/13 1:42 AM, Nick Sabalausky wrote:
 On Fri, 26 Jul 2013 09:55:05 +0200
 "Joseph Rushton Wakeling"<joseph.wakeling webdrake.net>  wrote:

 On Friday, 26 July 2013 at 05:10:55 UTC, Nick Sabalausky wrote:
 If you have an opinion on something that doesn't amount to "it
 is
 good", then yes, you are seen by *many* people as being bad
 person who
 exhibits the sorts of ideas and beliefs that (slippery slope
 fallacy
 here) lead to atrocities (making such beliefs therefore
 unacceptable
 viewpoints - or at least unacceptable to speak and write).

There's a difference between expressing a negative opinion and expressing it in an insulting or offensive way. The latter tends to create an unpleasant atmosphere to work in.

True, but the quoted examples from the Rust NG looked quite benign to me. If something as basic as that is deemed "insulting or offensive", then that creates a chilling effect on the ability to express negative opinions.

FWIW I agree with the moderator. He over-played the case a bit to clarify his stance and to stop a trend early. Andrei
Jul 26 2013
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 7/26/2013 11:33 AM, SomeDude wrote:
 On Friday, 26 July 2013 at 17:09:50 UTC, Jesse Phillips wrote:
 I'm not of the opinion this community needs a code of conduct. This group has
 many examples of harsh language both directed at code/projects and people. It
 results in community members to speak up against that language use, which is
 great, but we don't need Andrei and Walter stepping in and pointing out
 violation of rules.

I agree.

I would rue the day we felt it necessary to have a written code of conduct here. I prefer to presume that we can simply be expected and trusted to act as civilized and honorable adults.
Jul 26 2013
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 7/26/2013 7:20 AM, Craig Dillabaugh wrote:
 This discussion brought to my mind the quote (don't know who said
 it):

 “Obscenity is the sign of a weak mind trying to express itself
 forcibly.”

It reminds me of something my lawyer told me: 1. If the law is on your side, argue the law. 2. If justice is on your side, argue justice. 3. If neither is on your side, use ad homenims. (I inferred from this that you can tell how good the other guy's case is by how he argues it!)
 However, I must admit I've known many people who have brilliant
 minds that tend to enjoy using obscenity, so this cannot be
 entirely true.  However, I do think the quote has some truth to
 it as sometimes obscenity is used to add force to an argument,
 when perhaps a little more thought would have simply produced a
 better argument.

Jobs and Torvalds famously use(d) obscenity, and in fact being cussed out by either of those can be a perverse badge of honor. But I think those are exceptions, and their methods are not general license for others to use the same techniques.
Jul 26 2013
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 7/29/2013 1:31 PM, Nick Sabalausky wrote:
 Blaming person X for that, famous or not, would be a ridiculous shifting
 of responsibilities on par with blaming some music band, or blaming JD
 Salinger, etc. A person, famous or not, cannot rationally be held
 responsible for what the masses of idiots they've never even met will
 end up doing out of their own colossal stupidity.

I agree with you. I'm a big believer in free will, and that adults ought not be blaming their own behavior on others. That said, it is also clear that in any organization, attitudes, tone and style flow from the top down. (It's amazing how pervasive this is.)
Jul 29 2013
parent Walter Bright <newshound2 digitalmars.com> writes:
Not aimed at anyone in particular, but I see these kinds of statements all too 
often:

"Sure, I believe in free speech, but you can't let that guy say those things!"

"I'm certainly not advocating censorship, but those books don't belong in the 
public library!"

That said, I pay the bills for this forum, and if someone wants to be a troll, 
they are free to post it on their own nickel, not mine.
Jul 29 2013
prev sibling next sibling parent Artur Skawina <art.08.09 gmail.com> writes:
On 07/26/13 06:57, Nick Sabalausky wrote:
 to be. To look at THOSE quotes above and claim that they're
 unacceptable *IS* to claim that merely voicing a distaste for something
 is unacceptable, because those quotes say nothing more than that.
 
 It's either an overreaction to the quotes, or it's whitewashing reality
 itself. There's nothing else in those quotes to take issue with unless

Don't worry - it's a self-correcting process. IOW it has a direct effect on the end product (the language) quality. Evolution at work. Sure, it can be frustrating when an interesting experiment, that does have some potential, isn't likely to succeed, because of the wrong choices that are being made. But the alternative, without the natural selection process, would be even worse. There's not /that/ much competition in this space, and many more-or-less isolated niches, so there's enough room for everyone, at least initially. Rust includes some nice ideas, hopefully it will be able to evolve and stay around longer than eg XUL. Just like D, it's a good source of ideas, inspiration and empirical evidence of what works and what does not. artur
Jul 26 2013
prev sibling parent Artur Skawina <art.08.09 gmail.com> writes:
On 07/26/13 22:49, Walter Bright wrote:
 Jobs and Torvalds famously use(d) obscenity, and in fact being cussed out by
either of those can be a perverse badge of honor.
 
 But I think those are exceptions, and their methods are not general license
for others to use the same techniques.

That could give the impression that Linus frequently /uses obscenity/ as a /method/, which would be very, very misleading. He does so /rarely/ and in exceptional contexts where it's appropriate, using a style which pretty much makes sure no one is, or could be, offended. The fact that he does it sometimes (and that he has a sense of humor) means that various trolls and pseudo-news|discussion|journalism-sites always have some material which they can mine from the vast amounts of data, then deliberately use of out of context and misrepresent. [1] Somebody reading just those accounts will get a very skewed picture, which can then spread further. The quoted statement above is vague enough that this might not be the case here - but it's also vague enough that most readers *will* draw the wrong conclusions. Which is not only unfair, but can have the opposite effect; people will try to emulate Linus, without realizing that that his online persona is extremely a) nice and friendly, b) eloquent, and c) frank. In that order. artur [1] Which, btw, does not mean that one needs to avoid the possibility of this happening - it only means that one shouldn't blindly believe everything read. More often than not, somebody is trying to manipulate you.
Jul 27 2013
prev sibling next sibling parent "CJS" <Prometheus85 hotmail.com> writes:
I was wrong about the code not being available. There's a link in 
the first paragraph of the original post that I completely missed.
Jul 23 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--20cf302ef9527f5c0504e23bf3cb
Content-Type: text/plain; charset=ISO-8859-1

On Jul 24, 2013 5:20 AM, "CJS" <Prometheus85 hotmail.com> wrote:
 This isn't a constructive link, but this benchmark of D vs. Rust vs. Go

 Spoiler: D came out pretty well, but for some reason ldc gave

didn't release any code. I see that he used different back end for gdc/gcc - so the newer gcc might have some improvements over the older gdc. And as Walter pointed out, he probably left bounds checking on for the compiler tests. ;) Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --20cf302ef9527f5c0504e23bf3cb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <p>On Jul 24, 2013 5:20 AM, &quot;CJS&quot; &lt;<a href=3D"mailto:Prometheu= s85 hotmail.com">Prometheus85 hotmail.com</a>&gt; wrote:<br> &gt;<br> &gt; This isn&#39;t a constructive link, but this benchmark of D vs. Rust v= s. Go just hit the reddit/programming front page.<br> &gt;<br> &gt; Spoiler: D came out pretty well, but for some reason ldc gave signific= antly better results than gdc. It&#39;s unclear why since the author didn&#= 39;t release any code.</p> <p>I see that he used different back end for gdc/gcc - so the newer gcc mig= ht have some improvements over the older gdc.=A0 And as Walter pointed out,= he probably left bounds checking on for the compiler tests.=A0 ;)</p> <p>Regards<br> -- <br> Iain Buclaw</p> <p>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;</p> --20cf302ef9527f5c0504e23bf3cb--
Jul 23 2013
prev sibling next sibling parent "qznc" <qznc web.de> writes:
On Wednesday, 24 July 2013 at 04:16:45 UTC, CJS wrote:
 This isn't a constructive link, but this benchmark of D vs. 
 Rust vs. Go just hit the reddit/programming front page.

Hacker News: https://news.ycombinator.com/item?id=6094668
Jul 23 2013
prev sibling next sibling parent reply dennis luehring <dl.soluz gmx.net> writes:
Am 24.07.2013 06:16, schrieb CJS:
 This isn't a constructive link, but this benchmark of D vs. Rust
 vs. Go just hit the reddit/programming front page.

 Spoiler: D came out pretty well, but for some reason ldc gave
 significantly better results than gdc. It's unclear why since the
 author didn't release any code. Unfortunately the original post
 was written before the author tried ldc, so most of the post has
 the impression that D compilers/runtime/libraries currently
 aren't that much better than Rust. Which, unfortunately, he
 blamed on the GC.

 original:
 http://togototo.wordpress.com/2013/07/23/benchmarking-level-generation-go-rust-haskell-and-d/

 reddit link:
 http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/

what im missing in the source is the benchmark environment: and the info how many cycles where runned what im missing is a program like for(...1000) { benchmark(D.executable) benchmark(C.executable) benchmark(Haskell.executable) ... } average D.executable C.executable Haskell.executable
Jul 23 2013
next sibling parent reply dennis luehring <dl.soluz gmx.net> writes:
Am 24.07.2013 09:20, schrieb Peter Alexander:
 This comment is worrying:

 "Can you try D version without std.random, and use srand and rand
 from std.c.stdlib? I think it should be almost same speed as C
 version ;-)"

 "Wow! Just tried that, and this brings the running time of the
 DMD-compiled version to 0.770s from 1.290, the GDC-compiled
 version from 1.060 to 0.680s, and the LDC version to 0.580s from
 0.710s. Meaning the LDC version is on par with the Clang-compiled
 C version and just slightly beats the GCC-compiled C one! There
 really should be a warning note in the std.random library
 documentation that for performance-critical code the C stdlib
 random generator is a better choice."


 Is this just because RNGs are value types? It's literally causing
 bad press for D, so this needs to be high on the priority list.

that was my second thought - what is benchmarked more the std library or the code-generation itself for an pure code-generation test he should implement the stdc random in pure D, go, Haskell whatever and get rid of the printf stuff - that would give better results or he should try to use different random implementations, (but still get rid of the io stuff)
Jul 24 2013
parent dennis luehring <dl.soluz gmx.net> writes:
Am 24.07.2013 09:39, schrieb dennis luehring:
 for an pure code-generation test he should implement the stdc random
 in pure D, go, Haskell whatever and get rid of the printf stuff - that
 would give better results

he could use this glibc like but simplified implementation of random as a base for pure language generators http://www.mathstat.dal.ca/~selinger/random/
Jul 24 2013
prev sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 7/24/13 2:43 AM, monarch_dodra wrote:
 On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote:
 This comment is worrying:

 "Can you try D version without std.random, and use srand and rand from
 std.c.stdlib? I think it should be almost same speed as C version ;-)"

 "Wow! Just tried that, and this brings the running time of the
 DMD-compiled version to 0.770s from 1.290, the GDC-compiled version
 from 1.060 to 0.680s, and the LDC version to 0.580s from 0.710s.
 Meaning the LDC version is on par with the Clang-compiled C version
 and just slightly beats the GCC-compiled C one! There really should be
 a warning note in the std.random library documentation that for
 performance-critical code the C stdlib random generator is a better
 choice."


 Is this just because RNGs are value types? It's literally causing bad
 press for D, so this needs to be high on the priority list.

The whole of std.random is nothing but problems and pitfalls, biting us and our users on a regular basis :/

What are the other problems aside from value semantics? Andrei
Jul 24 2013
prev sibling next sibling parent "Peter Alexander" <peter.alexander.au gmail.com> writes:
This comment is worrying:

"Can you try D version without std.random, and use srand and rand 
from std.c.stdlib? I think it should be almost same speed as C 
version ;-)"

"Wow! Just tried that, and this brings the running time of the 
DMD-compiled version to 0.770s from 1.290, the GDC-compiled 
version from 1.060 to 0.680s, and the LDC version to 0.580s from 
0.710s. Meaning the LDC version is on par with the Clang-compiled 
C version and just slightly beats the GCC-compiled C one! There 
really should be a warning note in the std.random library 
documentation that for performance-critical code the C stdlib 
random generator is a better choice."


Is this just because RNGs are value types? It's literally causing 
bad press for D, so this needs to be high on the priority list.
Jul 24 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 24 July 2013 07:20, Andrei Alexandrescu
<SeeWebsiteForEmail erdani.org> wrote:
 On 7/23/13 9:23 PM, Walter Bright wrote:
 reddit link:

 http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/

Please post your comment here to Reddit!

Did. I tried to provide positive feedback. I'm mildly miffed how the text is so much at odds with the numbers - literally as if the text was written beforehand and the numbers collected at the last minute.

I see it more as a test between standard library implementations myself... for instance, there's almost no comparative difference between gcc/gdc if I was to take his C implementation and alter it as needed to turn it into D. :o) -- Iain Buclaw
Jul 24 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote:
 This comment is worrying:

 "Can you try D version without std.random, and use srand and 
 rand from std.c.stdlib? I think it should be almost same speed 
 as C version ;-)"

 "Wow! Just tried that, and this brings the running time of the 
 DMD-compiled version to 0.770s from 1.290, the GDC-compiled 
 version from 1.060 to 0.680s, and the LDC version to 0.580s 
 from 0.710s. Meaning the LDC version is on par with the 
 Clang-compiled C version and just slightly beats the 
 GCC-compiled C one! There really should be a warning note in 
 the std.random library documentation that for 
 performance-critical code the C stdlib random generator is a 
 better choice."


 Is this just because RNGs are value types? It's literally 
 causing bad press for D, so this needs to be high on the 
 priority list.

RNGs should be passed by ref so if that isn't happening, there might be a speed hit (there will also be noticeable statistical problems). But the posted code just used rndGen and didn't pass anything. C stdlib rand() is fast but has terrible statistical performance. Mersenne Twister is fast relative to its (high) statistical quality, but will still be slower than something designed purely for speed without concern for quality. It'd be interesting to see how the speeds go if Xorshift was used in place of Mersenne Twister, that should give a big speed boost while still having high statistical quality.
Jul 24 2013
prev sibling next sibling parent "monarch_dodra" <monarchdodra gmail.com> writes:
On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote:
 This comment is worrying:

 "Can you try D version without std.random, and use srand and 
 rand from std.c.stdlib? I think it should be almost same speed 
 as C version ;-)"

 "Wow! Just tried that, and this brings the running time of the 
 DMD-compiled version to 0.770s from 1.290, the GDC-compiled 
 version from 1.060 to 0.680s, and the LDC version to 0.580s 
 from 0.710s. Meaning the LDC version is on par with the 
 Clang-compiled C version and just slightly beats the 
 GCC-compiled C one! There really should be a warning note in 
 the std.random library documentation that for 
 performance-critical code the C stdlib random generator is a 
 better choice."


 Is this just because RNGs are value types? It's literally 
 causing bad press for D, so this needs to be high on the 
 priority list.

The whole of std.random is nothing but problems and pitfalls, biting us and our users on a regular basis :/ Designing a new "std.random2" or "std.rand" should be high on our todo list. That, and I think "std.random" should go the way of "std.xml": A big fat warning telling users it is doomed for replacement, and, perhaps, a brief explanation of the problems, and their potential workarounds.
Jul 24 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Wednesday, 24 July 2013 at 09:43:12 UTC, monarch_dodra wrote:
 Designing a new "std.random2" or "std.rand" should be high on 
 our todo list. That, and I think "std.random" should go the way 
 of "std.xml": A big fat warning telling users it is doomed for 
 replacement, and, perhaps, a brief explanation of the problems, 
 and their potential workarounds.

It's on my list. As you know I've in the short term been trying to fix all the issues that can be fixed without breaking the API. I will try and follow up next month with a more concrete random2 spec and sample code.
Jul 24 2013
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
Joseph Rushton Wakeling:

 It'd be interesting to see how the speeds go if Xorshift was 
 used in place of Mersenne Twister, that should give a big speed 
 boost while still having high statistical quality.

There is a version with xorshift: http://codepad.org/ecw8aPFu Bye, bearophile
Jul 24 2013
prev sibling next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote:
 This comment is worrying:

 "Can you try D version without std.random, and use srand and 
 rand from std.c.stdlib? I think it should be almost same speed 
 as C version ;-)"

 "Wow! Just tried that, and this brings the running time of the 
 DMD-compiled version to 0.770s from 1.290, the GDC-compiled 
 version from 1.060 to 0.680s, and the LDC version to 0.580s 
 from 0.710s. Meaning the LDC version is on par with the 
 Clang-compiled C version and just slightly beats the 
 GCC-compiled C one! There really should be a warning note in 
 the std.random library documentation that for 
 performance-critical code the C stdlib random generator is a 
 better choice."


 Is this just because RNGs are value types? It's literally 
 causing bad press for D, so this needs to be high on the 
 priority list.

The c stdlib random number generation isn't very random. There should be a note in std.random docs warning that it's slower but better than the c stdlib version.
Jul 24 2013
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
John Colvin:

 There should be a note in std.random docs warning that it's 
 slower but better than the c stdlib version.

Compiling with LDC2 I have found Xorshift about as fast as C rand :-) So I suggested to make Xorshift the default one, but people rightly answered the standard one should be the safe (this means good) generator. On the other hand a note in the Phobos docs is a good idea. Bye, bearophile
Jul 24 2013
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
CJS:

 reddit link:

As suggested by Walter I think all D compilers could add a switch like "-Of" that equals "-O -release -inline -noboundscheck". (It's better to not call it "-O3" because ldc2 has already a -O3 switch with different semantics.) Bye, bearophile
Jul 24 2013
prev sibling next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote:
 As suggested by Walter I think all D compilers could add a 
 switch like "-Of" that equals "-O -release -inline 
 -noboundscheck".

I'm not comfortable with the recommendations for -noboundscheck because I see the bounds check as a good thing and use it in all my real world code. Getting used to turning it off regularly kinda torpedoes the whole memory safety thing D offers. Though perhaps you could turn it off for one module - I think with separate compilitation you could make one with -inline -noboundscheck then link it in to the rest of the app compiled normally. That might be worth it.
Jul 24 2013
prev sibling next sibling parent "deadalnix" <deadalnix gmail.com> writes:
On Wednesday, 24 July 2013 at 15:11:40 UTC, Adam D. Ruppe wrote:
 On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote:
 As suggested by Walter I think all D compilers could add a 
 switch like "-Of" that equals "-O -release -inline 
 -noboundscheck".

I'm not comfortable with the recommendations for -noboundscheck because I see the bounds check as a good thing and use it in all my real world code. Getting used to turning it off regularly kinda torpedoes the whole memory safety thing D offers.

Yes, especially since we have arr.ptr[index] that access array without bound check. This is system, as it should be.
 Though perhaps you could turn it off for one module - I think 
 with separate compilitation you could make one with -inline 
 -noboundscheck then link it in to the rest of the app compiled 
 normally. That might be worth it.

Jul 24 2013
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
Adam D. Ruppe:

 I'm not comfortable with the recommendations for -noboundscheck 
 because I see the bounds check as a good thing and use it in 
 all my real world code. Getting used to turning it off 
 regularly kinda torpedoes the whole memory safety thing D 
 offers.

I understand. I think D should introduce simple optimizations to remove some array bound tests safely. Recently one of my enhancement requests on this was implemented and merged, it will be present in 2.064. And I have other simple suggestions: http://d.puremagic.com/issues/show_bug.cgi?id=10685 There are some more refined ideas here, that need more implementation efforts: http://ssw.jku.at/Research/Papers/Wuerthinger07/Wuerthinger07.pdf More info: https://wikis.oracle.com/display/HotSpotInternals/RangeCheckElimination Bye, bearophile
Jul 24 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--047d7bb03d36313e5104e2461426
Content-Type: text/plain; charset=ISO-8859-1

On Jul 24, 2013 4:16 PM, "Adam D. Ruppe" <destructionator gmail.com> wrote:
 On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote:
 As suggested by Walter I think all D compilers could add a switch like


 I'm not comfortable with the recommendations for -noboundscheck because I

Getting used to turning it off regularly kinda torpedoes the whole memory safety thing D offers.
 Though perhaps you could turn it off for one module - I think with

link it in to the rest of the app compiled normally. That might be worth it. Incase someone hasn't already pointed out. Bounds checking is *always* done in safe code. :) Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --047d7bb03d36313e5104e2461426 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <p>On Jul 24, 2013 4:16 PM, &quot;Adam D. Ruppe&quot; &lt;<a href=3D"mailto= :destructionator gmail.com">destructionator gmail.com</a>&gt; wrote:<br> &gt;<br> &gt; On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote:<br> &gt;&gt;<br> &gt;&gt; As suggested by Walter I think all D compilers could add a switch = like &quot;-Of&quot; that equals &quot;-O -release -inline -noboundscheck&q= uot;.<br> &gt;<br> &gt;<br> &gt; I&#39;m not comfortable with the recommendations for -noboundscheck be= cause I see the bounds check as a good thing and use it in all my real worl= d code. Getting used to turning it off regularly kinda torpedoes the whole = memory safety thing D offers.<br> &gt;<br> &gt; Though perhaps you could turn it off for one module - I think with sep= arate compilitation you could make one with -inline -noboundscheck then lin= k it in to the rest of the app compiled normally. That might be worth it.</= p> <p>Incase someone hasn&#39;t already pointed out.=A0 Bounds checking is *al= ways* done in safe code.=A0 :)</p> <p>Regards<br> -- <br> Iain Buclaw</p> <p>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;</p> --047d7bb03d36313e5104e2461426--
Jul 24 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Wednesday, 24 July 2013 at 11:32:17 UTC, bearophile wrote:
 Compiling with LDC2 I have found Xorshift about as fast as C 
 rand :-)

Excellent! I'm away from computer for a week so couldn't check myself.
 So I suggested to make Xorshift the default one, but people 
 rightly answered the standard one should be the safe (this 
 means good) generator. On the other hand a note in the Phobos 
 docs is a good idea.

The bug with Xorshift that was the real blocker here has been fixed. As far as defaults go, though, Mersenne Twister still has overall better statistical quality (though Xorshift is good -- it fails only the strictest tests of randomness). MT is also something of an "industry standard" for quality random number generation. If I recall right there was a suggestion that the default RNG type Random should be target-dependent, so e.g. for a low-powered device it might be better to make Xorshift the default. There have also been some other RNGs developed recently that match Xorshift for speed but have better statistical properties. I have the papers and it's probably worth looking into adding these to Phobos.
Jul 24 2013
prev sibling next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Wed, Jul 24, 2013 at 12:54:19PM -0700, Andrei Alexandrescu wrote:
 On 7/24/13 2:43 AM, monarch_dodra wrote:

The whole of std.random is nothing but problems and pitfalls, biting
us and our users on a regular basis :/

What are the other problems aside from value semantics?

Value semantics for RNGs are a *gigantic* pitfall. Joseph Rushton Wakeling has pointed out some side-effects such as producing sequences with bad randomness properties (e.g. first element of two RNGs identical, the rest not; or first element of two RNGs different but the rest identical, etc.). We need to get rid of value semantics for RNGs, and we need to get rid of it *now*. T -- Truth, Sir, is a cow which will give [skeptics] no more milk, and so they are gone to milk the bull. -- Sam. Johnson
Jul 24 2013
prev sibling next sibling parent "Namespace" <rswhite4 googlemail.com> writes:
On Wednesday, 24 July 2013 at 20:05:42 UTC, H. S. Teoh wrote:
 On Wed, Jul 24, 2013 at 12:54:19PM -0700, Andrei Alexandrescu 
 wrote:
 On 7/24/13 2:43 AM, monarch_dodra wrote:

The whole of std.random is nothing but problems and pitfalls, 
biting
us and our users on a regular basis :/

What are the other problems aside from value semantics?

Value semantics for RNGs are a *gigantic* pitfall. Joseph Rushton Wakeling has pointed out some side-effects such as producing sequences with bad randomness properties (e.g. first element of two RNGs identical, the rest not; or first element of two RNGs different but the rest identical, etc.). We need to get rid of value semantics for RNGs, and we need to get rid of it *now*. T

We need auto ref. SCNR
Jul 24 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Wednesday, 24 July 2013 at 19:54:19 UTC, Andrei Alexandrescu 
wrote:
 What are the other problems aside from value semantics?

The serious problems mostly derive _from_ the value semantics. They include the annoying (if you forget to add "ref" when passing to a function, the source RNG won't get updated and your program will have unwanted correlations) and the critical (you can't safely store a copy of an RNG inside another object without it being a copy, which again means the source RNG won't be updated); this latter means that the design of ranges that "wrap" an RNG, like RandomCover and RandomSample, can't be given an arbitrary RNG to use without generating unwanted correlations. In short, having them as value types makes it impossible to design tools like RandomCover etc. to be correct, safe and straightforward. There are other issues there, but they are mainly implementation errors that can be fixed (I've fixed several of them recently and will carry on doing so). All the fundamental problems stem from the value semantics.
Jul 24 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Wednesday, 24 July 2013 at 20:46:00 UTC, Joseph Rushton 
Wakeling wrote:
 There are other issues there, but they are mainly 
 implementation errors that can be fixed (I've fixed several of 
 them recently and will carry on doing so). All the fundamental 
 problems stem from the value semantics.

I'm not sure my previous post was entirely clear or easy to understand, but I've given extensive descriptions of the problems in past threads. Difficult to write more clearly or at length now as I'm writing from phone not computer :-)
Jul 24 2013
prev sibling next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Wednesday, 24 July 2013 at 18:28:55 UTC, Iain Buclaw wrote:
 On Jul 24, 2013 4:16 PM, "Adam D. Ruppe" 
 <destructionator gmail.com> wrote:
 On Wednesday, 24 July 2013 at 12:46:26 UTC, bearophile wrote:
 As suggested by Walter I think all D compilers could add a 
 switch like


 I'm not comfortable with the recommendations for 
 -noboundscheck because I

world code. Getting used to turning it off regularly kinda torpedoes the whole memory safety thing D offers.
 Though perhaps you could turn it off for one module - I think 
 with

-noboundscheck then link it in to the rest of the app compiled normally. That might be worth it. Incase someone hasn't already pointed out. Bounds checking is *always* done in safe code. :) Regards

And safe is automatically inferred (on templates only still?) when possible? I don't like where this is going...
Jul 24 2013
prev sibling next sibling parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Thursday, July 25, 2013 01:29:04 John Colvin wrote:
 And  safe is automatically inferred (on templates only still?)
 when possible? I don't like where this is going...

If you have code that you want to be explictly system, then mark it with system. That will override any attribute inference for safe. - Jonathan m Davis
Jul 24 2013
prev sibling next sibling parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Wednesday, July 24, 2013 19:28:41 Iain Buclaw wrote:
 Incase someone hasn't already pointed out. Bounds checking is *always*
 done in  safe code. :)

Not if you use -noboundscheck. The whole point of its existence is to disable bounds checking in safe code. -release disables bounds checking in non- safe code, and -noboundscheck disables it in everything. - Jonathan m Davis
Jul 24 2013
prev sibling next sibling parent "monarch_dodra" <monarchdodra gmail.com> writes:
On Thursday, 25 July 2013 at 00:09:40 UTC, Jonathan M Davis wrote:
 On Thursday, July 25, 2013 01:29:04 John Colvin wrote:
 And  safe is automatically inferred (on templates only still?)
 when possible? I don't like where this is going...

If you have code that you want to be explictly system, then mark it with system. That will override any attribute inference for safe. - Jonathan m Davis

Last time I checked: Adding a *single* qualification on a function will deactivate inference for *every* qualifier. Is this still true? Is there any documentation about how inference works, I can't find it.
Jul 24 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Wednesday, 24 July 2013 at 11:32:17 UTC, bearophile wrote:
 Compiling with LDC2 I have found Xorshift about as fast as C 
 rand :-)

Minor point, but it may be worth checking the number of bits used in different languages' Xorshifts. For D the default is 128. If others use less (or more) they may be faster (or slower).
Jul 25 2013
prev sibling next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Thursday, 25 July 2013 at 00:09:40 UTC, Jonathan M Davis wrote:
 On Thursday, July 25, 2013 01:29:04 John Colvin wrote:
 And  safe is automatically inferred (on templates only still?)
 when possible? I don't like where this is going...

If you have code that you want to be explictly system, then mark it with system. That will override any attribute inference for safe. - Jonathan m Davis

That isn't really a good solution for the general case. Could dmd perhaps mark a function inferred to be safe as trusted instead of safe? Or would that break other stuff?
Jul 25 2013
prev sibling next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Thursday, 25 July 2013 at 10:00:53 UTC, John Colvin wrote:
 On Thursday, 25 July 2013 at 00:09:40 UTC, Jonathan M Davis 
 wrote:
 On Thursday, July 25, 2013 01:29:04 John Colvin wrote:
 And  safe is automatically inferred (on templates only still?)
 when possible? I don't like where this is going...

If you have code that you want to be explictly system, then mark it with system. That will override any attribute inference for safe. - Jonathan m Davis

That isn't really a good solution for the general case. Could dmd perhaps mark a function inferred to be safe as trusted instead of safe? Or would that break other stuff?

woops, sorry, just saw your message below saying that -noboundscheck does actually disable it in safe
Jul 25 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Thursday, 25 July 2013 at 08:13:07 UTC, Joseph Rushton 
Wakeling wrote:
 On Wednesday, 24 July 2013 at 11:32:17 UTC, bearophile wrote:
 Compiling with LDC2 I have found Xorshift about as fast as C 
 rand :-)

Minor point, but it may be worth checking the number of bits used in different languages' Xorshifts. For D the default is 128. If others use less (or more) they may be faster (or slower).

Just checked the code -- the C and Go versions are using 32-bit Xorshift so it's still not a fair comparison (didn't check for Rust). Could try with Xorshift32 (or bump the C/C++/Go/Rust versions to 128-bit). But before doing that -- has the Xorshift32 bug fix made it to LDC yet? Last observation -- could some of the LLVM vs. GCC difference be down to LLVM backends outputting native as opposed to generic executables?
Jul 25 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Thursday, 25 July 2013 at 10:34:56 UTC, Joseph Rushton 
Wakeling wrote:
 Just checked the code

... not thoroughly enough. D.d in the GitHub repo is using the same handwritten 32-bit Xorshift as the C and Go code.
Jul 25 2013
prev sibling next sibling parent "monarch_dodra" <monarchdodra gmail.com> writes:
On Thursday, 25 July 2013 at 10:52:58 UTC, Joseph Rushton 
Wakeling wrote:
 On Thursday, 25 July 2013 at 10:34:56 UTC, Joseph Rushton 
 Wakeling wrote:
 Just checked the code

... not thoroughly enough. D.d in the GitHub repo is using the same handwritten 32-bit Xorshift as the C and Go code.

Is this a big problem performance wise though? I mean, the bug was *only* that the first few iteration were "not so random", is this correct? This fix didn't really change the computational cost of the operation, did it? I mean, it's a problem as far as randomness goes, but for a simple bench, I don't think it is much of a problem.
Jul 25 2013
prev sibling next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Thursday, July 25, 2013 08:56:40 monarch_dodra wrote:
 On Thursday, 25 July 2013 at 00:09:40 UTC, Jonathan M Davis wrote:
 On Thursday, July 25, 2013 01:29:04 John Colvin wrote:
 And  safe is automatically inferred (on templates only still?)
 when possible? I don't like where this is going...

If you have code that you want to be explictly system, then mark it with system. That will override any attribute inference for safe. - Jonathan m Davis

Last time I checked: Adding a *single* qualification on a function will deactivate inference for *every* qualifier. Is this still true?

I have no idea. I'd have to test it. I was not aware of that ever being the case. I'd certainly consider that to be a bug if it is.
 Is there any documentation about how inference works, I can't
 find it.

Not that I'm aware of. - Jonathan M Davis
Jul 25 2013
prev sibling next sibling parent "monarch_dodra" <monarchdodra gmail.com> writes:
On Thursday, 25 July 2013 at 11:42:10 UTC, Jonathan M Davis wrote:
 On Thursday, July 25, 2013 08:56:40 monarch_dodra wrote:
 On Thursday, 25 July 2013 at 00:09:40 UTC, Jonathan M Davis 
 wrote:
 On Thursday, July 25, 2013 01:29:04 John Colvin wrote:
 And  safe is automatically inferred (on templates only 
 still?)
 when possible? I don't like where this is going...

If you have code that you want to be explictly system, then mark it with system. That will override any attribute inference for safe. - Jonathan m Davis

Last time I checked: Adding a *single* qualification on a function will deactivate inference for *every* qualifier. Is this still true?

I have no idea. I'd have to test it. I was not aware of that ever being the case. I'd certainly consider that to be a bug if it is.

I just tested on my end. Seems it's not the case, so I could have been mistaken. Good to know.
 Is there any documentation about how inference works, I can't
 find it.

Not that I'm aware of. - Jonathan M Davis

Thanks.
Jul 25 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Thursday, 25 July 2013 at 11:22:47 UTC, monarch_dodra wrote:
 Is this a big problem performance wise though? I mean, the bug 
 was *only* that the first few iteration were "not so random", 
 is this correct? This fix didn't really change the 
 computational cost of the operation, did it?

Re the benchmarks, as they're all using a custom-written 32-bit Xorshift, there should be no bias (except against Haskell and Scala which are using 128-bit versions). Re the bug in Phobos Xorshift32, it might affect performance slightly as it was caused by a missing xor transformation. But it's irrelevant to the benchmark as they're not using it. The practical effect of the bug was that instead of being uniformly distributed, all the numbers being generated were from the extreme lower end of the range. (I think you may be confusing it with issues related to RandomCover and RandomSample.)
 I mean, it's a problem as far as randomness goes, but for a 
 simple bench, I don't think it is much of a problem.

Most likely. :-)
Jul 25 2013
prev sibling next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
--089e0149c3bc99343a04e25d3867
Content-Type: text/plain; charset=ISO-8859-1

On Jul 25, 2013 1:10 AM, "Jonathan M Davis" <jmdavisProg gmx.com> wrote:
 On Thursday, July 25, 2013 01:29:04 John Colvin wrote:
 And  safe is automatically inferred (on templates only still?)
 when possible? I don't like where this is going...

If you have code that you want to be explictly system, then mark it with system. That will override any attribute inference for safe. - Jonathan m Davis

Can't remember the logic off the top off my head. Check the old old change logs. :) -no bounds check set value is between the range 0-2 is all I recall, and that there being a check for safety. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; --089e0149c3bc99343a04e25d3867 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <p>On Jul 25, 2013 1:10 AM, &quot;Jonathan M Davis&quot; &lt;<a href=3D"mai= lto:jmdavisProg gmx.com">jmdavisProg gmx.com</a>&gt; wrote:<br> &gt;<br> &gt; On Thursday, July 25, 2013 01:29:04 John Colvin wrote:<br> &gt; &gt; And safe is automatically inferred (on templates only still?)<br=

&gt;<br> &gt; If you have code that you want to be explictly system, then mark it w= ith<br> &gt; system. That will override any attribute inference for safe.<br> &gt;<br> &gt; - Jonathan m Davis</p> <p>Can&#39;t remember the logic off the top off my head.=A0 Check the old o= ld change logs. :)</p> <p>-no bounds check set value is between the range 0-2 is all I recall, and= that there being a check for safety. </p> <p>Regards<br> -- <br> Iain Buclaw</p> <p>*(p &lt; e ? p++ : p) =3D (c &amp; 0x0f) + &#39;0&#39;;</p> --089e0149c3bc99343a04e25d3867--
Jul 25 2013
prev sibling next sibling parent "SomeDude" <lovelydear mailmetrash.com> writes:
On Wednesday, 24 July 2013 at 06:20:11 UTC, Andrei Alexandrescu 
wrote:
 On 7/23/13 9:23 PM, Walter Bright wrote:
 reddit link:
 http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/

Please post your comment here to Reddit!

Did. I tried to provide positive feedback. I'm mildly miffed how the text is so much at odds with the numbers - literally as if the text was written beforehand and the numbers collected at the last minute. Andrei

Whatever miffs us, let's try to keep cool and show the same class that the Rust guys do here: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004838.html Oh, and BTW, I really want to congrat them, they've been doing a great job so far.
Jul 25 2013
prev sibling next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Fri, 26 Jul 2013 01:14:42 +0200
"SomeDude" <lovelydear mailmetrash.com> wrote:

 On Wednesday, 24 July 2013 at 06:20:11 UTC, Andrei Alexandrescu 
 wrote:
 On 7/23/13 9:23 PM, Walter Bright wrote:
 reddit link:
 http://www.reddit.com/r/programming/comments/1ixnf6/benchmarking_roguelike_level_generation_go_rust/

Please post your comment here to Reddit!

Did. I tried to provide positive feedback. I'm mildly miffed how the text is so much at odds with the numbers - literally as if the text was written beforehand and the numbers collected at the last minute. Andrei

Whatever miffs us, let's try to keep cool and show the same class that the Rust guys do here: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004838.html Oh, and BTW, I really want to congrat them, they've been doing a great job so far.

Not to slam Rust or the Rust people, but I wouldn't call that an example of "class" so much as "new age nazi": where everything is incontrovertibly wonderful in it's own special way and any opinion contrary to that is categorically invalid and not to be tolerated (or must, at least, be first run through a rose-tinted castration filter). Referring to those two quotations as "throw[ing] random slander" is outright hyperbole and very much an overreaction. I'm *very* glad that we've been mature enough here to allow real, frank discussion and not descend into the self-righteous, almost Orwellian, whitewash trap of "happy...or else".
Jul 25 2013
prev sibling next sibling parent "deadalnix" <deadalnix gmail.com> writes:
On Friday, 26 July 2013 at 02:51:57 UTC, Walter Bright wrote:
 On 7/25/2013 6:48 PM, Nick Sabalausky wrote:
 Not to slam Rust or the Rust people, but I wouldn't call that 
 an example
 of "class" so much as "new age nazi": where everything is
 incontrovertibly wonderful in it's own special way and any 
 opinion
 contrary to that is categorically invalid and not to be 
 tolerated (or
 must, at least, be first run through a rose-tinted castration 
 filter).

 Referring to those two quotations as "throw[ing] random 
 slander" is
 outright hyperbole and very much an overreaction. I'm *very* 
 glad that
 we've been mature enough here to allow real, frank discussion 
 and not
 descend into the self-righteous, almost Orwellian, whitewash 
 trap of
 "happy...or else".

I tend to agree. I enjoy a bit of rough and tumble with ideas, along with hyperbole and excursions into excess, and even the occasional angry outburst. Where I draw the line, though, is bullying any member of our community. Fortunately, uncivil behavior has been extremely rare, and I am very proud of our community as a result.

Stop reading my mind !
Jul 25 2013
prev sibling next sibling parent reply "SomeDude" <lovelydear mailmetrash.com> writes:
On Friday, 26 July 2013 at 01:48:36 UTC, Nick Sabalausky wrote:
 On Fri, 26 Jul 2013 01:14:42 +0200

 Not to slam Rust or the Rust people, but I wouldn't call that 
 an example
 of "class" so much as "new age nazi": where everything is
 incontrovertibly wonderful in it's own special way and any 
 opinion
 contrary to that is categorically invalid and not to be 
 tolerated (or
 must, at least, be first run through a rose-tinted castration 
 filter).

 Referring to those two quotations as "throw[ing] random 
 slander" is
 outright hyperbole and very much an overreaction. I'm *very* 
 glad that
 we've been mature enough here to allow real, frank discussion 
 and not
 descend into the self-righteous, almost Orwellian, whitewash 
 trap of
 "happy...or else".

"new age nazi", "castration filter", "almost orwellian"... talk about overreaction. I think the intent of the moderator is to keep the level of discussions high,and have some not to rose-tint them. I expect the main leaders of the D community to keep the same high standards, not only on the m-l, but also on other forums and bulletin boards, like reddit or HN. After all, it's important to show that we all keep an open mind.
Jul 25 2013
next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Fri, Jul 26, 2013 at 04:41:05PM +0200, Joseph Rushton Wakeling wrote:
 On Friday, 26 July 2013 at 14:20:49 UTC, Craig Dillabaugh wrote:
“Obscenity is the sign of a weak mind trying to express itself
forcibly.”

"They say it's a sign of a limited vocabulary but I don't think that's true, because I know, oh, at least 127 different words and I still prefer fuck." (Billy Connolly) :-)

I think his dictionary should use an unsigned byte instead of a signed byte. :-P One of the places where size_t being unsigned is important in an 8-bit environment. ;-) T -- Right now I'm having amnesia and deja vu at the same time. I think I've forgotten this before.
Jul 26 2013
prev sibling parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On 07/26/2013 06:06 PM, H. S. Teoh wrote:
 I think his dictionary should use an unsigned byte instead of a signed
 byte. :-P  One of the places where size_t being unsigned is important in
 an 8-bit environment. ;-)

You have no idea how much delight I'm getting out of imagining Billy Connolly's reaction to what you've just said here. :-) He really did say 127, too. Here's the clip (Not Safe For Work): https://www.youtube.com/watch?v=h68CfIUkPKs
Jul 30 2013
prev sibling next sibling parent "SomeDude" <lovelydear mailmetrash.com> writes:
On Friday, 26 July 2013 at 03:37:46 UTC, SomeDude wrote:
 On Friday, 26 July 2013 at 01:48:36 UTC, Nick Sabalausky wrote:
 On Fri, 26 Jul 2013 01:14:42 +0200

 Not to slam Rust or the Rust people, but I wouldn't call that 
 an example
 of "class" so much as "new age nazi": where everything is
 incontrovertibly wonderful in it's own special way and any 
 opinion
 contrary to that is categorically invalid and not to be 
 tolerated (or
 must, at least, be first run through a rose-tinted castration 
 filter).

 Referring to those two quotations as "throw[ing] random 
 slander" is
 outright hyperbole and very much an overreaction. I'm *very* 
 glad that
 we've been mature enough here to allow real, frank discussion 
 and not
 descend into the self-righteous, almost Orwellian, whitewash 
 trap of
 "happy...or else".

"new age nazi", "castration filter", "almost orwellian"... talk about overreaction. I think the intent of the moderator is to keep the level of discussions high,and have some not to rose-tint them. I expect the main leaders of the D community to keep the same high standards, not only on the m-l, but also on other forums and bulletin boards, like reddit or HN. After all, it's important to show that we all keep an open mind.

BTW, this post I saw on reddit and has been very well received. http://www.reddit.com/r/programming/comments/1iydil/the_zed_shaw_phenomenon_a_look_at_bullies_in_tech/cb9berc
Jul 25 2013
prev sibling next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Fri, 26 Jul 2013 05:37:41 +0200
"SomeDude" <lovelydear mailmetrash.com> wrote:

 On Friday, 26 July 2013 at 01:48:36 UTC, Nick Sabalausky wrote:
 On Fri, 26 Jul 2013 01:14:42 +0200

 Not to slam Rust or the Rust people, but I wouldn't call that 
 an example
 of "class" so much as "new age nazi": where everything is
 incontrovertibly wonderful in it's own special way and any 
 opinion
 contrary to that is categorically invalid and not to be 
 tolerated (or
 must, at least, be first run through a rose-tinted castration 
 filter).

 Referring to those two quotations as "throw[ing] random 
 slander" is
 outright hyperbole and very much an overreaction. I'm *very* 
 glad that
 we've been mature enough here to allow real, frank discussion 
 and not
 descend into the self-righteous, almost Orwellian, whitewash 
 trap of
 "happy...or else".

"new age nazi", "castration filter", "almost orwellian"... talk about overreaction. I think the intent of the moderator is to keep the level of discussions high,and have some not to rose-tint them. I expect the main leaders of the D community to keep the same high standards, not only on the m-l, but also on other forums and bulletin boards, like reddit or HN. After all, it's important to show that we all keep an open mind.

The terms I used are admittedly exaggerated in their strength, but they're the most accurate way I can think of to describe the basic points I was trying to get across. There's nothing wrong with what the moderator said, per se. The problem is that it came in direct response to these exact quotes:
 "You think Linux is not well-engineered?"

 Nope .. its the same piece of 1970s crap that all the other popular OS
 use , with trivial differences people make a bit deal about..

 Go and D are basically C with a few add ons so it makes sense thet
 want to keep things the same that does not mean they are good ... and
 none of those are major languages ..

Note that strongest BY FAR the strongest thing said there is one instance of the word "crap". Big deal... I may not agree with those statements, but they're FAR from being the abusive community-destroying slander that the moderator is making it out to be. To look at THOSE quotes above and claim that they're unacceptable *IS* to claim that merely voicing a distaste for something is unacceptable, because those quotes say nothing more than that. It's either an overreaction to the quotes, or it's whitewashing reality itself. There's nothing else in those quotes to take issue with unless we're so very immature that we can't even handle the word "crap".
Jul 25 2013
prev sibling next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Fri, 26 Jul 2013 05:39:08 +0200
"SomeDude" <lovelydear mailmetrash.com> wrote:

 On Friday, 26 July 2013 at 03:37:46 UTC, SomeDude wrote:
 On Friday, 26 July 2013 at 01:48:36 UTC, Nick Sabalausky wrote:
 On Fri, 26 Jul 2013 01:14:42 +0200

 Not to slam Rust or the Rust people, but I wouldn't call that 
 an example
 of "class" so much as "new age nazi": where everything is
 incontrovertibly wonderful in it's own special way and any 
 opinion
 contrary to that is categorically invalid and not to be 
 tolerated (or
 must, at least, be first run through a rose-tinted castration 
 filter).

 Referring to those two quotations as "throw[ing] random 
 slander" is
 outright hyperbole and very much an overreaction. I'm *very* 
 glad that
 we've been mature enough here to allow real, frank discussion 
 and not
 descend into the self-righteous, almost Orwellian, whitewash 
 trap of
 "happy...or else".

"new age nazi", "castration filter", "almost orwellian"... talk about overreaction. I think the intent of the moderator is to keep the level of discussions high,and have some not to rose-tint them. I expect the main leaders of the D community to keep the same high standards, not only on the m-l, but also on other forums and bulletin boards, like reddit or HN. After all, it's important to show that we all keep an open mind.

BTW, this post I saw on reddit and has been very well received. http://www.reddit.com/r/programming/comments/1iydil/the_zed_shaw_phenomenon_a_look_at_bullies_in_tech/cb9berc

I don't doubt that. Intolerance of negative opinions is extremely popular these days (something I've always found inherently self-contradictory and hypocritical). If you have an opinion on something that doesn't amount to "it is good", then yes, you are seen by *many* people as being bad person who exhibits the sorts of ideas and beliefs that (slippery slope fallacy here) lead to atrocities (making such beliefs therefore unacceptable viewpoints - or at least unacceptable to speak and write).
Jul 25 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Friday, 26 July 2013 at 05:10:55 UTC, Nick Sabalausky wrote:
 If you have an opinion on something that doesn't amount to "it 
 is
 good", then yes, you are seen by *many* people as being bad 
 person who
 exhibits the sorts of ideas and beliefs that (slippery slope 
 fallacy
 here) lead to atrocities (making such beliefs therefore 
 unacceptable
 viewpoints - or at least unacceptable to speak and write).

There's a difference between expressing a negative opinion and expressing it in an insulting or offensive way. The latter tends to create an unpleasant atmosphere to work in.
Jul 26 2013
prev sibling next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Fri, 26 Jul 2013 09:55:05 +0200
"Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> wrote:

 On Friday, 26 July 2013 at 05:10:55 UTC, Nick Sabalausky wrote:
 If you have an opinion on something that doesn't amount to "it 
 is
 good", then yes, you are seen by *many* people as being bad 
 person who
 exhibits the sorts of ideas and beliefs that (slippery slope 
 fallacy
 here) lead to atrocities (making such beliefs therefore 
 unacceptable
 viewpoints - or at least unacceptable to speak and write).

There's a difference between expressing a negative opinion and expressing it in an insulting or offensive way. The latter tends to create an unpleasant atmosphere to work in.

True, but the quoted examples from the Rust NG looked quite benign to me. If something as basic as that is deemed "insulting or offensive", then that creates a chilling effect on the ability to express negative opinions.
Jul 26 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Friday, 26 July 2013 at 08:42:10 UTC, Nick Sabalausky wrote:
 True, but the quoted examples from the Rust NG looked quite 
 benign
 to me. If something as basic as that is deemed "insulting or
 offensive", then that creates a chilling effect on the ability
 to express negative opinions.

Yes, but you are someone who throws around swearwords very clearly. Of course you have a high tolerance for crap! :-) Not everyone is so thick-skinned, though, and it can create a better collaborative environment if everyone tries to avoid swearwords and pejorative terms (which isn't the same as censoring negative opinions -- in my experience, it helps convey them more effectively because the recipient has fewer grounds to take offence and use that as a reason to dismiss your opinion).
Jul 26 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Friday, 26 July 2013 at 10:09:10 UTC, Joseph Rushton Wakeling 
wrote:
 Yes, but you are someone who throws around swearwords very 
 clearly.

... casually. Phone auto-correct is fun. :-P Incidentally, I think the censure on the Rust list was less because of the swearwords and more because of the sweeping casual dismissal of other projects.
Jul 26 2013
prev sibling next sibling parent "Dicebot" <public dicebot.lv> writes:
On Friday, 26 July 2013 at 01:48:36 UTC, Nick Sabalausky wrote:
 Not to slam Rust or the Rust people, but I wouldn't call that 
 an example
 of "class" so much as "new age nazi": where everything is
 incontrovertibly wonderful in it's own special way and any 
 opinion
 contrary to that is categorically invalid and not to be 
 tolerated (or
 must, at least, be first run through a rose-tinted castration 
 filter).

I think there is a major difference between personal opinion and representing certain development team. Your personal opinion may be as harsh as possible and that is fine, but as a public representative of a community you should be prohibited to have any personal opinion at all. It is important to keep those two alter-egos different.
Jul 26 2013
prev sibling next sibling parent "deadalnix" <deadalnix gmail.com> writes:
On Friday, 26 July 2013 at 10:09:10 UTC, Joseph Rushton Wakeling 
wrote:
 Not everyone is so thick-skinned, though, and it can create a 
 better collaborative environment if everyone tries to avoid 
 swearwords and pejorative terms (which isn't the same as 
 censoring negative opinions -- in my experience, it helps 
 convey them more effectively because the recipient has fewer 
 grounds to take offence and use that as a reason to dismiss 
 your opinion).

You put the limit at the wrong place. It is ok to say that some piece of code is a shitty monstrosity, but ok to say that to someone. People get often offended because they associate themselves with their code. This isn't a good thing, and a indicator that the dev may have trouble to adapt/be territorial. You don't always more dev in your boat as it means management overhead (yes, even with FOSS, as someone have to review the code, discuss it, etc . . .).
Jul 26 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Friday, 26 July 2013 at 12:08:06 UTC, deadalnix wrote:
 You put the limit at the wrong place. It is ok to say that some 
 piece of code is a shitty monstrosity, but ok to say that to 
 someone.

But you can also convey the same negative opinion about the code without using that kind of language. If it makes it more likely the code author will take on board the criticism and react well to it, why not? It costs you much less to temper your language, than to deal with an offended or angry developer.
 People get often offended because they associate themselves 
 with their code. This isn't a good thing, and a indicator that 
 the dev may have trouble to adapt/be territorial.

Yes, it's good to draw a line between "me" and "my code", and in my experience good people in any discipline are more harshly critical of their own work than anyone else's. But I wouldn't use pejorative descriptions of code as a deliberate technique to smoke out too-possessive developers. It's important to distinguish between people who are arrogant or bad team players versus people who react badly because they're not confident and read, "this code is crap" as a euphemism for "the developer that wrote this is crap". (Which, be fair, is sometimes what people mean, and they use criticism of code as a technique to bully a developer they don't like.) If you avoid pejorative language, you can still deal with the problem people but you have less risk of causing other problems with abrasive behaviour.
 You don't always more dev in your boat as it means management 
 overhead (yes, even with FOSS, as someone have to review the 
 code, discuss it, etc . . .).

Sure, it's just that I wouldn't make "can they deal with abrasive criticism?" the selection criteria. If I had to, I'd prefer "Can they handle problems and disagreements, even severe ones, with intelligence and courtesy?"
Jul 26 2013
prev sibling next sibling parent "Craig Dillabaugh" <cdillaba cg.scs.carleton.ca> writes:
 But you can also convey the same negative opinion about the 
 code without using that kind of language. If it makes it more 
 likely the code author will take on board the criticism and 
 react well to it, why not? It costs you much less to temper 
 your language, than to deal with an offended or angry developer.

This discussion brought to my mind the quote (don't know who said it): “Obscenity is the sign of a weak mind trying to express itself forcibly.” However, I must admit I've known many people who have brilliant minds that tend to enjoy using obscenity, so this cannot be entirely true. However, I do think the quote has some truth to it as sometimes obscenity is used to add force to an argument, when perhaps a little more thought would have simply produced a better argument. In honour of Nick through, I would like to end with a variation on the above quote that he might enjoy more (of course, I have removed the obscenity). “Obscenity is the crutch of inarticulate $# %!^%%$%ers.”
Jul 26 2013
prev sibling next sibling parent "Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> writes:
On Friday, 26 July 2013 at 14:20:49 UTC, Craig Dillabaugh wrote:
 “Obscenity is the sign of a weak mind trying to express itself
 forcibly.”

"They say it's a sign of a limited vocabulary but I don't think that's true, because I know, oh, at least 127 different words and I still prefer fuck." (Billy Connolly) :-)
Jul 26 2013
prev sibling next sibling parent "Jesse Phillips" <Jesse.K.Phillips+D gmail.com> writes:
On Thursday, 25 July 2013 at 23:14:43 UTC, SomeDude wrote:
 Whatever miffs us, let's try to keep cool and show the same 
 class that the Rust guys do here:
 https://mail.mozilla.org/pipermail/rust-dev/2013-July/004838.html

 Oh, and BTW, I really want to congrat them, they've been doing 
 a great job so far.

I'm not of the opinion this community needs a code of conduct. This group has many examples of harsh language both directed at code/projects and people. It results in community members to speak up against that language use, which is great, but we don't need Andrei and Walter stepping in and pointing out violation of rules. And I must say generally the harshest language directed to people tends to come from newer members to the forum. Though there is definitely very frank comments which can be taken as insulting. I think the worst combination is harsh language used to express something that is completely wrong. The statements relate to D shouldn't surprise any of us and knowing our field, everything is a crappy design 1970 or 2064.
Jul 26 2013
prev sibling next sibling parent "SomeDude" <lovelydear mailmetrash.com> writes:
On Friday, 26 July 2013 at 04:58:06 UTC, Nick Sabalausky wrote:
 It's either an overreaction to the quotes, or it's whitewashing 
 reality
 itself. There's nothing else in those quotes to take issue with 
 unless
 we're so very immature that we can't even handle the word 
 "crap".

Or maybe it's simply because the rules 4, 5 and 6 (or whatever) of their community simply forbids such behavior, even if only very mildly offensive. I believe the moderator wants to keep good relations with other communities and not look like of a bunch of sectar fanboys.
Jul 26 2013
prev sibling next sibling parent "SomeDude" <lovelydear mailmetrash.com> writes:
On Friday, 26 July 2013 at 17:09:50 UTC, Jesse Phillips wrote:
 I'm not of the opinion this community needs a code of conduct. 
 This group has many examples of harsh language both directed at 
 code/projects and people. It results in community members to 
 speak up against that language use, which is great, but we 
 don't need Andrei and Walter stepping in and pointing out 
 violation of rules.

I agree.
Jul 26 2013
prev sibling next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Fri, 26 Jul 2013 12:09:09 +0200
"Joseph Rushton Wakeling" <joseph.wakeling webdrake.net> wrote:

 On Friday, 26 July 2013 at 08:42:10 UTC, Nick Sabalausky wrote:
 True, but the quoted examples from the Rust NG looked quite 
 benign
 to me. If something as basic as that is deemed "insulting or
 offensive", then that creates a chilling effect on the ability
 to express negative opinions.

Yes, but you are someone who throws around swearwords very clearly. Of course you have a high tolerance for crap! :-)

A fair point ;)
 Not everyone is so thick-skinned, though, and it can create a 
 better collaborative environment if everyone tries to avoid 
 swearwords and pejorative terms (which isn't the same as 
 censoring negative opinions -- in my experience, it helps convey 
 them more effectively because the recipient has fewer grounds to 
 take offence and use that as a reason to dismiss your opinion).

Well, when we start being afraid of people mistaking our objections against a thing or idea as objections against the person, then that very much stifles (ie, not eliminates, but strongly reduces) the ability to meaningfully critique things. That's why I, for one, make a point - in anything I say or read - to maintain a strong separation between statements about a thing/idea versus statements about any person associated with such thing/idea. If I'm objecting to a person then I'll be clear about it, and I always try to assume others are *not* talking about actual people unless there's *very* clear unambiguous reason to believe otherwise. Yes, sometimes that will lead me to mistake an intended personal attack for a benign statement, but I say that's a *good* thing - it helps put a wet blanket over unnecessary potential flame wars. I really believe that's the only way to foster civility without hindering meaningful discourse. And yes, sometimes people *will* mistake something for being more malicious than it really is and they'll fly off the handle as a result of their *own* mistaken impression (and I'm not claiming I've never done that). But that's life, that's going to happen. If we're going to live our lives in fear of how others might twist things around, or what they may be offended by, then we may as well never say anything to anyone because there will *always* be a potential for someone to offended, or invent reason to be offended, no matter what we say (or what others will decide to pretend that we said). And yes, sometimes people *will* mistake something for being more malicious than it really is and they'll fly off the handle as a result of their *own* mistaken impression (and I'm not claiming I've never done that). But that's life, that's going to happen. If we're going to live our lives in fear of how others might twist things around, or what they may be offended by, then we may as well never say anything to anyone because there will *always* be a potential for someone to offended, or invent reason to be offended, no matter what we say (or what others will decide to pretend that we said).
Jul 26 2013
prev sibling next sibling parent "Jonathan A Dunlap" <jdunlap outlook.com> writes:
 That could give the impression that Linus frequently /uses 
 obscenity/
 as a /method/, which would be very, very misleading.

Zed Shaw also falls into this category. He is usually polite and civil during debates. However like Linus, he does sometimes throw around obscenity to express a particular point... a trait that other people try to emulated thinking its cool to use as a default method of asserting a point. Simply I believe the people who have the most respect or fame in the industry need to be the most careful about their expression. Just like any parent to child relationship, be aware that others may emulate your behavior and cross boundaries where you had carefully walked the line.
Jul 29 2013
prev sibling next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 29 Jul 2013 19:47:30 +0200
"Jonathan A Dunlap" <jdunlap outlook.com> wrote:

 Simply I believe the people 
 who have the most respect or fame in the industry need to be the 
 most careful about their expression.

I agree with that, but only because being well-known leads to a much higher change of being quoted out-of-context in a very widespread, or even deliberately sensationalized manner. Therefore, they (unfortunately) have to be careful what they say publicly simply for their own sake.
 Just like any parent to 
 child relationship, be aware that others may emulate your 
 behavior and cross boundaries where you had carefully walked the 
 line.

That I don't agree with at all. If person X, famous or not, is seen smoking and person Y thinks "Wow, that person's great I wanna do every dumb fuck thing they do (because I'm apparently a stupid fucking shit who can't think for myself, and can't be expected to)" and then gets hooked on nicotine gets lung cancer, etc, then it's purely person Y's *own* dumbshit fault. Blaming person X for that, famous or not, would be a ridiculous shifting of responsibilities on par with blaming some music band, or blaming JD Salinger, etc. A person, famous or not, cannot rationally be held responsible for what the masses of idiots they've never even met will end up doing out of their own colossal stupidity.
Jul 29 2013
prev sibling next sibling parent "Jonathan A Dunlap" <jdunlap outlook.com> writes:
 Blaming person X for that, famous or not, would be a ridiculous 
 shifting
 of responsibilities

 That said, it is also clear that in any organization, 
 attitudes, tone and style flow from the top down. (It's amazing 
 how pervasive this is.)

Totally agree, I didn't mention blaming. Of course, everyone is free to express themselves and how others replicate their actions cannot be controlled. However fame, just like any power, should be responsibly used, but it's a personal choice as long as it doesn't cross unacceptable boundaries (e.g. personal attacks). I'm with Walter that ideally rules shouldn't be established as the natural maturing of a community lends itself to becoming stronger because of it. Basically: a) Don't promote or feed the fire of bad behavior, best to show by example b) Remind/educate others of their influence when their actions are negatively affecting others... however don't command as it's their prerogative
Jul 29 2013
prev sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 29 Jul 2013 14:59:33 -0700
Walter Bright <newshound2 digitalmars.com> wrote:

 Not aimed at anyone in particular, but I see these kinds of
 statements all too often:
 
 "Sure, I believe in free speech, but you can't let that guy say those
 things!"
 
 "I'm certainly not advocating censorship, but those books don't
 belong in the public library!"
 

<captain pedantic> I'd happily ban a book from a public library if it was beaten, torn, scribbled over and (most damming of all) heavily soiled. The library should get a *fresh* copy if possible! </captain pedantic> Needless to say, not only do I believe in free speech, I believe in stupid groan-inducing speech :)
Jul 29 2013