Source

scheme-bert / README.markdown

Full commit
Yasir M. Arsanuk… 18b80da 


Yasir M. Arsanuk… 94bc360 
Yasir M. Arsanuk… 18b80da 


Yasir M. Arsanuk… 3de04e6 
Yasir M. Arsanuk… 18b80da 

Yasir M. Arsanuk… f9e4cab 
Yasir M. Arsanuk… 692f6d0 




Yasir M. Arsanuk… 18b80da 
Yasir M. Arsanuk… 3de04e6 
Yasir M. Arsanuk… 18b80da 

Yasir M. Arsanuk… 692f6d0 



Yasir M. Arsanuk… ed88711 
Yasir M. Arsanuk… 18b80da 




Yasir M. Arsanuk… 692f6d0 
Yasir M. Arsanuk… 18b80da 
Yasir M. Arsanuk… 2432571 
Yasir M. Arsanuk… 18b80da 
Yasir M. Arsanuk… 263480b 
Yasir M. Arsanuk… 18b80da 


Yasir M. Arsanuk… 2432571 



Yasir M. Arsanuk… 263480b 
Yasir M. Arsanuk… 18b80da 

Yasir M. Arsanuk… 263480b 





Yasir M. Arsanuk… 938d25c 
Yasir M. Arsanuk… 263480b 



Yasir M. Arsanuk… 18b80da 



scheme-bert
===========

scheme-bert is a BERT (Binary ERlang Term) serialization library for Scheme implementations compliant to [R^6RS](http://www.r6rs.org/). BERT is based on Erlang's [External Term Format](http://www.erlang.org/doc/apps/erts/erl_ext_dist.html).

See the BERT specification at [bert-rpc.org](http://bert-rpc.org).

Instances of the following Scheme types will be automatically converted to the
proper simple BERT type:

* `flonum?`
* `integer?` (fixnum and bignum)
* `symbol?`
* `list?`
* `string?`
* `vector?`

Instances of the following Scheme types will be automatically converted to the
proper complex BERT type:

* `'nil`
* `#t`
* `#f`
* `hashtable?`
* `time?`


Installation
------------

Installation for Racket:

    $ plt-r6rs --install ./src/scheme-bert.ss

(see [Installing Libraries](http://docs.racket-lang.org/r6rs/Installing_Libraries.html) for more info)

Usage
-----

Issue `(import (scheme-bert))` in your REPL or put this in head of your source file.
You will also probably want to import some other libraries such as `bytevectors`.

    > (bert-encode (vector 'foo 42 666 (vector 12 '() (vector 255 'bar) 111222333444555666)))
    #"\203h\4d\0\3fooa*b\0\0\2\232h\4a\fjh\2a\377d\0\3barn\b\0\222\203\r|\37$\213\1"

    > (bert-decode #"\203m\0\0\0001Most people would rather die than think; many do.")
    "Most people would rather die than think; many do."    

Caveats
-------

Regular expressions conversion is not supported, because every Scheme comes with its own regexp implementation and I haven't found any portable library which allows to get the source string of a regexp after one is compiled.

Trivia
------
Please, drop me an email to yarsanukaev AT gmail DOT com if you used or intend to use the library in your project ;-)

Copyright
---------

Copyright (c) 2010 Yasir M. Arsanukaev. See LICENSE for details.