lurgi
lurgi t1_jbawg6k wrote
Reply to comment by iceytomatoes in I made a library that allows you to run functions from any language, in any language. by Zealousideal_Crazy46
If what you are returning can easily be represented as a string, I suppose you could.
lurgi t1_jbarw1b wrote
Reply to comment by iceytomatoes in I made a library that allows you to run functions from any language, in any language. by Zealousideal_Crazy46
It looks like it takes the file containing the function, slaps an int main()
in there which calls the function with the appropriate arguments, and then compiles and runs the code. No values can be returned from the function and my guess is it will only work with a few data types (int, float, char, maybe string) so good luck using anything remotely interesting.
lurgi t1_itxqf2n wrote
I got the alert a few seconds before the quake hit me. The future can be cool, sometimes.
lurgi t1_jbbp5gi wrote
Reply to comment by ragtagthrone in I made a library that allows you to run functions from any language, in any language. by Zealousideal_Crazy46
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).