IRC channel logs

2024-02-29.log

back to list of logs

<rschulman>Am I correct that messages encoded into syrup do not necessarily have to have a top level structure? That is, could a message just contain a string followed by an integer followed by an array?
<cwebber>rschulman: are you speaking about Syrup usage generally, irrespective of OCapN's specific usage?
<cwebber>rschulman: typically a single syrup expression does have an enclosed structure. Eg, in the guile and racket libraries you run decoding over a syrup structure and it's expected to read in one expression and stop there. if you have eg a stream you can read multiple times to keep slurping messages off the stream
<cwebber>but, like json, one syrup message is one piece of structured information
<rschulman>Ideally yes, irrespective of ocapn specifics, since I'm working on a general library that others might someday want to use.
<rschulman>In practice, though, I'm doing so so I can make an ocapn library on top it.
<rschulman>But thank you, that explanation is very useful.