Live data from Hacker News

What's up with all those equals signs anyway?

lars.ingebrigtsen.no

61–70 of 200 posts

Re: What's up with all those equals signs anyway?

#61
post #38

[dead]

> It's the same class of bug as manually parsing HTML with regex, it works right up until it doesn't I'm sure you already know this one, but for anyone else reading this I can share my favourite StackOverflow answer of all time: https://stackoverflow.com/a/1732454

I prefer the question about CPU pipelines that gets explained using a railroad switch as example. That one does a decent job of answering the question instead of going of on a, how to best put it, mentally deranged one page rant about regexes with the lazy throw away line at the end being the only thing that makes it qualify as an answer at all.

Re: What's up with all those equals signs anyway?

#62
post #35

> We see that that’s a quite a long line. Mail servers don’t like that Why do mail server care about how long a line is? Why don't they just let the client reading the mail worry about wrapping the lines?

RFC822 explicitly says it is for readability on systems with simple display software. Given that the protocol is from 1982 and systems back then had between 4 and 16kb RAM in total it might have made sense to give the lower end thin client systems of the day something preprocessed.

Also it is an easy way to stop a denial of service attack. If you let an infinite amount in that field. I can remotely overflow your system memory. The mail system can just error out and hang up on the person trying the attack instead of crashing out.

Re: What's up with all those equals signs anyway?

#63
post #17

Earlier quoted context omitted.

“Insert characters”? Consider converting the original text (maintaining the author’s original line wrapping and indentation) to base64. Has anything been “inserted” into the text? I would suggest not. It has been encoded. Now consider an encoding that leaves most of the text readable, translates some things based on a line length limit, and some other things based on transport limitations (e.g. passing through 7-bit…

Okey it does sound better from this POV. Still wierd as its a Client/UI concern, not something a server is supposed to do; whats next,adding "bold" tags on the title? Lol

SMTP is a line-oriented protocol. The server processes one line at a time, and needs to understand headers.

Infinite line length = infinite buffer. Even worse, QP is 7-bit (because SMTP started out ASCII only), so characters >127 get encoded as three bytes (equal, then two hex digits), so a 500-character non-ASCII UTF8 line is 1500 bytes.

It all made sense at the time. Not so much these days when 7-bit pipes only exist because they always have.

Re: What's up with all those equals signs anyway?

#64

> We see that that’s a quite a long line. Mail servers don’t like that Why do mail server care about how long a line is? Why don't they just let the client reading the mail worry about wrapping the lines?

This is how email work(ed) over smtp. When each command was sent it would get a '200'-class message (success) or 400/500-class message (failure). Sound familiar? telnet smtp.mailserver.com 25 HELO MAIL FROM: me@foo.com RCPT TO: you@bar.com DATA blah blah blah how's it going? talk to you later! . QUIT

This brings back some fun memories from the 1990s when this was exactly how we would send prank emails.

Re: What's up with all those equals signs anyway?

#66
post #6

CLRF vs LF strikes again. Partly at least. I wonder why even have a max line length limit in the first place? I.e. is this for a technical reason or just display related?

Wait, now we have to deal with Carriage Line Return Feeds too?

I wonder if the person who had the idea of virtualizing the typewriter carriage knew how much trouble they would cause over time.

Re: What's up with all those equals signs anyway?

#67
post #7

Earlier quoted context omitted.

Author seems to think Unix uses a character called "NL" instead of "LF"...

I am more surprised by the description of “rock döts”. A Norwegian certainly knows that ASCII is not enough for all our alphabetical needs.

https://en.wikipedia.org/wiki/Metal_umlaut

The writer presumably knows that umlauts and other non-ascii characters are functional in many languages. "rock döts" is poking fun at the trend in a certain tranche of anglophone rock/metal to use them in a purely aesthetic way in band names etc.

Re: What's up with all those equals signs anyway?

#70
post #38

[dead]

> It's the same class of bug as manually parsing HTML with regex, it works right up until it doesn't I'm sure you already know this one, but for anyone else reading this I can share my favourite StackOverflow answer of all time: https://stackoverflow.com/a/1732454

HE COMES
Post reply on HN