unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Craven <david@craven.ch>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel <guix-devel@gnu.org>
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	[thread overview]
Message-ID: <CAL1_imk+krS6heOTjHU5j4spjTPyQZE7zq0VRwvTQLgaH4OFfQ@mail.gmail.com> (raw)
In-Reply-To: <20170102145137.41830372@scratchpost.org>

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	other threads:[~2017-01-02 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02  2:16 Guix build side - including modules (guix hash), (guix gcrypt): How to provide shared library? Danny Milosavljevic
2017-01-02 10:06 ` David Craven
2017-01-02 13:51   ` Danny Milosavljevic
2017-01-02 14:31     ` David Craven [this message]
2017-01-02 22:03       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL1_imk+krS6heOTjHU5j4spjTPyQZE7zq0VRwvTQLgaH4OFfQ@mail.gmail.com \
    --to=david@craven.ch \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).