## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 15:13

Neverlord on neverlord

Implement process_open_fds metr… (compare)

• 15:11

Neverlord on neverlord

Implement process_open_fds metr… (compare)

• 14:31

Neverlord on neverlord

Implement process_open_fds metr… (compare)

• May 18 07:43
• May 15 19:10
• May 14 18:45
jhigginbotham64 starred actor-framework/actor-framework
• May 13 08:57

Neverlord on neverlord

Merge branch 'topic/neverlord/m… (compare)

• May 13 08:45

Neverlord on neverlord

Merge branch 'topic/neverlord/m… (compare)

• May 13 08:16
Neverlord labeled #1348
• May 13 08:16
Neverlord opened #1348
• May 13 08:14

Neverlord on neverlord

Fix instance getters on the met… (compare)

• May 13 07:40
• May 12 17:35

Neverlord on neverlord

Set reuse-addr for Prometheus p… (compare)

• May 12 15:29
Neverlord commented #1343
• May 12 15:05
uentity commented #1343
• May 11 18:50
Neverlord commented #1343
• May 11 17:45
uentity commented #1343
• May 11 11:25
Neverlord unlabeled #1347
• May 11 11:25
Neverlord labeled #1347
• May 11 11:25
Neverlord unlabeled #1346
Quang Huy Nguyen

Hi, i'm installing CAF on Ubuntu 20.10. When I try to run the configure file, then the following error occurs:

-- The CXX compiler identification is GNU 10.2.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
add_subdirectory not given a binary directory but the given source
directory
is not a subdirectory of
When specifying an out-of-tree source a binary directory must be explicitly
specified.

add_subdirectory not given a binary directory but the given source
directory
is not a subdirectory of
When specifying an out-of-tree source a binary directory must be explicitly
specified.

add_subdirectory not given a binary directory but the given source
directory
is not a subdirectory of
When specifying an out-of-tree source a binary directory must be explicitly
specified.

add_subdirectory not given a binary directory but the given source
directory
is not a subdirectory of
When specifying an out-of-tree source a binary directory must be explicitly
specified.

add_subdirectory not given a binary directory but the given source
directory
is not a subdirectory of
When specifying an out-of-tree source a binary directory must be explicitly
specified.

-- Configuring incomplete, errors occurred!

The path of caf source code is; /home/student/Desktop/student/Downloads/actor-framework-master. Is something missing in my configuration? Thank you in advance!

