6 ms·
Show HN: HNLive – Hacker News in Real Time
- jMyles 11y agoWhat can you tell us about the stack powering this? It's gunicorn; I was hoping to see hendrix. :-) How are you doing the push?
- Zyst 11y agoIt seems to be a jQuery bit of code querying the api every 10 seconds. No push or anything of the sort, so that's a bit of a shame.
- tagawa 11y agoNice. This would be good as part of a dashboard on a second monitor. Request: I'd love to see domain names included. Submitter usernames would also be nice as long as it doesn't make it too cluttered. Edit: I'd really like to be able to click through to the comments page as well. Speaking of which, are you sure those comment figures are correct?
- heinrich5991 11y agoTypo: hacker hews (right in the subtitle)
- lambdacomplete 11y agoNot really "real time". See [2] (quoted below). `function update() { $("#live").load("/get_links/hot"); } setInterval(update, 10000);update();` Polling per se is ok but you should do it on the server and push to the client through web sockets or server-sent events [1]. Refs: [1] https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events https://developer.mozilla.org/en-US/docs/Web/API/Server-sent... [2] https://github.com/Max00355/HNLive/blob/master/templates/newest.html#L8 https://github.com/Max00355/HNLive/blob/master/templates/new...
- andrewstuart2 11y agoEspecially when there's a fancy fully-real-time API provided for free by firebase. Not that it's the most efficient way to query all the top stories, but there's plenty that can be done with it. https://hacker-news.firebaseio.com/v0/topstories https://hacker-news.firebaseio.com/v0/topstories
- 2ton_jeff 11y agowhen I wrote hnwatch last year, there were some "issues" with the firebase feed, but for the most part the firebaseio goods are in fact realtime.
- insin 11y agoIt works pretty well, but there are still some "issues" you need to deal with: - Items for users with a delay configured get posted to the API before their content is made available (if you go to the story id on HN proper, there's a * placeholder) - The odd item will come back as `null` from the API for a while As long as you deal going from not having content for an item to having content in an update, the API usually corrects itself eventually. Here are live feeds of new stories and comments from the Firebase API in the client I wrote when it was announced: http://insin.github.io/react-hn/#/newest http://insin.github.io/react-hn/#/newest http://insin.github.io/react-hn/#/newcomments http://insin.github.io/react-hn/#/newcomments
- vanous 11y agoThanks for the links. Any experiences with practical deployment, the compatibility chart [1] shows minimal support for mobile browsers and no support for IE? I have several command line tools that i expose via internal web pages and ended up also using setInterval based polling, rather then server pushed messaging. [1] https://developer.mozilla.org/en-US/docs/Web/API/EventSource#Browser_compatibility https://developer.mozilla.org/en-US/docs/Web/API/EventSource...
- dspillett 11y ago
- vaguilar 11y agoNeat. Another issue along with the others mentioned is something is probably wrong with the text encoding. Some punctuation is displayed incorrectly.
- chowes 11y agoWith HN data being provided by Firebase, why not leverage the realtime capabilities their service provides?
- japhyr 11y agoThis is great. When I go to the new page, one of the first things I look for is articles where a conversation is just starting. This makes it really easy to see which submissions are starting to get some attention.
- kentosi 11y agoHi there I found a character rendering issue. HN front page: "Why do people keep coming to this coupleâs home ..." HNLive front page: "Why do people keep coming to this couple’s home ..."
- minimaxir 11y agoIf anyone is curious, this is a UTF-8 encoding error as HN automatically coverts normal quotes to smart quotes. Makes things annoying when scraping.
- vinceyuan 11y agoSuggestion: add links of comments. Many people like reading comments at Hacker News. Users have to open the original HN home page to open comments. btw, I created another HN web client: Hacker News Room http://hackernewsroom.com http://hackernewsroom.com
- nine_k 11y agoLook at http://www.hckrnews.com/ http://www.hckrnews.com/ It does about the same thing. It is instructive to compare the two and understand one is more usable than the other.
- grouzen 11y agoI have the same in my FB being subscribed to their facebook page.
- joshmn 11y agoThis guys submission history is littered with this thing.
- ahmetlutfu 11y agoYou should use Golang instead of Python.
- dimfeld 11y agoSeems like the points and comments numbers are often inaccurate. Sometimes they're right but other times way off. Any idea what's happening there?
- valentinvieriu 11y agoI guess everybody has it's own clone. With Firebase opening up the dat, it's quite trivial to build your own Here is my version: https://hnews.xyz/#/ https://hnews.xyz/#/ It grabs the preview of the landing pages so you kind of know what you are getting into