ANN: Gloss, a byte-format DSL

11 views
Skip to first unread message

ztellman

unread,
Nov 23, 2010, 2:37:40 AM11/23/10
to Aleph
I've just finished up the first draft of the documentation for Gloss
[1] and updated the TCP examples [2] to reflect how it's meant to be
used within Aleph. This will help me add support for some existing
binary protocols (Redis, AMQP), and will hopefully help the people who
have been asking about support for their own proprietary formats.

Zach

[1] https://github.com/ztellman/gloss/wiki
[2] https://github.com/ztellman/aleph/wiki/TCP

ztellman

unread,
Nov 23, 2010, 2:38:42 AM11/23/10
to Aleph
I forgot to mention that this is a slightly breaking change (TCP
channels will produce seqs of ByteBuffers, rather than just a single
ByteBuffer), so I've incremented Aleph's version to 0.1.4-SNAPSHOT.

zoka

unread,
Nov 28, 2010, 10:46:14 AM11/28/10
to Aleph
Hi Zach,

Encoding simple frame example in Wiki {:a :int16, :b :float32}
returns sequence of just one 6 bytes long ByteBuffer, as is to be
expected.

What sort of frame definition will cause encode to return
ByteBuffer sequence containing more than one element?

Zoka

Zach Tellman

unread,
Nov 28, 2010, 11:57:29 AM11/28/10
to alep...@googlegroups.com
Anything which has an unpredictable byte-length, such as (repeated
...) or (string ...), will generate its own buffer.

[:int32 (repeated :int32) :int32]

will generate a sequence of three buffers.

Zach

Reply all
Reply to author
Forward
0 new messages