Re: Zero-terminated strings suck (was: xargs)

2007-08-06 Thread A. Pagaltzis
* Peter da Silva [2007-08-06 14:40]: > Don't you hate coming across code you wrote years ago and > wishing you had a temporal bitchslap machine so you could knock > some sense into yourself? That would lead us off-topic, because actually, not really. I'm probably still an idiot in the exact same

Re: Zero-terminated strings suck (was: xargs)

2007-08-06 Thread Peter da Silva
I didn't realise you were talking specifically about *lists* of strings represented by a successing of zero-terminated strings. I could probably gen up a healthy rant about the hateful way people mix up wire formats, storage formats, and internal formats, but I don't feel up to that much hate

Re: Zero-terminated strings suck (was: xargs)

2007-08-06 Thread A. Pagaltzis
* Peter da Silva [2007-08-03 17:02]: > On Aug 3, 2007, at 0:59, A. Pagaltzis wrote: > >* Peter da Silva [2007-08-02 21:45]: > >>> Please have the length of strings upfront. > > >>Length encoding isn't self-syncing, > > >Synching the length is O(1). > > Can you elaborate on that comment, becaus

Re: Zero-terminated strings suck (was: xargs)

2007-08-03 Thread Peter da Silva
On Aug 3, 2007, at 0:59, A. Pagaltzis wrote: * Peter da Silva [2007-08-02 21:45]: Please have the length of strings upfront. Length encoding isn't self-syncing, Synching the length is O(1). Can you elaborate on that comment, because I don't see how you can in principle resync a stream

Re: Zero-terminated strings suck (was: xargs)

2007-08-03 Thread demerphq
On 8/3/07, A. Pagaltzis wrote: > * Peter da Silva [2007-08-02 21:45]: > > > Please have the length of strings upfront. > > > > Length encoding isn't self-syncing, > > Synching the length is O(1). > > Not doing it makes *everything* O(n) and leaves you to deal with > the semi-predicate problem, s

Zero-terminated strings suck (was: xargs)

2007-08-03 Thread A. Pagaltzis
* Peter da Silva [2007-08-02 21:45]: > > Please have the length of strings upfront. > > Length encoding isn't self-syncing, Synching the length is O(1). Not doing it makes *everything* O(n) and leaves you to deal with the semi-predicate problem, source of lots of 'sploits and other fun for the