[Top][All Lists]

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

Re: Guile base64

From: Thien-Thi Nguyen
Subject: Re: Guile base64
Date: Tue, 28 Sep 2010 14:48:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

() Andy Wingo <address@hidden>
() Mon, 06 Sep 2010 11:59:15 +0200

   Perhaps we could combine interfaces -- the stream-based (I presume; I
   haven't seen your code yet, but I know your Scheme code looks good)
   interfaces from yours, and the map-3-to-4 stuff from Andreas' R6RS port
   of my base64.scm.

   I say this because the r6rs port already uses bytevectors, and compiles
   down to fairly tight VM code. I haven't run benchmarks though.

Please find below a five-minute port of (ice-9 base64) to Guile 1.9.x.
To play, write it to /tmp and try something like:

  $ cd /tmp
  $ cat > hack <<EOF
  (use-modules (ice-9 base64))
  (base64-encode #t (open-input-file "/tmp/hack") 44)
  $ base64 -w 44 hack > A
  $ guile -l base64.scm -s hack | diff A -

Probably the next step is to settle the interface.  I am biased towards
1.4.x compatability but am open (albeit reluctantly) to breaking it.
Once the interface is settled, i'll add docs and some perfunctory tests
and repost.  WRT performance -- feel free to rewrite things afterwards;
i'm not yet up to speed (har har) on this area of Guile development
enough to help more than hinder.

Attachment: base64.scm
Description: Binary data

reply via email to

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