Ask HN: Is the Hacker News source code public?
Is the Hacker News source code and infrastructure public? I'm interested in web application security and performance and was hoping I could learn more about HN's source code and infrastructure.
62 comments
An old version is available here: http://arclanguage.org/install
I assume the current version is still written in Arc (Paul Graham created the language) but differs from that version.
I assume the current version is still written in Arc (Paul Graham created the language) but differs from that version.
There is also anarki, the experimental public fork[0] of Arc and the forum. Like everything else, it differs from HN.
[0]https://github.com/arclanguage/anarki
[0]https://github.com/arclanguage/anarki
Hacker news was originally written by Paul Graham in Arc. Arc is a Lisp-inspired programming language also written/invented by PG at the same time and Hacker News programmed in it to (also) prove it works. Arc did not catch on outside of Hacker News. Arc is free and open source. Regarding Hacker News, itself: "Ask PG: Why don’t you open source HN? (2013): https://news.ycombinator.com/item?id=5006037
PG's response is:
I don't have time to manage such a project. I don't think it's necessary anyway. The reason HN lacks x cool feature is not that I expend no energy on the site, but that I expend all my energy on what users actually care about, which is not features but the content.
PG's response is:
I don't have time to manage such a project. I don't think it's necessary anyway. The reason HN lacks x cool feature is not that I expend no energy on the site, but that I expend all my energy on what users actually care about, which is not features but the content.
krapp(4)
It's still missing modern privacy features, such as the "right to be forgotten".
If you email HN mods they are fairly reasonable is what I've heard.
The mods are awesome on here in general compared to many comparably sized communities.
Dang deserves a lot of praise. Thank you Dang.
Dang deserves a lot of praise. Thank you Dang.
Strongly agree! A big shoutout to Scott also!
Right to be forgotten is an old EU law, the new GDPR law is 'right to erasure'
In the event you don't feel like deleting your own comments the mods will likely help you.
A general best practice is to avoid posting personally identifiable information.
In the event you don't feel like deleting your own comments the mods will likely help you.
A general best practice is to avoid posting personally identifiable information.
You can’t delete your comments after 2 hours.
You can have any problematic comments anonymised or removed by emailing the hn@yc address.
By default, it's an important part of HN that comments stay up, unless they will cause problems for the poster. PG explained why, many years ago:
https://news.ycombinator.com/item?id=6813226
By default, it's an important part of HN that comments stay up, unless they will cause problems for the poster. PG explained why, many years ago:
https://news.ycombinator.com/item?id=6813226
I think it's pretty good. I only need one feature that is a piece of message that shows me which one of my comments has been replied when it happens. But then again I'm fine without it so I guess it's not necessary.
I always assumed that someone had lost the source for the iOS app and that’s why we’re stuck with the broken thing.
There is no official HN app, for any OS. People have made multiple unofficial ones, using the API, though.
And many kinda work but are no longer mantained.
Such is the fate of the iOS app previously mentioned and of Materialistic (Android)
I use Materialistic. Is there a better one?
I'm currently using Harmonic for Android after Materialistic irritated me too many times and while it's definitely got some issues, it works well enough for casual use
I would be completely happy with Harmonic except for 3 issues and I'm not sure if the one can be resolved because every Android HN API using app I have tried has the same issue.
The first issue is that long comments are difficult to type because the text box doesn't scroll the content. You end up typing blind. I'm already doing so now.
The 2nd is that you can you can copy part of a comment.
The 3rd and the one that I've experienced across clients is that dead comments are displayed. I would like to not see dead comments.akimg this a setting would be fine.
The first issue is that long comments are difficult to type because the text box doesn't scroll the content. You end up typing blind. I'm already doing so now.
The 2nd is that you can you can copy part of a comment.
The 3rd and the one that I've experienced across clients is that dead comments are displayed. I would like to not see dead comments.akimg this a setting would be fine.
Yeah I've faced both of the first 2 issues. I'd also like to add that it has no options for searching which makes it useless since I want recent results, not something years ago
I read it on my iphone in the browser, and it is fine. It never even occurred to me that it would need an app. One of the best features of the site is that it does not need an app, and one can browse it while seated in the little room.
There's an app? Why??
It's the plainest of websites. I've been using it on android and iPhone for years without ever thinking "oh boy this would be better with an installable update able app asking me permissions and doing who knows what on my device". I assume any apps out there would be 3rd party scrapers...
It's the plainest of websites. I've been using it on android and iPhone for years without ever thinking "oh boy this would be better with an installable update able app asking me permissions and doing who knows what on my device". I assume any apps out there would be 3rd party scrapers...
I use materialistic on the phone. Design is nicer for mobile, plus I'm addicted to dark mode.
I use Hermit to appify often accessed pages, you get a Hackernews icon on your Android desktop that behaves exactly like an app, has its own cookie jar that does not leak browsing information etc.
The interface paradigm of mobile devices is built around apps, mobile browsers are a pain in the butt - deliberately, most likely.
The interface paradigm of mobile devices is built around apps, mobile browsers are a pain in the butt - deliberately, most likely.
I use https://github.com/weiran/Hackers because it’s nice to read on, but then to comment I have to use the site, so yea lol
If there was a dark mode on the site I’d just use that
If there was a dark mode on the site I’d just use that
Octal lets you comment from the app, if that’s something you are missing.
Oh cool, thanks I’ll take a look
Most 3rd apps use the Hackernews API https://github.com/cheeaun/awesome-hacker-news https://github.com/HackerNews/API
Having tried to write an HN client myself, I can assure you most of them scrape instead of using the API. The API is basically read only, is impractical for things like loading a full tree of comments (get ready to make an API call for every comment) and you need to scrape if you want things like “what auth hash do I need in order to upvote this particular comment via POST”.
> that’s why we’re stuck with the broken thing
I've been using HN for 10+ years but I don't think I've ever found anything that was broken. What are you referring to exactly?
I've been using HN for 10+ years but I don't think I've ever found anything that was broken. What are you referring to exactly?
> for the iOS app
HN doesn't have any iOS app nor any other app for that matter. So I'm guessing the author must confuse HN with something else.
Thanks for the comments. I'm also interested in the infrastructure. Does HN run on dedicated hardware, shared VPS, AWS, Azure, etc.
It's running on a Lisp Machine under (next to?) dang's desk. It used to be under pg's desk.
:-p
:-p
Some information in this thread: https://news.ycombinator.com/item?id=26469566
Yes, it is kind of public, at least one version of it. You can find it here as it's bundled with Arc, the language HN is coded in: http://arclanguage.org/install
I don't see it mentioned in another comment, so I'll add that part of why it's not public is probably to hide how exactly some things like "shadow banning" work, or the exact secret sauce to make the front page, etc.
I recall they pushed updates a month or so back. Forget why I know this; vaguely recall some hiccups being mentioned. So they seem to update it on the regular, maybe on a pro re nata basis.
how did they make it so fast? I'm always surprised by its loading speed
Perhaps an equally (more?) relevant question is "why are other sites so slow?"
Simplicity. Clean HTML ("rendered" server side), straight forward CSS and little JavaScript.
I remember reading a couple years ago, that there's no database. It just reads stuff off disk, and then caches it in memory.
It probably also helps that the html/css/js is minimal
It probably also helps that the html/css/js is minimal
By not having any features