Live data from Hacker News

Show HN: Six Degrees of Wikipedia

sixdegreesofwikipedia.com

301–310 of 354 posts

Re: Show HN: Six Degrees of Wikipedia

#301
post #121

Earlier quoted context omitted.

Thanks! I'm glad you asked. I actually do what I call a bi-directional breadth first search[1]. The gist of it is that instead of just doing a BFS from the source node until I reach the target node, I do a reverse BFS from the target node as well and wait until the two searches overlap. That helps with the exploding path problem, although that still becomes an issue for longer paths (>= 5 degrees generally). I also p…

When I was first playing with this, I actually really expected you to be using an expensive performant solution like neo4j. When I read that you were using sqlite, I didn't believe it at first and thought it was a mistype from dev until I looked over the source. That's an impressive and well thought out performance enhancement, and that the app runs so blazingly fast on sqlite is very impressive.

Especially SQLite is often overlooked. A marvelous library that should be part of every personal toolkit.

Re: Show HN: Six Degrees of Wikipedia

#302

9 paths with 3 steps from Gluon to Lemur. No way this is going to be addictive. Disappears for days Edit: I finally got 4 steps! Clitoris->Dictation I am a child.

Best result: No path of Wikipedia links exists from Bertolt Brecht to 97. Found 87 paths with 5 degrees of separation from Asteroid family to SIX Found 460 paths with 4 degrees of separation from Imaginary unit to Borscht Found 460 paths with 4 degrees of separation from 433 Eros to Shooting of Oscar Grant

Found 3 paths with 6 degrees of separation from SIX to Separation

Found 571 paths with 6 degrees of separation from Sepulchre (comics) to Separation

Re: Show HN: Six Degrees of Wikipedia

#303
post #138

So by default I block all javascript and I got this message: "Sorry internet hipster, this little side project requires JavaScript." These kinds of condescending messages towards people concerned with privacy aren't going to win you any points here.

Yeah, I don't know why this would need javascript.

Re: Show HN: Six Degrees of Wikipedia

#305
post #13

Creator here. Six Degrees of Wikipedia is a side project I've been sporadically hacking on over the past few years. It was an interesting technical challenge and it's fun to play with the end result. Here's the tech stack: * Frontend: React (Create React App) * Backend: Python Flask * Database: SQLite * Web (frontend) hosting: Firebase Hosting * Server (backend) hosting: Google Compute Engine (it runs fine on a tiny…

Love the idea, and it’s brilliantly executed! Well done.

Perhaps I misinterpreted the concept of “degrees of separation”, but I was expecting the site to tell me how to start at page X and get to page Y with the min number of clicks. If you wanted to achieve this, it doesn’t strike me as appropriate to use Bidirectional BFS but IANAL.

I did notice that someone pointed out that they get different results by swapping the order of X and Y. This seems pretty surprising?

Well done again!

Re: Show HN: Six Degrees of Wikipedia

#306
post #305
post #13

Creator here. Six Degrees of Wikipedia is a side project I've been sporadically hacking on over the past few years. It was an interesting technical challenge and it's fun to play with the end result. Here's the tech stack: * Frontend: React (Create React App) * Backend: Python Flask * Database: SQLite * Web (frontend) hosting: Firebase Hosting * Server (backend) hosting: Google Compute Engine (it runs fine on a tiny…

Love the idea, and it’s brilliantly executed! Well done. Perhaps I misinterpreted the concept of “degrees of separation”, but I was expecting the site to tell me how to start at page X and get to page Y with the min number of clicks. If you wanted to achieve this, it doesn’t strike me as appropriate to use Bidirectional BFS but IANAL. I did notice that someone pointed out that they get different results by swapping t…

Thanks, glad you enjoyed it!

> I was expecting the site to tell me how to start at page X and get to page Y with the min number of clicks.

Yup, this is exactly what the site does, and a bi-directional BFS is an efficient way to do it. The special thing about my bi-directional BFS is that I follow outgoing links when searching from the source page while following incoming links when searching from the target page[1].

