🤯 Wait… You’re building a code simulator?!

If you’ve been following me on Dev.to for the last few months, your probably asking yourself- where have you been? Well, I’ve been busy running a non-profit and so haven’t had the time to write. Sorry!

But, we’ve been working on some cool stuff and th…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by William McGonagle

If you’ve been following me on Dev.to for the last few months, your probably asking yourself- where have you been? Well, I’ve been busy running a non-profit and so haven’t had the time to write. Sorry!

But, we’ve been working on some cool stuff and through the next couple of days we are going to be sharing it- so stay posted.

What’s the code simulator?
We’ve been working on a system similar to Repl.it but we came upon a realization: we need to run the code that people write with our tool. So, how do you run code?

Most companies that do REPL (Read Eval Print Loop), just use code execution engines in the cloud. These engines are just monolithic computers with tons of programming languages installed on them. Whenever a language needs to be run, it just uses the language’s CLI on the machine. But, this requires an internet connection.

A large number of the people using our application won’t have an internet connection, and so we have to build the system to work for these people too. We could put an entire code execution engine onto their computers, but that would take up way too much disk space. So, the alternative is simulating the behaviors of each programming language.

The simulation is actually quite simple, we are just translating all of the code into a common Abstract Syntax Tree (a tree based way to store information about a program), and from there, we just interpret the Abstract Syntax Tree like it’s any other language.

Help if you can!
This sounds really simple in practice, but it’s not. And so, if you have any experience working with flutter, dart, or programming languages, we could really use some help. Feel free to check out the project and contribute!

Github URL
Irishman on Pub.get


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by William McGonagle


Print Share Comment Cite Upload Translate Updates
APA

William McGonagle | Sciencx (2022-10-05T14:00:31+00:00) 🤯 Wait… You’re building a code simulator?!. Retrieved from https://www.scien.cx/2022/10/05/%f0%9f%a4%af-wait-youre-building-a-code-simulator/

MLA
" » 🤯 Wait… You’re building a code simulator?!." William McGonagle | Sciencx - Wednesday October 5, 2022, https://www.scien.cx/2022/10/05/%f0%9f%a4%af-wait-youre-building-a-code-simulator/
HARVARD
William McGonagle | Sciencx Wednesday October 5, 2022 » 🤯 Wait… You’re building a code simulator?!., viewed ,<https://www.scien.cx/2022/10/05/%f0%9f%a4%af-wait-youre-building-a-code-simulator/>
VANCOUVER
William McGonagle | Sciencx - » 🤯 Wait… You’re building a code simulator?!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/10/05/%f0%9f%a4%af-wait-youre-building-a-code-simulator/
CHICAGO
" » 🤯 Wait… You’re building a code simulator?!." William McGonagle | Sciencx - Accessed . https://www.scien.cx/2022/10/05/%f0%9f%a4%af-wait-youre-building-a-code-simulator/
IEEE
" » 🤯 Wait… You’re building a code simulator?!." William McGonagle | Sciencx [Online]. Available: https://www.scien.cx/2022/10/05/%f0%9f%a4%af-wait-youre-building-a-code-simulator/. [Accessed: ]
rf:citation
» 🤯 Wait… You’re building a code simulator?! | William McGonagle | Sciencx | https://www.scien.cx/2022/10/05/%f0%9f%a4%af-wait-youre-building-a-code-simulator/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.