The comments sections of most online forums are about useless and I know that places like HN don't stay this way by accident.
1. https://chrome.google.com/webstore/detail/shut-up/oklfoejikk...
You should add a script that gives you a random highly-voted comment with positive language to your toolbox. In the interest of balance and sanity.
PS: Thank you for all you do for this community. You encourage our aspirations to be more civil humans.
Sometimes I'm more interested in the tech scene's opinion on an article than the actual article itself.
Other times, if an article is excessively long, or is a video, I look for someone that summarised the gist.
On that note - am I the only one who would prefer to read transcripts of videos than watch videos themselves? Specifically news sites that only have the video report and not any accompanying text.
It doesn't help that I'm basically in one ear and out the other with my auditory memory and almost photographic visually...
But these days there is a confluence of factors that have driven average web content quality through the floor. Whether it's the highly tuned click-bait industry, the easy accessibility of turnkey viral content platforms like Medium encouraging banal populist "think" pieces, or just the mainstreaming of tech startups as an average career path, whatever it is the average article I see these days is worth far less than the attention it expects.
I'm not sure whether HN comments are the best use of my time either, but middlebrow dismissals not withstanding, at least they aren't a race to the bottom.
Right now it's a Chrome extension, but I'd love to serve it as plain JS. Anybody know if you can give a web app privileges to open and close tabs without making it a browser extension?
(Don't worry, btw; if we ever publish this it will be entirely opt-in.)
Only thing is users must disable popup blocking for HN, in the unlikely case that you want to open more than 2 links at once, or open links when the user doesn't click something (like onload).
Forgive me for hijacking this thread into technical support territory, but I've found documentation on this stuff hard to come by.
You'd have to synchronize things yourself to prevent tripping over yourself. Ditto for firing off functions in response to events (i.e. Poll loop and fire handler).
Save objects to local storage:
localStorage.name = "dang";
alert(localStorage.name);
You save stuff to localstorage in one tab, and in other tab you listen to "storage" event:
window.addEventListener('storage', function() {..})
[0] https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage...[1] https://developer.mozilla.org/en-US/docs/Web/Events/storage
Another option is shared web workers, though I never used it.
[2] http://stackoverflow.com/questions/12107424/communication-be...
[3] https://developer.mozilla.org/en-US/docs/Web/API/SharedWorke...
I confused things in my other comment (I deleted it)
Edit:
Yep
w2 = window.open('/');
w2.document.click()
Is fine if complying with the sameOrigin policyhttps://developer.mozilla.org/en-US/docs/Web/API/Window/open
It's OK, I'm sure the mods will take care of it.
EDIT: I know this isn't reddit but I couldn't resist. Dan it's admirable how nice and down-to-earth you are in spite of all the stuff you see here everyday...huge thanks for all your work in making HN what it is.
It's all done by keyboard shortcuts, which means the mapping to keys is pretty complicated and not as consistent as I'd like.
Edit: It's also written in a Lisp we made that only three of you have ever heard of :)
And you can compile that Lisp to JavaScript to build the Chrome extension?
Dan and Scott, though, and in this case mostly Scott.
It's very easy to check for localStorage support (some people disable it just like cookies) and it works, I think, everywhere except Opera, in almost every mainstream version.
(I use it a bunch).
https://developer.mozilla.org/en-US/docs/Web/API/Window/clos...
Thanks everyone for all the help!
I haven't tested, but you might be able to kind of fake it by having the tab immediately before the one you want to open do the opening. That wouldn't work for tabs that have opened external sites (the stories themselves), but you could at least send a message to one of the other HN tabs telling it to open your new tab, which should give you some control.
While I'm at it, is there a way to give a regular web app the kind of permissions that a Chrome extension manifest can give? It isn't just tab mechanics I need, but clipboard access and cross-domain privileges. Obviously this would still require client consent (and might still be Chrome-only) but it would be easier than an extension with all its deployment headaches.
Regarding cross-domain, what do you want to do exactly? In general there's no built-in support at least in Firefox to override default same-origin policy, but there are Chrome/Firefox extensions that for instance inject CORS headers to each response.
Edit: In Chrome, it seems you can disable same-origin policy with command line flag [2]
I'd be scared to show it as is because we get in trouble when admin-specific stuff shows up in screenshots. There once was a controversy because 'kill', 'blast', and 'nuke' links showed up in a screen shot, despite the fact that they were all defined in the version of the HN source code that pg published years ago.
A Show HN will certainly be in order if we ever publish it, though.
> opening and closing those tabs when desired
will only work with window.open if the moderation tool's window owns the tabs in question. So if you open a HN tab randomly or from another site or wherever, the moderation tool won't have opened it, and so it won't be able to close it.
reddit has RES. People are used to browser extensions, and this doesn't sound like it'd cooperate too well on a phone or similar device, so I say just release the extension.
As for fun-sounding feature names, just make a help page in the extension describing how everything works. Maybe call the help page "spoilers" or something. :D
Oh and can I be the fourth person to know what Lisp you wrote this in? :D
Thanks for the info. :)
I'm mildly curious how Lumen and Arc differ.
We also wanted it to be self-hosted, and to compile (transpile) to Lua as well as JS, in as straightforward a way as possible. JS and Lua are very close semantically, so our approach with Lumen was to take the semantic intersection of those two and then build the simplest thing we could on top of it. As a result, it's quite different from Arc, which is semantically a classical Lisp.
Here are a couple of old comments I posted about this idea, before Scott implemented it:
The nice thing about user scripts is that there is no packaging or bundling. The advantage of Greasemonkey over Tampermonkey is it uses files rather than storing scripts in a database.
I actually optimize for the comments, heh. I open HN links in new tabs and then wait a day or two for the discussion to complete before reading through them. So I don't end up refreshing for new comments or re-reading the same ones.
There are a couple downsides to this though: One, I generally miss the window for participation. Two, my browser is perpetually filled with dozens of HN tabs.
edit: OK, I found https://blog.ycombinator.com/meet-the-people-taking-over-hac... which says he's "in charge of the HN community". (I kind of wish I didn't have to turn to a 2 year old blog post to see that stated.)
https://chrome.google.com/webstore/detail/tab-snooze/pdiebia...
- Highlight any comments added since the last time you loaded the page with a little vertical orange bar.
- Change the hckrnews.com comment count display to show the number of unread comments in addition to the number of total comments.
I probably read ~500 comments a day on HN.
1. Filter out anything below 5 upvotes instantly.
2. Merge comments of duplicate OP's into one super-post.
3. Provide Vivisimo-like tech to auto-categorize and search those. Nice picture of what that looked like in document below.
https://faculty.ist.psu.edu/jjansen/academic/pubs/vivisimo_j...
I imagine HN comments would have a ton of tags generated by such an approach. So, a straight-forward search engine for them could help too. Not a Big Data guy so I can't do recommendations. However, this DARPA-funded, Watson alternative was open-sourced and might do interesting things for HN data:
Come to think of it, is there any technical limitation on having comments submitted as stories? Maybe it's just a cultural issue (i.e., there is no culture of submitting comments as stories here).
A genuine technical limitation is that poll options don't work like other items ('item' is what the code calls posts like stories, comments, and job ads), which caused some trouble last week.
I think a community process for surfacing the best stuff—not by upvoting, but by e.g. nominating one best thing each per day—could yield interesting results.
>Please don't post on HN to ask or tell us something (e.g. to ask us questions about Y Combinator, or to ask or complain about moderation). If you want to say something to us, please send it to hn@ycombinator.com.
This may not specifically fall in that category, but you may still want to email if you don't get your answer here.
Too often comment chains devolve into nitpicking, pedantry, and into off-topic discussion where two people fight tooth and nail for Internet Points.
From a technical perspective I get little or nothing from them, and from a discussion standpoint there's little reason for me to spend my time watching people nitpick each other over things that nobody in the community cares about.
Metafilter doesn't have the same technical focus and has a markedly different overall tone, but is pretty much immune from the "reddit effect" due to a lack of upvotes/downvotes, good moderation, and one-time $5 signup fee.