Giter Club home page Giter Club logo

Comments (9)

jacobh avatar jacobh commented on May 24, 2024 3

Another option is https://github.com/pybee/ouroboros

from grumpy.

freakboy3742 avatar freakboy3742 commented on May 24, 2024 3

You can certainly use PyPy code as a starting point - but "Just Use PyPy" isn't a complete solution, because there will always be system native components. For example, you can't implement a socket library without being able to access sockets.

I've got similar needs to Grumpy on my projects pybee/batavia and pybee/voc, which is why I started pybee/ouroboros. Most of the code that is already there has originated from either PyPy or CPython.

I'd be delighted to collaborate on Ouroboros with anyone from the Grumpy team (and any other Python implementations, including PyPy) who shares the need of having a Python standard library that isn't derived from CPython.

from grumpy.

trotterdylan avatar trotterdylan commented on May 24, 2024 2

Definitely support this but from my brief look at PyPy stdlibs it seemed like there was a fair bit of weirdness going on with some of the PyPy code, e.g. https://bitbucket.org/pypy/pypy/src/61294de6f130/pypy/module/itertools/?at=default

I have no problem begging, borrowing and stealing what we have to to get the stdlib functional.

from grumpy.

trotterdylan avatar trotterdylan commented on May 24, 2024 1

Thanks for sharing, Russel. A collaboration sounds really interesting. A common pure-Python subset of the standard library that could be shared by all the different interpreters would make implementing Python runtimes a lot less of a chore. It reminds me a bit of the old STLPort project that was so useful when every C++ compiler had its own STL quirks and limitations.

Things get really interesting when you start to think about how to pare down the native integrations to get platform-specific features working. Like, if a runtime implements and exposes a POSIX interface to Python then most stuff should "just work".

Another area for investigation is how to enable optimization. ISTM that the design of many of the CPython libraries was dictated by what needed to be written in C. The re library is the obvious example here. If there was a more generic and flexible way to specify what ends up being implemented natively, then maybe it'd be easier for many runtimes to share the same standard library.

Anyway, happy to chat about this more. It'd be really cool if Grumpy could just use Ouroboros more or less as-is. Ideally the Grumpy repo would not include the stdlib or it would include Ouroboros wholesale rather than piecemeal from CPython and PyPy.

from grumpy.

ns-cweber avatar ns-cweber commented on May 24, 2024

It's MIT licensed, so that shouldn't be a concern. Seems like it would save a lot of work.

from grumpy.

ns-cweber avatar ns-cweber commented on May 24, 2024

Yeah, that is strange. Definitely optimized for PyPy. That module in particular depends on PyPy's jit package.

from grumpy.

trotterdylan avatar trotterdylan commented on May 24, 2024

Interesting I did not know about that project! I'm a little unclear about the origin of the libraries. Seems like some of it's from PyPy.

I'm concerned about the licensing. It looks like a non-standard license in addition to PSF: https://github.com/pybee/ouroboros/blob/master/LICENSE

Does anybody know if that project includes novel code or is it all from other places?

from grumpy.

tav avatar tav commented on May 24, 2024

@trotterdylan It looks like most of it is from PyPy/Python, so you can just grab the standard licensed files.

from grumpy.

ulope avatar ulope commented on May 24, 2024

@trotterdylan You should ask @freakboy3742. He's the mastermind behind BeeWare (pybee)

from grumpy.

Related Issues (20)

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.