beeware / batavia

A JavaScript implementation of the Python virtual machine.
http://pybee.org/batavia
Other
1.39k stars 424 forks source link

Complete standard library #272

Open swenson opened 8 years ago

swenson commented 8 years ago

We should be able to load the complete standard library.

Here is a list of the potential base modules we should be able to run that are present in Ouroboros, sorted (roughly) in the order of difficulty.

These are blocked for various reasons:

hstoebel commented 7 years ago

I'm interested in working on this, but I don't understand what is needed. Oroborus is written in Python, don't these libraries need to be implemented in Javascript to function in the browser? What am I not understanding?

freakboy3742 commented 7 years ago

The aim of Ouroboros is to be a pure python reference implementation of the Python standard library. This can then be used by Batavia (by compiling to Javascript), or VOC (compiling to Java), or any other platform for that matter.

There are some portions that will inevitably require a native implementation - for example, you can't write sockets in Python without access to some sort of socket layer. In Ouroboros, that means identifying a clear interface, and providing a way for that interface to be implemented in the native platform (e.g., directly in Javascript/Java).

hstoebel commented 7 years ago

thanks for that clarification. How then should I go about identifying the parts that need a native JS implementation? Do I need to try out features by hand one by one until I hit a problem or is there a better way?

clach04 commented 5 years ago

I'm interested in working on this, but I don't understand what is needed. Oroborus is written in Python, don't these libraries need to be implemented in Javascript to function in the browser? What am I not understanding?

NOTE typo in project name above above which confused me when I copied it :), https://github.com/pybee/ouroboros