Re: "dmd -O" does not support Mir Algorithm

2017-10-30 Thread Ilya Yaroshenko via Digitalmars-d
. Please use only LDC for builds with O flag for now. [1] https://issues.dlang.org/show_bug.cgi?id=17943 Best regards, Ilya Can't seem to reproduce this: http://rextester.com/SXR47957 It is not always reproducible. It fails for me on OSX for old 2.072 too. Looks like it depends on how DM

Re: "dmd -O" does not support Mir Algorithm

2017-10-30 Thread Jonathan M Davis via Digitalmars-d
DMD bug was filled [1]. I will explore others when this is > > fixed. Please use only LDC for builds with O flag for now. > > > > [1] https://issues.dlang.org/show_bug.cgi?id=17943 > > > > Best regards, > > Ilya > > Can't seem to reproduce this: htt

Re: "dmd -O" does not support Mir Algorithm

2017-10-30 Thread bauss via Digitalmars-d
On Monday, 30 October 2017 at 05:48:16 UTC, Ilya Yaroshenko wrote: Hi, I added unittest-release builds into Travis. LDC works well but DMD fails in few places. One DMD bug was filled [1]. I will explore others when this is fixed. Please use only LDC for builds with O flag for now. [1

"dmd -O" does not support Mir Algorithm

2017-10-29 Thread Ilya Yaroshenko via Digitalmars-d
Hi, I added unittest-release builds into Travis. LDC works well but DMD fails in few places. One DMD bug was filled [1]. I will explore others when this is fixed. Please use only LDC for builds with O flag for now. [1] https://issues.dlang.org/show_bug.cgi?id=17943 Best regards, Ilya

Re: Error: -o no longer supported, use -of or -od

2017-07-17 Thread Zaheer Ahmed via Digitalmars-d
On Monday, 17 July 2017 at 17:10:51 UTC, Jonathan Marler wrote: On Monday, 17 July 2017 at 16:08:30 UTC, Zaheer Ahmed wrote: When Compiling kernel.d with makefile I get Error: -o no longer supported, use -of or -od and my Makefile Commands to do this is following. DMDPARAMS = -m32 //...some

Re: Error: -o no longer supported, use -of or -od

2017-07-17 Thread Jonathan Marler via Digitalmars-d
On Monday, 17 July 2017 at 16:08:30 UTC, Zaheer Ahmed wrote: When Compiling kernel.d with makefile I get Error: -o no longer supported, use -of or -od and my Makefile Commands to do this is following. DMDPARAMS = -m32 //...some objects %.o: %.d dmd $(DMDPARAMS) -o $@ -c $<

Error: -o no longer supported, use -of or -od

2017-07-17 Thread Zaheer Ahmed via Digitalmars-d
When Compiling kernel.d with makefile I get Error: -o no longer supported, use -of or -od and my Makefile Commands to do this is following. DMDPARAMS = -m32 //...some objects %.o: %.d dmd $(DMDPARAMS) -o $@ -c $<

Re: [WIP] A Big O notation and algebra for D

2017-06-30 Thread Mark via Digitalmars-d
On Friday, 30 June 2017 at 16:28:18 UTC, Andrei Alexandrescu wrote: On 06/30/2017 12:01 PM, Mark wrote: On Sunday, 18 December 2016 at 18:26:27 UTC, Andrei Alexandrescu wrote: Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary): https://github.co

Re: [WIP] A Big O notation and algebra for D

2017-06-30 Thread Andrei Alexandrescu via Digitalmars-d
On 06/30/2017 12:01 PM, Mark wrote: On Sunday, 18 December 2016 at 18:26:27 UTC, Andrei Alexandrescu wrote: Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary): https://github.com/dlang/phobos/pull/4965 Andrei Was this project abandoned? It's

Re: [WIP] A Big O notation and algebra for D

2017-06-30 Thread Mark via Digitalmars-d
On Sunday, 18 December 2016 at 18:26:27 UTC, Andrei Alexandrescu wrote: Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary): https://github.com/dlang/phobos/pull/4965 Andrei Was this project abandoned? It's no longer in std/experimental.

Re: Safe code as an I/O requirement

2017-05-29 Thread Paulo Pinto via Digitalmars-d
On Sunday, 28 May 2017 at 16:58:53 UTC, aberba wrote: https://lwn.net/Articles/708196/ From the look of things and feedbacks from several security analysts and system developers, [exposed] I/O needs to be memory safe. GStreamer multimedia library developed in C has safety issues [see

