GithubHelp home page GithubHelp logo

Comments (9)

dicarlo2 avatar dicarlo2 commented on June 12, 2024

Hey @erikzhang I see that you added the enhancement label, does that mean we'll see this implemented soon?

from neo-vm.

erikzhang avatar erikzhang commented on June 12, 2024

I wonder if it should be an API to provide the functionality of a hash table.
Like this: Neo.Utility.CreateHashTable

from neo-vm.

dicarlo2 avatar dicarlo2 commented on June 12, 2024

@erikzhang It could be a bunch of syscalls that map to the opcodes proposed above and I'm not opposed to making it a syscall, but to me it feels like something that should be native to the vm, similar to arrays. Either way, we would need to implement an IEqualityComparer for the StackItems that are valid keys and it seems like for better future proofing it would make sense to implement it in the neo-vm project in case we add more StackItem types in the future.

from neo-vm.

erikzhang avatar erikzhang commented on June 12, 2024

We just need MapStackItem, right? I didn't see the necessity of DictStackItem.

from neo-vm.

dicarlo2 avatar dicarlo2 commented on June 12, 2024

@erikzhang Yea, I just added DictStackItem for consistency with StructStackItem. If we don't add DictStackItem it might be nice to have an op code for shallow cloning a DictStackItem.

from neo-vm.

dicarlo2 avatar dicarlo2 commented on June 12, 2024

@erikzhang Checking in, is this something that we'll see implemented as described in the spec? (Except for the StructStackItem)

This is a feature I'd like to make use of for the TypeScript compiler, so if you're planning on implementing it like the spec I'll go ahead and start developing against it.

from neo-vm.

erikzhang avatar erikzhang commented on June 12, 2024

Hi @dicarlo2 , please review #28 .

from neo-vm.

localhuman avatar localhuman commented on June 12, 2024

This is awesome, adding support in neo-python now. Not sure how I missed it!

@erikzhang @dicarlo2 do you have any sample .avm I can use to test with?

from neo-vm.

dicarlo2 avatar dicarlo2 commented on June 12, 2024

@localhuman Sorry, a little late on the reply (cleaning up notifications). I do not currently have a sample .avm to test with, I just tested using manual unit tests.

from neo-vm.

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.