Guile: (buffer repository)

In a step towards constructing my block-programming framework, I coded this (buffer repository) module:

(buffer repository)
(buffer repository tests)

(make-buffer-repository smallest-pwr largest-pwr)

 A procedure in module (buffer repository).
 Make a buffer repository instance. Parameters refer to the sizes of buffers
  stored in the repository. The smallest size is 2 to the smallest-pwr, the
  largest is 2 to the largest-pwr. 

(checkout-buffer! requested-bytes (buffer-repository) (#:spawn))

A procedure in module (buffer repository).

Checkout a buffer (bytevector) from the buffer-repository. If
 buffer-repository is not specified, parameter %buffer-repository is
 used. The default action, if a buffer is not available from the
 appropriate size bucket, is to generate a new buffer. If #:spawn #f is
 passed, checkout-buffer! will throw the 'empty-bucket exception
 instead. The buffer returned might be larger than the number of bytes
 requested. A 'no-match exception will be thrown if the size-requested
 is not in the range of buffer sizes stored by the buffer-repository.

(checkin-buffer! buffer (buffer-repository))

A procedure in module (buffer repository).

Return a buffer (bytevector) to the buffer-repository. If
 buffer-repository is not specified, parameter %buffer-repository is
 used. It is the responsibility of the calling code not to use the
 buffer after it has been checked in. Technically the buffer does not
 have to be one that was originally checked-out from the
 buffer-repository, but checkin-buffer will throw exceptions if the
 buffer is not the proper size to fit in a repository bucket.

git clone git://git.librehacker.com/pub/git/hackrf-rkt.git

Fun with wxMaxima: Semicircle Tangent

I have been working through some pre-calculus problems, and wxMaxima is a fun tool to play with:

wxMaxima provides a mathematical workbook environment. Maxima is a Computer Algebra System coded in Common Lisp back in the 80s.

In the screenshot you can see the semi-circle function f(x), and the function h(x, x_2) generates the tangent line for any point on the semicircle. The helpful feature exhibited here is partial application, allowing me to specify, e.g., h(x,20), to provide the graph with a new function, the tangent line attached to that point on the semi-circle. With a little more work, I could generalize h to allow passing in any semicircle function.

I wanted to upload the wxmx file, but wordpress.com does not permit upload that file type, for reasons that are beyond me.