Git Product home page Git Product logo

Comments (4)

piyush-kurur avatar piyush-kurur commented on July 28, 2024

On Fri, Aug 30, 2013 at 10:15:07PM -0700, satvikc wrote:

why load ptr is not giving same result as peek ((castPtr ptr) :: Ptr a)?

load takes care of endianness. For example consier Word32BE on an
intel machine. load will load the data and convert the endian, peek
will not.

Regards

ppk

from raaz.

satvikc avatar satvikc commented on July 28, 2024

Defining cellLoad and cellStore using load and store is not working while defining them using peek and poke works.

from raaz.

satvikc avatar satvikc commented on July 28, 2024

What happens when you use store to write a value to a pointer and then read that in the c side ?

from raaz.

piyush-kurur avatar piyush-kurur commented on July 28, 2024

On Sat, Aug 31, 2013 at 03:33:48AM -0700, satvikc wrote:

What happens when you use store to write a value to a pointer and then read that in the c side ?

It is working as expected. There are two classes Storable (provided by Haskell) and
CryptoStore (provided in Raaz). The functions load and store are functions of the
CryptoStore class and their purpose is only while reading/writing with appropriate
endian conversion. Load and store are thus relevant only at the very first step (i.e reading
the SHA1 hash for example) or the very last step (i.e. when serializing and deserializing).
For example the toByteString uses store, and if we want the corresponding (fromByteString) it
would use load. All other steps, including passing to C, should make use peek and poke.

Regards

ppk

from raaz.

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.