Re: Safe code as an I/O requirement

2017-05-28 Thread piotrklos via Digitalmars-d
On Sunday, 28 May 2017 at 16:58:53 UTC, aberba wrote: https://lwn.net/Articles/708196/ (...) Intuitively it would be much better because overwhelming majority of the code can be written with @safe, but bounds checking would have to be switched off for some plugin code for performance reason

Re: Safe code as an I/O requirement

2017-05-28 Thread Ola Fosheim Grostad via Digitalmars-d
On Sunday, 28 May 2017 at 16:58:53 UTC, aberba wrote: https://lwn.net/Articles/708196/ From the look of things and feedbacks from several security analysts and system developers, [exposed] I/O needs to be memory safe. GStreamer multimedia library developed in C has safety issues [see

Safe code as an I/O requirement

2017-05-28 Thread aberba via Digitalmars-d
https://lwn.net/Articles/708196/ From the look of things and feedbacks from several security analysts and system developers, [exposed] I/O needs to be memory safe. GStreamer multimedia library developed in C has safety issues [see article]. What would its safety be if it was written in D

Re: New fast sorting algorithm (O(n))

2017-01-03 Thread Andrei Alexandrescu via Digitalmars-d
On 01/03/2017 03:01 AM, Nicholas Wilson wrote: https://probablydance.com/2016/12/27/i-wrote-a-faster-sorting-algorithm/ on reddit https://www.reddit.com/r/programming/comments/5lqgks/i_wrote_a_faster_sorting_algorithm/ In the reddit comments there's the one idea worth looking at: https://git

Re: New fast sorting algorithm (O(n))

2017-01-03 Thread ketmar via Digitalmars-d
heads.ptr[bucket] = tails.ptr[bucket] = head; } else { tails.ptr[bucket].next = head; tails.ptr[bucket] = head; } auto next = head.next; head.next = null; head = next; } OT res, cur; foreach (OT o; heads[]) { if (o !is null && r

Re: New fast sorting algorithm (O(n))

2017-01-03 Thread ketmar via Digitalmars-d
On Tuesday, 3 January 2017 at 08:01:59 UTC, Nicholas Wilson wrote: https://probablydance.com/2016/12/27/i-wrote-a-faster-sorting-algorithm/ on reddit https://www.reddit.com/r/programming/comments/5lqgks/i_wrote_a_faster_sorting_algorithm/ ah, radix sort again, trading memory for speed. it is

New fast sorting algorithm (O(n))

2017-01-03 Thread Nicholas Wilson via Digitalmars-d
https://probablydance.com/2016/12/27/i-wrote-a-faster-sorting-algorithm/ on reddit https://www.reddit.com/r/programming/comments/5lqgks/i_wrote_a_faster_sorting_algorithm/

Re: [WIP] A Big O notation and algebra for D

2016-12-18 Thread Timothee Cour via Digitalmars-d
lish; should do it >> with Mike) >> >> Code (preliminary): https://github.com/dlang/phobos/pull/4965 >> >> >> Andrei >> > > static assert( >> complexity!(insertFrontMany!MyC) <= O("n2") * log(O("n1")), >> "Too

Re: [WIP] A Big O notation and algebra for D

2016-12-18 Thread John Colvin via Digitalmars-d
On Sunday, 18 December 2016 at 18:26:27 UTC, Andrei Alexandrescu wrote: Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary): https://github.com/dlang/phobos/pull/4965 Andrei static assert( complexity!(insertFrontMany!MyC) <= O("n2&q

[WIP] A Big O notation and algebra for D

2016-12-18 Thread Andrei Alexandrescu via Digitalmars-d
Article: http://erdani.com/d/bigo.html (do not publish; should do it with Mike) Code (preliminary): https://github.com/dlang/phobos/pull/4965 Andrei

May I get some cleanup in aisle 5 please :o)

2016-09-30 Thread Andrei Alexandrescu via Digitalmars-d
Hello, could I please direct your attention toward https://github.com/dlang/phobos/pull/4809, which will then allow pushing https://github.com/dlang/phobos/pull/4815, which would be nice? Thanks! -- Andrei

Codegen error with -O -cov

2016-09-23 Thread Andrei Alexandrescu via Digitalmars-d
https://issues.dlang.org/show_bug.cgi?id=16530 Workaround: use "ref" for the iteration variable. -- Andrei

