Re: [proto] : Proto transform with state

2011-01-29 Thread Eric Niebler
On 11/18/2010 4:56 AM, Eric Niebler wrote: I think Proto transforms need a let statement for storing intermediate results. Maybe something like this: struct RenumberFun : proto::fold _ , make_pair(fusion::vector0(), proto::_state) , let _a(

Re: [proto] : Proto transform with state

2011-01-29 Thread Eric Niebler
On 1/29/2011 7:49 PM, Eric Niebler wrote: Bills be damned. I just committed to trunk an implementation of proto::let, along with tests and reference docs. End-user docs are still todo. sigh As often happens, I woke up this morning knowing this code was broken, so I pulled it. I think I finally

Re: [proto] : Proto transform with state

2010-12-07 Thread Eric Niebler
On 12/6/2010 4:50 PM, Thomas Heller wrote: Eric Niebler wrote: I played with the let transform idea over the weekend. It *may* be possible to accomplish without the two problems I described above. See the attached let transform (needs latest Proto trunk). I'm also attaching the Renumber

Re: [proto] : Proto transform with state

2010-12-07 Thread Thomas Heller
Eric Niebler wrote: On 12/6/2010 4:50 PM, Thomas Heller wrote: Eric Niebler wrote: I played with the let transform idea over the weekend. It *may* be possible to accomplish without the two problems I described above. See the attached let transform (needs latest Proto trunk). I'm also

Re: [proto] : Proto transform with state

2010-12-07 Thread Thomas Heller
Eric Niebler wrote: On 12/7/2010 3:13 PM, Thomas Heller wrote: Eric Niebler wrote: Now they do: T()(e,s,d). Inside T::impl, D had better be the type of d. Nowhere does the _data transform appear in this code, so changing _data to be smart about environments and scopes won't save you if

Re: [proto] : Proto transform with state

2010-12-06 Thread Eric Niebler
On 11/18/2010 3:31 PM, Eric Niebler wrote: On 11/18/2010 1:45 PM, Thomas Heller wrote: Eric Niebler e...@... writes: It's REALLY hard. The let context needs to be bundled with the Expr, State, or Data parameters somehow, but in a way that's transparent. I don't actually know if it's possible.

Re: [proto] : Proto transform with state

2010-12-06 Thread Thomas Heller
Eric Niebler wrote: On 11/18/2010 3:31 PM, Eric Niebler wrote: On 11/18/2010 1:45 PM, Thomas Heller wrote: Eric Niebler e...@... writes: It's REALLY hard. The let context needs to be bundled with the Expr, State, or Data parameters somehow, but in a way that's transparent. I don't actually

Re: [proto] : Proto transform with state

2010-11-18 Thread Thomas Heller
Eric Niebler e...@... writes: On 11/17/2010 2:18 PM, joel falcou wrote: On 17/11/10 19:46, Eric Niebler wrote: See the attached code. I wish I had a better answer. It sure would be nice to generalize this for other times when new state needs to bubble up and back down. Just chiming

Re: [proto] : Proto transform with state

2010-11-17 Thread joel falcou
On 17/11/10 19:46, Eric Niebler wrote: See the attached code. I wish I had a better answer. It sure would be nice to generalize this for other times when new state needs to bubble up and back down. Just chiming in. We had the exact same problem in quaff where needed to carry on a process ID

Re: [proto] : Proto transform with state

2010-11-17 Thread Eric Niebler
On 11/17/2010 2:18 PM, joel falcou wrote: On 17/11/10 19:46, Eric Niebler wrote: See the attached code. I wish I had a better answer. It sure would be nice to generalize this for other times when new state needs to bubble up and back down. Just chiming in. We had the exact same problem in