Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-31 Thread Andrej Mitrovic
Ok this is the thing that really gets me with CTFE: void printFields(T)(T t) { enum fields = [__traits(allMembers, T)]; foreach (string field; fields) { mixin("writeln(t." ~ to!string(field) ~ ");"); // fail mixin("writeln(t." ~ to!string(fields[0]) ~ ");"); // o

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-29 Thread Andrej Mitrovic
On 3/27/11, Andrej Mitrovic wrote: > I remember a few months ago I've tried using CTFE and import > expressions to load a .def file and generate at compile-time a runtime > DLL loading mechanism in a class which would load a DLL file and > create wrapper functions for DLL functions. Found it. It

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-27 Thread Jonathan M Davis
On 2011-03-27 08:41, Robert Jacques wrote: > On Sun, 27 Mar 2011 06:06:48 -0400, Jacob Carlborg wrote: > > On 2011-03-26 21:16, Don wrote: > >> dsimcha wrote: > >>> On 3/26/2011 12:16 PM, Don wrote: > I'm giving CTFE a *major* overhaul right now. I don't know if I'll be > finished in tim

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-27 Thread Andrej Mitrovic
I remember a few months ago I've tried using CTFE and import expressions to load a .def file and generate at compile-time a runtime DLL loading mechanism in a class which would load a DLL file and create wrapper functions for DLL functions. It would also add try{}catch{} blocks based on a naming sc

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-27 Thread Don
Robert Jacques wrote: On Sun, 27 Mar 2011 08:36:39 -0400, spir wrote: On 03/26/2011 09:57 PM, Don wrote: The basic problem with the current implementation of CTFE is that it uses copy-on-write. This means that references (including dynamic arrays) don't work properly -- they just copy a snaps

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-27 Thread Robert Jacques
On Sun, 27 Mar 2011 06:06:48 -0400, Jacob Carlborg wrote: On 2011-03-26 21:16, Don wrote: dsimcha wrote: On 3/26/2011 12:16 PM, Don wrote: I'm giving CTFE a *major* overhaul right now. I don't know if I'll be finished in time for the next compiler release, but definitely by the release after

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-27 Thread Robert Jacques
On Sun, 27 Mar 2011 08:36:39 -0400, spir wrote: On 03/26/2011 09:57 PM, Don wrote: The basic problem with the current implementation of CTFE is that it uses copy-on-write. This means that references (including dynamic arrays) don't work properly -- they just copy a snapshot of the thing they a

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-27 Thread spir
On 03/26/2011 09:57 PM, Don wrote: The basic problem with the current implementation of CTFE is that it uses copy-on-write. This means that references (including dynamic arrays) don't work properly -- they just copy a snapshot of the thing they are referencing. This is bug 1330. It also means it

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-27 Thread Jacob Carlborg
On 2011-03-26 21:16, Don wrote: dsimcha wrote: On 3/26/2011 12:16 PM, Don wrote: I'm giving CTFE a *major* overhaul right now. I don't know if I'll be finished in time for the next compiler release, but definitely by the release after that. Most importantly, bug 1330, which is the root cause of

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-26 Thread David Nadlinger
On 3/26/11 9:59 PM, David Nadlinger wrote: On 3/26/11 9:16 PM, Don wrote: The basic problem with the current implementation of CTFE is that it uses copy-on-write. This means that references (including dynamic arrays) don't work properly -- they just copy a snapshot of the thing they are referenc

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-26 Thread Robert Jacques
On Sat, 26 Mar 2011 16:57:34 -0400, Don wrote: dsimcha wrote: On 3/26/2011 4:16 PM, Don wrote: I'm changing CTFE to use in-place modification. This fixes all those issues. But this is obviously a fairly intense change, and will take quite a lot of time to iron out all the corner cases. So that

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-26 Thread David Nadlinger
On 3/26/11 9:16 PM, Don wrote: The basic problem with the current implementation of CTFE is that it uses copy-on-write. This means that references (including dynamic arrays) don't work properly -- they just copy a snapshot of the thing they are referencing. This is bug 1330. It also means it burn

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-26 Thread Don
dsimcha wrote: On 3/26/2011 4:16 PM, Don wrote: dsimcha wrote: On 3/26/2011 12:16 PM, Don wrote: I'm giving CTFE a *major* overhaul right now. I don't know if I'll be finished in time for the next compiler release, but definitely by the release after that. Most importantly, bug 1330, which is

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-26 Thread dsimcha
On 3/26/2011 4:16 PM, Don wrote: dsimcha wrote: On 3/26/2011 12:16 PM, Don wrote: I'm giving CTFE a *major* overhaul right now. I don't know if I'll be finished in time for the next compiler release, but definitely by the release after that. Most importantly, bug 1330, which is the root cause o

Re: CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-26 Thread Don
dsimcha wrote: On 3/26/2011 12:16 PM, Don wrote: I'm giving CTFE a *major* overhaul right now. I don't know if I'll be finished in time for the next compiler release, but definitely by the release after that. Most importantly, bug 1330, which is the root cause of almost all of the problems, will

CTFE Overhaul (Was: RFC: Thrift project proposal (draft))

2011-03-26 Thread dsimcha
On 3/26/2011 12:16 PM, Don wrote: I'm giving CTFE a *major* overhaul right now. I don't know if I'll be finished in time for the next compiler release, but definitely by the release after that. Most importantly, bug 1330, which is the root cause of almost all of the problems, will be fixed. I hop