stackernews / stacker.news Goto Github PK
View Code? Open in Web Editor NEWInternet communities that pay you Bitcoin
Home Page: https://stacker.news
License: MIT License
Internet communities that pay you Bitcoin
Home Page: https://stacker.news
License: MIT License
Provide verbiage so that user comments and other user submitted content is clearly under a free/libre license (CC0, CC-BY, CC-BY-SA).
In my opinion, one of the reasons for StackOverflow's success is that the questions and answers are provided to the community under a free/libre license (CC-BY-SA 4.0). StackOverflow (SO) terms of service specifically addresses the point (under "Subscriber Content") and users who post on the site agree to provide their content under said license so that others can share and distribute it:
You agree that any and all content, including without limitation any and all text, graphics, logos, tools, photographs, images, illustrations, software or source code, audio and video, animations, and product feedback (collectively, “Content”) that you provide to the public Network (collectively, “Subscriber Content”), is perpetually and irrevocably licensed to Stack Overflow on a worldwide, royalty-free, non-exclusive basis pursuant to Creative Commons licensing terms (CC BY-SA 4.0), and you grant Stack Overflow the perpetual and irrevocable right and license to access, use, process, copy, distribute, export, display and to commercially exploit such Subscriber Content, even if such Subscriber Content has been contributed and subsequently removed by you as reasonably necessary ...
Though there are many sites that effectively duplicate SO, SO remains popular and there's probably an argument that even though there are many copycats, SO is probably enhanced by the duplication rather than inhibited by it.
Contrast this with Hacker News (HN) and their restrictive prohibition on using other people's comments on their site:
Commercial Use: Unless otherwise expressly authorized herein or in the Site, you agree not to display, distribute, license, perform, publish, reproduce, duplicate, copy, create derivative works from, modify, sell, resell, exploit, transfer or upload for any commercial purposes, any portion of the Site, use of the Site, or access to the Site. The buying, exchanging, selling and/or promotion (commercial or otherwise) of upvotes, comments, submissions, accounts (or any aspect of your account or any other account), karma, and/or content is strictly prohibited, constitutes a material breach of these Terms of Use, and could result in legal liability.
There's a saying by Quinn Norton that says
All data, over time, approaches deleted, or public.
I'm a fan of the HN community but the restriction on their user provided content is a mistake, in my opinion, and I worry it's inevitable that the HN data is lost or unusable in some pretty meaningful ways. If HN ever did decide to give the data to the community, my bet is that it would be at a point when they're shuttering and "throwing it over the fence" at which time it's utility would be a shadow of what it is now.
It would be nice if SN could avoid HN's mistake and make sure to provide user submitted content in what I believe is the spirit in which it was created, as a resource to the public and available to everyone, even for commercial re-use.
Something users tend to do is post screenshots when their item is on the frontpage (also seen this for HN and reddit). It'd be nice for the post to simply indicate the highest rank the posts have received instead - this is complicated by boost in our case but still an interesting habit we can maybe make easier.
And thanks for the great site. 👏🏼
WebLN is a pre-requisite for the app to be included in Breez and other lightning apps.
The implementation can be fairly simple, https://webln.dev/#/ and when ready worth pinging some of the teams like Breez to include SN there.
This would be both useful and also good marketing ;)
I didn't get notified by this post https://stacker.news/items/2004
If it wasn't a transient error, I suspect it's due to punctuation being captured in the regex
It just ends up in a random place.
I suspect the issue is that the 'reply' button is sometimes removed from the DOM while the popover is still active ... it doesn't always happen so there's probably a race condition. Probably just requires hiding the popover before submitting the comment form.
Currently we only have links and discussions but we can support more types to give users more options.
If I have a notification and check it on mobile while my desktop has an SN tab open, for some reason the favicon doesn't switch back to non-notification style.
We want to provide users with more ways to fund their accounts/earn bitcoin. We also want to bootstrap the community because users will get more value from the site if more people are on it. A simple solution is a sat referral program. I'm thinking 20 sats but I don't know.
Wallet providers use a protocol (https://webln.dev/) to make sending lightning payments less cumbersome is my understanding. It'd be nice to support this.
A few users have been trying to use @ mentions to get a users attention in comments. These should at least link to a users profile but it'd be better if they also showed up in @their notifications.
Getting quite a few of these message in the logs. These could be happening for a number of reasons. They appear to be intermittent and might not be avoidable but there might be a better way to handle it.
Sep 12 16:42:37 ip-172-31-87-148 web: [next-auth][error][client_fetch_error]
Sep 12 16:42:37 ip-172-31-87-148 web: https://next-auth.js.org/errors#client_fetch_error session FetchError: request to https://stacker.news/api/auth/session failed, reason: connect ETIMEDOUT 35.168.134.186:443
Sep 12 16:42:37 ip-172-31-87-148 web: at ClientRequest.<anonymous> (/var/app/current/node_modules/node-fetch/lib/index.js:1461:11)
Sep 12 16:42:37 ip-172-31-87-148 web: at ClientRequest.emit (events.js:376:20)
Sep 12 16:42:37 ip-172-31-87-148 web: at TLSSocket.socketErrorListener (_http_client.js:475:9)
Sep 12 16:42:37 ip-172-31-87-148 web: at TLSSocket.emit (events.js:376:20)
Sep 12 16:42:37 ip-172-31-87-148 web: at emitErrorNT (internal/streams/destroy.js:106:8)
Sep 12 16:42:37 ip-172-31-87-148 web: at emitErrorCloseNT (internal/streams/destroy.js:74:3)
Sep 12 16:42:37 ip-172-31-87-148 web: at processTicksAndRejections (internal/process/task_queues.js:82:21) {
Sep 12 16:42:37 ip-172-31-87-148 web: type: 'system',
Sep 12 16:42:37 ip-172-31-87-148 web: errno: 'ETIMEDOUT',
Sep 12 16:42:37 ip-172-31-87-148 web: code: 'ETIMEDOUT'
Sep 12 16:42:37 ip-172-31-87-148 web: }
Users want this. I do too but I keep forgetting.
I initially avoided SSR because I wanted to use clientside caching and I didn't understand the cache too well. The trouble is that if I'm SSRing I have to send from the server a dehydrated cache to be rehydrated on the client. I'm a little more savvy with the cache now ... Probably worth doing considering the perceived speed up for users.
It'd be nice to give larger rewards to users than a single upvote.
I was recently asked by Car at https://thrillerx.com if it were possible to do this on his articles. I'm uncertain of how much work is involved, but it'd be interesting to do if it's not too hard.
This book was written by some disqus engineers and might be helpful (if outdated):
https://www.amazon.com/Third-Party-JavaScript-Ben-Vinegar/dp/1617290548
There might be superior resources now ...
The only sat transfer mechanism we really have currently is the vote and boost (which is in the same db table but differentiated with a boolean). Even the dust cost of posting and commenting is kind of recorded as a vote.
We want to support many types of sat transfers on the site eventually. To name a few immediate ideas:
Eventually:
The sky is the limit IMO and we are going to the moon my plebs! These are naive examples. The incentives will have to be carefully examined before deploying of course.
Anyway, we don't want a DB table for all of these so we should probably have something more generic. The trick is making something intended to be generic also performant/correct so we should deliberately design such a system.
Off the top of my head it's probably best to have an xfer model with a sender id then we have a polymorphic receiver (e.g. an item (post/comment), a user for direct tips, a message for message hurdles) ... I'm not sure how well all of these will fit into this model so I'll probably attempt an exhaustive experiment to make sure any particular design fits.
When navigating to the rss feed, I get the following error:
XML Parsing Error: not well-formed
Location: https://stacker.news/rss
Line Number 86, Column 99:
<link>https://twitter.com/irisenergyco/status/1428677975537377285?t=esQNOfvjbmpMrItP9oHjSA&s=19</link>
--------------------------------------------------------------------------------------------------^
i know that the second number besides my name (nathanael [2,1]
) means that i have one satoshi, but i think on the wallet page it is useful to also display the balance above the two buttons (fund / withdraw)
btw. there is a little typo: withdraw and not withdrawl (for the withdraw button on the wallet page)
Title is self-explanatory. Sometimes we make mistakes in comments. Replying to your own comment with the fix is a workaround, but an inelegant one. Perhaps it could use the same system as Reddit does where an edit after a certain period of time indicates that the comment has been edited. Could also see a use for being able to view the original comment to see exactly what was edited if the commenter does not indicate that themselves (such as with a strikethrough through the edited word for a misspelling rather than simply removing the word).
Currently notifications just tell you you've stacked sats but you aren't told who upvoted you or which content got upvoted.
Users are getting served stale pages after I deploy updates basically. While the bundle is updated, their page cache is unawares of the update on the server until they refresh. I'm not sure yet how to bust their cache in these cases.
Because we deploy across more than one server and build independently on each server, each server gets a different build id. This build id is used to address artifacts on the server and if the load balancer does not stick a client to a particular server, then they might end up referencing build artifacts that exist on one server but not the others.
Solution is probably to use the git commit id.
Some folks may feel better if stacker.news are available via onion (Tor) network. It can also help in your search for decentralization as Tor now has Onionbalance to distribute the service on multiple hosts while serving it over one onion link.
Plausible has a feature that makes the dashboard publicly accessible which is nice. Users should know everything I know.
Create a code of conduct for the site itself and a code of conduct or contributing guideline for contributing to the repo.
Some examples and/or resources:
Some of these may only apply to code contributions while others may be more appropriate for the site itself.
e.g. strings with spaces are currently valid
Thanks for all the work you have done so far! Just wanted to create an issue for this.
It would be really nice to be able to sort posts by the amount of sats they have received - I'm not sure how "boosts" would affect this though.
It's easy to discount how much performance affects the UX. SSR is a step in the right direction but because it makes db queries synchronous, it's kind of a step back unless we make those queries very fast. I've done some work making sure we have indices where needed but we need more.
There are lots of things we can do to improve performance. Prioritization is the hard part. As for queries most things can be improved with materialized views but at our stage this might be overkill. What we need now are results and fast.
materialized view
of items and update it concurrently but this creates problems for pagination and we need a good strategy for refreshing the materialized view (probably just when upvotes happen). I see this as a longer term solution.I noticed a while ago I started getting the above error on macOS when manually refreshing my feed.
Through discussion in the #general Slack channel, it was determined that this error is caused due to a tokenExpired
status for an enabled Twitter extension (not sure if it would also apply to the Reddit extension as well since I did not have that extension enabled).
A simple fix that was suggested to me was to deactivate the extension and then reactivate. I can confirm this worked. I also revoked NetNewsWire from accessing my Twitter account and re-enabled it, but they may not have been necessary. Based on the language on the Twitter page, NetNewsWire's access had not be previously revoked.
Was told to open an issue so it could be kept track of.
Recommended by user here https://stacker.news/items/3398
Would be nice if users could use lightning addresses to fund their wallet, e.g. [email protected]
First of all thanks for the project, it's pretty cool!
When trying to log in with GitHub I've noticed that it requires read & write permission for:
I think we could probably relax this a bit to just require reading public data, since it appears that the login is what we are interested in. I might be wrong since I'm not too familiar with next-auth
so feel free to close this issue if so.
This website has been a great resource for Bitcoin news and being able to anonymously log in via the Lightning network is ingenious.
However, the fact that the website is just that makes it easy to forget to check regularly for news. Being able to access the website via RSS will allow a user to subscribe to the website (possibly even using specific parameters) so they will always know when a new post they care about is made.
Got a. report on twitter that async-retry might not work with a try block inside or something like that. Need to investigate. We use this for when there are serialization conflicts when updating user wallet balances.
Though it might be obvious to engineers that are better than myself, how to get a test environment working is not clear to me. It would be nice to have some minimal instructions on how to get a development setup working so that getting familiar with the environment is as easy as possible.
Better yet, it might be nice to provide a Docker container so that people can experiment with something that's pre-built.
I got as far as running the web service but, in the couple minutes I looked at it, I couldn't figure out how to hook up or create the database, so gave up. A little more documentation on how to get a dev environment working or providing a Docker container would help speed up this on-boarding.
Responses are cached on the client but invalidate as the browser sees fit. This is nice for the user experience in certain contexts but the main/recent pages tend to go stale too slowly so the user is forced to manually refresh.
I'm not sure the best way to do this from a UX perspective.
It would be nice to be able to "undo" an upvote, tip or boost. From what I understand, the upvote/tip/boost (UpTiBo) represents an actual transaction on the Lightning network which, in my opinion is "the right way", so once the transaction is sent, there's no going back. To try and mitigate a mistaken UpTiBo, the transaction could be delayed for 5s, say, allowing a user to do a 'quick undo' with the understanding that waiting any longer than that will finalize the transaction.
I believe Gmail does something similar, allowing you to 'undo send' of an email by holding it for some number of seconds/minutes before finally pushing it through.
I think most of the time, people will realize their mistake within some short time, like 5s, taking care of 90%+ of the cases where users would want to rescind their UpTiBo.
I would consider this a very low priority, "nice to have" feature and nothing that is significantly interfering with the user (or my) experience.
Give users some surface area to tell people about themselves.
Occasionally people post duplicate URLs. This isn't a huge issue ATM but it'd be nice to be able to detect it and display a warning - and possibly disallow it if it happens within a certain timeframe of the past post.
Probably doesn't need to be complicated. Remove trailing slash, case insensitive, https/http insensitive, and remove query params (although some sites use query params to specify which post, e.g. HN does this sadly, but we can probably just have some kind of whitelist) then compare.
Hacker News has an API to their data, providing an interface to query data from their site in JSON (see here). Hacker News provides it through firebaseio
, so maybe it's worth pushing this to another service but the basic form would be something in the form of https://stacker.news/items/1130.json?print=pretty
with the resulting item
JSON closely mirroring the database schema.
Other tables in the database schema could be accessed similarly.
I do see an api
directory so maybe this is already implemented? If so, it would be good to document. If not, then having an API so that other hackers can look at the data would be cool.
I'm yet to find even a hacky solution to this problem. I've tried several variations. I want to preserve the user seeing as much of the url as possible, while not taking any more vertical space than necessary. Flexbox handles this extremely well - except when the title wraps.
There are some issues with scroll position etc after adding SSR. It feels janky. Definitely worth refining.
Many users have asked. Fairly straight forward to throw everything into ElasticSearch given my experience with https://grepmed.com ... but ops can be complicated.
If a user upvotes fast successively, ie they do second upvote before the server responds from the first, the post is boosted instead of being tipped
Something along the way broke this functionality. I had it working at one point.
When pulling from the RSS feed, the format for an item is as follows:
...
<item>
<guid>https://stacker.news/items/1098</guid>
<title>Lightning Voucher ATM Coming Soon ⚡️🏧</title>
<link>https://stacker.news/items/1098</link>
<pubDate>Sun, 15 Aug 2021 20:32:02 GMT</pubDate>
</item>
...
For folks subscribing to the RSS feed:
link
doesn't go to the article but rather the entry on stacker.news
which seems surprising to mestacker.news
It would be much nicer, in my opinion, if the link
field had the address of the linked article (in the above example https://twitter.com/ltngstore/status/1426950427346542594?s=20
).
At the very least, adding another field that has the proper link would be nice.
Obviously this can't happen for all items, as some the main link is the guid
, but where appropriate it would be good to provide the link.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.