Changes I had to make to get langbinding to build

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Changes I had to make to get langbinding to build

John Moeller
[Ok, that was just embarrassing; reposting here]

Not that anyone cares about my personal status on this project, but I
thought I'd share some progress that I made.


1.  I think I understand what the library does (that took a few days of
study all in itself :) ).  The class graph stuff went over my head, but
I'm neither familiar with BGL nor with Graph Theory in general (though
it's probably within my reach if I spent the time).  I can see vaguely
what its purpose is, however.

2.  I got the source building, with a new Jamfile.v2.  That didn't take
terribly long, and I got a little more familiar with the build system.

3.  I worked on getting each test to run.

3a. I had trouble getting the holder.cpp test to build.  The override
function object returns a proxy, and the proxy doesn't like being cast
to an int for some reason, even though it seems to me that the
conversion should work just fine.  I tried the pointer conversion, but
the assertions failed.  I eventually gave up on this test, because I was
more interested in getting the invoker class working.

3b. The tests that use the invoker class wouldn't build because they
were using a version of fusion that was out-of-date.  After about a week
of study, I figured out that I needed to make some fundamental changes
to how fusion was utilized in the invoker.  I also discovered that
fusion is very cool.

It seems to me that the way things worked before was to create the
transform view of the function arguments with the proper converters, and
call a generate metafunction, that when constructed with a sequence
iterator, generated a tuple with all the correct argument converters:

         aux::fusion_arg_iterator arg_iterator(args);

         typename fusion::meta::generate<
             mpl::transform_view<
                 argument_types
               , arg_extractor<mpl::_>
             >
         >::type argument_converters(arg_iterator);

I basically replaced meta::generate with result_of::as_list; it seems
that this is the way that you get a type that can be instantiated with a
sequence:

         aux::fusion_arg_sequence<
             mpl::size<argument_types>::type
         > arg_seq(args);

         typename fusion::result_of::as_list<
             mpl::transform_view<
                 argument_types
               , arg_extractor<mpl::_>
             >
         >::type argument_converters(arg_seq);

Unfortunately, list's constructor doesn't take an iterator; it takes a
sequence, so I had to add sequence support to fusion_arg_iterator, in
addition to modifying the iterator.

The invoker-related tests pass now.  However, I wanted to be certain
that I didn't fundamentally destroy the way that things were supposed to
work, so that's why I'm posting what I changed.

4.  I got a test jamfile working.  All the tests use assert(), though,
and not Boost:Test asserts.  I didn't change any of them.

5.  I got autolinking working.


So now that I've done all that, should I get some of this into CVS?  Or
should I post some diffs up?  If I should commit these changes to CVS, I
think that I would need access, but I don't know if I'm supposed to have
that.  I'm not a developer with an approved project.  (Or can I commit
with anonymous CVS?  I've never developed using anonymous CVS.)  Either
way, I don't really want to lose this work.

Another thing; Fusion has invocation support now.  I looked into it
briefly, and it seems that it may allow some contraction of the invoker
code; at least, it could replace a good portion of aux::invoke.  Is this
something that you would be interested in seeing done?  Or should it be
left alone?

Sorry for the wall of text.

--

John Moeller
[hidden email]


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

Roman Yakovenko
On 6/15/07, John Moeller <[hidden email]> wrote:

