release building problem

2014-12-03 Thread Oleg via Digitalmars-d-learn
When I build my program with release flag I get an errors, in debug build all works .dub/build/application-profile-linux.posix-x86_64-dmd-AD20DEA65FEE410217932549C1D262EF/ftree.o: In function `_D3des4flow5event5Event27__T6__ctorTS6client6ClientZ6__ctorMFNcmKxS6client6ClientZS3des4flow5event5Ev

Re: release building problem

2014-12-03 Thread Rikki Cattermole via Digitalmars-d-learn
On 3/12/2014 11:15 p.m., Oleg wrote: When I build my program with release flag I get an errors, in debug build all works .dub/build/application-profile-linux.posix-x86_64-dmd-AD20DEA65FEE410217932549C1D262EF/ftree.o: In function `_D3des4flow5event5Event27__T6__ctorTS6client6ClientZ6__ctorMFNcmKx

Ncurses deprecated "~master" issue

2014-12-03 Thread Paul via Digitalmars-d-learn
Sorry if this is a little off-topic, I posted this in the Dub forum on 23/11/14 but have had no reply yet: --- I read that the use of a branch spec like "~master" in dub.json is deprecated. I also read that it could be overriden on a per-project basis by editing the project's dub.selections.j

Re: release building problem

2014-12-03 Thread Oleg via Digitalmars-d-learn
the same result of building release or profile

template bug?

