Indeed. This is precisely what we did for the HN Personal Websites Directory at <https://hnpwd.github.io/>. The website info cards are shown in random order, with the ordering reshuffled every hour.
I am not a professional web developer but I have been using JavaScript since 2001 or so. It is only this month that I realised JavaScript does not have a way to seed the pseudorandom number generator (PRNG). So there was no way to do something like:
srand(Math.floor(Date.now() / 1000 / 3600))
As a result, I had to implement a linear congruential generator (LCG) based on the Knuth parameters: <https://github.com/hnpwd/hnpwd/blob/1e513b1/web/script.js>. When I first came across the LCG algorithm (in K&R with different parameters) in the early 2000s, I felt it was neat but assumed I would never need it, since almost every mainstream language comes with a reasonable PRNG. Little did I know back then that the most ubiquitous language on the web would make that old knowledge useful again, some 25 years later.
Both were pretty well received here on HN. The second one is more popular one among the two with about 90 unique visitors per day on an average, as far as I can tell from the access logs after filtering out bots and scrapers. The first one has about 10 unique visitors per day. Really tiny numbers, but it's a delight that some people out there return to this game regularly. Thank you, whoever you are.
Playing computer games is how I was introduced to computers. I too wanted to develop my own invaders-like game when I was about 8 years old. Unfortunately, I neither had enough access to computers nor sufficient programming skills at the time. The first link (invaders.html) is the result of fulfilling that childhood dream 30 years later.
Inspired by a few computer games from the early 1980s, the first game also includes an autoplay algorithm. If you leave the game idle for 5 seconds after loading, the autoplayer kicks in and starts playing the game automatically.
Each game is implemented in plain HTML and JavaScript as a single, unminified, easily readable HTML page. Anyone can download the page, save it locally, play it offline as well as inspect or tweak the source code.
This is great. Thank you for building and sharing it.
May I request you to consider moving this project to a community organisation like https://github.com/<your-new-org> so that we, the HN folks, can maintain it as a community? Curated list projects often start with a lot of enthusiasm and I follow several similar ones focused on personal websites and blogs. While some of the curators remain active and maintain their project even years later, some do not. This isn't a complaint. I know life happens and circumstances change. So it is understandable that some of these projects become inactive later.
But it becomes a little problematic when someone wants to have their creation added to the curated list but cannot do so because the maintainer is no longer active. Of course, volunteers can fork the project and maintain it as a community but this is easier said than done. Once a 'Show HN' thread like this becomes successful, future visitors are more likely to end up on the original but no-longer-maintained curated list than the newer community maintained fork. For that reason, when I created my list of curated personal websites, I did so under the organisation <https://github.com/hnpwd> from the very start, and now we have multiple maintainers and contributors helping out with the curation.
Hosting the project under a community org with multiple maintainers could give it a better chance of staying active in the long term. This is only a request. I do not mean to impose or pressure you in any way. Please feel free to ignore the suggestion and thank you again for the work regardless.
Most of the "Awesome XXX" lists are designed solely to promote their creators pet project.
You can see the gaming happen early on in many of these lists, where commercial things start appearing quite highly, or weirdly the project get sponsored.
Once they get popular the creators abandon them and start ignoring the updates/PRs because their task of feeding traffic to their personal projects has been accomplished.
The org should also curate selections. Particularly only games that have been well received in past HN discussions, and if they have, the org might add them to the directory.
[EDIT: This was meant to be a reply to another comment in this thread but I posted it under the top-level comment by mistake. I am leaving this comment intact anyway, in case someone finds it useful.]
The web browsers don't highlight the feed URL information embedded in the HTML anymore, quite unfortunately. But if you go to a YouTube video, say, <https://www.youtube.com/watch?v=9kaIXkImCAM> and then view or inspect the HTML source, you can find the LINK tag for the feed:
If you are rendering your blog or website with a static site generator, you could also consider importing comments as content files into your website source and then rendering them as part of the build. The full workflow would look like this:
1. Accept comments via email, CGI scripts, server-side program or by any other means that suits you. A simple hack that requires no server-side scripting: if you run your own web server, you can submit comments as GET query parameters logged in access.log, then extract them using grep, sed, etc. Personally, I use a server-side program to accept POST requests and write comments to a text file on the web server.
2. Review submitted comments. Delete spam.
3. Add comments to your website source repository as .md, .html or whatever format you use, similar to how you add blog posts as content files to your source.
4. Render comments alongside the rest of your site using your static site generator. Depending on the nature of your static site generator, this may require using or creating a template or layout that iterates over the comments and renders them.
It is a fairly hands-on workflow, so it may not suit everybody, but this is how I do it for my personal website. I see two main benefits of this approach. Since the review is manual in step 2, no spam can ever make it to my website. Step 3 ensures comments live entirely under my control, so I never need to worry about migrating them between platforms in the future.
I can see how that would work. For a small website, you're probably only looking at a few comments per day at absolute most, and you'll be reviewing them anyway to filter/approve them. (And the implementation lends to easy automation, since you just need to programatically update the Markdown file instead.)
I have a vague recollection that 4chan basically works like this. They just generate static pages on every comment because that's more efficient than trying to have a fancy database.
The last link shows the consolidated comments page that lists all approved comments posted across my entire personal website. The 'View original comment' link under each comment points to the individual comment page for each post.
2. This is not exactly a language feature but more of an attribute of the ecosystems, but I wish Common Lisp had a more comprehensive 'batteries included' standard library. It does have a pretty good standard library [1] for its time, but in the modern day, it fades in comparison to that of mainstream languages like Python or Go. Yes, the availability of Quicklisp compensates for the relatively smaller standard library, but it does not fully replace the value of having a large and cohesive standard library.
For Python, I wish (and this might be controversial) that it used s-expressions instead of whitespace-based delimiter for blocks. I find cutting, pasting, moving around, and in general, manipulating whole s-expressions as individual units very convenient with appropriate editor support (e.g. Paredit). I know there are languages like Racket, Clojure, etc. which fulfil the requirement of extensive batteries included library + s-expressions, but they are much less popular than Python. In my ideal world, one of the top three popular languages would be a Lisp or Lisp-like language with an extensive standard library comparable to Python's.
3. Common Lisp for personal projects. Python for collaborative projects.
hello world
4ef69019c65909ffbb470597e3c5afe05ea8a866a0d3b9f950f0bcf057924b52
hello
4358f43b660389eecd435dc2a5f5cee29786245cd2cff27bd4de0b3e8fd53b79
4ef69019c65909ffbb470597e3c5afe05ea8a866a0d3b9f950f0bcf057924b52
406cc6dbc566bf6c672a2167868341e9853f7fbbd2a21eb1caa4d08006abae41
hi
661ce2e5ed28422eb8b51ec2a217c976e05e37713246166e8fcbf67be4824380
test
83d34c0abee918ed3edf585b6cb8ce97fe8286027b012bacdfa71b967924f9b2
a
beef7c4d3141c30ab4f6ebf1f724936c50f609ee1915951d802046ba1d9fa23d
subth.ink
3f3b05abaec959c9950d5a93a64525971c7d9fcabf6436d653edba62f29d5bea
lol
39567a3cc35a4c68d72d01beac88414d0ced5c20b437ff9bc6e2cb20615a47b7
Thanks to Y@Y for 4ef69019c65909ffbb470597e3c5afe05ea8a866a0d3b9f950f0bcf057924b52.
reply