batavia icon indicating copy to clipboard operation
batavia copied to clipboard

Complete standard library

Open swenson opened this issue 8 years ago • 4 comments

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.

  • [ ] _csv
  • [x] colorsys
  • [x] copyreg
  • [x] this
  • [x] bisect
  • [ ] sre_constants
  • [ ] _codecs
  • [ ] antigravity
  • [ ] asynchat
  • [ ] formatter
  • [ ] mailcap
  • [ ] netrc
  • [ ] nturl2path
  • [ ] numbers
  • [ ] opcode
  • [x] stat
  • [ ] xdrlib
  • [ ] _compat_pickle
  • [ ] _sitebuiltins
  • [ ] ast
  • [ ] codecs
  • [ ] contextlib
  • [ ] enum
  • [ ] genericpath
  • [ ] getopt
  • [ ] glob
  • [ ] hmac
  • [ ] io
  • [ ] macurl2path
  • [ ] string
  • [ ] traceback
  • [ ] binhex
  • [ ] calendar
  • [ ] cmd
  • [ ] crypt
  • [ ] csv
  • [ ] fnmatch
  • [ ] imghdr
  • [ ] linecache
  • [ ] lzma
  • [x] operator
  • [ ] pty
  • [ ] reprlib
  • [ ] uu
  • [ ] bz2
  • [ ] code
  • [ ] filecmp
  • [ ] gettext
  • [ ] heapq
  • [ ] optparse
  • [ ] pipes
  • [ ] pprint
  • [ ] quopri
  • [ ] re
  • [ ] selectors
  • [ ] shelve
  • [ ] shlex
  • [ ] socket
  • [ ] sre_compile
  • [ ] sre_parse
  • [ ] sunau
  • [ ] future
  • [ ] _bootlocale
  • [ ] base64
  • [ ] datetime
  • [ ] fileinput
  • [ ] imaplib
  • [ ] macpath
  • [ ] mimetypes
  • [ ] poplib
  • [ ] queue
  • [ ] sndhdr
  • [ ] tabnanny
  • [ ] wave
  • [ ] _osx_support
  • [ ] argparse
  • [ ] cProfile
  • [ ] copy
  • [ ] dis
  • [ ] fractions
  • [ ] profile
  • [ ] rlcompleter
  • [ ] sched
  • [ ] symbol
  • [ ] symtable
  • [ ] _dummy_thread
  • [ ] asyncore
  • [ ] configparser
  • [ ] hashlib
  • [ ] telnetlib
  • [ ] timeit
  • [ ] tracemalloc
  • [ ] _sre
  • [ ] _threading_local
  • [ ] difflib
  • [ ] functools
  • [ ] getpass
  • [ ] gzip
  • [ ] pstats
  • [ ] socketserver
  • [ ] warnings
  • [ ] compileall
  • [ ] ftplib
  • [ ] posixpath
  • [ ] random
  • [ ] weakref
  • [ ] _strptime
  • [ ] bdb
  • [ ] cgitb
  • [ ] nntplib
  • [ ] _pyio
  • [ ] plistlib
  • [ ] tempfile
  • [ ] aifc
  • [ ] decimal
  • [ ] mailbox
  • [ ] statistics
  • [ ] threading
  • [ ] tokenize
  • [ ] webbrowser
  • [ ] dummy_threading
  • [ ] locale
  • [ ] ntpath
  • [ ] cgi
  • [ ] platform
  • [ ] py_compile
  • [ ] runpy
  • [ ] smtplib
  • [ ] sysconfig
  • [ ] shutil
  • [ ] trace
  • [ ] uuid
  • [ ] pathlib
  • [ ] imp
  • [ ] pyclbr
  • [ ] smtpd
  • [ ] tarfile
  • [ ] zipfile
  • [ ] turtle
  • [ ] subprocess
  • [ ] pdb
  • [ ] doctest
  • [ ] inspect
  • [ ] os
  • [ ] site
  • [ ] ssl
  • [ ] pickletools
  • [ ] pickle
  • [ ] modulefinder
  • [ ] pydoc
  • [ ] pkgutil

These are blocked for various reasons:

  • [ ] _markupbase (blocked by re)
  • [ ] _weakrefset (blocked by _weakref)
  • [ ] abc (blocked by _weakref)
  • [ ] chunk (blocked by struct)
  • [ ] codeop (blocked by __future__)
  • [ ] ipaddress (blocked by weakref)
  • [ ] itertools (blocked by classmethod)
  • [ ] stringprep (blocked by unicodedata)
  • [ ] textwrap (blocked by re)
  • [ ] tty (blocked by termios)
  • [ ] types (blocked by type(type.__dict__) throwing exception)
  • [ ] token (blocked by globals)
  • [ ] _collections_abc (blocked by bytearray)
  • [ ] struct (blocked by native implementation)

swenson avatar Sep 22 '16 05:09 swenson

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?

hstoebel avatar Nov 13 '16 14:11 hstoebel

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).

freakboy3742 avatar Nov 14 '16 00:11 freakboy3742

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?

hstoebel avatar Nov 14 '16 13:11 hstoebel

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

clach04 avatar Feb 02 '19 18:02 clach04