From eliswilson at hushmail.com Wed May 1 00:06:14 2013 From: eliswilson at hushmail.com (eliswilson at hushmail.com) Date: Tue, 30 Apr 2013 18:06:14 -0400 Subject: [C++-sig] Biggest Fake Conference in Computer Science Message-ID: <20130430220614.51CF914DBE1@smtp.hushmail.com> Biggest Fake Conference in Computer Science We are researchers from different parts of the world and conducted a study on the world?s biggest bogus computer science conference WORLDCOMP http://sites.google.com/site/worlddump1 organized by Prof. Hamid Arabnia from University of Georgia, USA. We submitted a fake paper to WORLDCOMP 2011 and again (the same paper with a modified title) to WORLDCOMP 2012. This paper had numerous fundamental mistakes. Sample statements from that paper include: (1). Binary logic is fuzzy logic and vice versa (2). Pascal developed fuzzy logic (3). Object oriented languages do not exhibit any polymorphism or inheritance (4). TCP and IP are synonyms and are part of OSI model (5). Distributed systems deal with only one computer (6). Laptop is an example for a super computer (7). Operating system is an example for computer hardware Also, our paper did not express any conceptual meaning. However, it was accepted both the times without any modifications (and without any reviews) and we were invited to submit the final paper and a payment of $500+ fee to present the paper. We decided to use the fee for better purposes than making Prof. Hamid Arabnia richer. After that, we received few reminders from WORLDCOMP to pay the fee but we never responded. This fake paper is different from the two fake papers already published (see https://sites.google.com/site/worlddump4 for details) in WORLDCOMP. We MUST say that you should look at the above website if you have any thoughts of participating in WORLDCOMP. DBLP and other indexing agencies have stopped indexing WORLDCOMP?s proceedings since 2011 due to its fakeness. See http://www.informatik.uni-trier.de/~ley/db/conf/icai/index.html for of one of the conferences of WORLDCOMP and notice that there is no listing after 2010. See Section 2 of http://sites.google.com/site/dumpconf for comments from well-known researchers about WORLDCOMP. The status of your WORLDCOMP papers can be changed from scientific to other (i.e., junk or non-technical) at any time. Better not to have a paper than having it in WORLDCOMP and spoil the resume and peace of mind forever! Our study revealed that WORLDCOMP is money making business, using University of Georgia mask, for Prof. Hamid Arabnia. He is throwing out a small chunk of that money (around 20 dollars per paper published in WORLDCOMP?s proceedings) to his puppet (Mr. Ashu Solo or A.M.G. Solo) who publicizes WORLDCOMP and also defends it at various forums, using fake/anonymous names. The puppet uses fake names and defames other conferences to divert traffic to WORLDCOMP. He also makes anonymous phone calls and threatens the critiques of WORLDCOMP (See Item 7 of Section 5 of above website). That is, the puppet does all his best to get a maximum number of papers published at WORLDCOMP to get more money into his (and Prof. Hamid Arabnia?s) pockets. Prof. Hamid Arabnia makes a lot of tricks. For example, he appeared in a newspaper to fool the public, claiming him a victim of cyber-attack (see Item 8 in Section 5 of above website). Monte Carlo Resort (the venue of WORLDCOMP for more than 10 years, until 2012) has refused to provide the venue for WORLDCOMP?13 because of the fears of their image being tarnished due to WORLDCOMP?s fraudulent activities. That is why WORLDCOMP?13 is taking place at a different resort. WORLDCOMP will not be held after 2013. The draft paper submission deadline is over but still there are no committee members, no reviewers, and there is no conference Chairman. The only contact details available on WORLDCOMP?s website is just an email address! We ask Prof. Hamid Arabnia to publish all reviews for all the papers (after blocking identifiable details) since 2000 conference. Reveal the names and affiliations of all the reviewers (for each year) and how many papers each reviewer had reviewed on average. We also ask him to look at the Open Challenge (Section 6) at https://sites.google.com/site/moneycomp1 and respond if he has any professional values. Sorry for posting to multiple lists. Spreading the word is the only way to stop this bogus conference. Please forward this message to other mailing lists and people. We are shocked with Prof. Hamid Arabnia and his puppet?s activities at http://worldcomp-fake-bogus.blogspot.com Search Google using the keyword worldcomp fake for additional links. From j.wielicki at sotecware.net Thu May 2 12:58:00 2013 From: j.wielicki at sotecware.net (Jonas Wielicki) Date: Thu, 02 May 2013 12:58:00 +0200 Subject: [C++-sig] Biggest Fake Conference in Computer Science In-Reply-To: <20130430220614.51CF914DBE1@smtp.hushmail.com> References: <20130430220614.51CF914DBE1@smtp.hushmail.com> Message-ID: <518246B8.6050900@sotecware.net> see also: http://lists.randombit.net/pipermail/cryptography/2013-April/004193.html From Andreas.Kostyrka at kapsch.net Fri May 3 02:31:42 2013 From: Andreas.Kostyrka at kapsch.net (Kostyrka (External user) Andreas) Date: Fri, 3 May 2013 02:31:42 +0200 Subject: [C++-sig] pygccxml In-Reply-To: References: Message-ID: <1635364C2ABD024BAF4859C82AB100611C125655AC@S060VS20.kapsch.co.at> Still wondering if anyone is maintaining the pygccxml/pyplusplus pipeline? TIA, Andreas The information contained in this e-mail message is privileged and confidential and is for the exclusive use of the addressee. The person who receives this message and who is not the addressee, one of his employees or an agent entitled to hand it over to the addressee, is informed that he may not use, disclose or reproduce the contents thereof, and is kindly asked to notify the sender and delete the e-mail immediately. From Andreas.Kostyrka at kapsch.net Fri May 3 02:30:44 2013 From: Andreas.Kostyrka at kapsch.net (Kostyrka (External user) Andreas) Date: Fri, 3 May 2013 02:30:44 +0200 Subject: [C++-sig] Biggest Fake Conference in Computer Science In-Reply-To: <518246B8.6050900@sotecware.net> References: <20130430220614.51CF914DBE1@smtp.hushmail.com>, <518246B8.6050900@sotecware.net> Message-ID: <1635364C2ABD024BAF4859C82AB100611C125655AB@S060VS20.kapsch.co.at> Not exactly anything new here, fake conferences, ideally hosted in a top vacation spot, have happened all the time. It's not exactly a bad thing either *cough*, you just need to know what to expect, e.g. a scientific publication reference to your CV, or a nice vacation financed by your University. And last but not least, "honesty in science" issues are not really much of a CS issue, other fields where there is much more money at stake, e.g. Medicine/Pharmaceutic Research are way crazier. Andreas The information contained in this e-mail message is privileged and confidential and is for the exclusive use of the addressee. The person who receives this message and who is not the addressee, one of his employees or an agent entitled to hand it over to the addressee, is informed that he may not use, disclose or reproduce the contents thereof, and is kindly asked to notify the sender and delete the e-mail immediately. From bcatanzaro at acm.org Wed May 8 01:19:22 2013 From: bcatanzaro at acm.org (Bryan Catanzaro) Date: Tue, 7 May 2013 16:19:22 -0700 Subject: [C++-sig] boost::python::extract and boost::variant Message-ID: Hi - Using Boost 1.53.0, the following code fails to compile with g++, when c++11 is enabled: #include #include struct A{}; struct B{}; typedef boost::variant my_variant; void foo(boost::python::object o) { my_variant v = boost::python::extract(o); } The error is: /home/bcatanzaro/boost_1_53_0/boost/variant/variant.hpp:1574:9: error: no matching function for call to ?boost::variant::initializer::initialize(void*, std::remove_reference >&>::type)? Looking at the relevant line in boost/variant/variant.hpp, it looks like variant is attempting to convert the boost::python::extract object into either A or B, and failing to find a conversion. Since this code compiles when c++11 is not enabled, it appears rvalue references coupled with boost::python::extract are confusing boost::variant's constructor selection; I would expect it should be copy constructing from variant, rather than convert constructing into A or B. Any advice or workarounds? Turning off c++11 is difficult, since the whole project relies on it. The code compiles correctly with c++11 turned on with Boost 1.48.0, so it appears something has regressed. Thanks, bryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From talljimbo at gmail.com Wed May 8 01:28:11 2013 From: talljimbo at gmail.com (Jim Bosch) Date: Tue, 07 May 2013 19:28:11 -0400 Subject: [C++-sig] boost::python::extract and boost::variant In-Reply-To: References: Message-ID: <51898E0B.7000603@gmail.com> On 05/07/2013 07:19 PM, Bryan Catanzaro wrote: > Hi - > Using Boost 1.53.0, the following code fails to compile with g++, when c++11 is enabled: > > #include > #include > > struct A{}; struct B{}; > > typedef boost::variant my_variant; > > void foo(boost::python::object o) { > my_variant v = boost::python::extract(o); > } > > The error is: > /home/bcatanzaro/boost_1_53_0/boost/variant/variant.hpp:1574:9: error: no matching function for call to ?boost::variant::initializer::initialize(void*, std::remove_reference >&>::type)? > > Looking at the relevant line in boost/variant/variant.hpp, it looks like variant is attempting to convert the boost::python::extract object into either A or B, and failing to find a conversion. Since this code compiles when c++11 is not enabled, it appears rvalue references coupled with boost::python::extract are confusing boost::variant's constructor selection; I would expect it should be copy constructing from variant, rather than convert constructing into A or B. > > Any advice or workarounds? Turning off c++11 is difficult, since the whole project relies on it. The code compiles correctly with c++11 turned on with Boost 1.48.0, so it appears something has regressed. > Hmm...maybe try this? my_variant v = boost::python::extract(o)(); (note the extra parenthesis). Or this: my_variant v = boost::python::extract(o)(); I haven't checked, but I'd be very surprised if the change between 1.48 and 1.53 was in Boost.Python, so that means you can probably reproduce it without Boost.Python and maybe report it to the Boost.Variant people as a regression there. Jim From bcatanzaro at acm.org Wed May 8 01:38:29 2013 From: bcatanzaro at acm.org (Bryan Catanzaro) Date: Tue, 7 May 2013 16:38:29 -0700 Subject: [C++-sig] boost::python::extract and boost::variant In-Reply-To: <51898E0B.7000603@gmail.com> References: <51898E0B.7000603@gmail.com> Message-ID: Thanks Jim, adding the extra parentheses solved the problem. I'll contact the Boost.Variant people. - bryan On Tue, May 7, 2013 at 4:28 PM, Jim Bosch wrote: > On 05/07/2013 07:19 PM, Bryan Catanzaro wrote: > >> Hi - >> Using Boost 1.53.0, the following code fails to compile with g++, when >> c++11 is enabled: >> >> #include >> #include >> >> struct A{}; struct B{}; >> >> typedef boost::variant my_variant; >> >> void foo(boost::python::object o) { >> my_variant v = boost::python::extract(o); >> } >> >> The error is: >> /home/bcatanzaro/boost_1_53_0/**boost/variant/variant.hpp:**1574:9: >> error: no matching function for call to ?boost::variant> B>::initializer::initialize(**void*, std::remove_reference> python::extract >&>::type)? >> >> Looking at the relevant line in boost/variant/variant.hpp, it looks like >> variant is attempting to convert the boost::python::extract >> object into either A or B, and failing to find a conversion. Since this >> code compiles when c++11 is not enabled, it appears rvalue references >> coupled with boost::python::extract are confusing boost::variant's >> constructor selection; I would expect it should be copy constructing from >> variant, rather than convert constructing into A or B. >> >> Any advice or workarounds? Turning off c++11 is difficult, since the >> whole project relies on it. The code compiles correctly with c++11 turned >> on with Boost 1.48.0, so it appears something has regressed. >> >> > Hmm...maybe try this? > > my_variant v = boost::python::extract(o)(); > > (note the extra parenthesis). Or this: > > my_variant v = boost::python::extract(o)(); > > I haven't checked, but I'd be very surprised if the change between 1.48 > and 1.53 was in Boost.Python, so that means you can probably reproduce it > without Boost.Python and maybe report it to the Boost.Variant people as a > regression there. > > > Jim > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bryan.catanzaro at gmail.com Wed May 8 01:03:07 2013 From: bryan.catanzaro at gmail.com (Bryan Catanzaro) Date: Tue, 7 May 2013 16:03:07 -0700 Subject: [C++-sig] boost::variant and boost::python::extract Message-ID: Hi - Using Boost 1.53.0, the following code fails to compile with g++, when c++11 is enabled: #include #include struct A{}; struct B{}; typedef boost::variant my_variant; void foo(boost::python::object o) { my_variant v = boost::python::extract(o); } The error is: /home/bcatanzaro/boost_1_53_0/boost/variant/variant.hpp:1574:9: error: no matching function for call to ?boost::variant::initializer::initialize(void*, std::remove_reference >&>::type)? Looking at the relevant line in boost/variant/variant.hpp, it looks like variant is attempting to convert the boost::python::extract object into either A or B, and failing to find a conversion. Since this code compiles when c++11 is not enabled, it appears rvalue references coupled with boost::python::extract are confusing boost::variant's constructor selection; I would expect it should be copy constructing from the same variant, rather than convert constructing. Any advice or workarounds? Turning off c++11 is difficult, since the whole project relies on it. The code compiles correctly with c++11 turned on with Boost 1.48.0, so it appears something has regressed. Thanks, bryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From wichert at wiggy.net Wed May 8 22:33:51 2013 From: wichert at wiggy.net (Wichert Akkerman) Date: Wed, 8 May 2013 22:33:51 +0200 Subject: [C++-sig] Type converter not found for property Message-ID: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> I am trying to expose a class with a boost::uuids::uuid member to Python. The class is pretty simple: class Article { public: boost::uuids::uuid uuid; }; which is exposed like this: article .def(init((arg("uuid"))) .def_readwrite("uuid", &Article::uuid); and I have basic converter registered (see https://gist.github.com/wichert/5543390 , it is a bit large to include in this email). This compiles fine and the uuid convertor works correctly when trying converting from python to C++, but trying to access the uuid property results in "TypeError: No Python class registered for C++ class boost::uuids::uuid". I don't understand why that doesn't work; does anyone see what I missed? Wichert. -------------- next part -------------- An HTML attachment was scrubbed... URL: From beamesleach at gmail.com Wed May 8 23:31:14 2013 From: beamesleach at gmail.com (Alex Leach) Date: Wed, 08 May 2013 22:31:14 +0100 Subject: [C++-sig] Type converter not found for property In-Reply-To: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> Message-ID: That error means the type_id of uuid is not in the bp registry. I think you can fix this by deriving uuid_to_python from to_python_converter, as demonstrated in the pytype_function example[1]. This will add the get_pytype function call, and on initialisation, should hopefully add what's missing: a call to `registry::lookup`[2]. Cheers, Alex [1] - http://www.boost.org/doc/libs/1_53_0/libs/python/doc/v2/pytype_function.html [2] - http://www.boost.org/doc/libs/1_53_0/boost/python/converter/registry.hpp On Wed, 08 May 2013 21:33:51 +0100, Wichert Akkerman wrote: > I am trying to expose a class with a boost::uuids::uuid member to > Python. The class is pretty simple: > > class Article { > public: > boost::uuids::uuid uuid; > }; > > which is exposed like this: > > article > .def(init((arg("uuid"))) > .def_readwrite("uuid", &Article::uuid); > > and I have basic converter registered (see > https://gist.github.com/wichert/5543390 , it is a bit large to include > in >this email). This compiles fine and the uuid convertor works > correctly when trying converting from python to C++, but >trying to > access the uuid property results in "TypeError: No Python class > registered for C++ class >boost::uuids::uuid". I don't understand why > that doesn't work; does anyone see what I missed? > > Wichert. > > -- Using Opera's mail client: http://www.opera.com/mail/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From talljimbo at gmail.com Wed May 8 23:48:10 2013 From: talljimbo at gmail.com (Jim Bosch) Date: Wed, 08 May 2013 17:48:10 -0400 Subject: [C++-sig] Type converter not found for property In-Reply-To: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> Message-ID: <518AC81A.7030104@gmail.com> On 05/08/2013 04:33 PM, Wichert Akkerman wrote: > I am trying to expose a class with a boost::uuids::uuid member to Python. The class is pretty simple: > > class Article { > public: > boost::uuids::uuid uuid; > }; > > which is exposed like this: > > article > .def(init((arg("uuid"))) > .def_readwrite("uuid", &Article::uuid); > > and I have basic converter registered (see https://gist.github.com/wichert/5543390 , it is a bit large to include in this email). This compiles fine and the uuid convertor works correctly when trying converting from python to C++, but trying to access the uuid property results in "TypeError: No Python class registered for C++ class boost::uuids::uuid". I don't understand why that doesn't work; does anyone see what I missed? > I suspect that def_readwrite requires lvalue converters, and I see that you've only implemented an rvalue converter. I think in this case you're better off just writing a getter and setter, and wrapping those using add_property. Jim From talljimbo at gmail.com Wed May 8 23:58:06 2013 From: talljimbo at gmail.com (Jim Bosch) Date: Wed, 08 May 2013 17:58:06 -0400 Subject: [C++-sig] Type converter not found for property In-Reply-To: <518AC81A.7030104@gmail.com> References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> <518AC81A.7030104@gmail.com> Message-ID: <518ACA6E.5000106@gmail.com> On 05/08/2013 05:48 PM, Jim Bosch wrote: > On 05/08/2013 04:33 PM, Wichert Akkerman wrote: >> I am trying to expose a class with a boost::uuids::uuid member to Python. The class is pretty simple: >> >> class Article { >> public: >> boost::uuids::uuid uuid; >> }; >> >> which is exposed like this: >> >> article >> .def(init((arg("uuid"))) >> .def_readwrite("uuid", &Article::uuid); >> >> and I have basic converter registered (see https://gist.github.com/wichert/5543390 , it is a bit large to include in this email). This compiles fine and the uuid convertor works correctly when trying converting from python to C++, but trying to access the uuid property results in "TypeError: No Python class registered for C++ class boost::uuids::uuid". I don't understand why that doesn't work; does anyone see what I missed? >> > > I suspect that def_readwrite requires lvalue converters, and I see that you've only implemented an rvalue converter. I think in this case you're better off just writing a getter and setter, and wrapping those using add_property. > Ah, sorry, that didn't make any sense. There's no such thing as an lvalue to-Python converter, and to-Python is the problem here. You may want to try also registering your to-Python converter for the pointers and/or references to uuid. I ran into a similar problem with getting def_readwrite to work a while back, and specializing for pointer/reference/const variants made it go away, though I was using a different converter mechanism (by partial specialization of some template classes - not something I'd recommend here). Jim From wichert at wiggy.net Thu May 9 08:41:49 2013 From: wichert at wiggy.net (Wichert Akkerman) Date: Thu, 9 May 2013 08:41:49 +0200 Subject: [C++-sig] Type converter not found for property In-Reply-To: <518ACA6E.5000106@gmail.com> References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> <518AC81A.7030104@gmail.com> <518ACA6E.5000106@gmail.com> Message-ID: <812A89AB-A1C7-48CD-8352-8C68B957134A@wiggy.net> On May 8, 2013, at 23:58 , Jim Bosch wrote: > On 05/08/2013 05:48 PM, Jim Bosch wrote: >> On 05/08/2013 04:33 PM, Wichert Akkerman wrote: >>> I am trying to expose a class with a boost::uuids::uuid member to Python. The class is pretty simple: >>> >>> class Article { >>> public: >>> boost::uuids::uuid uuid; >>> }; >>> >>> which is exposed like this: >>> >>> article >>> .def(init((arg("uuid"))) >>> .def_readwrite("uuid", &Article::uuid); >>> >>> and I have basic converter registered (see https://gist.github.com/wichert/5543390 , it is a bit large to include in this email). This compiles fine and the uuid convertor works correctly when trying converting from python to C++, but trying to access the uuid property results in "TypeError: No Python class registered for C++ class boost::uuids::uuid". I don't understand why that doesn't work; does anyone see what I missed? >>> >> >> I suspect that def_readwrite requires lvalue converters, and I see that you've only implemented an rvalue converter. I think in this case you're better off just writing a getter and setter, and wrapping those using add_property. >> > > Ah, sorry, that didn't make any sense. There's no such thing as an lvalue to-Python converter, and to-Python is the problem here. > > You may want to try also registering your to-Python converter for the pointers and/or references to uuid. I ran into a similar problem with getting def_readwrite to work a while back, and specializing for pointer/reference/const variants made it go away, though I was using a different converter mechanism (by partial specialization of some template classes - not something I'd recommend here). If I try to do that by adding this: to_python_converter(); to_python_converter() I get a compile error: /opt/local/include/boost/python/converter/as_to_python_function.hpp:21:84: error: 'type name' declared as a pointer to a reference of type 'boost::uuids::uuid &' static void convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = 0) {} ^ /opt/local/include/boost/python/to_python_converter.hpp:88:10: note: in instantiation of template class 'boost::python::converter::as_to_python_function::uuid_to_python>' requested here &normalized::convert ^ ../../python/uuid.cc:77:2: note: in instantiation of member function 'boost::python::to_python_converter::uuid_to_python, false>::to_python_converter' requested here python::to_python_converter(); which suggests that to_python_converter doesn't really like to see references. Wichert. From wichert at wiggy.net Thu May 9 08:55:07 2013 From: wichert at wiggy.net (Wichert Akkerman) Date: Thu, 9 May 2013 08:55:07 +0200 Subject: [C++-sig] Type converter not found for property In-Reply-To: References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> Message-ID: <98A898D1-F86D-40BE-BFD6-BCC58406DA9F@wiggy.net> On May 8, 2013, at 23:31 , "Alex Leach" wrote: > That error means the type_id of uuid is not in the bp registry. > > I think you can fix this by deriving uuid_to_python from to_python_converter, as demonstrated in the pytype_function example[1]. This will add the get_pytype function call, and on initialisation, should hopefully add what's missing: a call to `registry::lookup`[2]. I'm afraid that doesn't work. To test this I changes my converter struct to derive from bp::converter::wrap_pyttype<&PyStringType> and pass has_get_type=true to the to_python_converter call, but I still get the exact same error. Regards, Wichert. -------------- next part -------------- An HTML attachment was scrubbed... URL: From beamesleach at gmail.com Thu May 9 12:34:57 2013 From: beamesleach at gmail.com (Alex Leach) Date: Thu, 09 May 2013 11:34:57 +0100 Subject: [C++-sig] Type converter not found for property In-Reply-To: <98A898D1-F86D-40BE-BFD6-BCC58406DA9F@wiggy.net> References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> <98A898D1-F86D-40BE-BFD6-BCC58406DA9F@wiggy.net> Message-ID: On Thu, 09 May 2013 07:55:07 +0100, Wichert Akkerman wrote: > > On May 8, 2013, at 23:31 , "Alex Leach" wrote: > >> That error means the type_id of uuid is not in the bp registry. >> >> I think you can fix this by deriving uuid_to_python from >> >>to_python_converter, as demonstrated in the pytype_function >> example[1]. >>This will add the get_pytype function call, and on >> initialisation, should >>hopefully add what's missing: a call to >> `registry::lookup`[2]. > > I'm afraid that doesn't work. To test this I changes my converter struct > to derive from >bp::converter::wrap_pyttype<&PyStringType> and pass > has_get_type=true to the to_python_converter call, but I still >get the > exact same error. Fair enough. I see your conversion function doesn't use bp::object, but a raw PyObject instead. Using a bp::object might do the registration for you.. Probably not. Alternatively, you could try adding this to your registration code:- converter::registration& uuid_converter = const_cast( converter::registry::lookup(type_id()) ); uuid_converter.m_class_object = # if PY_VERSION_HEX >= 0x03000000 &PyUnicode_Type; #else &PyString_Type; #endif That will get you past the current error, at least, but there's probably an easier solution... HTH, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From beamesleach at gmail.com Thu May 9 12:42:57 2013 From: beamesleach at gmail.com (Alex Leach) Date: Thu, 09 May 2013 11:42:57 +0100 Subject: [C++-sig] Type converter not found for property In-Reply-To: <812A89AB-A1C7-48CD-8352-8C68B957134A@wiggy.net> References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> <518AC81A.7030104@gmail.com> <518ACA6E.5000106@gmail.com> <812A89AB-A1C7-48CD-8352-8C68B957134A@wiggy.net> Message-ID: On Thu, 09 May 2013 07:41:49 +0100, Wichert Akkerman wrote: > If I try to do that by adding this: > > to_python_converter(); > to_python_converter() > > I get a compile error: > > /opt/local/include/boost/python/converter/as_to_python_function.hpp:21:84: > error: 'type name' declared as a pointer to a reference of type > 'boost::uuids::uuid &' > static void > convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = > 0) {} > ^ > /opt/local/include/boost/python/to_python_converter.hpp:88:10: note: in > instantiation of template class > 'boost::python::converter::as_to_python_function ::uuid_to_python>' requested here > &normalized::convert > ^ > ../../python/uuid.cc:77:2: note: in instantiation of member function > 'boost::python::to_python_converter ::uuid_to_python, false>::to_python_converter' requested > here > python::to_python_converter uuid_to_python>(); > > which suggests that to_python_converter doesn't really like to see > references. > Unfortunately the convert function doesn't like non-const references; const references (and values) should work fine, though. Cheers, Alex From wichert at wiggy.net Fri May 10 11:10:05 2013 From: wichert at wiggy.net (Wichert Akkerman) Date: Fri, 10 May 2013 11:10:05 +0200 Subject: [C++-sig] Type converter not found for property In-Reply-To: References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> <98A898D1-F86D-40BE-BFD6-BCC58406DA9F@wiggy.net> Message-ID: <387F9540-CA08-468F-8051-DB8AF734D363@wiggy.net> On May 9, 2013, at 12:34 , Alex Leach wrote: > On Thu, 09 May 2013 07:55:07 +0100, Wichert Akkerman wrote: > > > On May 8, 2013, at 23:31 , "Alex Leach" wrote: > >> That error means the type_id of uuid is not in the bp registry. >> >> I think you can fix this by deriving uuid_to_python from to_python_converter, as demonstrated in the pytype_function example[1]. This will add the get_pytype function call, and on initialisation, should hopefully add what's missing: a call to `registry::lookup`[2]. > > I'm afraid that doesn't work. To test this I changes my converter struct to derive from bp::converter::wrap_pyttype<&PyStringType> and pass has_get_type=true to the to_python_converter call, but I still get the exact same error. > > Fair enough. I see your conversion function doesn't use bp::object, but a raw PyObject instead. Using a bp::object might do the registration for you.. Probably not. Alternatively, you could try adding this to your registration code:- > > > converter::registration& uuid_converter > = const_cast( > converter::registry::lookup(type_id()) ); > > uuid_converter.m_class_object = > # if PY_VERSION_HEX >= 0x03000000 > &PyUnicode_Type; > #else > &PyString_Type; > #endif > > > That will get you past the current error, at least, but there's probably an easier solution? That seems to do something! But still not quite there: >>> a.uuid Traceback (most recent call last): File "", line 1, in TypeError: cannot create weak reference to 'str' object >>> u=a.uuid zsh: segmentation fault -------------- next part -------------- An HTML attachment was scrubbed... URL: From wichert at wiggy.net Fri May 10 11:24:34 2013 From: wichert at wiggy.net (Wichert Akkerman) Date: Fri, 10 May 2013 11:24:34 +0200 Subject: [C++-sig] Type converter not found for property In-Reply-To: References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> <518AC81A.7030104@gmail.com> <518ACA6E.5000106@gmail.com> <812A89AB-A1C7-48CD-8352-8C68B957134A@wiggy.net> Message-ID: On May 9, 2013, at 12:42 , Alex Leach wrote: > On Thu, 09 May 2013 07:41:49 +0100, Wichert Akkerman wrote: > >> If I try to do that by adding this: >> >> to_python_converter(); >> to_python_converter() >> >> I get a compile error: >> >> /opt/local/include/boost/python/converter/as_to_python_function.hpp:21:84: error: 'type name' declared as a pointer to a reference of type 'boost::uuids::uuid &' >> static void convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = 0) {} >> ^ >> /opt/local/include/boost/python/to_python_converter.hpp:88:10: note: in instantiation of template class 'boost::python::converter::as_to_python_function> ::uuid_to_python>' requested here >> &normalized::convert >> ^ >> ../../python/uuid.cc:77:2: note: in instantiation of member function 'boost::python::to_python_converter::uuid_to_python, false>::to_python_converter' requested >> here >> python::to_python_converter(); >> >> which suggests that to_python_converter doesn't really like to see references. >> > > Unfortunately the convert function doesn't like non-const references; const references (and values) should work fine, though. They don't though: you can't create a pointer to a const reference. Wichert. From wichert at wiggy.net Fri May 10 11:26:25 2013 From: wichert at wiggy.net (Wichert Akkerman) Date: Fri, 10 May 2013 11:26:25 +0200 Subject: [C++-sig] Type converter not found for property In-Reply-To: <387F9540-CA08-468F-8051-DB8AF734D363@wiggy.net> References: <1B377FDE-FC9F-41D8-B879-EF1642E8E744@wiggy.net> <98A898D1-F86D-40BE-BFD6-BCC58406DA9F@wiggy.net> <387F9540-CA08-468F-8051-DB8AF734D363@wiggy.net> Message-ID: <9F461A91-1401-405C-B1AD-EECA214FF6FC@wiggy.net> On May 10, 2013, at 11:10 , Wichert Akkerman wrote: > On May 9, 2013, at 12:34 , Alex Leach wrote: >> On Thu, 09 May 2013 07:55:07 +0100, Wichert Akkerman wrote: >> >> On May 8, 2013, at 23:31 , "Alex Leach" wrote: >> >>> That error means the type_id of uuid is not in the bp registry. >>> >>> I think you can fix this by deriving uuid_to_python from to_python_converter, as demonstrated in the pytype_function example[1]. This will add the get_pytype function call, and on initialisation, should hopefully add what's missing: a call to `registry::lookup`[2]. >> >> I'm afraid that doesn't work. To test this I changes my converter struct to derive from bp::converter::wrap_pyttype<&PyStringType> and pass has_get_type=true to the to_python_converter call, but I still get the exact same error. >> >> Fair enough. I see your conversion function doesn't use bp::object, but a raw PyObject instead. Using a bp::object might do the registration for you.. Probably not. Alternatively, you could try adding this to your registration code:- >> >> >> converter::registration& uuid_converter >> = const_cast( >> converter::registry::lookup(type_id()) ); >> >> uuid_converter.m_class_object = >> # if PY_VERSION_HEX >= 0x03000000 >> &PyUnicode_Type; >> #else >> &PyString_Type; >> #endif >> >> >> That will get you past the current error, at least, but there's probably an easier solution? > > That seems to do something! But still not quite there: > > >>> a.uuid > Traceback (most recent call last): > File "", line 1, in > TypeError: cannot create weak reference to 'str' object > >>> u=a.uuid > zsh: segmentation fault Which can be fixed by not using def_readwrite but a property with a getting returning a new value instead of a reference: .add_property("uuid", bp::make_getter(&Article::uuid, bp::return_value_policy()), bp::make_setter(&Article::uuid)) After which everything seems to work! Wichert. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simwarg at gmail.com Fri May 24 21:19:48 2013 From: simwarg at gmail.com (Simon W) Date: Fri, 24 May 2013 21:19:48 +0200 Subject: [C++-sig] Undefined symbols for architecture x86_64 - Building boost 1.52 with Python 3.3 on MacOSX Message-ID: Hello, I need som help. I'm building boost on my Mac OSX 10.8 using the bjam build system. I have installed Python 3.3 seperatly aas it doesn't ship with the Mac. So I have my project-config.jam file like: # Boost.Build Configuration # Automatically generated by bootstrap.sh import option ; import feature ; if ! darwin in [ feature.values ] { using darwin ; } project : default-build darwin ; # Python configuration using python : 3.3 : /Library/Frameworks/Python.framework/Versions/3.3 : /Library/Frameworks/Python.framework/Versions/3.3/Headers : /Library/Frameworks/Python.framework/Versions/3.3/lib ; libraries = --with-python ; option.set prefix : /usr/local ; option.set exec-prefix : /usr/local ; option.set libdir : /usr/local/lib ; option.set includedir : /usr/local/include ; # Stop on first error option.set keep-going : false ; I'm not used to Mac but I think it compiles but during linking I get the following error: Undefined symbols for architecture x86_64: "_PyInt_AsLong", referenced from: boost::python::detail::list_base::count(boost::python::api::object const&) constin list.o boost::python::detail::list_base::index(boost::python::api::object const&) constin list.o boost::python::detail::list_base::insert(boost::python::api::object const&, boost::python::api::object const&)in list.o "_PyInt_FromLong", referenced from: boost::python::detail::returnable::type boost::python::call(_object*, boost::python::api::object const&, long const&, boost::type*)in numeric.o boost::python::detail::returnable::type boost::python::call(_object*, long const&, long const&, boost::type*)in numeric.o boost::python::detail::returnable::type boost::python::call(_object*, long const&, long const&, long const&, boost::type*)in numeric.o boost::python::detail::returnable::type boost::python::call(_object*, long const&, boost::type*)in numeric.o boost::python::detail::list_base::pop(long)in list.o boost::python::detail::returnable::type boost::python::call(_object*, long const&, boost::python::api::object const&, boost::type*)in list.o "_PyString_FromStringAndSize", referenced from: boost::python::numeric::(anonymous namespace)::load(bool)in numeric.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status What is wrong? Thanks, Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: