10 ms·
Show HN: SwiftHN, a Hacker News reader in Swift
- dimillian 12y agoIt still a work in progress, but my plan is to release it on the launch day of iOS 8, with a lot more features. Like a Today widget and a share extension which will allow you to post to HN right from Safari. Edit: I started an Hacker News Swift scraper, which is what SwiftHN use now, it's called Hacker Swifter: https://github.com/Dimillian/HackerSwifter https://github.com/Dimillian/HackerSwifter It's highly inspired from LibHN (https://github.com/bennyguitar/libHN https://github.com/bennyguitar/libHN) for the scrapping part at the moment. Feedbacks and pull requests appreciated :)
- danudey 12y agoIt took me a few moments, but I think you mean 'scraper', and not 'scrapper'?
- dimillian 12y agoTotally ^^
- e15ctr0n 12y agoAre you seriously scraping or using the official Hacker News API[1]? [1] https://hn.algolia.io/api https://hn.algolia.io/api
- dimillian 12y agoWhat... wait what.... There is an official API and no one told ... what? Ok, I'm seriously scraping, and I seriously dislike it, sound like HackerSwifter will now use the API! Thanks! Edit: But there is no endpoint to have the top items, ask hn etc... right?
- e15ctr0n 12y agoOctopart initially provided the official API[1] and then Algolia took over early this year[2]. [1] https://www.hnsearch.com/api https://www.hnsearch.com/api [2] https://news.ycombinator.com/item?id=7130590 https://news.ycombinator.com/item?id=7130590 A lot of people seem to have used the API to build cool apps. https://hn.algolia.io/cool_apps https://hn.algolia.io/cool_apps I would read the docs first and jump to conclusions later.
- redox_ 12y agoLast Show HN: http://hn.algolia.com/api/v1/search_by_date?tags=story,show_hn http://hn.algolia.com/api/v1/search_by_date?tags=story,show_... Last Ask HN: http://hn.algolia.com/api/v1/search_by_date?tags=story,ask_hn http://hn.algolia.com/api/v1/search_by_date?tags=story,ask_h... Front page: https://news.ycombinator.com/rss https://news.ycombinator.com/rss You should be able to build something :)
- dang 12y agoWork is underway on an API to do all of this. Nick and Scott are hacking on it about three feet to my right just now. The days of scraping are numbered.
- jordanbrown 12y agoGreat news!
- dimillian 12y agoThis is awesome. So it'll be a new API or an extension of the Algolia API?
- dang 12y agoThe former.
- goblin89 12y agoYCombinator doesn't endorse Algolia's HN API in any public way, to my knowledge. This makes it just regular third-party API—reliable, convenient, better than scraping, but hardly ‘official’. (Yes, I'm being pedantic.)
- ihuman 12y agoHow is that official? I thought that was Algolia's API, not YC's
- e15ctr0n 12y agoAlgolia is a YC company and built the API for YC, which is as official as it gets.
- Alupis 12y agowould certainly be a lot less confusing if the api was actually hosted on the same domain. as-in: news.ycombinator.com/api or something... When I search for "news.ycombinator api" I get a bunch of irrelevant or very outdated links... https://www.google.com/#q=news.ycombinator+api https://www.google.com/#q=news.ycombinator+api
- serf 12y agoI agree, but it's good marketing. It associates the act of searching with the hostname 'algolia', which seems to be in their interest (being that their tagline is "Hosted cloud search as a service | AlgoliaSearch").
- miket 12y agoLooks great, Thomas. If you'd like to use Diffbot [1] to generate clean content summaries of the links for mobile, ala premii, I'd be happy to hook you up with some calls. [1] http://diffbot.com http://diffbot.com
- robinhoodexe 12y agoLooks extremely nice. Currently I'm using http://hckrnews.com/ http://hckrnews.com/ both on my laptop as well as on iOS due to the lovely layout for mobile as well as cronologically ordering. If your app can do that as well I'm sold!
- dimillian 12y agoWell, I want the app to be as close as what Apple could deliver as I possible. So I plan to keep the feed and comments very clean. It'll also feature some offline feature and automatic background update, very handy.
- robinhoodexe 12y agoSounds very very nice, I can't wait for iOS 8 now. By the way, please add a "add to reading list" for links.
- dimillian 12y agoAhah, to be honest, this was the first feature I put in, you can send any article to the Reading List by swiping a cell. I use the offline feature of the Safari Reading List a lot. This is a killer feature for me. http://cl.ly/Wf4t http://cl.ly/Wf4t
- robinhoodexe 12y agoNice. How about filters of some kind? Like "banned words" or the like. Maybe something like http://skimhn.com/ http://skimhn.com/.
- jordanbrown 12y agoWe should design a dark mode!
- dimillian 12y ago+10 I want to do it! Or pull request :)
- oidar 12y agoLooks nice. What is your opinion on Swift now that you've used it for a project?
- dimillian 12y agoIt's rough, not because of Swift, but because of Xcode. I really love Swift, but it take some time to get up to the speed you are used with Objective-c. Mostly because of the new syntax, but also because Xcode is very buggy around code completion, linking and syntax highlighting. But for a new app, I would recommend Swift to anyone, it's light, and readable, I really like it.
- nwalter08 12y agoAmen to this. Almost my feelings exactly
- r618 12y agothat's right the only thing which saddens me a bit is that any Swift app is iOS 8+ only :(
- tejaswiy 12y ago+1 to this. It's like we're back in Xcode 3.x again with Swift.
- k-mcgrady 12y agoI had some big issues with code completion in Swift in Xcode. The completion engine regularly crashed and all syntax highlighting and warnings/errors disappeared. A total nightmare when you're trying to learn a new language.
- coldtea 12y ago>The completion engine regularly crashed and all syntax highlighting and warnings/errors disappeared. A total nightmare when you're trying to learn a new language. Kids these days... We had to learn new languages with no "syntax highlighting", no "completion engine", no tutorials, no reference sites and no internet in general. If we were lucky we had some kind of printed manual -- not always.
- cnp 12y agoI am really excited to navigate through this code! Great work.
- psophis 12y agoHave you had to refactor at all between releases of the xcode beta?
- dimillian 12y agoActually, no. The big changes was for the beta 3 and it was mostly around arrays syntax. The old syntax was "deprecated" and Xcode gently allowed me to use the new syntax in 1 click. I was impressed :) Can't wait to see the changes in new seed next week.
- revscat 12y agoIt's good to see some actual code in practice. I'm pleased to see how readable Swift is compared to Objective-C. Good job.
- tomashertus 12y agoThanks for sharing the code, it looks really nice. I can't wait to dig into it little bit more. Good job