Giter VIP home page Giter VIP logo

Comments (4)

jasal82 avatar jasal82 commented on July 22, 2024

There's one thing that confuses me and needs to be clarified for the patch: Even after removing both get and Protocol::INDEX_GET instance functions from Vec's native module declaration I can still do let item = v[1] in the Rune script, which is completely unexpected.

from rune.

udoprog avatar udoprog commented on July 22, 2024

Vector indexing by a number is an internal Vm operation. Range indexing could probably also go there.

from rune.

jasal82 avatar jasal82 commented on July 22, 2024

Ok I understand. Intuitively I would think that neither the integer nor the range indexing should be an internal Vm operation because if there are instance functions in the native modules (like get()) which are just another frontend to the indexing you have to implement the operations twice.

from rune.

udoprog avatar udoprog commented on July 22, 2024

Hm, Vm operation exists because it accelerates the operation. We avoid additional dispatch to the external function which involves a bit of stack mangling.

I'd be open to being able to disable internal acceleration maybe it could be done through a feature flag, but then you'd run the risk of feature parity. All though disabling it completely should probably be supported at some point for folks that really wants a completely bare virtual machine.

from rune.

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.