Eduardo Cavazos wrote:

----------------------------------------------------------------------
(use srfi-4)

(define (make-bytevector n)
 (u8vector->blob/shared (make-u8vector n)))

(define bytevector-length blob-size)

(define (bytevector-ieee-double-native-ref bv i)
 (f64vector-ref (blob->f64vector/shared bv) (/ i 8)))

(define (bytevector-ieee-double-native-set! bv i val)
 (f64vector-set! (blob->f64vector/shared bv) (/ i 8) val))
----------------------------------------------------------------------


felix winkelmann wrote:

That looks good. And it should also be the most efficient
solution.

Cool!

Here's a screenshot of the fruits of today's labors:

http://proteus.freeshell.org/abstracting-screenshots/game1-turn6-chicken.png

That was produced by a pure Scheme implementation of the ContextFreeArt semantics. More info about ContextFree:

    http://www.contextfreeart.org/

The code that rendered it also runs on Larceny and Ypsilon.

If anybody is curious to see the code behind the program and the framework supporting it:

    http://github.com/dharmatech/abstracting/tree/master

Ed


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to