Re: An interesting data structure with search time O(sqrt n)

2015-12-03 Thread Timon Gehr via Digitalmars-d
. [...] Ω(n^(3/2)). Thanks. My math-fu is not good enough to properly follow the argument, There was actually an (asymptotically inconsequential) error in the initial expression. Fixed version: Ignoring the work performed in the heaps each elements starts in (which is obviously at most O(n

Re: An interesting data structure with search time O(sqrt n)

2015-12-03 Thread Andrei Alexandrescu via Digitalmars-d
On 12/02/2015 06:26 AM, Timon Gehr wrote: Assume the initial array is sorted from largest to smallest. This will be the worst case for this construction algorithm, as each element will be sifted all the way down to leaf level of the last heap. [...] Ω(n^(3/2)). Thanks. My math-fu is not good

Re: An interesting data structure with search time O(sqrt n)

2015-12-02 Thread Chris Wright via Digitalmars-d
of the square, we create a new heap. This is the target heap. Now we repeatedly bubble up values from lower heaps to higher ones until no heap between the one we tried to insert into and the target heap has any surplus. This costs us in the worst case something like O(n * log(n) * sqrt(n)).

Re: An interesting data structure with search time O(sqrt n)

2015-12-02 Thread Andrei Alexandrescu via Digitalmars-d
On 12/02/2015 06:26 AM, Timon Gehr wrote: The linear search can have way better locality, so it is likely that actually the binary search dominates for some data sets. Galloping search ftw (good locality, log complexity). -- Andrei

Re: An interesting data structure with search time O(sqrt n)

2015-12-02 Thread Timon Gehr via Digitalmars-d
On 12/02/2015 03:29 PM, Timon Gehr wrote: On 12/02/2015 12:26 PM, Timon Gehr wrote: ... ∑ᵢ[2≤i≤m]·log(i)·∑ₖ[0≤k≤⌊i/2⌋-1]·(2·k+1) = ∑ᵢ[2≤i≤m]·log(i)·⌊i/2⌋² It should actually be (⌊i/2⌋-1)² here, but this does not change the asymptotics. Oops. No, it was actually right. Sorry for the noise. :

Re: An interesting data structure with search time O(sqrt n)

2015-12-02 Thread Timon Gehr via Digitalmars-d
On 12/02/2015 12:26 PM, Timon Gehr wrote: ... ∑ᵢ[2≤i≤m]·log(i)·∑ₖ[0≤k≤⌊i/2⌋-1]·(2·k+1) = ∑ᵢ[2≤i≤m]·log(i)·⌊i/2⌋² It should actually be (⌊i/2⌋-1)² here, but this does not change the asymptotics.

Re: An interesting data structure with search time O(sqrt n)

2015-12-02 Thread Timon Gehr via Digitalmars-d
On 12/01/2015 11:48 PM, Andrei Alexandrescu wrote: On 12/01/2015 12:13 AM, Andrei Alexandrescu wrote: On 11/30/15 9:47 PM, Timon Gehr wrote: On 12/01/2015 03:33 AM, Timon Gehr wrote: On 11/30/2015 09:57 PM, Andrei Alexandrescu wrote: So now consider my square heaps. We have O(n) build time

Re: An interesting data structure with search time O(sqrt n)

2015-12-01 Thread rsw0x via Digitalmars-d
On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: Okasaki's book is a continued inspiration of data structures and algorithms. [...] Sort of reminds me of a modified Hashed Array Tree — not keen on the name, I think "Bucket Array" would have been better. https://en.wik

Re: An interesting data structure with search time O(sqrt n)

2015-12-01 Thread Navin via Digitalmars-d
have O(n) build time (just a bunch of heapifications) and O(sqrt n) search. How do you build in O(n)? (The initial array is assumed to be completely unordered, afaict.) (I meant to say: There aren't any assumptions on the initial ordering of the array elements.) That's quite c

Re: An interesting data structure with search time O(sqrt n)

2015-12-01 Thread Andrei Alexandrescu via Digitalmars-d
On 12/01/2015 12:13 AM, Andrei Alexandrescu wrote: On 11/30/15 9:47 PM, Timon Gehr wrote: On 12/01/2015 03:33 AM, Timon Gehr wrote: On 11/30/2015 09:57 PM, Andrei Alexandrescu wrote: So now consider my square heaps. We have O(n) build time (just a bunch of heapifications) and O(sqrt n) search

Re: An interesting data structure with search time O(sqrt n)

2015-12-01 Thread Andrei Alexandrescu via Digitalmars-d
On 12/01/2015 04:50 AM, Emil Kirschner wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: Okasaki's book is a continued inspiration of data structures and algorithms. Start with a simple array of data. Then mentally decompose that array into a concatenation of smaller

Re: An interesting data structure with search time O(sqrt n)

2015-12-01 Thread Andrei Alexandrescu via Digitalmars-d
On 12/1/15 5:19 AM, Marko Mikulicic wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: Okasaki's book is a continued inspiration of data structures and algorithms. [...] Hi, You might find relevant ideas in https://cs.uwaterloo.ca/research/tr/1979/CS-79-31.pdf an

Re: An interesting data structure with search time O(sqrt n)

2015-12-01 Thread Marko Mikulicic via Digitalmars-d
On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: Okasaki's book is a continued inspiration of data structures and algorithms. [...] Hi, You might find relevant ideas in https://cs.uwaterloo.ca/research/tr/1979/CS-79-31.pdf and http://www.sciencedirect.com/science/ar

Re: An interesting data structure with search time O(sqrt n)

2015-12-01 Thread Emil Kirschner via Digitalmars-d
On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: Okasaki's book is a continued inspiration of data structures and algorithms. Start with a simple array of data. Then mentally decompose that array into a concatenation of smaller arrays: first has size 1, second has size 4,

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 9:47 PM, Timon Gehr wrote: On 12/01/2015 03:33 AM, Timon Gehr wrote: On 11/30/2015 09:57 PM, Andrei Alexandrescu wrote: So now consider my square heaps. We have O(n) build time (just a bunch of heapifications) and O(sqrt n) search. How do you build in O(n)? (The initial array is

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/2015 06:32 PM, Titus Nicolae wrote: On Monday, 30 November 2015 at 23:19:44 UTC, Titus Nicolae wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Timon Gehr via Digitalmars-d
On 12/01/2015 03:33 AM, Timon Gehr wrote: On 11/30/2015 09:57 PM, Andrei Alexandrescu wrote: So now consider my square heaps. We have O(n) build time (just a bunch of heapifications) and O(sqrt n) search. How do you build in O(n)? (The initial array is assumed to be completely unordered

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/2015 06:19 PM, Titus Nicolae wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. ... Hi Andrei, If I'm not mistaken, the number of hea

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Sriram Srinivasan via Digitalmars-d
The key search phrase is "cache oblivious data structures". One of the cache-friendly layouts is the van Emde Boas tree.

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Timon Gehr via Digitalmars-d
On 11/30/2015 09:57 PM, Andrei Alexandrescu wrote: So now consider my square heaps. We have O(n) build time (just a bunch of heapifications) and O(sqrt n) search. How do you build in O(n)? (The initial array is assumed to be completely unordered, afaict.)

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Timon Gehr via Digitalmars-d
On 11/30/2015 09:13 PM, Andrei Alexandrescu wrote: I haven't worked out the math for insertion and deletion yet, but they seem to also be around O(sqrt n) or O(log(n) * sqrt(n)). (Assuming the bucket sizes actually grow linearly.) It seems to me that for insertion O(√n̅ log n) is very ea

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Titus Nicolae via Digitalmars-d
On Monday, 30 November 2015 at 23:19:44 UTC, Titus Nicolae wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. ... Hi Andrei, If I'm not mis

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Torin via Digitalmars-d
On Monday, 30 November 2015 at 23:19:44 UTC, Titus Nicolae wrote: On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. ... Hi Andrei, If I'm not mis

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Titus Nicolae via Digitalmars-d
On Monday, 30 November 2015 at 20:13:15 UTC, Andrei Alexandrescu wrote: ... smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. ... Hi Andrei, If I'm not mistaken, the number of heaps is proportional to n^(1/3) not n^(1/2)

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Torin via Digitalmars-d
position, then followed by the next 4 smallest organized in a max heap, followed by the next 9 smallest organized in a max heap, ... etc. There are a total of O(sqrt n) heaps, and each has O(sqrt n) elements. Isn't the size of each heap a little larger than O(sqrt n)? The total number of ele

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread H. S. Teoh via Digitalmars-d
ere seems to > >>be nothing in between. So I was thinking, what would be a data > >>structure that allows O(sqrt n) search times? > >> > >>After a little tinkering, here's what I came up with. > > > >Interesting indeed. > > > >It leav

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
On 11/30/15 3:29 PM, Dmitry Olshansky wrote: Reminds me of Van Emde Boas layout which is however fractal in nature: sqrt(N) pieces each having sqrt(N) element are subdivided again into sqrt(sqrt(N)) pieces and so on. Not sure if you have seen, but see also cache-oblivious data-structures: http:/

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
s are searchable in linear time. Then we have highly structured collections that feature logarithmic search time. But there seems to be nothing in between. So I was thinking, what would be a data structure that allows O(sqrt n) search times? After a little tinkering, here's what I came up with. I

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Dmitry Olshansky via Digitalmars-d
earch time. But there seems to be nothing in between. So I was thinking, what would be a data structure that allows O(sqrt n) search times? After a little tinkering, here's what I came up with. Start with a simple array of data. Then mentally decompose that array into a concatenation of smal

Re: An interesting data structure with search time O(sqrt n)

2015-11-30 Thread H. S. Teoh via Digitalmars-d
Then we have highly structured collections > that feature logarithmic search time. But there seems to be nothing in > between. So I was thinking, what would be a data structure that allows > O(sqrt n) search times? > > After a little tinkering, here's what I came up with. Interesting

An interesting data structure with search time O(sqrt n)

2015-11-30 Thread Andrei Alexandrescu via Digitalmars-d
tween. So I was thinking, what would be a data structure that allows O(sqrt n) search times? After a little tinkering, here's what I came up with. Start with a simple array of data. Then mentally decompose that array into a concatenation of smaller arrays: first has size 1, second has siz

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-17 Thread ketmar via Digitalmars-d
On Fri, 17 Oct 2014 08:02:42 +0100 Iain Buclaw via Digitalmars-d wrote: > > GDC is 2.065. > And soon to be 2.066 as soon as I apply the last 244 patches between > May and the final release date. yay! you're my hero, do you know that? ;-) signature.asc Description: PGP signature

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-17 Thread Trass3r via Digitalmars-d
LDC is 2.065 Already 2.066 in the repo.

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-17 Thread Chris via Digitalmars-d
On Friday, 17 October 2014 at 09:15:37 UTC, Iain Buclaw via Digitalmars-d wrote: On 17 October 2014 09:53, Chris via Digitalmars-d wrote: On Thursday, 16 October 2014 at 22:01:37 UTC, ketmar via Digitalmars-d wrote: On Thu, 16 Oct 2014 21:53:40 + Chris via Digitalmars-d wrote: I had p

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-17 Thread Iain Buclaw via Digitalmars-d
On 17 October 2014 09:53, Chris via Digitalmars-d wrote: > On Thursday, 16 October 2014 at 22:01:37 UTC, ketmar via Digitalmars-d > wrote: >> >> On Thu, 16 Oct 2014 21:53:40 + >> Chris via Digitalmars-d wrote: >> >>> I had planned to use GDC/LDC too, but GDC is 2.064 >> >> GDC is 2.065. > > >

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-17 Thread Chris via Digitalmars-d
On Friday, 17 October 2014 at 07:02:53 UTC, Iain Buclaw via Digitalmars-d wrote: On 16 Oct 2014 23:01, "ketmar via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: On Thu, 16 Oct 2014 21:53:40 + Chris via Digitalmars-d wrote: > I had planned to use GDC/LDC too, but GDC is 2.064 GDC is

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-17 Thread Chris via Digitalmars-d
that DMD built programs are only around 10% slower than GDC/LDC builds it depends of the task. my voxel renderer runs with miserable 15 FPS with dmd -O -inline, yet with much more appropriate 40 FPS with gdc -O2. but it's a specific task, many other software can work with reasonable speed.

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-17 Thread Iain Buclaw via Digitalmars-d
On 16 Oct 2014 23:01, "ketmar via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: > > On Thu, 16 Oct 2014 21:53:40 + > Chris via Digitalmars-d wrote: > > > I had planned to use GDC/LDC too, but GDC is 2.064 > GDC is 2.065. > And soon to be 2.066 as soon as I apply the last 244 patches be

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread ketmar via Digitalmars-d
le 15 FPS with dmd -O -inline, yet with much more appropriate 40 FPS with gdc -O2. but it's a specific task, many other software can work with reasonable speed. signature.asc Description: PGP signature

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Chris via Digitalmars-d
On Thursday, 16 October 2014 at 21:23:09 UTC, Trass3r wrote: What should I do? Am I stuck with not using -O and -inline for now, hoping that things will improve in the future? Step 1) DustMite the heck out of it and create a bug report. Step 2) Start using ldc/gdc for release build I had

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Trass3r via Digitalmars-d
What should I do? Am I stuck with not using -O and -inline for now, hoping that things will improve in the future? Step 1) DustMite the heck out of it and create a bug report. Step 2) Start using ldc/gdc for release builds if possible.

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Chris via Digitalmars-d
writefln("Q: %s\nA: %s", q, getAnswer(q)); } } } mixin template News() { string[] Questions; auto getAnswer(string q) { return Answers[q]; } } [version 2.065] $ dmd optimizer.d -O -release -inline -noboundscheck $ ./optimizer $ Segmentation fault (core dumped) [versino 2.0

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Chris via Digitalmars-d
n code. This escapes the optimizer. mixin template PressConference { int STATEMENT_LEN; // ... void someFunction() { // uses STATEMENT_LEN } } Hm. If I compile with -release -noboundscheck -inline (but without -O), I get this error: Internal error: backend\cod4.c 358 If I compi

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Chris via Digitalmars-d
On Thursday, 16 October 2014 at 11:54:09 UTC, Chris wrote: Ok, I've found the flaw in my program. It's code that was left over after refactoring some modules. It looks like this (simplified): I import a module and access an enum in that module. However, I never use the accessed element mo

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Chris via Digitalmars-d
compiler bug? I like to think it's the latter, after all the program works perfectly without -O. On the other hand, it's scary because I have no clue where to look for the offender. It could be either. Sometimes, if you program relies on undefined behaviour, enabling optimizations mig

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Sag Academy via Digitalmars-d
compiler bug? I like to think it's the latter, after all the program works perfectly without -O. On the other hand, it's scary because I have no clue where to look for the offender. It could be either. Sometimes, if you program relies on undefined behaviour, enabling optimizations mig

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Peter Alexander via Digitalmars-d
ogram works perfectly without -O. On the other hand, it's scary because I have no clue where to look for the offender. It could be either. Sometimes, if you program relies on undefined behaviour, enabling optimizations might be what uncovers the bug, and manifest as a crash. On the othe

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-16 Thread Chris via Digitalmars-d
On Monday, 13 October 2014 at 13:11:13 UTC, Gary Willoughby wrote: On Monday, 13 October 2014 at 09:18:01 UTC, Chris wrote: I have the same problem. If I don't use -O it works fine (-inline is ok). If I use it, I get an error when executing the program. I had the same about a yea

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-13 Thread OlaOst via Digitalmars-d
On Monday, 13 October 2014 at 14:53:24 UTC, ketmar via Digitalmars-d wrote: On Mon, 13 Oct 2014 14:28:49 + OlaOst via Digitalmars-d wrote: Here too. I just managed to pare it down to 2 files: care to fill bugreport? Added to https://issues.dlang.org/show_bug.cgi?id=13244

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-13 Thread ketmar via Digitalmars-d
On Mon, 13 Oct 2014 14:28:49 + OlaOst via Digitalmars-d wrote: > Here too. I just managed to pare it down to 2 files: care to fill bugreport? signature.asc Description: PGP signature

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-13 Thread Daniel Murphy via Digitalmars-d
"Lumi Pakkanen" wrote in message news:choqmgtkydoxleape...@forum.dlang.org... I'm creating a somewhat large hobby project with D. I'm enjoying the ride so far. Unit tests and contract programming have saved me from long bug hunts, but today I ran into a bug that seems to

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-13 Thread OlaOst via Digitalmars-d
On Monday, 13 October 2014 at 13:11:13 UTC, Gary Willoughby wrote: On Monday, 13 October 2014 at 09:18:01 UTC, Chris wrote: I have the same problem. If I don't use -O it works fine (-inline is ok). If I use it, I get an error when executing the program. I had the same about a yea

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-13 Thread Gary Willoughby via Digitalmars-d
On Monday, 13 October 2014 at 09:18:01 UTC, Chris wrote: I have the same problem. If I don't use -O it works fine (-inline is ok). If I use it, I get an error when executing the program. I had the same about a year ago, thought i was going crazy and refactored the program and it went

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-13 Thread Chris via Digitalmars-d
On Sunday, 12 October 2014 at 15:44:14 UTC, Lumi Pakkanen wrote: I'm creating a somewhat large hobby project with D. I'm enjoying the ride so far. Unit tests and contract programming have saved me from long bug hunts, but today I ran into a bug that seems to be caused by the -O a

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-12 Thread ketmar via Digitalmars-d
On Sun, 12 Oct 2014 15:44:13 + Lumi Pakkanen via Digitalmars-d wrote: > What should I do? Am I stuck with not using -O and -inline for > now, hoping that things will improve in the future? p.s. you can try ldc/gdc too. they using different codegens, and their optimisers are better th

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-12 Thread Mike Parker via Digitalmars-d
d I do? Am I stuck with not using -O and -inline for now, hoping that things will improve in the future? You might try to reduce it with DustMite: https://github.com/CyberShadow/DustMite/wiki --- This email is free from viruses and malware because avast! Antivirus protection is ac

Re: Consistent bugs with dmd -O -inline in a large project

2014-10-12 Thread ketmar via Digitalmars-d
On Sun, 12 Oct 2014 15:44:13 + Lumi Pakkanen via Digitalmars-d wrote: > What should I do? haven't you tried DustMite? https://github.com/CyberShadow/DustMite/wiki it may help to get reduced test case. > Am I stuck with not using -O and -inline for > now, hoping that things w

Consistent bugs with dmd -O -inline in a large project

2014-10-12 Thread Lumi Pakkanen via Digitalmars-d
I'm creating a somewhat large hobby project with D. I'm enjoying the ride so far. Unit tests and contract programming have saved me from long bug hunts, but today I ran into a bug that seems to be caused by the -O and -inline flags with dmd. Without the flags the program runs corr

Re: Complete the checklist! :o)

2014-08-06 Thread Kagamin via Digitalmars-d
On Wednesday, 6 August 2014 at 08:16:56 UTC, Brian Schott wrote: http://en.wikipedia.org/wiki/MUMPS Ah, I remember, Caché ObjectScript, a superset of MUMPS is a scripting language for Caché database which InterSystems claims to be the fastest object-oriented database.

Re: Complete the checklist! :o)

