GithubHelp home page GithubHelp logo

koehlma / jaspy Goto Github PK

View Code? Open in Web Editor NEW
581.0 581.0 52.0 1.43 MB

A Python byte code VM written entirely from scratch in JavaScript with some unique features.

JavaScript 82.72% HTML 0.37% Python 16.91%
experimental interpreter javascript python web

jaspy's Introduction

jaspy's People

Contributors

koehlma avatar m-heerde 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

jaspy's Issues

Client-side compilation

From my understanding, Jaspy requires a custom server because server.py handles GET requests to /load/ specially by asking compile_and_convert() from convert.py to compile it to bytecode, and then sending back the result.

However, my goal is to make a Python REPL available directly in the browser. So far, I have found either libraries that send the instructions back to a server for execution, or libraries that do not support interruptions of execution (input()).

WIth the VM interpreter, Jaspy seems like it should be able to do the trick. However, there remains the issue of compiling to bytecode. Considering that Jaspy is written in Python, compiling Jaspy itself to Javacript may be doable (of course, a few adaptations for I/O could be necessary).

So, I have a few questions:

  • what do you think of a fully client-sided interpreter?
  • do you plan to make Jaspy compatible with this?
  • do you plan to implement that yourself / have you started working on it?
  • do you have any pointers if I (or anyone) do start working on this?

Edit: I have just realized that Jaspy just relies on compile() to generate the bytecode. I will leave the issue there in case it is of interest.

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.