Coder Social home page Coder Social logo

ronenness / adder Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 3.0 1.78 MB

Executing untrusted code with ease.

License: MIT License

Batchfile 0.02% JavaScript 97.84% CSS 1.66% HTML 0.48%
eval javascript javascript-library javascript-sandbox node-js nodejs scripting-language

adder's People

Contributors

ronenness avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

adder's Issues

Defining Functions and Executing them Externally

Love this project, it looks like it could be perfect for my needs.

I read through the docs and I couldn't find an answer to the question I have.

Is it possible, and if so how would one go about doing so, for a user script to define a function and for that function to be executed externally in Node.js.

For example, could I have an adder script like so:

# Click handler
def onClick():
    print("Clicked");

And then call that function from Node.js:

// Call event handler
program.execute("onClick");

Or something along those lines?
I couldn't find anything in the docs about this.
Thanks for the help!

Performance numbers in Readme

Hey hey ^^

Very nice thing you've created here! One question though:

  • Is the compilation step in the numbers of the performance tests included or is it only the execution of the build?
    (My backend will probably be Elixir and i am wondering if I could speed up the execution by caching the build step ^^)

Thx for your feedback in advance and toodaloo ;)

Accessing built-in functionality with better syntax.

I think this project is amazing and probably the best there is out there in terms of client-side sandboxes, but I think there are a couple of things holding it back.

One of the main problems I've noticed is the lack of shorthand list/dictionary initialization and access, which could make the creation and access much easier.

old_list = list(0,1,2)
old_dict = dict()
old_dict.set("a", 0)
old_dict.set("b", 1)
old_dict.set("c", 2)

print(old_list.at(1))
print(old_dict.get("b"))

# Would look much better like

new_list = [0,1,2]
new_dict = {"a":0, "b": 1, "c":2}

print(new_list[1])
print(new_dict["b"])

But the real dealbreaker for me was that there is no built-in way of creating classes/modules. Something like the python class initializer would be very helpful to organize complex code.

Are there any plans for improving the syntax?
Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.