batavia icon indicating copy to clipboard operation
batavia copied to clipboard

Complete implementations of Python builtins

Open freakboy3742 opened this issue 9 years ago • 40 comments

batavia/core/builtins.js is an implementation of all the Python builtins - methods like print(), input(), list(), abs(), min() and so on.

An implementation of these builtins is required.

freakboy3742 avatar Apr 13 '16 09:04 freakboy3742

i'm going to implement filter()

schuyler1d avatar Jun 02 '16 16:06 schuyler1d

I'm going to work on reversed() 💥

jasonwalsh avatar Jun 02 '16 17:06 jasonwalsh

I will implement list()

lisroach avatar Jun 02 '16 18:06 lisroach

also doing map()

schuyler1d avatar Jun 02 '16 19:06 schuyler1d

I'm going to work on len()

ghost avatar Jun 02 '16 22:06 ghost

Going to work on this issue, is there any particular method that is needed ASAP? otherwise I'll pick one and post.

raehart avatar Jun 04 '16 16:06 raehart

working on set()

ghost avatar Jun 04 '16 19:06 ghost

working on oct()

Lawlheart avatar Jun 04 '16 21:06 Lawlheart

working on all()

Lawlheart avatar Jun 05 '16 18:06 Lawlheart

working on isinstance()

raehart avatar Jun 05 '16 19:06 raehart

I m work beginning

prathmesh4 avatar Jun 25 '16 18:06 prathmesh4

Which builtins have yet to be implemented?

asher-scott avatar Jul 06 '16 02:07 asher-scott

@asherScott At the very least, the methods in this file whose implementation is nothing more than throw NotImplmentedError. There are a couple of methods that internally throw NotImplementedError as well, for certain subsets of behavior (e.g., iter with 2 arguments).

freakboy3742 avatar Jul 06 '16 06:07 freakboy3742

I am working on implementing ascii in batavia/core/builtins.js.

greeve avatar Jul 21 '16 18:07 greeve

I'm dibbing byte, bytearray, and adding to Byte and Bytearray, which depend on each other enough that it doesn't make sense to work on one and not the others.

I've opened a (so far) empty PR to track progress of my work: https://github.com/pybee/batavia/pull/221

candeira avatar Aug 15 '16 05:08 candeira

Progressing on bytes by vendoring the Buffer JS library, stalled on bytearray because Buffer is mutable, but fixed-length. I'll keep reporting.

candeira avatar Aug 17 '16 00:08 candeira

Hey @freakboy3742 the link in this (https://github.com/pybee/batavia/issues/47#issuecomment-230678203) points to 404 error page.

ghost avatar Sep 14 '16 05:09 ghost

@shyam114 Thanks - I've just corrected the link.

freakboy3742 avatar Sep 14 '16 07:09 freakboy3742

Working on max() and min()

vojtechjelinek avatar Oct 19 '16 18:10 vojtechjelinek

Dibbing str(). Currently batavia has implemented the Python2 version of str(), and we want the Python3 version. Taking it over because it fits neatly with the work I'm doing in bytes().

candeira avatar Oct 21 '16 11:10 candeira

@greeve hey- are you still working on ascii? I've also started work on it, not realizing you had claimed it already.

MisterRios avatar Nov 05 '16 14:11 MisterRios

@thewus - are you still working on len()/__len__? I'd grab that one otherwise.

rixx avatar Nov 06 '16 22:11 rixx

Sorry for the delayed response. I started but didn't finish implementing ascii. Go ahead with yours.

Thanks, Greg

On Sat, Nov 5, 2016 at 8:20 AM, Daniel Rios [email protected] wrote:

@greeve https://github.com/greeve hey- are you still working on ascii? I've also started work on it, not realizing you had claimed it already.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pybee/batavia/issues/47#issuecomment-258614524, or mute the thread https://github.com/notifications/unsubscribe-auth/AFl-IEZrHDT4yHr5B6HF-0la_UQ5yGhtks5q7JCkgaJpZM4IGM-e .

greeve avatar Nov 13 '16 08:11 greeve

I think the new link for this (#47 (comment)) is here. Appears to have been moved in the last month or so.

jwpfox avatar Dec 27 '16 13:12 jwpfox

Hi. First time contributor. I was looking for a function to work on implementing, but the previous link provided by @freakboy3742 no longer exists. Is there a list of functions currently up for grabs?

matthewphillips avatar Feb 27 '17 05:02 matthewphillips

@matthewphillips The builtins are no longer in a single file; this directory contains all the builtins. If you search the files in that directory for "throw new exceptions.NotImplementedError" you'll get the list of stuff that is outstanding.

freakboy3742 avatar Mar 01 '17 00:03 freakboy3742

Going to work on bytearray and bytes constructor overloads with int arguments.

robcarney avatar Jun 28 '17 21:06 robcarney

Is this still active? I would like to work on reversed() and sorted().

gobisa avatar Mar 29 '18 21:03 gobisa

I think that reversed() and sorted() are already implemented: https://github.com/pybee/batavia/blob/master/batavia/builtins/sorted.js https://github.com/pybee/batavia/blob/master/batavia/builtins/reversed.js

Not that they couldn't be improved.

swenson avatar Mar 29 '18 21:03 swenson

Hi there, working on issubclass()

marcus290 avatar Apr 21 '18 11:04 marcus290