[HN Gopher] Show HN: I developed a native macOS Hacker News client ___________________________________________________________________ Show HN: I developed a native macOS Hacker News client Author : pcr910303 Score : 87 points Date : 2021-07-21 00:20 UTC (1 days ago) (HTM) web link (github.com) (TXT) w3m dump (github.com) | smoldesu wrote: | I feel like calling it "Hacker News" is a bit of a misnomer at | this point, right? /s | grishka wrote: | Any chance for Mojave support? It currently requires Big Sur. | Looks good on screenshots tho. | przemub wrote: | I like that you kept at it for 1.5 year - it is inspiring me to | pick up some projects I've half-started. | SavantIdiot wrote: | This raises a question I've always wondered: | | How many of you prefer to run a native app rather than the web | app? | | Personally I hate installing things on my desktop if there is a | website because it is just another thing I have to manage. (Even | more so because I have multiple Windows, Mac and Linux boxes I'm | bouncing around between during the day and rather just have | sync'd Firefox bookmarks than have to install s/w on each box.) | | Am I in the minority, majority, both, neither? | et-al wrote: | On a phone, I can see apps being easier to use (saved | credentials and ideally the UX is streamlined for touchscreen | use). But if I have a keyboard and mouse, I strongly prefer a | web app for stuff that requires minimal interaction from me | because it's sandboxed and accessible anywhere. | | A native app should be snappier and maybe offline capable, but | I'm not expecting to use Hacker News offline. | judge2020 wrote: | I prefer PWAs since it combines the window-ness of regular | applications with the security sandbox traits of websites in | the browser. | justaguy88 wrote: | I always prefer the native (so long as it's really native, not | just electron) | | I'm usually lost in a sea of browser tabs | Austin_Conlon wrote: | Seems that it's usually long time Mac users that prefer native | with extensive menu bar support, familiar keyboard shortcuts, | etc. | kitsunesoba wrote: | I like native apps (as in, uses the host platform's UI toolkit) | where available, because it's almost a given that the operating | systems's typography, color scheme, etc are more legible and | less annoying than whatever choices were made by a website's | designer. This is especially important now that all major | desktop OSes implement a dark mode, which many sites still | lack. | | Things like reader mode and user styles help a lot with that, | but they're both kind of clunky bolt-ons and in the case of | userstyles, often manual since many sites don't have any | readily available. | | A lot of this could be improved if browsers had restyling built | in as a first class feature and site owners were incentivized | to make their sites work with it. | tasogare wrote: | Of course desktop software, as they are way better than web | sites. | | - don't need to create yet another account (and won't be | deplatformed arbitrarily) | | - my data stay in local and are not used in shaddy way by the | service provider | | - usable offline or with poor connection | | - better performance | | - I'm in control with upgrades | | Webapps in general are hostile to the user and are just a way | for the developer to take over (undue) control over the | software usage and user data. | rootsudo wrote: | Depends, web apps are nifty af but a console app can be better, | but lately I enjoy using a browser entirely as it makes it | computer agnostic. | willyt wrote: | Depends. Something I use all the time, like a music player or a | chat app, I hate having to use a web app or a app that just | wraps a web interface as they are usually slow, clunky, | glitchy, power hungry and with non-standard interfaces | especially things like keyboard shortcuts, drag n drop support. | But something like this app I would probably never install as I | don't spend that much time writing stuff on HN. HN is just a | website that links to other websites that I mostly just have a | look once or twice a day for semi-obscure interesting science, | tech and design news that hasn't made it to ars technica or | whatever. | TranquilMarmot wrote: | I'm the same way; I use multiple machines (and my phone!) every | day so having synced Firefox tabs is ideal. Especially for | something as simple as Hacker News a native client seems a | little... overkill? | brailsafe wrote: | I much prefer a native mac experience for things that aren't | necessarily tied directly to services and I do more than just | read on, and usually that I'd like them to be offline by | default. However, I've been wanting a HN client for a while for | some reason. I don't sync tabs around, but do use Firefox. | seany wrote: | I don't think I've ever picked the web interface over native as | long as the native app is "really native" | tailspin2019 wrote: | Agreed, the "really native" bit is important! | geoah wrote: | If it's an app I want open all the time I'd rather have a | dedicated native app for it. | cartoonworld wrote: | I use materialistic(on fdroid and gplay) because it gives me a | phone home screen widget of top hn stories. | | https://f-droid.org/is/packages/io.github.hidroh.materialist... | jll29 wrote: | In the absence of a USENET news server comp.bbs.hn, a TUI RSS | reader would be the next best thing for me, and viewing the | site in a Web browser after that. | | (I appreciate that many will enjoy a native app, and I applaud | the effort, but for me personally content sites are harder to | keep track of if each has its own app.) | Naac wrote: | Does the Algolia hackernews api ( the specific API this client | uses ) still require you to query in a tree like fashion, every | comment item id if you want an entire page of comments? | | Its extremely inefficient, to the point where I have a better | time curling the HN web page and piping it through python | beautifulsoup | | Regarding a native app vs the using the HN website. The HN | website I think is pretty ideal for the type of content its | displaying, a native app doesn't give you much over having a HN | tab open. I guess only if you want to read HN but not have a web | browser open? But how often does that happen? | | The only benefit I see from a native app ( and why I use one on | Android ) is the ability to save articles and comments for | offline reading, say, when I get on a plane. | pcr910303 wrote: | > Does the Algolia hackernews api ( the specific API this | client uses ) still require you to query in a tree like | fashion, every comment item id if you want an entire page of | comments? | | I'm using two different APIs -- the inefficient API that | requires you querying in a tree fashion is the HN official | API[0], but there's also the Algolia API[1], which is much | faster and gives a much sensible data shape. I also do actually | fetch the HN website as well -- it's needed for account/voting | features. With these sources, it's much faster than a usual | client that gets it's data from the official API. | | > The HN website I think is pretty ideal for the type of | content its displaying, a native app doesn't give you much over | having a HN tab open. | | I guess it's a bit of difference on how one uses HN? I didn't | like HN tabs being mixed with other work--related tabs. I felt | that having an app would be a perfect solution to me, but YMMV | I guess. | | > The only benefit I see from a native app is the ability to | save articles and comments for offline reading | | I guess that's one more feature that I should add to my backlog | :) | | [0]: https://github.com/HackerNews/API | | [1]: https://hn.algolia.com/api | krapp wrote: | Oh wow, I... really wish I'd known about that second API a | while ago. I gave up on writing my own client because HN's | API was so frustrating. | Karrot_Kream wrote: | > Does the Algolia hackernews api ( the specific API this | client uses ) still require you to query in a tree like | fashion, every comment item id if you want an entire page of | comments? | | > Its extremely inefficient, to the point where I have a better | time curling the HN web page and piping it through python | beautifulsoup | | Yes it still does and yeah it's ridiculously inefficient. I | have a couple tools I've written atop the HN API and all of | them are forced to go async simply because the sheer # of page | loads necessary to render a thread makes async almost a | necessity. | dahfizz wrote: | Agreed. Generally I prefer native apps, but HN is so well | designed and so minimalist that I don't feel it needs a native | client. | sys_64738 wrote: | Wouldn't Vienna with the RSS feed give you the same? | tailspin2019 wrote: | Haven't tried it yet but the screen shot looks great. Clean, | simple and not over engineered. | pcr910303 wrote: | Hello, I'm the developer. Didn't expect a Show HN post to go into | a second--chance pool -- I woke up an hour ago to find that my | app was trending on HN. | | I developed this b.c. I found that I didn't like HN mixed with | other work/school related tabs, and realized that a separate app | would be great for me. I believe that apps should use the most | native-like UI possible -- especially Cocoa on macOS, so I aimed | to be the most 'Mac-assed' HN client possible. | | Unfortunately the current app is in fact pretty unpolished -- | it's in a usable state, but there's a lot of missing features | that one would expect from a 'full-featured' HN client. Probably | a bunch of unknown bugs as well :-(. I would very appreciate any | suggestions on feature additions or simple bug reports. Thanks! | caseyf7 wrote: | Would love to see the ability to search and/or export upvoted | submissions/comments. | adammenges wrote: | Nice! This looks great. | c17r wrote: | On my "projects to do when I have lots more free time" list is to | make a Hacker News NNTP server. Read only, of course. Few details | to work out (edits, polls, making comments, etc) but I think it | could work. It would solve the "what's new in this thread" | problem. | jll29 wrote: | Would be great to get that and read it in Emacs (gnus). | floss_silicate wrote: | "Mac-er News", surely? | themodelplumber wrote: | HrNReader 2000 | paulcole wrote: | God I would love somebody to make one of these that could block | specific users, linked sites, or topics/keywords. | leecb wrote: | Very happy to see a "mac-assed" app! | | My only complaint so far is that I can only see about 12 items in | the app on one screen, vs the whole front page in a browser. Adds | a lot more scrolling. | geoah wrote: | Thanks for sharing this. It looks really great and pretty minimal | which I personally love. The main thing I'm missing from this | would be read/unread indicators on stories. | | A roadmap of planned features would be nice or some tickets that | other people could help with. | | I'm not sure how much time you plan on spending this, but I'd | personally probably be willing to buy a version of this if it was | able to do notifications on replies and similar features hn | lurkers might want. Other interesting paid features could be | read-later list, favourites, cross device syncing of read | indicators and lists, etc. If you don't wanna deal with paid | features maybe consider enabling the github sponsor feature so | people could optionally pitch-in. | pcr910303 wrote: | For me, right now, this is a hobby project -- until now, the | feature roadmap was basically the feature that I have in mind. | | I'm more than happy to get feature requests though -- | read/unread indication and favorites are something that I would | definitely try implementing. Notifications are a bit harder | because it would require polling HN -- I'll be thinking on it. | soheil wrote: | Here is some code for a simple chrome ext for HN to show | votes/created date/bio inline (just stick it in a chrome ext) | function hackernews() { if | (document.location.toString().indexOf('news.ycombinator') === -1) | return; document.querySelector('#hnmain td').style = | 'background-color: #55b6f2;'; var i = 0; function | render(user, html) { const div = | document.createElement('div'); let style = 'cursor: | text;overflow-y: scroll; height: 39px;position: absolute;border: | 1px dotted black;width: 250px;margin-left: 250px;margin-top: | -34px;background-color: #f6f6ef;'; div.innerHTML = | html; const date = div.querySelectorAll('tr')[5].queryS | electorAll('td')[1].innerHTML.split(', ')[1]; const | karma = div.querySelectorAll('tr')[6].querySelectorAll('td')[1].i | nnerHTML; const about = div.querySelectorAll('tr')[7].q | uerySelectorAll('td')[1].innerHTML; if (about.length < | 60) { style += 'display: flex;flex-direction: column- | reverse;margin-top: -39px;border: none;background-color: | transparent;'; } div.innerHTML = about; | div.style = style; user.querySelector('.age').innerHTML | += date ? ' ' + date + ' ' + parseInt(karma).toLocaleString() : ' | (x_x)'; user.appendChild(div); } | function next() { if (i >= | document.querySelectorAll('.default .comhead').length) return; | const user = document.querySelectorAll('.default .comhead')[i++]; | if (!user) return next(); const username = | user.querySelector('a').href; if | (username.indexOf('soheil') !== -1) return next(); | const html = localStorage.getItem(user); if (html) { | render(username, html); next(); return; | } fetch(username) .then(res => res.text()) | .then(res => { localStorage.setItem(username, res); | render(user, res); setTimeout(next, 3000); | }); } next(); } | Jerry2 wrote: | Excellent work! I really like the UI. I've been using some iOS | app for HN because the UI offers easy and quick swipe-based | upvotes and bookmarking. But your UI is more reminiscent of a | mail app and that's better suited for a desktop app. So kudos! | npunt wrote: | Looks good but needs text zoom (cmd =/+ and cmd -). | | I'd also consider the sidebar include 'My Posts' and 'My | Comments'. Maybe it has those, but I couldn't tell, as I turned | off outgoing network access to firebase before logging in just to | be on the safe side. Any reason you're connecting to firebase | rather than storing preferences locally? I'm worried about my HN | credentials being stolen. | pcr910303 wrote: | Thanks for the feature requests! Will definitely add a text | zoom feature and a 'My Postsm category. | | > Any reason you're connecting to firebase rather than storing | preferences locally? | | All of your preferences are stored locally -- the firebase | connection is due to the official HN API[0] implemented on | Firebase. Your HN credentials never leave the app (except for | news.ycombinator.com) -- it's tucked in your keychain. | | [0]: https://github.com/HackerNews/API | npunt wrote: | Ah thank you for the clarification! Keychain is truly the | 'Mac-assed' solution isn't it? | | I know it's kind of a feature/property of HN to not implement | notifications or other attention driving features but it'd be | interesting to see this app periodically poll HN for any | replies to My Posts / My Comments and generate at least | sidebar number badges, if not app badges and system | notifications. I'd implement a preference on the latter two | though, in keeping with the spirit of not having HN turn | completely into an attention grabbing social network for | those that wish it not to be. ___________________________________________________________________ (page generated 2021-07-22 23:00 UTC)