Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 5, 2022 02:00 pm GMT

Wait... Youre building a code simulator?!

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

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

Whats the code simulator?
Weve 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 languages CLI on the machine. But, this requires an internet connection.

A large number of the people using our application wont 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 its any other language.

Help if you can!
This sounds really simple in practice, but its 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


Original Link: https://dev.to/williammcgonagle/wait-youre-building-a-code-simulator-4pml

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To