> [Ok, that was just embarrassing; reposting here]
>
> Not that anyone cares about my personal status on this project, but I
> thought I'd share some progress that I made.
>
>
> 1.  I think I understand what the library does (that took a few days of
> study all in itself :) ).  The class graph stuff went over my head, but
> I'm neither familiar with BGL nor with Graph Theory in general (though
> it's probably within my reach if I spent the time).  I can see vaguely
> what its purpose is, however.
>
> 2.  I got the source building, with a new Jamfile.v2.  That didn't take
> terribly long, and I got a little more familiar with the build system.
>
> 3.  I worked on getting each test to run.
>
> 3a. I had trouble getting the holder.cpp test to build.  The override
> function object returns a proxy, and the proxy doesn't like being cast
> to an int for some reason, even though it seems to me that the
> conversion should work just fine.  I tried the pointer conversion, but
> the assertions failed.  I eventually gave up on this test, because I was
> more interested in getting the invoker class working.
>
> 3b. The tests that use the invoker class wouldn't build because they
> were using a version of fusion that was out-of-date.  After about a week
> of study, I figured out that I needed to make some fundamental changes
> to how fusion was utilized in the invoker.  I also discovered that
> fusion is very cool.
>
> It seems to me that the way things worked before was to create the
> transform view of the function arguments with the proper converters, and
> call a generate metafunction, that when constructed with a sequence
> iterator, generated a tuple with all the correct argument converters:
>
>          aux::fusion_arg_iterator arg_iterator(args);
>
>          typename fusion::meta::generate<
>              mpl::transform_view<
>                  argument_types
>                , arg_extractor<mpl::_>
>              >
>          >::type argument_converters(arg_iterator);
>
> I basically replaced meta::generate with result_of::as_list; it seems
> that this is the way that you get a type that can be instantiated with a
> sequence:
>
>          aux::fusion_arg_sequence<
>              mpl::size<argument_types>::type
>          > arg_seq(args);
>
>          typename fusion::result_of::as_list<
>              mpl::transform_view<
>                  argument_types
>                , arg_extractor<mpl::_>
>              >
>          >::type argument_converters(arg_seq);
>
> Unfortunately, list's constructor doesn't take an iterator; it takes a
> sequence, so I had to add sequence support to fusion_arg_iterator, in
> addition to modifying the iterator.
>
> The invoker-related tests pass now.  However, I wanted to be certain
> that I didn't fundamentally destroy the way that things were supposed to
> work, so that's why I'm posting what I changed.
>
> 4.  I got a test jamfile working.  All the tests use assert(), though,
> and not Boost:Test asserts.  I didn't change any of them.
>
> 5.  I got autolinking working.
>
>
> So now that I've done all that, should I get some of this into CVS?  Or
> should I post some diffs up?  If I should commit these changes to CVS, I
> think that I would need access, but I don't know if I'm supposed to have
> that.  I'm not a developer with an approved project.  (Or can I commit
> with anonymous CVS?  I've never developed using anonymous CVS.)  Either
> way, I don't really want to lose this work.
>
> Another thing; Fusion has invocation support now.  I looked into it
> briefly, and it seems that it may allow some contraction of the invoker
> code; at least, it could replace a good portion of aux::invoke.  Is this
> something that you would be interested in seeing done?  Or should it be
> left alone?

It looks like you make some good progress with the library.

Does it make sense to setup a new project and commit all changes to it?


--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

John Moeller
Roman Yakovenko wrote:

> On 6/15/07, John Moeller <[hidden email]> wrote:
>> So now that I've done all that, should I get some of this into CVS?  Or
>> should I post some diffs up?  If I should commit these changes to CVS, I
>> think that I would need access, but I don't know if I'm supposed to have
>> that.  I'm not a developer with an approved project.  (Or can I commit
>> with anonymous CVS?  I've never developed using anonymous CVS.)  Either
>> way, I don't really want to lose this work.
>>
>> Another thing; Fusion has invocation support now.  I looked into it
>> briefly, and it seems that it may allow some contraction of the invoker
>> code; at least, it could replace a good portion of aux::invoke.  Is this
>> something that you would be interested in seeing done?  Or should it be
>> left alone?
>
> It looks like you make some good progress with the library.
>
> Does it make sense to setup a new project and commit all changes to it?

That may not be a bad idea, but I'd hate to fork the development if
David, Daniel and Rene want the changes here.

--

John Moeller
[hidden email]


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

Roman Yakovenko
On 6/15/07, John Moeller <[hidden email]> wrote:
> Roman Yakovenko wrote:
> > It looks like you make some good progress with the library.
> >
> > Does it make sense to setup a new project and commit all changes to it?
>
> That may not be a bad idea, but I'd hate to fork the development if
> David, Daniel and Rene want the changes here.

This is not what I meant. Right now the projects sits deep inside CVS
tree it not that easy to find it and work against it. I think it worse
to move the project to on-going ( current ) label, so you can commit
your changes( or patches ) to some place. Also this should improve
project "visibility".

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

Rene Rivera-2
Roman Yakovenko wrote:

> On 6/15/07, John Moeller <[hidden email]> wrote:
>> Roman Yakovenko wrote:
>>> It looks like you make some good progress with the library.
>>>
>>> Does it make sense to setup a new project and commit all changes to it?
>> That may not be a bad idea, but I'd hate to fork the development if
>> David, Daniel and Rene want the changes here.
>
> This is not what I meant. Right now the projects sits deep inside CVS
> tree it not that easy to find it and work against it. I think it worse
> to move the project to on-going ( current ) label, so you can commit
> your changes( or patches ) to some place. Also this should improve
> project "visibility".

Have some patience... I'll move the project to the sandbox once the
Boost CVS repo is moved to SVN.


--
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

John Moeller
Rene Rivera wrote:
> Have some patience... I'll move the project to the sandbox once the
> Boost CVS repo is moved to SVN.

Oh, of course!  I neglected to remember that you were in the middle of a
migration.  My apologies.

