HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
antirez
lamernews
Ruby2011–2023
antirez / lamernews

lamernews

Lamer News -- an HN style social news site written in Ruby/Sinatra/Redis/JQuery

24Distinct people
24Mentions
0Explicit recommenders
1.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Lamer News -- an HN style social news site written in Ruby/Sinatra/Redis/JQuery

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year24 dated mentions

Observed mentions: 2011-10-20 20:04:43 UTC to 2023-04-24 20:15:13 UTC.

0369122011-01-01 00:00:00 UTC to 2012-01-01 00:00:00 UTC (exclusive): 11 mentions; 1 submissions, 10 comments20112012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20112011-01-01 00:00:00 UTC2012-01-01 00:00:00 UTC11110
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC505
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC404
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC110
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
About Lamer news is an implementation of a Reddit / Hacker News style news web site written using Ruby, Sinatra, Redis and jQuery. The goal is to have a system that is very simple to understand and modify and that is able to handle a very high load using a small virtual server, ensuring at the same time a very low latency user experience. This project was created in order to run http://lamernews.com but is free for everybody to use, fork, and have fun with. We believe it is also a good programming example for Redis as a sole DB of a nontrivial, real world, web application. Installation Lamer news is a Ruby/Sinatra/Redis/jQuery application. You need to install Redis and Ruby 1.9.2+ with the following gems: redis 3.0 or greater hiredis sinatra json ruby-hmac net/smtp openssl (not needed but will speedup the authentication if available). Please note that Redis uses port 6379 by default, so you should either change the port number in the configuration file (which is set to use port 10000), or configure Redis to use a matching port. How to contribute I plan to hack on Lamer News in my free time as it is interesting to have a non trivial open source example for Redis that is also an useful application. However contributions are welcomed. Just make sure to: Keep it simple. No complex code, no extreme ruby programming. Ideally non ruby people should understand the code without much efforts. Don't use templates, they suck. If your code slows down significantly the page generation time it will not get merged. Do everything you can to avoid depending on new ruby gems. Open an issue on github before firing your editor to see if there are good chances that your changes will be merged. If you don't want to follow all this rules, forking the code is encouraged! The license is two clause BSD, do with this code what you want. Run your site, turn it into a blog, hack it to the extreme consequences. Have fun :) Web sites using this code http://lamernews.com Programming News. http://hackingitalia.com Programming and Startup News (In Italian). http://www.echojs.com JavaScript News. Data Layout Users Every user is represented by the following fields: A Redis hash named user:<user id> with the following fields: id -> user ID username -> The username password -> Hashed password, PBKDF2(salt|password) note: | means concatenation ctime -> Registration time (unix time) karma -> User karma, earned visiting the site and posting good stuff about -> Some optional info about the user email -> Optional, used to show gravatars auth -> authentication token apisecret -> api POST requests secret code, to prevent CSRF attacks. flags -> user flags. "a" enables administrative privileges. karma_incr_time -> last time karma was incremented pwd_reset -> unix time of the last password reset requested. replies -> number of unread replies Additionally for every user there is the following key: `username.to.id:<lowercase_username>` -> User ID This is used to lookup users by name. Frequency of user posting is limited by a key named user:<user_id>:submitted_recently with TTL 15 minutes. If a user attempts to post before that key has expired an error message notifies the user of the amount of time until posting is permitted. Account creation is rate limited by IP address with a key named limit:create_user:<ip_address> with TTL 15 hours. Authentication Users receive an authentication token after a valid pair of username/password is received. This token is in the form of a SHA1-sized hex number. The representation is a simple Redis key in the form: `auth:<lowercase_token>` -> User ID News News are represented as an hash with key name news:<news id>. The hash has the following fields: id -> News id title -> News title url -> News url user_id => The User ID that posted the news ctime -> News creation time. Unix time. score -> News score. See source to check how this is computed. rank -> News score adjusted by age: RANK = SCORE / AGE^ALPHA up -> Counter with number of upvotes down -> Counter with number of downvotes comments -> number of comments Note: up, down, comments fields are also available in other ways but we denormalize for speed. Also recently posted urls have a key named url:<actual full url> with TTL 48 hours and set to the news ID of a recently posted news having this url. So if another user will try to post a given content again within 48 hours the system will simply redirect it to the previous news. News is never deleted, but just marked as deleted adding the "del" field with value 1 to the news object. However when the post is rendered into HTML, it is displayed as [deleted news] text. News votes Every news has a sorted set with user upvotes and downvotes. The keys are named respectively news.up:<news id> and news.down:<news id>. In the sorted sets the score is the unix time of the vote creation, the element is the user ID of the voting user. Posting a news will automatically register an up vote from the user posting the news. Saved news The system stores a list of upvoted news for every user using a sorted set named user.saved:<user id>, index by unix time. The value of the sorted set elements is the <news id>. Submitted news Like saved news every user has an associated sorted set with news he posted. The key is called user.posted:<user id>. Again the score is the unix time and the element is the news id. Top and Latest news news.cron is used to generate the "Latest News" page. It is a sorted set where the score is the Unix time the news was posted, and the value is the news ID. news.top is used to generate the "Top News" page. It is a sorted set where the score is the "RANK" of the news, and the value is the news ID. Comments Comments are represented using a very memory efficient pattern. The system is implemented in the comments.rb file. In short every thread (that is a collection of comments for a given news) is represented by an hash. Every hash entry represents a single comment: The hash field is the comment
Read the full README on GitHub