> I did notice that someone pointed out that they get different results by swapping the order of X and Y. This seems pretty surprising?

This is expected, because it is a directed graph, with the links on Wikipedia being in one direction. Just because page A links to page B doesn't mean page B links to page A.

[1] https://github.com/jwngr/sdow/blob/master/sdow/breadth_first...

Re: Show HN: Six Degrees of Wikipedia

#307
post #13

Creator here. Six Degrees of Wikipedia is a side project I've been sporadically hacking on over the past few years. It was an interesting technical challenge and it's fun to play with the end result. Here's the tech stack: * Frontend: React (Create React App) * Backend: Python Flask * Database: SQLite * Web (frontend) hosting: Firebase Hosting * Server (backend) hosting: Google Compute Engine (it runs fine on a tiny…

Hey man, just a nitpick. The input fields fudge up when using dark GTK themes, as in text isn't legible unless I select it. Might wanna look into it.

Re: Show HN: Six Degrees of Wikipedia

#308

In case you receive the following message "Sorry internet hipster, this little side project requires JavaScript." here is a quick example of how to get the pages the "traditional way"[FN1]: #/bin/sh test $# -eq 2||exec echo usage: $0 source target; exec curl -H"Content-type: application/json" \ -d '{"source":"'$1'","target":"'$2'"}' \ https://api.sixdegreesofwikipedia.com/paths \ |exec sed ' s/\",/\"\ /g;s/,\"/\ \"/g…

Now it makes more sense.

I'd prefer to have a brief technical explanation why Javascript is needed instead of this condescending labeling.

Edit: NoScript is not a luxury for technically minded geeks anymore, it's a necessary protection against tracking, CPU-consuming advertisement and attacks like Spectre/Meltdown and who knows what else Intel has for us.

Re: Show HN: Six Degrees of Wikipedia

#309
post #306
post #305

Earlier quoted context omitted.

Love the idea, and it’s brilliantly executed! Well done. Perhaps I misinterpreted the concept of “degrees of separation”, but I was expecting the site to tell me how to start at page X and get to page Y with the min number of clicks. If you wanted to achieve this, it doesn’t strike me as appropriate to use Bidirectional BFS but IANAL. I did notice that someone pointed out that they get different results by swapping t…

Thanks, glad you enjoyed it! > I was expecting the site to tell me how to start at page X and get to page Y with the min number of clicks. Yup, this is exactly what the site does, and a bi-directional BFS is an efficient way to do it. The special thing about my bi-directional BFS is that I follow outgoing links when searching from the source page while following incoming links when searching from the target page[1].…

I just realized what my confusion was over!

https://www.sixdegreesofwikipedia.com/?source=Carnegie%20Mel...

I was looking at the results of going from CMU to my little secondary school in Dublin, Ireland. I saw the results and saw that the last page before my Irish school was "College" and assumed it must be wrong, because how could my tiny secondary school be on the Wikipedia page for "College"? But alas, I was wrong!! I just checked and turns out it IS on the college wiki page!

I also assumed you were looking at outgoing links for both X and Y - that explains a lot.

I am super interested in this, but I have never done any graph theory or searching/planning (I'm EE) - how did you build up all of the incoming links for each wiki page? Are you storing all of this? How much data is that? Thanks for the reply!

Re: Show HN: Six Degrees of Wikipedia

#310
post #38

Earlier quoted context omitted.

Your notification for having JS disabled made me chuckle. One suggestion I have is that the graph view seems to clutter up pretty fast. Maybe have a slider that increases the length of the lines between the vertices. Also, a SVG export would be cool for visualizing related concepts.

Glad you found one of the Easter eggs :D The graph visualization / performance is definitely not ideal. I spent a ton of time trying to make d3 more performant and layout the graph more nicely, but ultimately I just had to cut my losses and go with what I had. I do think there is room for improvement and I'll look into your suggestion, which is something I didn't consider. SVG export is also a great idea!

Interesting you used d3. I used sigma.js on a very similar project in the past and only had performance issues with giant graphs. http://sigmajs.org/
Post reply on HN