Re: extern(C) with function returning user type

2015-07-30 Thread bachmeier via Digitalmars-d-learn
On Thursday, 30 July 2015 at 01:14:06 UTC, Mike Parker wrote: On Wednesday, 29 July 2015 at 18:42:45 UTC, Kyoji Klyden wrote: Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a round about solution almost working. :P Really? I see it as

Re: Compare types with `static if` in template function.

2015-07-30 Thread Vladde Nordholm via Digitalmars-d-learn
On Wednesday, 29 July 2015 at 22:40:08 UTC, Ali Çehreli wrote: You seem to be using type names instead of member names: static if(is(typeof(c) == dchar) || is(typeof(c) == char)) { slots[xy.y][xy.x].character = c; } else

Re: Yes or No Options

2015-07-30 Thread Alex via Digitalmars-d-learn
My father owns a small software company, specialized in market data products. www.bccgi.com (in case anyone is interested) So programming was basically around all my life. I do a small job in his company and my next task was to learn D. There are two trainees and the three of us have to

Re: Yes or No Options

2015-07-30 Thread Chris via Digitalmars-d-learn
On Thursday, 30 July 2015 at 14:20:41 UTC, Alex wrote: My father owns a small software company, specialized in market data products. www.bccgi.com (in case anyone is interested) So programming was basically around all my life. I do a small job in his company and my next task was to learn D.

std.container.array - are these arrays passed by reference?

2015-07-30 Thread Harry P via Digitalmars-d-learn
I'm trying to avoid the gc so I'm using std.container.array arrays instead of the standard ones. I know the standard arrays return by reference so I imagine that the nogc alternative is also passed by reference because it'd be a struct with a pointer and a length, yeah? I just want to check

Re: extern(C) with function returning user type

2015-07-30 Thread Kyoji Klyden via Digitalmars-d-learn
On Thursday, 30 July 2015 at 11:32:10 UTC, bachmeier wrote: On Thursday, 30 July 2015 at 01:14:06 UTC, Mike Parker wrote: On Wednesday, 29 July 2015 at 18:42:45 UTC, Kyoji Klyden wrote: Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a

Re: std.container.array - are these arrays passed by reference?

2015-07-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, July 30, 2015 21:05:24 Harry P via Digitalmars-d-learn wrote: I'm trying to avoid the gc so I'm using std.container.array arrays instead of the standard ones. I know the standard arrays return by reference so I imagine that the nogc alternative is also passed by reference because

Re: extern(C) with function returning user type

2015-07-30 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-07-29 20:42, Kyoji Klyden wrote: Thanks for the replies, This issue really highlights one of D's weak points I think. I've atleast got a round about solution almost working. :P You might want to check out Calypso [1] as well. [1]

Re: Yes or No Options

2015-07-30 Thread Ali Çehreli via Digitalmars-d-learn
On 07/30/2015 08:14 AM, Chris wrote: I wonder, is your father's company listed among those using D? I think there's a list somewhere on Wiki, if not we should have one :-) I don't think they use D yet but the page is here: http://wiki.dlang.org/Current_D_Use Ali

Re: Struct that destroys its original handle on copy-by-value

2015-07-30 Thread via Digitalmars-d-learn
On Wednesday, 29 July 2015 at 19:10:36 UTC, Adam D. Ruppe wrote: On Sunday, 26 July 2015 at 12:16:30 UTC, Joseph Rushton Wakeling wrote: My aim by contrast is to _allow_ that kind of use, but render the original handle empty when it's done. I don't think D offers any way to do that. With the

Re: Typed Message Passing between D Processes

2015-07-30 Thread Atila Neves via Digitalmars-d-learn
On Thursday, 30 July 2015 at 05:53:48 UTC, yawniek wrote: On Wednesday, 29 July 2015 at 16:36:41 UTC, Atila Neves wrote: LDC: Cerealed: 970 ms, 482 μs, and 6 hnsecs MsgPack: 896 ms, 591 μs, and 2 hnsecs Not too shabby! Atila cool. what are the advantages of cereald over msgpack? AFAIK,