2014-08-06 Thread Wyatt via Digitalmars-d
On Wednesday, 6 August 2014 at 09:39:10 UTC, Brian Schott wrote: On Wednesday, 6 August 2014 at 08:44:57 UTC, eles wrote: OMG, this one is not intended to be a joke! http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx http://thedailywtf.com/Articles/Avoiding-MUMPS--Arcadius.aspx I interv

Re: Complete the checklist! :o)

2014-08-06 Thread eles via Digitalmars-d
On Wednesday, 6 August 2014 at 09:39:10 UTC, Brian Schott wrote: On Wednesday, 6 August 2014 at 08:44:57 UTC, eles wrote: OMG, this one is not intended to be a joke! http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx http://thedailywtf.com/Articles/Avoiding-MUMPS--Arcadius.aspx I interv

Re: Complete the checklist! :o)

2014-08-06 Thread Brian Schott via Digitalmars-d
On Wednesday, 6 August 2014 at 08:44:57 UTC, eles wrote: OMG, this one is not intended to be a joke! http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx http://thedailywtf.com/Articles/Avoiding-MUMPS--Arcadius.aspx I interviewed with this company once. (I'm not the one who wrote in to TD

Re: Complete the checklist! :o)

2014-08-06 Thread eles via Digitalmars-d
On Wednesday, 6 August 2014 at 08:16:56 UTC, Brian Schott wrote: On Wednesday, 6 August 2014 at 08:12:57 UTC, eles wrote: http://en.wikipedia.org/wiki/Malbolge (=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc (no, I wasn't cursing you!) http://en.wikipedia.org/wiki/INTERCA