Cem Degirmenci
did you do ./configure --prefix=$PWD/build in the beginning? Farafonov Alexey @farafonov-alexey Hello all. What is the proper syntax of this 0.17 block self->attach_functor([=](const caf::error& reason) { if (reason.category() == atom_constant<atom("exit")>::value) { ... in caf 0.18? Dominik Charousset @Neverlord category gives you a type ID in 0.18, so you'd need to compare against the ID of the atom. Something like reason.category() == type_id_v<my_atom>. Farafonov Alexey @farafonov-alexey Well I think this exit atom was inner caf. type_id_v<exit>? Dominik Charousset @Neverlord Isn't this code supposed to check whether the error is an exit_reason? Then that'd be just category() == type_id_v<exit_reason>. Farafonov Alexey @farafonov-alexey That's code snippet inside caf 0.17 broker, where we trying to determing caf::error category in attach_functor and do smth if this is exit Isn't this code supposed to check whether the error is an exit_reason? Yes. Thank you! Dominik Charousset @Neverlord 👍 Farafonov Alexey @farafonov-alexey Get this compile error. Couldn't find out what is wrong. I'm not using caf::byte btw. [build] ...MSVC\14.28.29333\include\xmemory(701,82): error C2440: 'initializing': cannot convert from 'const caf::byte' to '_Objty' [build] with [build] [ [build] _Objty=unsigned char [build] ] Farafonov Alexey @farafonov-alexey Figured out the cause of error new_data_msg.buf has custom type byte_buffer, that is vector of caf::byte Quang Huy Nguyen @Qhuy1605_twitter did you do ./configure --prefix=$PWD/build in the beginning?

Hi, i have tried but this error still occurs :(

Dominik Charousset
@Neverlord
Can you share what steps you've taken? Git checkout, configure arguments, etc. The CMake output looks weird, like something messed with the folders.
Dominik Charousset
@Neverlord
Maybe just deleting the build directory and doing a clean build would already help.
Quang Huy Nguyen

Can you share what steps you've taken? Git checkout, configure arguments, etc. The CMake output looks weird, like something messed with the folders.

Hi Dominik, i just downloaded the source code from git, and ran ./configure without arguments (like the document on git).

Quang Huy Nguyen
Nevermind, i have already fixed it. Thank you!
ferjif
@ferjif
Hey. I was searching on logging in caf but couldn't find any examples. not even in the examples folder of caf's github. can anyone help me on how to do it
Dominik Charousset
@Neverlord
You basically need to build CAF with logging enabled. Either by passing --log-level=... to the configure script or by setting CAF_LOG_LEVEL directly when using CMake. Maybe this article here is of some use: https://www.cafcademy.com/gems/indenting-trace-logs
Christian C.
Hey I have a question about Message Handling when using Group Communication. Do all group member have to handle all messages that are published inside the group? At the moment I'm only have returns for messages that I want to handle with the specific group member but I'm getting a lot of unexpected message errors that seem to terminate my members.
If I have to handle every message what is the best way to handle them without publishing a new message to the group?
Dominik Charousset
@Neverlord
Yes, all subscribers have to handle all messages on the group. If you respond to a group message, everyone in the groups receives the response. You can either add matching handlers to all subscribers or add a default handler to silently discard messages you didn't expect. But beware of the risk, since doing this can lead to very hard-to-debug errors down the road.
Christian C.
Cem Degirmenci
is it possible to do something like .add<std::map<int,std::vector<int>>>(port_list, "port-list,p", "portlist"); in the config?
I get some empty list but don't know if I do something wrong or if it is not possible at all
Cem Degirmenci
ah my mistake, we need curly braces for the map
in the configuration file
ferjif
@ferjif
Hey Guys
I recently updated my caf from 0.17.6 to 0.18.5
then realized that custom atoms cause core dump
i searched every where but nothing comes up
Noir
@josephnoir
The atom implementation changed with 0.18. The "Atoms" section in the manual explains how to use them: https://actor-framework.readthedocs.io/en/stable/MessageHandlers.html#atoms They are defined in the type id block of your application. (Don't forget to load it, e.g., like this).
Yifei Yang
@Yifei-yang7
Hey I also updated from 0.17.6 to 0.18.5, and found caf::message_view is not an api anymore, may I know its alternative?
Dominik Charousset
@Neverlord
@Yifei-yang7 there isn't an analog in the new implementation since the entire type_erased_tuple-API has been cut out.
Yifei Yang
@Yifei-yang7
got it, thx! Is it possible to remote_spawn actors with detached option? Is it achievable by adding it into make_massage()?
Yifei Yang
@Yifei-yang7
or is it possible to change the api of add_actor_type to let spawn_option in? cause I found add_actor_type specifies no_spawn_option internally
Dominik Charousset
@Neverlord
The message only wraps the constructor arguments. Doesn't seem like there's an API for that at the moment.
Feel free to make a feature request on GitHub. :)
Yifei Yang
@Yifei-yang7
Thanks! I will make one for that. :)
Dominik Charousset
@Neverlord
👍
Rich Henry
@phaistos
im having the same issue as @ferjif above, i core dump whenever i try to use an atom defined with the new API, im following the pattern in the documentation
Dominik Charousset
@Neverlord
Are you passing your type IDs to CAF_MAIN or call init_global_meta_objects?
Rich Henry
@phaistos
fixed, thanks a lot
i didnt see any discussion of that method, or the passing of arguments in the docs, but i didnt read them very closely either
and on closer inspection i see it
Dominik Lohmann
@dominiklohmann
If I have an actor behavior that takes a parameter by reference, would it theoretically be safe to store that reference elsewhere if I also manually keep a reference count to the current message as long as I keep the reference? How would I go about getting a strong reference to the current message from a "self" pointer?
Dominik Charousset
@Neverlord
self->current_mailbox_element()-> payload gives you the message in a handler. Keeping a reference/pointer into that message is only safe for read-only access because you otherwise break COW (changing a tuple with ref count > 1).
Dominik Lohmann
@dominiklohmann
It is for read-only access purposes, thanks! Not sure if you've seen my discussion comment regarding coroutines w/ CAF result (open to chat about it any time!), but I kind of need to extend the current message lifetime until the coroutine frame is destroyed because by-reference function parameters are only stored by-reference in the coroutine frame.