2014-12-03 Thread gedaiu via Digitalmars-d-learn
Hi, Is this a bug in the compiler? import std.stdio; import std.typetuple; class A { int foo() { return 0; } } class B : A { alias A.foo foo; override int foo() { return 1; } } template ItemProperty(item, string meth

Re: Ncurses deprecated "~master" issue

2014-12-03 Thread Matt Soucy via Digitalmars-d-learn
On 12/03/2014 07:07 AM, Paul wrote: > Sorry if this is a little off-topic, I posted this in the Dub forum on > 23/11/14 but have had no reply yet: > > > --- > I read that the use of a branch spec like "~master" in dub.json is > deprecated. I also read that it could be overriden on a per-project

Re: template bug?

2014-12-03 Thread Ali Çehreli via Digitalmars-d-learn
On 12/03/2014 09:10 AM, gedaiu wrote: Hi, Is this a bug in the compiler? 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

Re: curl: catching exception on connect.

2014-12-03 Thread Ali Çehreli via Digitalmars-d-learn
On 12/02/2014 05:19 AM, Suliman wrote: connect() sends a "CONNECT" request to the server, as defined by HTTP [1]. This method is only used when you're working with proxies and the like. What you most likely want, however, is a "GET" request. Use get() for that. So what is the best way to chec

Re: template bug?

2014-12-03 Thread bearophile via Digitalmars-d-learn
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 TypeTuple(T...) = T; struct A { void foo() {} } template ItemProper

Re: Ncurses deprecated "~master" issue

2014-12-03 Thread Paul via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 17:37:18 UTC, Matt Soucy wrote: On 12/03/2014 07:07 AM, Paul wrote: Sorry if this is a little off-topic, I posted this in the Dub forum on 23/11/14 but have had no reply yet: --- I read that the use of a branch spec like "~master" in dub.json is deprecated. I

Re: threading issues with D -> C -> Python

2014-12-03 Thread Michael via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 06:11:56 UTC, Ellery Newcomer wrote: are you looking at this pyd: https://bitbucket.org/ariovistus/pyd I'm looking at this one, which is what came up when googling "python to D" http://pyd.dsource.org/

Re: threading issues with D -> C -> Python

2014-12-03 Thread Michael via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 06:30:07 UTC, Russel Winder via Digitalmars-d-learn wrote: As far as I can tell PyD is still active, but in a non-funded FOSS way, i.e. work happens as and when volunteers put time and effort in. I haven't tried PyD recently but it worked fine last time I did.

Sorted Array Wrapper Range

2014-12-03 Thread Nordlöw
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 write() and modify() - Lazy: Sorts lazily on read() read() of

Re: threading issues with D -> C -> Python

2014-12-03 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Dec 2014 20:41:46 + Michael via Digitalmars-d-learn wrote: > On Wednesday, 3 December 2014 at 06:11:56 UTC, Ellery Newcomer > wrote: > > are you looking at this pyd: > > https://bitbucket.org/ariovistus/pyd > > I'm looking at this one, which is what came up when googling > "pyt

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

2014-12-03 Thread ponce via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 22:53:48 UTC, 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. Thread A is a rea

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

2014-12-03 Thread ponce via Digitalmars-d-learn
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. Thread A is a real-time callback and should not ever block. @nogc seems perfe

Is this a bug or am I doing something wrong?

2014-12-03 Thread drsneed via Digitalmars-d-learn
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 are no errors. They do the same thing, just written slightly differently.

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

2014-12-03 Thread Ali Çehreli via Digitalmars-d-learn
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 are no errors. They do the same thin

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

2014-12-03 Thread drsneed via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 23:09:02 UTC, 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 na

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

2014-12-03 Thread via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 22:53:48 UTC, 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. Thread A is a rea

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

2014-12-03 Thread via Digitalmars-d-learn
On Thursday, 4 December 2014 at 00:27:49 UTC, Ola Fosheim Grøstad wrote: I assume you are referring to Windows and I have no good answer Btw, I found this page to be a nice starting point and generally a good read for writing portable code: http://msdn.microsoft.com/en-us/library/ms811896.as

Re: threading issues with D -> C -> Python

2014-12-03 Thread Michael via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 21:35:48 UTC, ketmar via Digitalmars-d-learn wrote: ah, dsource strikes back! that vile site keep biting us again and again. let's hope that new admins will kill it for good. Yeah. I've got the new PyD and it compiles and does everything I want much nicer, but

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

2014-12-03 Thread via Digitalmars-d-learn
On Thursday, 4 December 2014 at 00:27:49 UTC, Ola Fosheim Grøstad wrote: IRRC the D GC uses SIGUSR1 on unix, so there you should be able Hmmm, I have no idea why I wrote this. According to the code for the runtime it only suspends threads that inherit from Thread? GC fullcollect calls thread_

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

2014-12-03 Thread via Digitalmars-d-learn
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 of incorrect recollection and typos (it is late, 3AM :-P): I meant to say

Re: threading issues with D -> C -> Python

2014-12-03 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/03/2014 04:43 PM, Michael wrote: On Wednesday, 3 December 2014 at 21:35:48 UTC, ketmar via Digitalmars-d-learn wrote: ah, dsource strikes back! that vile site keep biting us again and again. let's hope that new admins will kill it for good. Yeah. I've got the new PyD and it compiles and

Re: threading issues with D -> C -> Python

2014-12-03 Thread Michael via Digitalmars-d-learn
On Thursday, 4 December 2014 at 02:31:51 UTC, Ellery Newcomer wrote: okay. that's not too surprising. If you can get me a minimal example, I'd be happy to have a look since pyd should probably support this case. Cool. Unfortunately most of the times I've attempted to reduce this down it alw

Re: Why the DMD Backend?

2014-12-03 Thread Jesse Phillips via Digitalmars-d-learn
On Friday, 28 November 2014 at 20:14:07 UTC, LeakingAntonovPlane wrote: DDMD, bootstraping. LDC and GDC are not written in D. Pretty sure that DDMD project is not a translation of the backend and is only the shared front end source code.

Re: threading issues with D -> C -> Python

2014-12-03 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/03/2014 06:56 PM, Michael wrote: On Thursday, 4 December 2014 at 02:31:51 UTC, Ellery Newcomer wrote: okay. that's not too surprising. If you can get me a minimal example, I'd be happy to have a look since pyd should probably support this case. Cool. Unfortunately most of the times I'v

Re: Sorted Array Wrapper Range

2014-12-03 Thread Xinok 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: More flexible sorted ranges?

2014-12-03 Thread Nordlöw
On Sunday, 2 November 2014 at 15:13:37 UTC, bearophile wrote: SortedRange!(Foo[], q{ a.x < b.x }) data; data ~= Foo(5); immutable n = data.upperBound(Foo(2)).length; Have anybody implemented SortedRange? I can't find any refs.

Re: Sorted Array Wrapper Range

2014-12-03 Thread Nordlöw
On Thursday, 4 December 2014 at 04:24:26 UTC, Xinok wrote: There was a relevant discussion about a month ago here: http://forum.dlang.org/thread/uhfpppdslxdghycon...@forum.dlang.org I can't any reference to code, typically for SortedRange. Has this been implemented somewhere?