|
From: | Diogo Behrens |
Subject: | Re: Multiple environments |
Date: | Sun, 16 Jun 2024 15:57:55 +0200 |
Hi Felix, Thanks for the reply. On 16. Jun 2024, at 11:27, felix.winkelmann@bevuta.com wrote:
Indeed, this has the issue that the module passed as second argument is not mutable.
Actually, no. I was planning not to compile the actors code. The idea is that the simulator takes the a “model” as input besides the number of actors. The model is the code executed by the actors. I guess that this boils down to using eval, right?
For the globals that are *shared* among actors, I’m already using an interface. That makes the accesses to shared data fully explicit (it’s just a hash-table in the background). But I wanted to allow the user to write the actors’ “models“ as plain scheme. At the end of the day, however, this is not a tremendous problem. I was just curious to see if it would be possible to implement. For now, I will follow your suggestion and move the accesses to global state (whether shared or not) behind a get-put interface. I think that later, using macros, I can hide/simplify the input of the user. Thanks for the suggestions. Best, -Diogo |
[Prev in Thread] | Current Thread | [Next in Thread] |