Re: extern(C) with function returning user type

2015-08-01 Thread Kyoji Klyden via Digitalmars-d-learn
On Saturday, 1 August 2015 at 04:11:02 UTC, Laeeth Isharc wrote: Walter observes that if you are a Java programmer and start writing D, you will write D like you write Java. And so I suppose one will see what one doesn't have in Java, but not so much the benefits of D. That's true of other

Re: extern(C) with function returning user type

2015-07-31 Thread Kyoji Klyden via Digitalmars-d-learn
On Friday, 31 July 2015 at 16:09:23 UTC, bachmeier wrote: On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji Klyden wrote: So idk, it feels silly and counterproductive to have D not able to natively use C libraries. Are we just gonna have to write D bindings to every notable library out there?

Re: extern(C) with function returning user type

2015-07-31 Thread Kyoji Klyden via Digitalmars-d-learn
On Friday, 31 July 2015 at 19:13:18 UTC, Laeeth Isharc wrote: On Friday, 31 July 2015 at 17:14:29 UTC, Kyoji Klyden wrote: On Friday, 31 July 2015 at 16:09:23 UTC, bachmeier wrote: On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji Klyden wrote: So idk, it feels silly and counterproductive to have

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: extern(C) with function returning user type

2015-07-29 Thread Kyoji Klyden via Digitalmars-d-learn
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

extern(C) with function returning user type

2015-07-29 Thread Kyoji Klyden via Digitalmars-d-learn
How would I use a C function that's returning a struct? auto doesn't work here, and from what I can tell D can't import C headers. (If it really can't then, that would be a very welcome feature) I do have the required libs but I can't create my D obj file so I can't really get there. I

Re: exclude current directory from search path in dmd ?

2015-06-08 Thread Kyoji Klyden via Digitalmars-d-learn
On Tuesday, 9 June 2015 at 00:22:09 UTC, Timothee Cour wrote: On Mon, Jun 8, 2015 at 12:08 AM, Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: The easiest way is to not use search paths, and instead pass all the modules you want compiled to the compiler

Re: string to char array?

2015-06-08 Thread Kyoji Klyden via Digitalmars-d-learn
On Monday, 8 June 2015 at 09:54:28 UTC, Kagamin wrote: On Sunday, 7 June 2015 at 17:41:11 UTC, Kyoji Klyden wrote: Do you perchance have any links to learning resources for the D runtime(aside from just the github repository), and also maybe x86 architecture stuff? (I know intel has some 1000+

Re: string to char array?

2015-06-03 Thread Kyoji Klyden via Digitalmars-d-learn
Ooooh okay, I'm starting to get it. I think this last question should clear it up for me: When a string is made, how is the struct Slice handled? What does ptr get assigned?