Re: Complete the checklist! :o)

2014-08-06 Thread Brian Schott via Digitalmars-d
On Wednesday, 6 August 2014 at 08:12:57 UTC, eles wrote: What could be worse than Javascript? Seriously. Serious questions call for serious answers. http://en.wikipedia.org/wiki/Malbolge http://en.wikipedia.org/wiki/INTERCAL http://en.wikipedia.org/wiki/MUMPS

Re: Complete the checklist! :o)

2014-08-06 Thread eles via Digitalmars-d
On Wednesday, 6 August 2014 at 07:44:39 UTC, Iain Buclaw via Digitalmars-d wrote: On 5 August 2014 22:34, H. S. Teoh via Digitalmars-d wrote: On Tue, Aug 05, 2014 at 10:14:21AM -0700, Andrei Alexandrescu [ ] You have reinvented Javascript but worse What could be worse than Javascript? Ser

Re: Complete the checklist! :o)

2014-08-06 Thread Iain Buclaw via Digitalmars-d
work. Here is why it will not > work. > > You appear to believe that: > [ ] Syntax is what makes programming difficult > [X] Garbage collection is free[ ] Computers have infinite > memory > [X] Nobody really needs: > [ ] concurrency [X] a REPL [

Re: Complete the checklist! :o)

2014-08-06 Thread Kagamin via Digitalmars-d
On Tuesday, 5 August 2014 at 21:36:30 UTC, H. S. Teoh via Digitalmars-d wrote: [X] stack-based Probably not what you thought.

