guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guix build side - including modules (guix hash), (guix gcrypt): How


From: David Craven
Subject: Re: Guix build side - including modules (guix hash), (guix gcrypt): How to provide shared library?
Date: Mon, 2 Jan 2017 15:31:31 +0100

I find it useful to look at the generated drv
(/gnu/store/asr76labrpqq0kcg64yni0sqsxj0d30y-rust-gtk-0.1.1.drv) and
build script (/gnu/store/hash-rust-gtk-0.1.1.builder) and see if those
make sense.

Sounds like a hard problem dough. Good luck! :)

I notice you haven't rebased yet, I added a couple of commits to the
cargo-build-system yesterday...

> Also, why is sha256 used via FFI via an external library? It's not exactly 
> difficult to implement in Guile :P

I'm not sure we want to write our own crypto primitives... And it's
not quite as trivial, I don't know or care what a Newton-Raphson
algorithm is ;)
http://stackoverflow.com/questions/24093199/a-pure-scheme-implementation-r5rs-of-sha256

>  @dfeuer Not for the purposes of deriving the SHA-2 initialisation values. 
> Most implementations use IEEE-754 doubles, which have only 53 bits of 
> significand, not nearly enough for the 64-bit values used in the constants. I 
> basically convert the doubles to rationals, then use Newton-Raphson to get 
> the extra precision necessary. – Chris Jester-Young Jun 19 '14 at 6:10

> @dfeuer And now, on Mark Weaver's suggestion, I don't even use doubles at 
> all, but instead use pure Newton-Raphson. It does make the startup slower, 
> but that's a one-time cost. – Chris Jester-Young Aug 12 '14 at 15:26



reply via email to

[Prev in Thread] Current Thread [Next in Thread]