Looks good. Except when you type a single space character the app enters into an infinite loop making it very difficult to do anything else in the browser (Chrome). Even navigating the window to a different page is impossible.<p>[Edit] Scratch that. Typing anything followed by a space character tends to make things crash. Why would this happen? I find this bug interesting. Let me know what the problem was when you fix it.<p>[Edit2] Okay looks like the problem may be with anything that needs to be url encoded.<p>[Edit3] I think the problem comes down to your call to encodeURIComponent in your search function and the behavior when the hash changes. Basically, we enter the search function when the hash changes. But then you call encodeURIComponent and assign the result to the hash. If the query contains characters that need to be escaped then the new value is different (meaning the hash changes), which means that your search function is going to get called ad infinitum.<p>In order to fix this I think you need to do two things. 1) Keep track of the in flight request unencoded and 2) if your search function is triggered by a hash change decode the query and compare it to your in flight request. If they are the same then you can bail out of the search function early. Otherwise you should cancel the in flight request and launch a new one.
Little known fact: SearchYC does instant search if you add &instant=true to the URL: <a href="http://searchyc.com/hacker+news?sort=by_date&instant=true" rel="nofollow">http://searchyc.com/hacker+news?sort=by_date&instant=tru...</a><p>It's not enabled by default because it's not as useful without autocomplete.
Using new HNsearch.com APIs, designed, developed, launched in 3 hours. More coming, this is about as MVP as it gets. Same ranking algorithm as used on HNSearch.com. BTW, hidden feature...you can double click words in search results to load a search for that term.
I built the same thing, was planning on finishing the app and buying the domain tomorrow.<p>Oh well, this is better than what I would have had anyway.<p><a href="http://nickcammarata.com/hninstant/" rel="nofollow">http://nickcammarata.com/hninstant/</a>
I found its messing with history incredibly annoying. Here's why...<p>Every single letter typed creates a new history item. It got to the point where so many history items were added that HN was pushed out of my history: I couldn't use "back" to get back to HN. I had to type in the URL to get to HN, then I had to find the comments page to get back here again to see the discussion.<p>I continued on looking at other HN stories. Once, I went back too far and landed on the HNI page again. I typed "L" as one does in Vimperator and Pentadactyl to go forward and get back to HN. The only problem was the text box stole my input, this resulted in a new query and a new history item, erasing, once again, HN's history item. I had to (again) type the URL to get here!
Interesting idea but on my first query, it locked up Chrome on me and went absolutely batsh1t crazy. Had to shut down Chrome and relaunch it.<p>Will wait for MVP2.0
"3 hour project" - I wonder what the author's intent is to point out that it took him 3 hours to implement? (I've equally been curious about the ones where people share their <i>weekend</i> projects and remark it explicitly)
you should cache local results, so as I type:<p><pre><code> drop > dropb > dropbo > dropbox
</code></pre>
I get no white screen in between, rather previous list filtered