Re: Complete the checklist! :o)

2014-08-05 Thread H. S. Teoh via Digitalmars-d
collection is free[ ] Computers have infinite memory [X] Nobody really needs: [ ] concurrency [X] a REPL [X] debugger support [X] IDE support [ ] I/O [ ] to interact with code not written in your language [ ] The entire world speaks 7-bit ASCII [X] Scaling up to large software pro

Complete the checklist! :o)

2014-08-05 Thread Andrei Alexandrescu via Digitalmars-d
http://colinm.org/language_checklist.html Andrei

Re: Simulating I/O errors [was: assume, assert, enforce, @safe]

2014-08-01 Thread Walter Bright via Digitalmars-d
On 8/1/2014 1:02 PM, H. S. Teoh via Digitalmars-d wrote: Not to mention, it lets you *really* unittest your code thoroughly, because it isolates each separate stage of the processing into its own self-contained unit, with clearly-defined standard interconnects. Your unittest can therefore easily

Re: Simulating I/O errors [was: assume, assert, enforce, @safe]

2014-08-01 Thread H. S. Teoh via Digitalmars-d
ne of the very cool things about the ranges+algorithms style of > programming is things like I/O don't get mixed up in code that > operates on data. [...] Not to mention, it lets you *really* unittest your code thoroughly, because it isolates each separate stage of the processing i

