Another interesting thing when communicating through sockets between two different languages is: How do you manage callbacks? For example I would like to be able to make Python execute a Pharo Block at a certain point of the execution or to make Pharo execute a Python���s lambda. I do not have answer for that.
You can do that in Pharo side or Python side , its up to you. Only you need is a string that acts as a single. For example getValue: technically is kinda like a callback because it sends the string containing the python command but it waits for response from Python that will signal it if the return string contains the signature, if I remember correctly, getvalue: value. So essentially what I have done is create a mini transfer protocol.
It was necessary for me to do this not because of callback per se, but because I wanted to retain the live coding abilities of Pharo while coding using Python libraries. In order to do that I wanted to send Python errors back to Pharo and trigger the Pharo debugger with the python error as the name of the error. To do that I had to implement a protocol that diffirentiate between return values and value that concern only Atlas in this case python errors.
This protocol can be extended of course to contain a myriad of things, callbacks, thread synchronization, C function calls , C memory etc.
So technically speaking its already possible through Atlas. If you want to do something very special with callback that involves the Pharo IDE as I did with Python error you only need to extend this protocol adding your own kind of signal strings.
I think you could re-use the ideas behind the bridge but not the code. It is really specific to Python 3, I do not see how you could generate LISP using it as is.
As far as my Atlas is concerned I had made also a Python 2 version but never bothered to continue developing it because I needed only Python 3. The good news is Python 2 and 3 have minor differences when it comes to sockets.
Indeed Atlas wont work magically with other language but porting it is not hard because I tried to keep the majority of the code as much as I could in Pharo side for this precise reason. So my initial intention was to provide Atlas to Pharo community as a means to use libraries of any programming language from inside Pharo. I hoped that people would use it as the foundation to bring other languages inside Pharo like I did for Python but alas it seems Pharoers for some weird reason prefer to use Pharo :D (joke for those that did not notice the laughing smiley face)
I was also planning adding the ability of memory mapped files that I used in my CPPBridge prohect. This form of communication accelerate things by thousands of times because its low level. But it sacrifices remote execution which means in this case you fall back to the existing socket bridge approach. This was necessary at the time because sockets are not a good idea if you plan on doing large loops, because obviously there is a delays , its low around 1 millisecond and less depending on the power of CPU but if you do 1 million iterations would turn that 1 millisecond to 1000 seconds which of course is no fun.
On the other hand even without memory mapped files you can avoid this by making sure you keep the loop either on python side or pharo side with the condition it does not contain Atlas communication commands that open and close the socket.