Live data from Hacker News

What's up with all those equals signs anyway?

lars.ingebrigtsen.no

181–190 of 200 posts

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

#181

I wrote my own email archiving software. The hardest part was dealing with all the weird edge cases in my 20+ year collection of .eml files. For being so simple conceptually, email is surprisingly complicated.

Email is one of those cursed standards where the committee wasn't building a protocol from scratch, but rather trying to build a universal standard by gluing together all of the independently developed existing systems in some way that might allow them to interoperate. Verifying that a string a user has typed is a valid email address is close to impossible short of just throwing up your hands and allowing anything wi…

Email is one of the very few success cases of the xkcd Standards meme: https://xkcd.com/927/ - and it's due to practicality and ingenuity on the part of people who made very creative parsers and placed real-world understanding behind every word of the early RFCs.

Without a unified email standard, the world would look incredibly different today, especially as it bootstrapped open communication between different countries and institutions in developing every protocol since.

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

#182

I wrote my own email archiving software. The hardest part was dealing with all the weird edge cases in my 20+ year collection of .eml files. For being so simple conceptually, email is surprisingly complicated.

Email is one of those cursed standards where the committee wasn't building a protocol from scratch, but rather trying to build a universal standard by gluing together all of the independently developed existing systems in some way that might allow them to interoperate. Verifying that a string a user has typed is a valid email address is close to impossible short of just throwing up your hands and allowing anything wi…

RFC 2822, for the curious :)

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

#183

Earlier quoted context omitted.

Hey, POP3 still makes sense. Having a local copy of your emails is useful.

If you want it to be the only copy and not sync with anything POP3 is line–based too, anyway. Maybe you can rsync your maildir?

Any decade now and we'll be ready for JMAP.

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

#184
post #142

Earlier quoted context omitted.

Hey, POP3 still makes sense. Having a local copy of your emails is useful.

Isn’t the only difference between pop and imap that pop removes the mail from the server? I only use imap, and all my email is available offline.

Not at all. IMAP can do a lot of complex operations on the email while leaving it on the server, for example you can have the server search the email, flag it (mark it important, or read, or unread).

POP can download the email, and that's about it.

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

#185

> 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?

SMTP is a line–based protocol, including the part that transfers the message body The server needs to parse the message headers, so it can't be an opaque blob. If the client uses IMAP, the server needs to fully parse the message. The only alternative is POP3, where the client downloads all messages as blobs and you can only read your email from one location, which made sense in the year 2000 but not now when everyone…

But everything after headers can (almost) be a blob. Just copy buffers while taking care to track CRLF and look if what follows is a space. In fact, you have to do it anyhow, because line-folding is allowed in headers as well! And this "chunking long lines" technique has been around since the 70s, when people started writing parsers on top of hand-crafted buffered I/O.

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

#186

Earlier quoted context omitted.

HTML comments do not nest. The obvious tokenizer you can create with regular expressions is the correct one.

If you're talking about tokenizers, then you're no longer parsing HTML with a regex. You're tokenizing it with a regex and processing it with an actual parser.

If you are talking about detecting tags, you (and the person asking that SO question) is talking about tokenization, and everybody (like the one making that famous answer) bringing parsing into the discussion is just being an asshole.

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

#187

Earlier quoted context omitted.

I don't think kids today realize how little memory we had when SMTP was designed. For example, the PDP-11 (early 1970s), which was shared among dozens of concurrent users, had 512 kilobytes of RAM. The VAX-11 (late 1970s) might have as much as 2 megabytes . Programmers were literally counting bytes to write programs.

I assure you we were not, at least it wasn’t really necessary. Virtual Memory is a powerful drug.

My point is that bytes mattered. If you could put a year in 2 bytes instead of 4, you did. If you could shrink the TCP header by packing fields, you did. And if you could limit SMTP memory use by specifying a 1000-byte limit, then that's what you did.

Every programmer I know from that era knew how big things were in bytes, because it mattered.

Also, not all PDP-11 systems had VM. And the designers of SMTP certainly did not expect that it would only run on systems with VM.

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

#188
post #53

Earlier quoted context omitted.

Presumably the Epstein files, but I'm not on twitter so not sure

you presume cor=rect https://www.jmail.world/thread/EFTA02512824?view=person

Yet somehow there is always a version of the same thread that's not mangled https://www.jmail.world/thread/EFTA02512795?view=inbox

Can only assume DOJ overpaid the law firms like 5x by not specifying deliveries need to be deduplicated first.

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

#189

For context, this is the Lars Ingebrigtsen who wrote the manual for Gnus[0], a common Emacs package for reading email and Usenet. It’s clever, funny, and wildly informative. Lars has probably forgotten more about email parsing than 99% of us here will ever have learned. The manual itself says[1]: > Often when I read the manual, I think that we should take a collection up to have Lars psycho-analysed. 0: https://www.g…

Ah, Lars. I used his software when it was still "ding" and remember sharing the documentation with anyone in my team that would read it. Great stuff.

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

#190

I wrote my own email archiving software. The hardest part was dealing with all the weird edge cases in my 20+ year collection of .eml files. For being so simple conceptually, email is surprisingly complicated.

Email is one of those cursed standards where the committee wasn't building a protocol from scratch, but rather trying to build a universal standard by gluing together all of the independently developed existing systems in some way that might allow them to interoperate. Verifying that a string a user has typed is a valid email address is close to impossible short of just throwing up your hands and allowing anything wi…

Unless you're also allowing local mails to be sent to other user accounts without leaving the system, in which case the @ is unnecessary, iirc
Post reply on HN