Re: Sorted Array Wrapper Range

2014-12-04 Thread Tobias Pankrath via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 21:02:05 UTC, Nordlöw wrote: Have anybody written a generic automatically sorted range wrapper for RandomAccessRanges? I guess http://dlang.org/library/std/range/assumeSorted.html should play a key role. I see two typical variants: - Direct: Always sorts on

Re: How to ensure a thread cannot be blocked by the GC?

2014-12-04 Thread Jacob Carlborg via Digitalmars-d-learn
On 2014-12-03 23:53, ponce wrote: I have a DLL written in D that gets called by two different threads, created by a non-D host program (audio plugin). I did not create those threads, but my understanding is that they get attached to the D runtime. No, the runtime in D doesn't know anything

Re: More flexible sorted ranges?

2014-12-04 Thread Tobias Pankrath via Digitalmars-d-learn
On Sunday, 2 November 2014 at 15:13:37 UTC, bearophile wrote: I have often arrays that are sorted, and sometimes I'd like to append items to them. So I'd like to write something like: SortedRange!(Foo[], q{ a.x b.x }) data; data ~= Foo(5); immutable n = data.upperBound(Foo(2)).length; This

Re: How to ensure a thread cannot be blocked by the GC?

2014-12-04 Thread ponce via Digitalmars-d-learn
On Thursday, 4 December 2014 at 02:01:26 UTC, Ola Fosheim Grøstad wrote: On Thursday, 4 December 2014 at 01:36:13 UTC, Ola Fosheim Grøstad wrote: So I suppose none of your threads are suspended unless you suspend it with Thread on call_back entry? But why suspend a @nogc thread? What a mess

@property usage

2014-12-04 Thread uri via Digitalmars-d-learn
Hi All, Do you guys use @property much, or is it largely ignored/avoided? Thanks, uri

Re: How to ensure a thread cannot be blocked by the GC?

2014-12-04 Thread via Digitalmars-d-learn
On Thursday, 4 December 2014 at 08:18:23 UTC, ponce wrote: In fact I was registering them both with core.sys.windows.dll.dll_thread_attach() when callbacked with DLL_THREAD_ATTACH, but I see now that I should instead register to the runtime only the interruptible thread. Yes, I assume you

Re: @property usage

2014-12-04 Thread Rikki Cattermole via Digitalmars-d-learn
On 4/12/2014 11:21 p.m., uri wrote: Hi All, Do you guys use @property much, or is it largely ignored/avoided? Thanks, uri When it makes sense I use it. https://github.com/Devisualization/window/blob/master/interfaces/devisualization/window/interfaces/window.d#L144 vs

Re: @property usage

2014-12-04 Thread uri via Digitalmars-d-learn
On Thursday, 4 December 2014 at 10:24:00 UTC, Rikki Cattermole wrote: On 4/12/2014 11:21 p.m., uri wrote: Hi All, Do you guys use @property much, or is it largely ignored/avoided? Thanks, uri When it makes sense I use it.

Re: template bug?

2014-12-04 Thread gedaiu via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 18:25:41 UTC, bearophile wrote: Ali Çehreli: Attempting to compile with a recent dmd git head causes segmentation fault. Any compiler crash is a compiler bug. Please report it at https://issues.dlang.org/ Ali A first reduction for Bugzilla: alias

Re: @property usage

2014-12-04 Thread ketmar via Digitalmars-d-learn
On Thu, 04 Dec 2014 10:21:10 + uri via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Do you guys use @property much, or is it largely ignored/avoided? i'm using it alot for the things that looks like properties. ;-) the thing is looking like a property if it works almost as

Re: release building problem

2014-12-04 Thread Oleg via Digitalmars-d-learn
renaming struct from 'Client' to 'MClient' resolve question

Re: Is this a bug or am I doing something wrong?

2014-12-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/3/14 6:09 PM, Ali Çehreli wrote: On 12/03/2014 03:02 PM, drsneed wrote: Check out http://dpaste.dzfl.pl/a5ada78fccf5 If my function named IWillNotCompile is run, I get an error stating Component!int' and 'Component!int' are not compatible. If my function named IWillCompile is run, there

Re: Is this a bug or am I doing something wrong?

2014-12-04 Thread Ali Çehreli via Digitalmars-d-learn
On 12/04/2014 06:37 AM, Steven Schveighoffer wrote: All that being said, what a horrible error message! https://issues.dlang.org/show_bug.cgi?id=13818 Ali

Re: threading issues with D - C - Python

2014-12-04 Thread Michael via Digitalmars-d-learn
On Thursday, 4 December 2014 at 03:22:05 UTC, Ellery Newcomer wrote: dustmite? Not sure what went wrong with dustmite, but every time I tried it it just started deleting all the files in the directory and setup.py would give errors. I manually deleted a reasonable chunk of the code and I'm

Re: threading issues with D - C - Python

2014-12-04 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Dec 04, 2014 at 10:11:53PM +, Michael via Digitalmars-d-learn wrote: On Thursday, 4 December 2014 at 03:22:05 UTC, Ellery Newcomer wrote: dustmite? Not sure what went wrong with dustmite, but every time I tried it it just started deleting all the files in the directory and

Re: threading issues with D - C - Python

2014-12-04 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/04/2014 02:11 PM, Michael wrote: On Thursday, 4 December 2014 at 03:22:05 UTC, Ellery Newcomer wrote: dustmite? Not sure what went wrong with dustmite, but every time I tried it it just started deleting all the files in the directory and setup.py would give errors. I manually deleted a

Template bug with second mixin?

2014-12-04 Thread Andre via Digitalmars-d-learn
Hi, following coding fails to compile with 2.066.0 and 2.067.0-b1. This is a bug, or? source\app.d(9): Error: mixin app.Data.insertReadMethods!(readTinyInt, ubyte) is not defined template insertReadMethods(string MethodName, DataType) { enum insertReadMethods = ; } struct Data {

Re: Template bug with second mixin?

2014-12-04 Thread ketmar via Digitalmars-d-learn
On Fri, 05 Dec 2014 07:06:34 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Hi, following coding fails to compile with 2.066.0 and 2.067.0-b1. This is a bug, or? source\app.d(9): Error: mixin app.Data.insertReadMethods!(readTinyInt, ubyte) is not

Re: Template bug with second mixin?

2014-12-04 Thread ketmar via Digitalmars-d-learn
On Fri, 05 Dec 2014 07:06:34 + Andre via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Hi, following coding fails to compile with 2.066.0 and 2.067.0-b1. This is a bug, or? source\app.d(9): Error: mixin app.Data.insertReadMethods!(readTinyInt, ubyte) is not