Re: I need runtime reflection

2017-10-01 Thread bitwise via Digitalmars-d
On Sunday, 1 October 2017 at 15:53:57 UTC, Gheorghe Gabriel wrote: On Saturday, 30 September 2017 at 19:06:20 UTC, bitwise wrote: On Friday, 29 September 2017 at 16:40:38 UTC, Gheorghe Gabriel wrote: [...] Still work to do, but usable. https://github.com/nicolasjinchereau/d-reflection I

Re: I need runtime reflection

2017-10-01 Thread Gheorghe Gabriel via Digitalmars-d
On Saturday, 30 September 2017 at 19:06:20 UTC, bitwise wrote: On Friday, 29 September 2017 at 16:40:38 UTC, Gheorghe Gabriel wrote: [...] Still work to do, but usable. https://github.com/nicolasjinchereau/d-reflection I understand, thank you! :) I have created another scripting model

Re: I need runtime reflection

2017-09-30 Thread bitwise via Digitalmars-d
On Friday, 29 September 2017 at 16:40:38 UTC, Gheorghe Gabriel wrote: [...] Still work to do, but usable. https://github.com/nicolasjinchereau/d-reflection

Re: I need runtime reflection

2017-09-29 Thread bitwise via Digitalmars-d
On Friday, 29 September 2017 at 16:40:38 UTC, Gheorghe Gabriel wrote: On Friday, 29 September 2017 at 16:24:32 UTC, bitwise wrote: On Friday, 29 September 2017 at 11:05:00 UTC, Gheorghe Gabriel wrote: [...] If i compile this script to a .dll DLL support for D is currently very spotty. Before

Re: I need runtime reflection

2017-09-29 Thread Gheorghe Gabriel via Digitalmars-d
On Friday, 29 September 2017 at 16:24:32 UTC, bitwise wrote: On Friday, 29 September 2017 at 11:05:00 UTC, Gheorghe Gabriel wrote: [...] If i compile this script to a .dll DLL support for D is currently very spotty. Before investing too much time, I would suggest confirming that DLLs are

Re: I need runtime reflection

2017-09-29 Thread bitwise via Digitalmars-d
On Friday, 29 September 2017 at 11:05:00 UTC, Gheorghe Gabriel wrote: [...] If i compile this script to a .dll DLL support for D is currently very spotty. Before investing too much time, I would suggest confirming that DLLs are even properly supported for your target platform at all.

Re: I need runtime reflection

2017-09-29 Thread Gheorghe Gabriel via Digitalmars-d
On Friday, 29 September 2017 at 09:34:26 UTC, JN wrote: On Wednesday, 27 September 2017 at 20:03:27 UTC, Gheorghe Gabriel wrote: Hi, I have a 3D scene editor. I need my scripts to be dynamically loaded in the scene. In c# or java I can use reflections to do that. How can I do that with D? I

Re: I need runtime reflection

2017-09-29 Thread JN via Digitalmars-d
On Wednesday, 27 September 2017 at 20:03:27 UTC, Gheorghe Gabriel wrote: Hi, I have a 3D scene editor. I need my scripts to be dynamically loaded in the scene. In c# or java I can use reflections to do that. How can I do that with D? I know that std.traits only works in compile time. Please,

Re: I need runtime reflection

2017-09-27 Thread Jordan Wilson via Digitalmars-d
On Wednesday, 27 September 2017 at 20:03:27 UTC, Gheorghe Gabriel wrote: Hi, I have a 3D scene editor. I need my scripts to be dynamically loaded in the scene. In c# or java I can use reflections to do that. How can I do that with D? I know that std.traits only works in compile time. Please,

I need runtime reflection

2017-09-27 Thread Gheorghe Gabriel via Digitalmars-d
Hi, I have a 3D scene editor. I need my scripts to be dynamically loaded in the scene. In c# or java I can use reflections to do that. How can I do that with D? I know that std.traits only works in compile time. Please, help me Gabriel

Re: Need runtime reflection?

2012-07-18 Thread Paulo Pinto
, the type information not complete. So, seems like I need runtime reflection? and how can I do this in D? I did not find any useful information in the TypeInfo*. -- [1] free functions support, e.g. -- interface IFoo { void foo(int a, string b, float c); } void foo(int self, int a, string b, float

Re: Need runtime reflection?

2012-07-18 Thread Jacob Carlborg
On 2012-07-18 06:10, lijie wrote: Free functions support is hard, with runtime cast, I just think compile time. It's possibly to implement runtime reflection by loading the running executable and inspecting the symbol table. It's an ugly hack but it should work.

Re: Need runtime reflection?

2012-07-18 Thread lijie
On Wed, Jul 18, 2012 at 2:59 PM, Jacob Carlborg d...@me.com wrote: On 2012-07-18 06:10, lijie wrote: Free functions support is hard, with runtime cast, I just think compile time. It's possibly to implement runtime reflection by loading the running executable and inspecting the symbol

Re: Need runtime reflection?

2012-07-18 Thread Jacob Carlborg
On 2012-07-18 09:26, lijie wrote: It is an optional way. I want to do all thing in D code. You can do this in D. -- /Jacob Carlborg

Re: Need runtime reflection?

2012-07-18 Thread lijie
On Wed, Jul 18, 2012 at 2:59 PM, Jacob Carlborg d...@me.com wrote: I think you can pass a module to a template via an alias parameter. Then the template should be able to inspect all free functions using something like __traits(allMembers). Have a problem. -- // file: A.d module A; //

Re: Need runtime reflection?

2012-07-18 Thread Jacob Carlborg
On 2012-07-18 17:10, lijie wrote: On Wed, Jul 18, 2012 at 2:59 PM, Jacob Carlborg d...@me.com mailto:d...@me.com wrote: I think you can pass a module to a template via an alias parameter. Then the template should be able to inspect all free functions using something like

Re: Need runtime reflection?

2012-07-17 Thread David Piepgrass
, it is *smaller* than IReadWriter, the cast operation must search methods and build vtbl at run time. In D, GoInterface(T).opAssign!(V)(V v) can build a rich runtime information to *V* if we need. But if *V* is interface or base class, the type information not complete. So, seems like I need runtime

Re: Need runtime reflection?

2012-07-17 Thread lijie
On Tue, Jul 17, 2012 at 11:08 PM, David Piepgrass qwertie...@gmail.comwrote: I, too, was enamored with Go Interfaces and implemented them for .NET: http://www.codeproject.com/**Articles/87991/Dynamic-**

Need runtime reflection?

2012-07-16 Thread lijie
, it is *smaller* than IReadWriter, the cast operation must search methods and build vtbl at run time. In D, GoInterface(T).opAssign!(V)(V v) can build a rich runtime information to *V* if we need. But if *V* is interface or base class, the type information not complete. So, seems like I need runtime reflection