[Castor] FYI : Castor 1.1 & Boost

A quick update for the many who expressed interest in the Castor library at the "Logic Paradigm for C++" talk at this year's BoostCon and also folks on the dev mailing list when I polled for interest. Castor 1.1 that was recently released and it will form the basis for the version that will be proposed to Boost. http://www.mpprogramming.com/announce.aspx Among other things, version 1.1 enables support for Coroutines and Query Expressions in C++. There are a couple of videos describing 1.1 specific enhancements at http://www.mpprogramming.com/cpp/default.aspx#Videos Boost Porting: The initial Boost related work has begun (thanks to Zach Laine who has done pretty much all of the work so far). Besides incorporating user feedback and changes that make it conformant to Boost guidelines... my intention is to hopefully include a few significant enhancements. Volunteers welcome! Project sources are currently hosted at http://sourceforge.net/projects/castor-logic/ - Roshan Naik

This looks like a prime candidate for using Expression Templates. Does it already ?

joel falcou wrote:
This looks like a prime candidate for using Expression Templates. Does it already ?
Similar idea ... but a bit simpler due to combination of type erasure. Here is the abridged idea : typedef function<bool()> relation; struct And { And(relation lhs, relation rhs); bool operator()(void); }; relation && (relation lhs, relation rhs) { return And(lhs,rhs); } Same for operator || and operator ^ That allows you to freely combine the three operators. The design of the core is described here: http://www.mpprogramming.com/resources/castordesign.pdf and also covered in this introductory video http://www.mpprogramming.com/cpp/#Videos1.0 The current implementation has some minor differences from what is listed in that doc... as 1.1 uses the new Coroutine facilites. -roshan

(adding back missing context) On 8/28/2010 6:12 AM, joel falcou wrote:
On 8/28/2010 6:01 AM, Roshan wrote:
A quick update for the many who expressed interest in the Castor library at the "Logic Paradigm for C++" talk at this year's BoostCon and also folks on the dev mailing list when I polled for interest.
Castor 1.1 that was recently released and it will form the basis for the version that will be proposed to Boost. http://www.mpprogramming.com/announce.aspx Among other things, version 1.1 enables support for Coroutines and Query Expressions in C++.
Cool. Congrats.
There are a couple of videos describing 1.1 specific enhancements at http://www.mpprogramming.com/cpp/default.aspx#Videos
Boost Porting: The initial Boost related work has begun (thanks to Zach Laine who has done pretty much all of the work so far). Besides incorporating user feedback and changes that make it conformant to Boost guidelines... my intention is to hopefully include a few significant enhancements.
Volunteers welcome! Project sources are currently hosted at http://sourceforge.net/projects/castor-logic/
This looks like a prime candidate for using Expression Templates. Does it already ?
From looking at the code, it appears it has a hand-rolled expression template solution. Roshan, if you foresee ever wanting to do manipulations and optimization of the ET before evaluating it, or integrating your Logic DSEL with the other DSELs in Boost, I suggest looking into Boost.Proto. Should Castor ever come up for review, this will undoubtedly be some feedback you'll get.
-- Eric Niebler BoostPro Computing http://www.boostpro.com

On 28/08/10 19:40, Eric Niebler wrote:
This looks like a prime candidate for using Expression Templates. Does it already ?
From looking at the code, it appears it has a hand-rolled expression template solution. Roshan, if you foresee ever wanting to do manipulations and optimization of the ET before evaluating it, or integrating your Logic DSEL with the other DSELs in Boost, I suggest looking into Boost.Proto. Should Castor ever come up for review, this will undoubtedly be some feedback you'll get.
Ok so :) This answers my questions ^^ Great job nonetheless, LP is not for the faitn of heart. I like how the interface actually plays out.

Eric Niebler wrote:
From looking at the code, it appears it has a hand-rolled expression template solution. Roshan, if you foresee ever wanting to do manipulations and optimization of the ET before evaluating it, or integrating your Logic DSEL with the other DSELs in Boost, I suggest looking into Boost.Proto. Should Castor ever come up for review, this will undoubtedly be some feedback you'll get.
I just looked at the web page and also attended your talk at BoostCon. Very intriguing piece of work. A couple of observations: a) The web link permits one to download a zip file. But it would be handy for more casually interested observers to be able to browse the documentation right on the site. b) I'm thinking that this contains a "hand rolled" co-routine library. We brought up this before. I've used the co-routine library submitted to boost and found it very well documented and useful. It's a shame that this hasn't been reviewed and included in boost. The "hand rolled" versions of existing libraries is something that I'm not a fan of. Your library is very interesting but this will come up as a serious issue if it's reviewed. Robert Ramey

Robert Ramey <ramey@rrsd.com> wrote:
a) The web link permits one to download a zip file. But it would be handy for more casually interested observers to be able to browse the documentation right on the site.
The second section called "Documentation" on this web page: http://www.mpprogramming.com/cpp/ has links to all documentation in PDF format. Did you have something else in mind ? Robert Ramey <ramey@rrsd.com> wrote:
b) I'm thinking that this contains a "hand rolled" co-routine library. We brought up this before. I've used the co-routine library submitted to boost and found it very well documented and useful. It's a shame that this hasn't been reviewed and included in boost. The "hand rolled" versions of existing libraries is something that I'm not a fan of.
I stayed away from it as it did not support recursion: http://www.crystalclearsoftware.com/soc/coroutine/coroutine/coroutines.html - Roshan

I stayed away from it as it did not support recursion: http://www.crystalclearsoftware.com/soc/coroutine/coroutine/coroutines.html
.. and also required them to be copyable. - Roshan

Eric Niebler <eric@boostpro.com> wrote:
Cool. Congrats.
Thank you. Eric Niebler <eric@boostpro.com> wrote:
From looking at the code, it appears it has a hand-rolled expression template solution. Roshan, if you foresee ever wanting to do manipulations and optimization of the ET before evaluating it, or integrating your Logic DSEL with the other DSELs in Boost, I suggest looking into Boost.Proto. Should Castor ever come up for review, this will undoubtedly be some feedback you'll get.
Yes, I am interested in exploring the value & use cases of manipulating/ optimizing trees in the longer term for LP in C++. And definitely Proto is high on my short list of places to steal/reuse from. For the first Boost version, there are some more fundamental things on my list that I feel need to be researched before pursuing this. But it would certainly be cool if this ability proves to be valuable for LP and also makes it into the first version of Castor. Your heads-up on potential feedback is motivating me a bit to document a few of the implementation alternatives to enable feedback that will help converge upon the final implementation strategy. -Roshan
participants (4)
-
Eric Niebler
-
joel falcou
-
Robert Ramey
-
Roshan