To tell you about my level, I am extremely serious about mastering Elixir, I have read through nearly all the documentation for Elixir , have read a tutorial series cover to cover while doing exercises, and have read one introductory book cover to cover, while trying many things, for example I just put up a GenServer and supervisor simple example. I am committed to fully mastering Elixir and making it my specialization.
Given my current level of progress, do you think I would be able to put up an online interpreter where I execute user-submitted code?
I am thinking of these examples - basically the top results for “online elixir interpreter” :
- [Online Compiler and Editor/IDE for Java, C, C++, PHP, Python, Ruby, Perl - Code and Run Online]
- [Elixir - OneCompiler - Write, run and share Elixir code online]
- [Online Elixir Compiler | Run Elixir Code Online]
I would like to make my own Elixir learning game that is online and uses some similar functionality.
How do you think these are done at the architecture level? Since there are several different online interpreters it seems like something that is pretty easy to do in Elixir (otherwise there wouldn’t be so many sites doing it), but I’m not sure of the approach that these online interpreters take.
How do you think they’re structured architecturally? How would you go about making an online interpreter like this?
Obviously I can’t just write out whatever the user submits to a file and execute it with Elixir right on the server as the user could include lines to read or modify my server settings.
I am thinking the way the above sites must do it is either that they use a subset of allowed Elixir (things that don’t include file access) and control how long processes can run, or perhaps they run it in a read-only VM without network access and just reset it after each request.
I think it would be a good demonstration of mastery of the basics of the Elixir language, and I am thinking of making an Elixir game out of it where users can complete small challenges to help learn Elixir. Let me know how you think the above sites do it, and whether you think it is something I might be able to do given my level.