Re:Why I no longer have an old-school cert on my HTTPS site
by marcosdumay on Friday May 23, 2025 @02:42PM
(#44075338)
What I don't understand is why you (and a lot of other people) just expect S-expression parsers to not have the exact same problems.
[ Parent
| on HN ]
Re:Why I no longer have an old-school cert on my HTTPS site
by 01HNNWZ0MV43FF on Friday May 23, 2025 @03:07PM
(#44075594)
I think they mean that Common Lisp has bigints by default
Re:Why I no longer have an old-school cert on my HTTPS site
by ryukafalz on Friday May 23, 2025 @04:35PM
(#44076385)
As do Scheme and most other Lisps I'm familiar with, and integers/floats are typically specified to be distinct. I think we'd all be better off if that were true of JSON as well.
I'd be happy to use s-expressions instead :) Though to GP's point, I suppose we might then end up with JS s-expression parsers that still treat ints and floats interchangeably.
Re:Why I no longer have an old-school cert on my HTTPS site
by petre on Saturday May 24, 2025 @12:28AM
(#44078775)
And in addition to that are unable to distingush between a string "42" and a number 42.
Re:Why I no longer have an old-school cert on my HTTPS site
by eadmund on Friday May 23, 2025 @05:06PM
(#44076602)
Because canonical S-expressions don’t have numbers, just atoms (i.e., byte sequences) and lists. It is up to the using code to interpret "34" as the string "34" or the number 34 or the number 13,108 or the number 13,363, which is part of the protocol being used. In most instances, the byte sequence is probably a decimal number.
Now, S-expressions as used for programming languages such as Lisp do have numbers, but again Lisp has bignums. As for parsers of Lisp S-expressions written in other languages: if they want to comply with the standard, they need to support bignums.
Re:Why I no longer have an old-school cert on my HTTPS site
by its-summertime on Friday May 23, 2025 @05:56PM
(#44076975)
"it can do one of 4 things" sounds very much like the pre-existing issue with JSON
Re:Why I no longer have an old-school cert on my HTTPS site
by tsimionescu on Saturday May 24, 2025 @02:18AM
(#44079135)
You can write JSON that exclusively uses strings, so this is not really relevant. Sure, maybe it can be considered an advantage that s-expressions force you to do that, though it can also be seen just as easily as a disadvantage. It certainly hurts readability of the format, which is not a 0-cost thing. This is also why all Lisps use more than plain sexps to represent their code: having different syntax for different types helps.
Re:Why I no longer have an old-school cert on my HTTPS site
by motorest on Saturday May 24, 2025 @01:41PM
(#44082613)
> Because canonical S-expressions don’t have numbers, just atoms (i.e., byte sequences) and lists.
If types other than string and a list bother you, why don't you stick with those types in JSON?