--

John Moeller
[hidden email]


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

David Abrahams
In reply to this post by John Moeller

on Fri Jun 15 2007, John Moeller <fishcorn-AT-gmail.com> wrote:

> Roman Yakovenko wrote:
>> On 6/15/07, John Moeller <[hidden email]> wrote:
>>> So now that I've done all that, should I get some of this into CVS?  Or
>>> should I post some diffs up?  If I should commit these changes to CVS, I
>>> think that I would need access, but I don't know if I'm supposed to have
>>> that.  I'm not a developer with an approved project.  (Or can I commit
>>> with anonymous CVS?  I've never developed using anonymous CVS.)  Either
>>> way, I don't really want to lose this work.
>>>
>>> Another thing; Fusion has invocation support now.  I looked into it
>>> briefly, and it seems that it may allow some contraction of the invoker
>>> code; at least, it could replace a good portion of aux::invoke.  Is this
>>> something that you would be interested in seeing done?  Or should it be
>>> left alone?
>>
>> It looks like you make some good progress with the library.
>>
>> Does it make sense to setup a new project and commit all changes to it?
>
> That may not be a bad idea, but I'd hate to fork the development if
> David, Daniel and Rene want the changes here.

I'd rather keep it in the sandbox area of the new boost svn repository

--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

The Astoria Seminar ==> http://www.astoriaseminar.com


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

David Abrahams
In reply to this post by Rene Rivera-2

on Mon Jun 18 2007, Rene Rivera <grafikrobot-AT-gmail.com> wrote:

> Roman Yakovenko wrote:
>> On 6/15/07, John Moeller <[hidden email]> wrote:
>>> Roman Yakovenko wrote:
>>>> It looks like you make some good progress with the library.
>>>>
>>>> Does it make sense to setup a new project and commit all changes to it?
>>> That may not be a bad idea, but I'd hate to fork the development if
>>> David, Daniel and Rene want the changes here.
>>
>> This is not what I meant. Right now the projects sits deep inside CVS
>> tree it not that easy to find it and work against it. I think it worse
>> to move the project to on-going ( current ) label, so you can commit
>> your changes( or patches ) to some place. Also this should improve
>> project "visibility".
>
> Have some patience... I'll move the project to the sandbox once the
> Boost CVS repo is moved to SVN.

I think it can be moved to the sandbox now, since there is already a
copy of the project in SVN.

--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

The Astoria Seminar ==> http://www.astoriaseminar.com


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

Rene Rivera-2
David Abrahams wrote:
> I think it can be moved to the sandbox now, since there is already a
> copy of the project in SVN.

Your going to have to point out where that copy is. Since AFAIK the test
Boost imports got nuked entirely before the sandbox & website imports
started. I'd gladly move it now since it would make the code reading of
it I was going to do this afternoon a bit easier :-)


--
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

David Abrahams

on Mon Jun 18 2007, Rene Rivera <grafikrobot-AT-gmail.com> wrote:

> David Abrahams wrote:
>> I think it can be moved to the sandbox now, since there is already a
>> copy of the project in SVN.
>
> Your going to have to point out where that copy is. Since AFAIK the test
> Boost imports got nuked entirely before the sandbox & website imports
> started. I'd gladly move it now since it would make the code reading of
> it I was going to do this afternoon a bit easier :-)

Shouldn't it be available wherever the cmake copy of Boost is?

--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

The Astoria Seminar ==> http://www.astoriaseminar.com


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

Rene Rivera-2
David Abrahams wrote:
> Shouldn't it be available wherever the cmake copy of Boost is?

No, since that is a snapshot of the 1.34.0 release.


--
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
Reply | Threaded
Open this post in threaded view
|

Re: Changes I had to make to get langbinding to build

David Abrahams
In reply to this post by Rene Rivera-2

on Mon Jun 18 2007, Rene Rivera <grafikrobot-AT-gmail.com> wrote:

> David Abrahams wrote:
>> I think it can be moved to the sandbox now, since there is already a
>> copy of the project in SVN.
>
> Your going to have to point out where that copy is. Since AFAIK the test
> Boost imports got nuked entirely before the sandbox & website imports
> started. I'd gladly move it now since it would make the code reading of
> it I was going to do this afternoon a bit easier :-)

Doug/DongInn

Is there a way we can get the langbinding branch of boost/langbinding
and libs/langbinding from our main CVS integrated into the sandbox?
People want to work on this code, and it doesn't make any sense to do
it in CVS.  If not, I can give them write access to the main CVS but
this project really belongs in the sandbox.

--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

The Astoria Seminar ==> http://www.astoriaseminar.com


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-langbinding mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding