4 ms·
As someone who has been using lisp for over 20 years, kragen's definition matches with what I think of when the term "S-expression" is used. Of course it's so
by aidenn0 4y ago
As someone who has been using lisp for over 20 years, kragen's definition matches with what I think of when the term "S-expression" is used. Of course it's so minimal that the standard syntax of any non-toy lisp will have extensions.
FWIW the most minimal attempted standard of an s-expression would be rivest's basic s-expressions, which, as an extension of djb's netstrings can represent arbitrary binary values:
<sexpr> :: <string> | <list>
<string> :: <display>? <simple-string> ;
<simple-string> :: <raw> ;
<display> :: "[" <simple-string> "]" ;
<raw> :: <decimal> ":" <bytes> ;
<decimal> :: <decimal-digit>+ ;
-- decimal numbers should have no unnecessary leading zeros
<bytes> -- any string of bytes, of the indicated length
<list> :: "(" <sexp>* ")" ;
<decimal-digit> :: "0" | ... | "9" ;
- djedr 4y agoYes, S-expressions come in many flavors, some more minimal than others, some binary. They are all truly wonderful. The most wonderful to me are the simplest ones, and Jevko grows out of the same spirit as them. However, it does not attempt to be a new flavor of S-expressions and diverges in ways which to me are worth looking at. I hope it can appeal and be useful not only to minimalist syntax enthusiasts. BTW Some time ago I've been also experimenting with binary versions of Jevko, certainly with inspiration from both netstrings and Rivest's csexps: https://github.com/jevko/binary-experiments#asttolengthprefixed3 https://github.com/jevko/binary-experiments#asttolengthprefi... Since then I had some more ideas which I hope to get around to implementing at some point.