[racket] Compiling Racket on Maemo 5

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Jul 14 13:58:21 EDT 2010

At Wed, 14 Jul 2010 13:19:36 -0400, Eli Barzilay wrote:
> On Jul 13, Matthew Flatt wrote:
> > The main obstacle was that operations like `raco make' and `raco
> > setup' needed SHA-1 hashing from OpenSSL via the FFI.
> > 
> > I've adjusted several things so that `make' and `make install' can
> > work when the FFI is disabled:
> > 
> >  * A new `file/sha1' library ports Eric Knauel's implementation of
> >    SHA-1 to Racket.
> > 
> >  * The `openssl/sha1' library falls back to `file/sha1' when the FFI
> >    isn't supported or when OpenSSL isn't available.
> > [...]
> > 
> > Hashing by `file/sha1' is about 500 times as slow as OpenSSL
> > hashing, but it should work well enough for `raco setup'.
> Maybe it's better to organize things differently -- make `file/sha1'
> provide the openssl functionality or the racket version (which will
> move to a private subdirectory)?  This looks like a better layout
> since it's easier to make it possible to remove openssl, 

? I'm pretty sure that it's easier to remove "openssl" if there's no
reference from `file/sha1' to `openssl/sha1'.

My rationale was to avoid that dependency (or any `dynamic-require'
hack that might attempt to make the dependency weak) and also provide a
simple way to reference the pure-Racket implementation.

> and I think
> that a `file/sha1' is more visible, so people are likely to use it
> directly.

True. The docs point to `openssl/sha1', but maybe there's a better way.

Surely someone is intrigued that the OpenSSL version is 500 times
faster, and they will work on the Racket version to make it reasonably
fast too. Then it won't matter so much. In fact, I'm surprised if you
haven't started already. :)

Posted on the users mailing list.