Coder Social home page Coder Social logo

chocopy-wasm-compiler-b's People

Watchers

 avatar  avatar  avatar

chocopy-wasm-compiler-b's Issues

Generics Functionality needed for implementing loops

To implement generic loop and set iterators, we are dependent on the following two things to work:

  1. Need List wrappers to be supported for proper implementation of iterators:
T: TypeVar = TypeVar('T')
class ListIterator(Generic[T]):
    list: [T] = None
    index:int = 0
    def new(self: ListIterator, initVal: [T]) -> ListIterator:
        self.list = initVal
        return self
    def next(self: ListIterator) -> T:
        ret: T = None
        ret = self.list[self.index]
        self.index = self.index + 1
        return ret
    def hasnext(self: ListIterator) -> bool:
        return self.index<len(self.list)

def iter_list(lst: T) -> __ListIterator__:
	return __ListIterator__.new(lst)

2, Need T to support strings and lists so that we can support lists and sets of a wider variety.

Please check our forLoopsIterators-conflicts.md for more details.

@jpolitz @nickwn @praishwarya

Sets functionality need for next() and hasnext() implementation

Hi,

Currently, the class set doesn't have any fields, and neither does it support adding parameters or returning something from it's functions (class set is not included in the type checking environment). We tried changing those yesterday but the amount of changes required is a lot and we don't want to change how the sets group are implementing their functionalities.

Can the sets group support the above so that we can add next() and hasnext() in the set.wat file. Or can they implement next() and hasnext() as they proposed in their next milestone? To implement a set iterator, we need to be unblocked on this.

Thanks! @jpolitz @yalhessi @7bw

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.