On Mon, 15 May 2000, Lee Daniel Crocker wrote:
<snip>
> No, it doesn't, and your constant insistance that it does is very
> annoying. I don't understand the need for a "presentation" layer at
> all. No successful protocol I know of needs one. It simply isn't
> needed. Tunneling through any protocol can be done with _no_ knowledge
> of Freenet protocol at all--not parsing fields, not understanding
> them, not dealing with them at all (except possibly, as noted, for
> TransportOptions). Please NAME a protocol for which this isn't true.
There is no need for a presentation layer, it is a want. But there is no need
in not having one either, that is just a want from your side.
Simple example of when it was good: When I changed from number encoding to
hexidecimal I had to change things in about a dozen places. If somebody wants
to change it back to decimal, or to some other base, they have to change it in
exactly one place. Should we decide that "yes" and "no" are synomyns of "true"
and "false": one place. Should we add a way of escaping new lines, given no
quoting, the change needs to be done in one place.
Layers are good.
I also don't see what the big deal about quoting is. Sure, you need to escape
sometimes, but if the encoding is done within a presentation layer, then that
code only has to be done once, and here it is in Java:
StringTokenizer st = new StringTokenizer(args[0],"\"\\",true);
StringBuffer sb = new StringBuffer();
while (st.hasMoreTokens()) {
String s = st.nextToken();
if (s.equals("\"") || s.equals("\\")) {
sb.append("\\" + s);
} else {
sb.append(s);
}
}
Decoding is equally simple (it might even be possible to do this with
String.replace() though it only takes a single char as replacement IIRC)...
> --
> Lee Daniel Crocker <lee at piclab.com> <http://www.piclab.com/lee/>
> "All inventions or works of authorship original to me, herein and past,
> are placed irrevocably in the public domain, and may be used or modified
> for any purpose, without permission, attribution, or notification."--LDC
>
>
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
--
___
Oskar Sandberg
md98-osa at nada.kth.se
_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev