|
From: | Eduardo Cavazos |
Subject: | Re: [Chicken-users] Re: bytevectors |
Date: | Tue, 17 Feb 2009 16:33:49 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080716 SeaMonkey/1.1.11 |
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.pngThat 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
[Prev in Thread] | Current Thread | [Next in Thread] |