iceytomatoes t1_jbaw9rn wrote
Reply to comment by lurgi in I made a library that allows you to run functions from any language, in any language. by Zealousideal_Crazy46
i understand it gets a little complicated depending on what's being returned, but for returning values wouldn't it be feasible to wrap that in an input()?
lurgi t1_jbawg6k wrote
If what you are returning can easily be represented as a string, I suppose you could.
ragtagthrone t1_jbbla1i wrote
So in theory you could stringify any object and return that as long as you have a deserialization step to handle it.
lurgi t1_jbbp5gi wrote
Then you'd need to modify the C/C++ code so that it doesn't return a Widget
type or whatever and instead serializes the data in such a way that it can be deserialized by the caller.
At this point it's just FFI with me doing all the work. Plus, every time a function is called with different arguments, the C compiler is invoked (this also means whoever is running the code will need a C compiler installed, which seems like a big ask).
ragtagthrone t1_jbbx4sf wrote
Yeah, seems really rigid tbh
Viewing a single comment thread. View all comments