[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua interface standards
- From: Martin <eden_martin_fuhrspam@...>
- Date: Sun, 23 Apr 2017 13:58:16 -0700
Thank you for reply!
I've just had a nice time reading about Daniel Bernstein
(which occurs to be a cool guy really understanding number
theory and cryptanalysis), CBOR RFC (heh, coauthored by
C. Bormann) and your code of CBOR codec.
On 04/23/2017 02:05 AM, Sean Conner wrote:
> The work that verify() would do is pretty much the same that
> encode()/decode() would do, so it doesn't make sense. Besides, someone
> could *still* call encode()/decode() and skip calling verify() entirely, so
> you *still* have to do the work in eocode()/decode().
Yes, I agree. There is no need to verify() function and no way to
enforce it's usage.
>> What should be done to serialize it partly? align() data before
> The name "align()" is a bad name for this. "sanitize()" would be better.
Yes, probably "align" is not a very suitable name. From the other hand
"sanitize" triggers some medical associations in my mind. Something
like "biohazard", "contamination", "desinfection", "desinsection".
Other variant is "adjust".
(Or any other suitable name for function which removes some data from
given table (breaks cycles, removes all keys that are not strings
(for JSON object) or not elements of sequence (for JSON array), removes
all values that are not tables, strings, numbers, booleans or json.null).)
>  One of the worse offenders of this is Danial Bernstein, who's code
> assumes *no standard library whatsoever* and provides his own
> version of routines like memcpy() or strlen() .
On Joel Spolsky site  stated that for some period Microsoft Excel
team had it's own C compiler for project. I don't consider this bad.
If someone likes reimplementing stuff despite possibility to reuse it -