What Hacker News says

24 sources
FWIW some years ago Salvatore Sanfilippo (antirez) wrote Lamernews [0][1] with the goal to create such a clone. AFAIK Lamernews, as a site, is long gone, but the code -Ruby, Sinatra, Redis- is still there. There have also been some forks. EchoJS [2] made a few modifications through the years and is running still today. Mostly about moderation and some related tasks like blacklisting and others. Can't say much about pros/cons but at least it's still used and somewhat maintained. [0] https://news.ycombinator.com/item?id=3146051 [1] https://github.com/antirez/lamernews [2] https://github.com/echojs/echojs
In Ask HN: Is there an open-source HN forum clone?
Antirez tried, with lamernews: https://github.com/antirez/lamernews/blob/master/app.rb Diff that vs HN circa 2008: https://github.com/evanrmurphy/SweetScript/blob/master/arc3.... Lamernews seems like just another HN clone, but back when it was launched it was a serious attempt at being a competitor. They probably came closest to pulling away a significant chunk of HN. I started to use it. Then I ran into missing features. Little quality of life stuff. I forget what they were, but the whole site felt noticeably harder to use. So I stopped using it. It's so tempting to think "HN is so simple. Just throw Rails at the problem and you can wipe the floor with them." But Lamernews was 2,964 lines of Ruby, and only managed to contain about 60% of the features. news.arc is 2,616 lines. And I don't care what anybody says: if you sat down and forced
Read the rest
yourself to read that code for a week straight, you'd find it is actually quite readable. It's terse because it's for getting shit done.
In Analyzing HN moderation and censorship
You might try lamernews[1], created by Redis author antirez. > Lamer news is an implementation of a Reddit / Hacker News style news web site written using Ruby, Sinatra, Redis and jQuery. > The goal is to have a system that is very simple to understand and modify and that is able to handle a very high load using a small virtual server, ensuring at the same time a very low latency user experience. [1]http://lamernews.com/ and https://github.com/antirez/lamernews
In Ask HN: An open source implementation of Hacker News?
You are right, I don't mean "abstract HTML", I just mean to provide a way to generate it from code using the same syntax of your code. This is what I use: https://github.com/antirez/lamernews/blob/master/app.rb#L138... For instance to write <foo> <bar id="4">content</bar> </foo> You write: H.foo { H.bar(:id => 4) {"content} } So everything you can write in HTML you can write in this DSL, there is no real abstraction, but it is Ruby code like in all the rest of the application.
In Your templating engine sucks and everything you've ever written is spaghetti

Showing the 15 most recent of 24 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.