Re: Importing D libraries

2011-07-28 Thread Jacob Carlborg
On 2011-07-28 03:23, Andrew Wiley wrote: On Wed, Jul 27, 2011 at 2:10 AM, Jacob Carlborg d...@me.com mailto:d...@me.com wrote: Cannot be implemented in GDC. The driver/compiler/assembler/__linker structure doesn't allow it. Why is that? Well, the short version is that

Re: Frontend and backend communication

2011-07-28 Thread Dainius (GreatEmerald)
Hmm, there are still a whole lot of functions that call Shuffle(), so it might not be ideal. However, this gives me an idea - if a pointer to a function can be a parameter, can it be a global variable? In that case, the frontend would indeed be able to overwrite the function that the backend calls

Re: Importing D libraries

2011-07-28 Thread Andrew Wiley
On Wed, Jul 27, 2011 at 11:46 PM, Jacob Carlborg d...@me.com wrote: On 2011-07-28 03:23, Andrew Wiley wrote: On Wed, Jul 27, 2011 at 2:10 AM, Jacob Carlborg d...@me.com mailto:d...@me.com wrote: Cannot be implemented in GDC. The driver/compiler/assembler/__** linker

Re: Frontend and backend communication

2011-07-28 Thread Pelle
On Wed, 27 Jul 2011 19:41:37 +0200, Dainius (GreatEmerald) past...@gmail.com wrote: I have one program design problem and I wonder if anyone here could give any suggestions about it. The situation is like this: I am splitting a game into a frontend (a library) and a backend (an executable).

Re: How do I call super or object.opAssign for classes?

2011-07-28 Thread Diego Canuhé
thanks, I was looking at this the wrong way On Tue, Jul 26, 2011 at 9:54 AM, Steven Schveighoffer schvei...@yahoo.comwrote: On Tue, 26 Jul 2011 07:54:54 -0400, Diego Canuhé canuh...@gmail.com wrote: Hi, isn't that the way it's supposed to work? I mean void show(int a) { writeln(a); }

Re: Importing D libraries

2011-07-28 Thread Jacob Carlborg
On 2011-07-28 09:17, Andrew Wiley wrote: In traditional terms, cc1d is a compiler, including both the frontend and the backend. It takes parameters and spits out assembly. That's it. The GDC executable is the driver responsible for running cc1d to compile the source to assembly, as to assemble

Re: Frontend and backend communication

2011-07-28 Thread novice2
Pelle Wrote: On Wed, 27 Jul 2011 19:41:37 +0200, Dainius (GreatEmerald) You could use a struct of function pointers to define the interface, if This is known approach in app, using plugin. For example, then open source FAR (File Archive Manager) exe load pluging dll, it fill strcuct with

Re: Frontend and backend communication

2011-07-28 Thread Steven Schveighoffer
On Wed, 27 Jul 2011 13:41:37 -0400, Dainius (GreatEmerald) past...@gmail.com wrote: I have one program design problem and I wonder if anyone here could give any suggestions about it. The situation is like this: I am splitting a game into a frontend (a library) and a backend (an executable).

Re: Frontend and backend communication

2011-07-28 Thread Kai Meyer
On 07/27/2011 04:40 PM, Dainius (GreatEmerald) wrote: No no. It's the other way round. Shuffle() is in the library (backend). PlaySound() is in the executable (frontend). Since I don't want the library to be dependent on any sound libraries, I can't have PlaySound() in it. And there is no other

Re: Frontend and backend communication

2011-07-28 Thread Kai Meyer
On 07/28/2011 01:18 AM, Dainius (GreatEmerald) wrote: Hmm, there are still a whole lot of functions that call Shuffle(), so it might not be ideal. However, this gives me an idea - if a pointer to a function can be a parameter, can it be a global variable? In that case, the frontend would indeed

Re: Frontend and backend communication

2011-07-28 Thread Dainius (GreatEmerald)
On Thu, Jul 28, 2011 at 10:37 PM, Kai Meyer k...@unixlords.com wrote: On 07/27/2011 04:40 PM, Dainius (GreatEmerald) wrote: One reason for the confusing responses is that in your original post you said: a frontend (a library), a backend (an executable), Shuffle() is a backend function, and