Giter Club home page Giter Club logo

Comments (3)

hyln9 avatar hyln9 commented on June 21, 2024

Will fix. There are also a few things the fasl-read procedure cannot read yet (some number types I think). Will fix those too.

Launchpad Details: #LPC Abdulaziz Ghuloum - 2008-02-22 01:28:58 -0500

from ikarus.

hyln9 avatar hyln9 commented on June 21, 2024

Fixed in rev 1405.

(let ()
(define-record-type my-thing (fields x))
(define t0 (make-my-thing 123))
(let-values ([(bvop bvop-getter) (open-bytevector-output-port)])
(fasl-write t0 bvop)
(let ([bv (bvop-getter)])
(for-each
(lambda (n) (printf "xx" (div n 16) (mod n 16)))
(bytevector->u8-list bv))
(newline)
(let ([obj (fasl-read (open-bytevector-input-port bv))])
(list t0 obj (and (my-thing? obj) (my-thing-x obj)))))))
2340494B30317B01000000574D73080000006D792D7468696E67464773020000006730731000000046246A392F35242F4C5877324A47395A46464904000000464D73010000007849EC010000
(#[my-thing 123] #[my-thing 123] 123)

Launchpad Details: #LPC Abdulaziz Ghuloum - 2008-02-26 03:55:56 -0500

from ikarus.

hyln9 avatar hyln9 commented on June 21, 2024

That output was too ugly. Here's a fix.

(let ()
(import (hexdump))
;;; from https://code.launchpad.net/~aghuloum/ikarus-libraries/r6rs-hexdump
(define-record-type my-thing (fields x))
(define t0 (make-my-thing 123))
(let-values ([(bvop bvop-getter) (open-bytevector-output-port)])
(fasl-write t0 bvop)
(let ([bv (bvop-getter)])
(hexdump bv)
(let ([obj (fasl-read (open-bytevector-input-port bv))])
(list t0 obj (and (my-thing? obj) (my-thing-x obj)))))))
0x00000000 23 40 49 4B 30 31 7B 01 00 00 00 57 4D 73 08 00 | #@ik01{....WMs.. |
0x00000010 00 00 6D 79 2D 74 68 69 6E 67 46 47 73 02 00 00 | ..my-thingFGs... |
0x00000020 00 67 30 73 10 00 00 00 6B 55 44 78 39 30 55 35 | .g0s....kUDx90U5 |
0x00000030 59 57 3E 76 6B 71 3D 58 46 46 49 04 00 00 00 46 | YW>vkq=XFFI....F |
0x00000040 4D 73 01 00 00 00 78 49 EC 01 00 00 | Ms....xI.... |
(#[my-thing 123] #[my-thing 123] 123)

Launchpad Details: #LPC Abdulaziz Ghuloum - 2008-02-27 01:57:03 -0500

from ikarus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.