Live data from Hacker News

Atom is better than RSS, in ways that matter

chrismorgan.info

71–80 of 111 posts

Re: Atom is better than RSS, in ways that matter

#71
post #38

Atom is correct to a degree that is annoying. It is XML, so not all HTML5 is allowed. You would have to convert your HTML5 to XHTML5. Possible but harder than string-concatenation. It requires full self links, so you must put your domain name in there as relative links would be an error. When using a static generator, why should I care where the files are published? My website has valid Atom feeds. Still, it's an ann…

And those three ways to encode a title. Do I really imagine that every parser is going to undo the double-encoding correctly? Or XHTML conversion if I use a namespace prefix?

Re: Atom is better than RSS, in ways that matter

#72

Earlier quoted context omitted.

Absolutely store the raw data. For the reasons you state. But also store derived data. Titles, authors, dates, article texts. You need those for whatever your application does. You don't want your application logic to be working with the raw text. > how will you handle updates to the feed? When polling, consider using HTTP HEAD to check for changes before GET. What you do when an article ID reappears with different c…

so how do you store raw xml data in postgres?

There is a datatype, if the XML is correct: https://www.postgresql.org/docs/current/datatype-xml.html

Re: Atom is better than RSS, in ways that matter

#73

Earlier quoted context omitted.

so how do you store raw xml data in postgres?

As text or XML column type. IME a document store or columnar backend is significantly cheaper if you're not querying it from SQL.

- there is definitely one dilemma here

- if you split the rss document into its "items" i am not sure if you can store each item separately inside postgres using that XML data type

- if you store the whole document, you end up with a problem when say the feed partially updates after a few minutes

- one suggestion i hear from r/PostgreSQL is that you store the XML blob somewhere else like hstore or something and somehow index it back to postgres. I wonder how that works conceptually / architecturally speaking

Re: Atom is better than RSS, in ways that matter

#74
post #14

Earlier quoted context omitted.

I use RSS multiple times daily.

And you're also on HN, you're not exactly the average human being. Do you use “RSS” as a protol specifically, or do you use “RSS” as in “any feed no matter the protocol”?

I was responding to the generic comment that:

> pretty much no-one uses either of them

Re: Atom is better than RSS, in ways that matter

#76

Earlier quoted context omitted.

As text or XML column type. IME a document store or columnar backend is significantly cheaper if you're not querying it from SQL.

- there is definitely one dilemma here - if you split the rss document into its "items" i am not sure if you can store each item separately inside postgres using that XML data type - if you store the whole document, you end up with a problem when say the feed partially updates after a few minutes - one suggestion i hear from r/PostgreSQL is that you store the XML blob somewhere else like hstore or something and someh…

Pg can do array columns, though I don't think it's a good fit for common use cases

Re: Atom is better than RSS, in ways that matter

#77
post #55

Earlier quoted context omitted.

Here’s an example of in titles being quite valuable: https://chrismorgan.info/blog/make-and-git-diff-test-harness... . Inferior plain text: Using make and git diff for a simple and powerful test harness Better plain text: Using `make` and `git diff` for a simple and powerful test harness Better HTML: Using make and git diff for a simple and powerful test harness I use the second for the and og:title on my site, and t…

I agree that it makes sense on that page. But only because the rendering of the page is completely under the control of the author, and the page shows only that one page. It's different if the text is rendered by an RSS reader in a different context. You don't know the font, color, or text weight it is rendered with in an RSS reader (which also depends on the context, like unread posts being bold). Imagine the same t…

> Imagine the same title in a list of post titles.

Sounds wonderful. I think you aren’t realising that it’s already easy to abuse this stuff, with uppercase and exotic Unicode letters https://yaytext.com/> and such. But people don’t abuse it in feeds.

I’m not talking about allowing , just some relevant semantic HTML elements like , and , which are pretty harmless to add, and useful.

Perhaps I should have gone with the MATHEMATICAL MONOSPACE characters for my plain text title. Alas, HN strips them. Demo in https://temp.chrismorgan.info/2026-08-02-titles.html. Doesn’t look any good for me with my specific fonts, would look better for some people.

Re: Atom is better than RSS, in ways that matter

#78
post #14

Earlier quoted context omitted.

And you're also on HN, you're not exactly the average human being. Do you use “RSS” as a protol specifically, or do you use “RSS” as in “any feed no matter the protocol”?

I was responding to the generic comment that: > pretty much no-one uses either of them

And I stand with that phrase. I'm pretty sure that are more VHS users than RSS these days. It's not strictly zero, but it's a negligible fraction of internet users.

Re: Atom is better than RSS, in ways that matter

#80
post #38

Atom is correct to a degree that is annoying. It is XML, so not all HTML5 is allowed. You would have to convert your HTML5 to XHTML5. Possible but harder than string-concatenation. It requires full self links, so you must put your domain name in there as relative links would be an error. When using a static generator, why should I care where the files are published? My website has valid Atom feeds. Still, it's an ann…

You don't have to convert anything to XHTML5. You only need to do that if you specify type="xhtml" on an element, but you can use="html" and escape the markup. RSS has this behaviour too, but it's spelled out better in Atom.

I suspect you've been making your lifeIfe difficult for no good reason.

> why should I care where the files are published?

You don't, but those consuming your feed do. You do it for their benefit.

Post reply on HN