actor-framework / actor-framework

An Open Source Implementation of the Actor Model in C++
http://actor-framework.org/
BSD 3-Clause "New" or "Revised" License
3.18k stars 542 forks source link

Is libcaf_python gone? #1081

Closed alatdneg closed 4 years ago

alatdneg commented 4 years ago

Hi, I'm trying to implement a python module , using libcaf_python, but I've just noticed that it's now gone, and atom_value is also gone.

I updated my build off master a few weeks ago, and only just noticed the changes.

Is it still possible to do this ? And if so what should I replace atom_value with ?

Cheers.

alatdneg commented 4 years ago

I've almost got it working, but the atoms are causing me grief, I can't work out how to set them up so they are recognised by python and the c++ code.

Neverlord commented 4 years ago

We recently dropped libcaf_python: https://github.com/actor-framework/actor-framework/issues/775#issuecomment-608623572. That's not to say that we wouldn't add Python bindings in the future again, just that the Python shell didn't had a purpose any more at the moment.

what should I replace atom_value with ?

CAF 0.18 is going to implement atoms using tag types. The simplest way to define them is by using the CAF_ADD_ATOM macro. As an example of the new API, you can have a look at the dining philosophers.

As to how to make binding to the new atoms: either one creates one Python type per atom or one could create a dictionary to look up types by name at runtime.

We will also update the docs if CAF 0.18 nears completion.

alatdneg commented 4 years ago

Finally got it working, didn't realise you now need to register each "atom" as a message type as well, couldn't workout why the remote wasn't receiving any messages.

cheers