5 ms·
Hacker News clone for CouchDB
- robwgibbons 14y agoThis is great. Except you forgot to return "Unknown or expired link." every other request
- Greg12x 14y agoWow! That's pretty cool.
- sktrdie 14y agoI wrote this because I thought it would be cool to let people host their own HN sites with very little overhead. CouchApps make it so easy to deploy your own site, simply push the code to a CouchDB. Also I learned quite a lot from building this. More info can be found here: https://github.com/lmatteis/hckr.it https://github.com/lmatteis/hckr.it There's still lots of work to be done, so don't hesitate to contribute :)
- rdtsc 14y agoWow that is neat. I saw you use couchapp, installed with npm. Have you tried kanso http://kan.so http://kan.so ? There is also erica, a similar couchapp deploying script written in Erlang. That one comes with an ACE on-line code editor (so you can edit your couchapp as it runs).
- cypherpunks01 14y agoAre stories on the frontpage ranked solely by points or do they fall off over time? I couldn't find any code like this. I was curious how you'd implement time-ranking using couchdb views, which can't emit different values as time goes on in a simple way.
- sktrdie 14y agoThey fall over time. The algorithm simply needs the date the item was created at and the amount of points. The difference is that instead of doing the calculation from the "time since submission" (which changes over time and, as you say, won't work with Couch's views which can't emit values as time goes on) it does the calculation using the "created_at" property. In essence the outcome is the same. Here's the algorithm I use which needs some better documentation :) https://github.com/lmatteis/hckr.it/blob/master/common/util.js#L2 https://github.com/lmatteis/hckr.it/blob/master/common/util....
- ecesena 14y agoIt's the reddit's algo, isn't it?
- jkap 14y agoI believe reddit's gives newer posts more points, rather than taking away points from older posts. I might be wrong, though. It's been a while since I've looked at that part of the code.
- ecesena 14y agoMmm... not so sure. One of the nice features of reddit's algo is that it doesn't require to evaluate the score based on the current time, as this one. http://amix.dk/blog/post/19588 http://amix.dk/blog/post/19588 There are also a few similarities like max(abs(points+1),1), log base 10...
- dmragone 14y agoThat's pretty much how it works (as explained by reddit co-founder Steve Huffman in Udacity 253 course - sorry I forget exactly which video he says it).
- Fizzadar 14y agoThe HN algorithm is outlined here: http://amix.dk/blog/post/19574 http://amix.dk/blog/post/19574
- danmaz74 14y agoWas this inspired by antirez's lamernews? http://lamernews.com/ http://lamernews.com/ It's funny to see two different HN clones, both of them coming from Italy :)
- sktrdie 14y agoI've actually never seen this. Looks very nice. The idea of mine was also to keep the same API (the HTML and the links schema) of HN, to enable re-use of already built crawlers and add-ons. Also, this seems to depend on Ruby other than Redis. Which means you probably need to buy a VPS or some cloud hosting and set it all up with Redis and Ruby and other stuff. Lots of overhead if you ask me. While with hckr.it, you simply push it to a Couch and you're done.
- danmaz74 14y agoI think that antirez just wanted to make a tech demo, yours is more production oriented ;) Buona fortuna!
- EzGraphs 14y agoVery cool - sounds like it is amazingly easy to deploy too. And inexpensive: http://www.iriscouch.com/ http://www.iriscouch.com/
- Spulk 14y agoDoes this have a way to counter spam votes posted from many different accounts?
- sktrdie 14y agoI guess I could keep track of the user's IP address? How does HN do this?