Re: Simulating I/O errors [was: assume, assert, enforce, @safe]

2014-08-01 Thread Walter Bright via Digitalmars-d
On 8/1/2014 8:18 AM, Assaf Gordon via Digitalmars-d wrote: As Walter said, it's alarming how many programs fail to handle such cases (though D is pretty solid in that regard). One of the very cool things about the ranges+algorithms style of programming is things like I/O don't get m

Re: Simulating I/O errors [was: assume, assert, enforce, @safe]

2014-08-01 Thread H. S. Teoh via Digitalmars-d
;it is nearly full. Now run your favorite programs that read and write > >files. Sit back and watch the crazy results (far too many programs > >assume that writes succeed). Operating systems also behave > >erratically in this scenario, hence the 'brave' suggestion. > >

Simulating I/O errors [was: assume, assert, enforce, @safe]

2014-08-01 Thread Assaf Gordon via Digitalmars-d
many programs assume that writes succeed). Operating systems also behave erratically in this scenario, hence the 'brave' suggestion. If anyone is interested in simulating I/O errors and nearly-full file system on Linux, I can suggest the following scripts: http://git.savann

Re: [OT] The ART runtime presentation at Google I/O 2014

2014-06-28 Thread w0rp via Digitalmars-d
On Saturday, 28 June 2014 at 06:23:25 UTC, Paulo Pinto wrote: Hi, posting this talk here, as Java performance on Android is often mentioned in the discussions about GC vs RC performance. So here you have the Android team explaining: - Dalvik GC sucks and is a basic stop the world implementa

Re: [OT] The ART runtime presentation at Google I/O 2014

2014-06-28 Thread Paulo Pinto via Digitalmars-d
Am 28.06.2014 14:42, schrieb Kagamin: BTW, how GC compares to RC with respect to battery life? All those memory scans don't come for free. I don't know, but given the focus to battery life in the upcoming Android release I would say it should be good enough. My S3 with Dalvik can last almost

Re: [OT] The ART runtime presentation at Google I/O 2014

2014-06-28 Thread Kagamin via Digitalmars-d
BTW, how GC compares to RC with respect to battery life? All those memory scans don't come for free.

  1   2   3   4   5   >