| ▲ | zzo38computer 3 days ago | ||||||||||||||||
OK, this is possible, but it seems the type that ought to be a built-in type. Also, if there is not a binary file format for the data then you will need to always convert to/from base64 when working with this file whether or not you should need to. Furthermore, this does not work very well when you want to deal with character sets rather than binary data, since (as far as I can tell from the specification) the input will still need to be UTF-8 and follow the EDN syntax of an existing type. From what I can understand from the specification, the EDN decoder will still need to run and cannot be streamed if the official specification is used (which can make it inefficient), although it would probably be possible to make an implementation that can do this with streaming instead (but I don't know if the existing one does). So, the extensibility is still restricted. (In my opinion, ASN.1 (and ASN.1X) does it better.) | |||||||||||||||||
| ▲ | delaguardo 3 days ago | parent [-] | ||||||||||||||||
> From what I can understand from the specification, the EDN decoder will still need to run and cannot be streamed if the official specification is used Sorry, you understand it wrong There is no enclosing element at the top level. Thus edn is suitable for streaming and interactive applications. > but I don't know if the existing one does This implementation does not do streaming for now, but it understands a concept of "reading one complete" element from buffer. The only missing part is buffer managment. > So, the extensibility is still restricted. Could you explain how it is restricted if you are allowed to run whatever you want during reading of edn document? You can even do IO, no restrictions at all! Consider this: #init/postgres {:db-spec {:host "..." :port 54321 ,,,} :specs {:user ,,,}} [#user/id 1 #user/id 2 #user/id 3] This allows you to have a program that can lookup postgres database during reading of a document validating every returned object using provided spec (conforming the value) > In my opinion, ASN.1 (and ASN.1X) does it better. Please show how it does better. I'm very curious | |||||||||||||||||
| |||||||||||||||||