
Show HN: SwiftHN, a Hacker News reader in Swift - dimillian
http://dimillian.github.io/SwiftHN/
======
dimillian
It 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 :)

~~~
e15ctr0n
Are you seriously scraping or using the official Hacker News API[1]?

[1] [https://hn.algolia.io/api](https://hn.algolia.io/api)

~~~
dimillian
What... 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?

~~~
dang
Work 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.

~~~
dimillian
This is awesome. So it'll be a new API or an extension of the Algolia API?

~~~
dang
The former.

------
oidar
Looks nice. What is your opinion on Swift now that you've used it for a
project?

~~~
dimillian
It'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.

~~~
eludwig
Debugging Swift is terrible right now in Xcode, unless I am not doing it
right. Some values can be seen, others are inexplicably missing. Coming from
Java/IntelliJ, it's a hopeless mess.

I hope that Xcode/Swift gets better in the debugging department soon. NSLog()
is a rough way to see values. It's just so 1996.

~~~
coldtea
> _I hope that Xcode /Swift gets better in the debugging department soon.
> NSLog() is a rough way to see values. It's just so 1996._

Well, XCode also has the Swift Playground, with live values updating next to
your code etc. Java/IntelliJ don't have that (of course XCode's implementation
is beta too, and might not work on some cases).

~~~
emp
Playground however is just a place for playing with snippets of code. And
experiment and learn environment. If you have a bug in a running app, it's
just not possible to recreate the problem except for the simplest of apps.

------
robinhoodexe
Looks 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
Well, 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
Sounds very very nice, I can't wait for iOS 8 now. By the way, please add a
"add to reading list" for links.

~~~
dimillian
Ahah, 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
Nice. How about filters of some kind? Like "banned words" or the like. Maybe
something like [http://skimhn.com/](http://skimhn.com/).

------
psophis
Have you had to refactor at all between releases of the xcode beta?

~~~
dimillian
Actually, 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.

~~~
speg
Sounds like you had a good time ;)

[https://twitter.com/Dimillian/status/486237717563736064](https://twitter.com/Dimillian/status/486237717563736064)

~~~
dimillian
Ahh yeah, at the tools level, but Swift is actually fine, after sometimes with
it :p

------
cnp
I am really excited to navigate through this code! Great work.

------
revscat
It'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
Thanks for sharing the code, it looks really nice. I can't wait to dig into it
little bit more. Good job

