My comment section is static HTML
12 points by jvalol
12 points by jvalol
The comment section under the post (not the lobste.rs one) is the mechanism the post describes, so view source shows the end result. If someone comments while you're reading, the page rebuilds and the comment is baked in about a minute later. Happy to answer questions about the server side.
Feels a bit recursive, now I think about it. Commenting about a novel commenting mechanism. Heh.
"novel"? This sounds like the standard way it was done by everyone before the whole web dev world lost their minds and forgot how to use html.
Can you give me any example of that? All of the comments sections before the Disqus days I remember were simple, but no way it was served directly without php rendering the page
I'd like to understand the decision to reach for solutions like Phoenix/Cowboy to serve a website such as this, instead of say Apache/NGINX. When I think of the BEAM I think of the need for lots and lots of concurrent messages, usually for some ultra dynamic system. I don't know how to reconcile that with the author's emphasis on static and simple characteristics.
For what it's worth, I generate static HTML comments using PostgreSQL's NOTIFY and LISTEN :
The PostgreSQL function that receives the posted comment:
https://github.com/sivers/sivers/blob/master/me/comment_post.sql
Then then simple query to wrap comments in an ordered list:
https://github.com/sivers/sivers/blob/master/me/comments.sql
So are mine: ikiwiki’s comments plugin works this way. The advantage ikiwiki has here, I think, is it’s had an optional dynamic component from day 1. (One of the disadvantages these days is it’s a setuid C wrapper to run Perl as the user who owns the source files, which is a lot of stuff you don’t need in the container era). Oh, and incremental builds.