Re: ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-26 Thread deadalnix via Digitalmars-d
I can confirm. i know some people in the car industry and that software fall into the same bucket as law and sausage: you don't want to know how it's done.

Re: [Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

2016-11-26 Thread Ilya Yaroshenko via Digitalmars-d
On Sunday, 27 November 2016 at 02:28:06 UTC, jmh530 wrote: On Saturday, 26 November 2016 at 16:31:40 UTC, Ilya Yaroshenko wrote: https://github.com/libmir : - mir - Generic numeric library - dcv - D Computer Vision library - mir-glas - Linear Algebra Subprograms (written in D) - mir-random

Re: ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-26 Thread Shachar Shemesh via Digitalmars-d
On 26/11/16 07:50, Walter Bright wrote: I'd like to know what really happened with the code. But as someone who has worked on flight critical systems for airliners, the designs are required to account for any single failure of anything. That means all inputs must be validated for "reasonablenes

Re: [Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

2016-11-26 Thread jmh530 via Digitalmars-d
On Saturday, 26 November 2016 at 16:31:40 UTC, Ilya Yaroshenko wrote: https://github.com/libmir : - mir - Generic numeric library - dcv - D Computer Vision library - mir-glas - Linear Algebra Subprograms (written in D) - mir-random - random numbers generators, includes non-uniform distribu

Re: ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-26 Thread Walter Bright via Digitalmars-d
On 11/26/2016 3:16 AM, deadalnix wrote: On Saturday, 26 November 2016 at 05:50:19 UTC, Walter Bright wrote: It reminds me of college, where we were told that if we worked a problem and came up with unreasonable answers, such as negative energy, we were expected to note: "I know this answer i

Re: [OT] Lower and upper median of 4

2016-11-26 Thread Timon Gehr via Digitalmars-d
On 26.11.2016 23:16, Timon Gehr wrote: On 26.11.2016 22:36, Timon Gehr wrote: Thanks! Sorry, I forgot to mention partitioning around the lower/upper median is also needed. It seems that changes the tradeoff space. -- Andrei Did you see the suggestion to make the leanLeft/leanRight cases sym

Re: [OT] Lower and upper median of 4

2016-11-26 Thread Timon Gehr via Digitalmars-d
On 26.11.2016 22:36, Timon Gehr wrote: Thanks! Sorry, I forgot to mention partitioning around the lower/upper median is also needed. It seems that changes the tradeoff space. -- Andrei Did you see the suggestion to make the leanLeft/leanRight cases symmetric, such that both use at most 4 bra

Re: [Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

2016-11-26 Thread Joseph Rushton Wakeling via Digitalmars-d
On Saturday, 26 November 2016 at 20:13:36 UTC, Andrei Alexandrescu wrote: Also I'm thinking of removing std.random's dependency on druntime, e.g. by removing the uses of enforce. Thoughts? There's no strong reason for those checks to be done via `enforce` except for a design decision that user

Re: [OT] Lower and upper median of 4

2016-11-26 Thread Timon Gehr via Digitalmars-d
On 26.11.2016 22:11, Andrei Alexandrescu wrote: On 11/26/2016 03:19 PM, Timon Gehr wrote: The following code (which I found using a quick brute-force search) uses at most 4 comparisons. int median(bool leanRight)(int[4] a){ static if(leanRight){ return a[a[0] Thanks! Sorry, I for

Re: [OT] Lower and upper median of 4

2016-11-26 Thread Era Scarecrow via Digitalmars-d
On Saturday, 26 November 2016 at 20:19:38 UTC, Timon Gehr wrote: The following code (which I found using a quick brute-force search) uses at most 4 comparisons. Which is probably the way to go. I was considering doing something similar for small sorting and the like, letting it get an optimi

Re: [OT] Lower and upper median of 4

2016-11-26 Thread Andrei Alexandrescu via Digitalmars-d
On 11/26/2016 03:19 PM, Timon Gehr wrote: The following code (which I found using a quick brute-force search) uses at most 4 comparisons. int median(bool leanRight)(int[4] a){ static if(leanRight){ return a[a[0] Thanks! Sorry, I forgot to mention partitioning around the lower/uppe

Re: [Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

2016-11-26 Thread Ilya Yaroshenko via Digitalmars-d
On Saturday, 26 November 2016 at 20:13:36 UTC, Andrei Alexandrescu wrote: On 11/26/16 11:31 AM, Ilya Yaroshenko wrote: Hey, 32-bit Mt19937 random number Generator is default in Phobos. It is default in Mir too, except that 64-bit targets use 64-bit Mt19937 instead. The last Mir Random beta i

Re: [OT] Lower and upper median of 4

2016-11-26 Thread Timon Gehr via Digitalmars-d
On 26.11.2016 18:17, Andrei Alexandrescu wrote: I'm submitting the median paper to http://2017.programmingconference.org/track/programming-2017-papers. (It was rejected by ALENEX... the short story is there was no open-source implementation and they simply didn't buy the results.) Now I have a C

Re: [Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

2016-11-26 Thread Andrei Alexandrescu via Digitalmars-d
On 11/26/16 11:31 AM, Ilya Yaroshenko wrote: Hey, 32-bit Mt19937 random number Generator is default in Phobos. It is default in Mir too, except that 64-bit targets use 64-bit Mt19937 instead. The last Mir Random beta improves performance for Mt19937. The goal was to: Congrats! Also thanks fo

Re: Transitioning std lib modules/packages

2016-11-26 Thread Andrei Alexandrescu via Digitalmars-d
On 11/25/2016 09:15 PM, rikki cattermole wrote: std.math.random The idea here is not to find new tricks for each of the modules we want to evolve, but instead devise a systematic migration path. -- Andrei

Re: Fixing implicit copies of InputRanges [was: Re: Mir Random [WIP]]

2016-11-26 Thread Andrei Alexandrescu via Digitalmars-d
On 11/26/2016 01:55 AM, Martin Nowak wrote: On Saturday, 26 November 2016 at 06:46:19 UTC, Martin Nowak wrote: Maybe non-copyability needs to become a requirement for InputRanges. Could have an optional .clone if copying is supported. What would be an InputRange where copying is correct? Inp

[OT] Lower and upper median of 4

2016-11-26 Thread Andrei Alexandrescu via Digitalmars-d
I'm submitting the median paper to http://2017.programmingconference.org/track/programming-2017-papers. (It was rejected by ALENEX... the short story is there was no open-source implementation and they simply didn't buy the results.) Now I have a C++ implementation available. I wanted to ask f

[Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.

2016-11-26 Thread Ilya Yaroshenko via Digitalmars-d
Hey, 32-bit Mt19937 random number Generator is default in Phobos. It is default in Mir too, except that 64-bit targets use 64-bit Mt19937 instead. The last Mir Random beta improves performance for Mt19937. The goal was to: 1. Improve RNG generation performance by making code more friendly f

Re: Fixing implicit copies of InputRanges [was: Re: Mir Random [WIP]]

2016-11-26 Thread Joseph Rushton Wakeling via Digitalmars-d
On Saturday, 26 November 2016 at 06:55:24 UTC, Martin Nowak wrote: Should we split off this discussion to a dlang-study thread? I would personally really welcome that, but subject to the understanding that people agree to look seriously at random algorithms (like RandomSample) and not focus t

Re: Mir Random [WIP]

2016-11-26 Thread Joseph Rushton Wakeling via Digitalmars-d
On Saturday, 26 November 2016 at 06:46:19 UTC, Martin Nowak wrote: Yes the problems are inadvertent copies and a disabled this(this) would prevent that. RNGs should have unique ownership of their internal state. Using InputRanges with phobos is somewhat clumsy. Maybe people have been burned by

Re: So these two compile and, in non-debug builds, run just fine

2016-11-26 Thread Era Scarecrow via Digitalmars-d
On Friday, 25 November 2016 at 15:30:35 UTC, Steven Schveighoffer wrote: But I think Walter's scope changes (DIP 1001 I think?) will make it so the compiler rejects this even in non-safe mode. Rejecting it would be nice... Although I wonder... I've been wondering and thinking about if we co

Re: ESA's Schiaparelli Mars probe crashed because of integer overflow

2016-11-26 Thread deadalnix via Digitalmars-d
On Saturday, 26 November 2016 at 05:50:19 UTC, Walter Bright wrote: It reminds me of college, where we were told that if we worked a problem and came up with unreasonable answers, such as negative energy, we were expected to note: "I know this answer is unreasonable, but I cannot find the

Re: Bot creating issues

2016-11-26 Thread Johannes Pfau via Digitalmars-d
Am Fri, 25 Nov 2016 11:43:07 -0800 schrieb "H. S. Teoh via Digitalmars-d" : > > I hope that the bot don't use a real address because you've forget > > to uncheck "CC add me to the list"...which means that your address > > is possibly added to a database. > > Oops! :-( > If bots really want to

Re: What is going on with the ubuntu/debian debacle ?

2016-11-26 Thread Johannes Pfau via Digitalmars-d
Am Fri, 25 Nov 2016 22:52:18 + schrieb H. S. Teoh : > - I did some googling, and found references to compiling with > `-fPIC -defaultlib=libphobos2.so` instead, i.e., if you don't > want to recompile druntime/phobos with -fPIC yourself. This also > works, *provided* you install the Phobos