Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eval and exec are not yet implemented #787

Open
acbart opened this issue Jul 1, 2018 · 6 comments
Open

eval and exec are not yet implemented #787

acbart opened this issue Jul 1, 2018 · 6 comments

Comments

@acbart
Copy link
Contributor

acbart commented Jul 1, 2018

It seems like eval and exec are not yet implemented. Any plans for them to be set up? Naively, given the existence of misceval, it seems like they wouldn't be too difficult. Are there roadblocks I'm missing?

@bnmnetp
Copy link
Contributor

bnmnetp commented Jul 1, 2018

Would be happy to review a PR 😄

@acbart
Copy link
Contributor Author

acbart commented Jul 9, 2018

Think it'd be more than just wrapping Sk.importModuleInternal_ ?

@Dustyposa
Copy link
Contributor

@acbart
Have any idea? Sk.importModuleInternal_ can't do this. Right?
Need locals var, global var, and a way to compile code when the script is running.
First, have any function to run a code segment?

@acbart
Copy link
Contributor Author

acbart commented Oct 9, 2019

Yeah, we've actually successfully gotten exec working in our fork. It was not easy, and has required a whole mess of changes in many places. The actual function can be seen here: https://github.com/blockpy-edu/skulpt/blob/master/src/builtin.js#L1424

But if you want to get my changes, you should probably diff against our whole skulpt directory to find out what else it depended on. It's relatively up-to-date to the master. I need to extract out a half-dozen features and bug fixes to push upstream, but I've already been moving at a break-neck speed this summer.

@acbart
Copy link
Contributor Author

acbart commented Oct 9, 2019

And I don't claim that this is thoroughly unit tested. I'm pretty sure there's a lot of little aspects that are not working - which is particularly troublesome since the whole point of making exec work was to get Pedal's sandbox module working, and it does some crazy stuff.

@Dustyposa
Copy link
Contributor

Oh, thanks. Has a bit of message for me. That's look not easy as my thought. :(
I will look over your master branch.

Some students use the eval function, but not support in my master branch....
That's a sad news. If complete this function too hard for me, I will make a online interpreter which use python interpreter interpret the code for the present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants