Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/msgpack|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. == msgpack === Author Hugo Arregui === Requirements * [[http://wiki.call-cc.org/egg/byte-blob|byte-blob]] * [[http://wiki.call-cc.org/egg/numbers|numbers]] * [[http://wiki.call-cc.org/egg/blob-utils|blob-utils]] * [[http://wiki.call-cc.org/egg/bind|bind]] === Description A [[http://msgpack.org/|MessagePack]] implementation for scheme. === API ==== Pack <procedure>(pack PORT VALUE)</procedure> This procedure will call primitive type packers, with the following rules: * if the VALUE has a packer, apply it. * if the VALUE is a string, it will be packed as str. * if the VALUE is a blob, it will be packed as bin. * if the VALUE is a char, it will be packed as a uint. * if the VALUE is a list, it will be packed as an array. * if the VALUE is a extension (see below), it will be packed as an ext <procedure>(pack-uint PORT VALUE)</procedure> <procedure>(pack-sint PORT VALUE)</procedure> <procedure>(pack-float PORT VALUE)</procedure> <procedure>(pack-double PORT VALUE)</procedure> <procedure>(pack-bin PORT BYTE-BLOB)</procedure> <procedure>(pack-str PORT STRING)</procedure> <procedure>(pack-array PORT VECTOR)</procedure> <procedure>(pack-map PORT HASH-TABLE)</procedure> <procedure>(pack-ext PORT EXT)</procedure> ==== Unpack <procedure>(unpack PORT [MAPPER identity])</procedure> === Extension ==== Definition: <record>(extension type data)</record> * type: integer from 0 to 127 * data: a byte-blob ==== Example: <enscript highlight="scheme"> (make-extension 1 (string->byte-blob "hi")) </enscript> === License BSD
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you add 12 to 10?