You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Future feature to be implemented: running code with multiple files.
This seems fairly straight forward with compiled languages. For example, for c/cpp we can send the code as an array of strings, have the file for each code string created, and the g++ command should take care of the rest in creating the executable. Some minor accomodations may need to be made to differentiate b/w header and non-header files, but that is not a big deal.
For interpreted languages, like python, I am not sure its as straight forward with the current mechanism. This is because if a python file imports from a file called "x", the imported filename will be modified to a UUID with the current set-up and thus the import statement will be broken. However, I might be misunderstanding and welcome criticism/solutions.
The text was updated successfully, but these errors were encountered:
@YasserDbeis I think you guys would need some sort of "module resolver" mechanism to create a dependency graph of the files before sending it to the server.
Later the server can flatten that data structure to resolve and load any missing modules.
But because there is no concept of a filesystem right now (I guess?) its more like a single evaluation call.
In a ideal architecture, the client could establish a WS connection with the server which can then be multiplexed to send different types of data like when the first time a enviornment loads, the client can send a Tree of files to the server which it can use to resolve file content.
This will also allow the server to pipe the STD inputs and outputs with using the WS with the client which can then be used to show a terminal view using something like https://xtermjs.org/
Haha these are just my suggestions from some experience with building such tooling, feel free to use if anything is useful to u. 😄
Future feature to be implemented: running code with multiple files.
This seems fairly straight forward with compiled languages. For example, for c/cpp we can send the code as an array of strings, have the file for each code string created, and the g++ command should take care of the rest in creating the executable. Some minor accomodations may need to be made to differentiate b/w header and non-header files, but that is not a big deal.
For interpreted languages, like python, I am not sure its as straight forward with the current mechanism. This is because if a python file imports from a file called "x", the imported filename will be modified to a UUID with the current set-up and thus the import statement will be broken. However, I might be misunderstanding and welcome criticism/solutions.
The text was updated successfully, but these errors were encountered: