34 comments

[ 3.9 ms ] story [ 89.1 ms ] thread
Glad you built a way for me to be more productive at being less productive.
Nice work :-) may end up using this. I noticed that you rolled your own hacker news parsing - any reason why you used this over http://www.hnsearch.com/api or similar?

On another note (and sorry for advertising my own project) but it is relevant and some may find it useful - Hacker News for Sublime Text: https://github.com/dotty/HackerNews-SublimeTextPlugin

By the way, you might want to consider putting "Show HN: ..." in the title. Tends to stand out more and people often look for these posts.

Oh yeah it's a nice project too. Thanks for it!

Edit too: Use my own to test BeautifulSoup and for fun.

Is there any reason I can't read the comments in the terminal? It should be relatively easy to implement once you've rolled out your own parser...
Parser don't handle comments at this time but it's could be a nice feature and not so difficult to implement.
Noob question (I barely ever use Python stuff), but after I install this with pip, how do I actually run it? I'd have expected a hashbanged script on my path but bash can't seem to find one...
Oh yes, I will add it in README.

You just have to run pyhn command in your favorite terminal.

Just run /usr/local/share/python/pyhn
Ah thanks. That wasn't on my path for some reason.
This is nice, good work.

As a testament to the simplicity of HN's design though, it should be noted HN is fully functional and looks good in elinks etc. In fact I'm posting this very comment from my terminal with elinks. With elinks re-writing scripting it wouldn't be hard to massage the pages a little first to get them looking even better.

It sounds nice but hacker news is way too distracting as it is, a sneaky look at hacker news really slow down work.
I am using w3m for hacker news, it is clean and pretty good.
Looks good. Cleaner and more articles on the screen than visiting Hacker News using lynx.
I mean this with all sincerity, but did I understand this correctly? Using Terminal to sift thru HN articles, only to open them up in a web browser via the "c" key or the Enter key? I fail see the point. If you have a browser, you don't need the less usable Terminal version.

I tried thinking about who could be the target audience for something like this and had images of 1960s-era IBMers who worked exclusively with character-based terminals hooked to the mainframes (ignore the lack of browsers in that time period for the moment). But today, barring specialized defense related jobs and the like, everyone has a browser. Hell, many of us have browsers in our pockets via smartphones.

I guess I just don't understand the fetish with 1960s-era technologies in 2013 (up to and including vi/vim vs. more powerful editors). Is it nostalgia?

I spend most of my day in a terminal. I might use this just to have one less context switch. But I agree that opening the actual article in the browser sort of defeats the point.

As far as vi/vim versus "more powerful" editors... you mean emacs right? Because IDEs aren't necessarily more powerful than vim/emacs, they are just easier to learn.

"you mean emacs right?"

Lol. I'm not taking that bait. :-)

FWIW, I had never tried emacs before and decided last week, ironically, to try it for the first time. I fired it up, poked around, tried to do something useful and then wanted to quit. I couldn't find a way to quit the app. As best as I can remember, I don't remember seeing an obvious way to exit so I closed the entire Terminal window. lol

But that same exercise on TextMate was not even close. I was immediately productive in TextMate, having never used it before, and was able to get things done. Even better, I was able to exit "properly" without killing the program.

TextMate required no memorization of any kind. But it also doesn't make one out to be a genius for simply being able to use it. Those archaic command-line editors do. My gf has to use nano because she can't navigate using vi. I use vi (barely), and I can't navigate it either. lol. vi, for me, is like a one night stand...get in and out as fast as possible. I hate using it. But many people swear by it...in 2013. Because ":wq" is so obvious.

> I had never tried emacs before and decided last week, ironically, to try it for the first time

The fact that Emacs and Vim lack features attractive to newcomers tells nothing about their value. Musicians and Craftsmen invest years in learning their tools or instruments [1]. One is left to wonder what a Guitar or a Saxophone would be like, if the concern of the designers were ease of use for someone who picked it up the first time. A famous quote comes to mind [2]:

A computer is like a violin. You can image a novice trying first a phonograph and then a violin. The latter, he says, sounds terrible. That is the argument we have heard from our humanists and most of our computer scientists. Computer programs are good, they say, for particular purposes, but they aren't flexible. Neither is a violin, or a typewriter, until you learn how to use it.

Marvin Minsky, "Why Programming Is a Good Medium for Expressing Poorly-Understood and Sloppily-Formulated Ideas"

I further refer you to fine writing of Eric Naggum [3] who had more to say on a similar topic, and I daresay he does it way better than I ever would.

[1] http://norvig.com/21-days.html

[2] http://mitpress.mit.edu/sicp/front/node3.html

[3] http://www.xach.com/naggum/articles/3065048088243385@naggum....

"The fact that Emacs and Vim lack features attractive to newcomers tells nothing about their value. Musicians and Craftsmen invest years in learning their tools or instruments."

Those editors have value to folks that have invested time in learning them but they are not intuitive. Using an editor, or any tool actually, should not require memorization. Functionality should be discoverable.

I can't speak for you or your usage pattern, but I don't have the time, nor the capacity, to memorize commands for every program I use. This would include shortcuts for GUI apps. I use a lot of apps and code in a few languages and use more APIs than I care to. I'm spread thin. I'm not a sysadmin type spending all day in vi, or emacs.

For the languages I code in, I don't know all the features in and out. Ditto for the frameworks/APIs I use. Hell, I don't even know all the features of my IDE.

There's too much to know/deal with. For me, personally, I don't want a text editor to be "something that requires knowledge to use". I just need to use it occasionally, and I just need to make a few edits.

Editing a simple text file in vi/vim is excrutiating. Some people code in that thing. lol. Perhaps a hex editor wasn't readily available.

-- why vim.

Don't want to create a flame thread, but I felt the urge to reply.

I was really skeptical of vim as an editor just like you are, until I (and I am so glad I did) forced myself to use vim for a month for ALL my text editing. The linux kernel is old, does that make it less useful? That's not a valid argument at all.

It certainly takes some time to learn how to do things, macros, search and replace, move blocks of text, install some good plugins, etc... All of this is incredibly fast and ergonomic as opposed to move your right hand to the arrow keys every now and then. Textmate, Gedit, Redcar, pretty much other text editor has just a subset of features that vim has (emacs being the exception where vim might be a subset of emacs). Learning vim is just like learning a sort of new way of talking to your editor. ":wq" is obvious once you learn the words. It means write and quit. Another big advantage I see is I can work remotely through SSH and be instantly super productive with an editor that doesn't get in my way. I learnt vim before doing this, now I pretty much do all my coding on remote machines where using Textmate would simply be losing a lot of time after a few days.

It is not a replacement for IntelliJ Idea, Eclipse, Visual Studio, or any IDE. IDE's help you in a different way that sometimes can be more valuable than having a powerful tool to edit code. Programming JavaEE apps for instance is something I just find way easier to do with an IDE.

I agree, the user has to put a lot of effort to be able to understand and make vim work for him as an amazing editor. Spending time learning how to use a computer program is something we are not used to do these days but in the case of vim it pays off.

--- OP

Back to the original topic, I agree opening the results on a web browser sort of defeats the point for me as well. If you can find a way to render the articles and comments texts nicely in a terminal I would find it a lot more useful though. Maybe you can reuse the parsing work the fellows at Pulse.me have done, I can't find the feed if there's any though :( . Best of luck!

> If you can find a way to render the articles and comments texts nicely in a terminal I would find it a lot more useful though

I am completely with you on not wanting a flame thread, but: In emacs you can run ansi-term, and open links with w3m right in an emacs buffer. I use if for most of documentation reading all the time (invoke documentation lookup on symbol under point et. al.)

"It certainly takes some time to learn how to do things, macros, search and replace, move blocks of text, install some good plugins, etc... All of this is incredibly fast and ergonomic as opposed to move your right hand to the arrow keys every now and then. "

This explains it so perfectly. The arrow keys are not a penalty. They are 1. clearly labeled, and 2. available on every keyboard. Using them is intuitive. They require no knowledge or memorization.

Yes, I have to move my right hand to them, just as I have to occasionally move my right hand to the mouse and/or trackpad. I am not performing data entry. I am editing a file, often a configuration file of some sort. Speed is not the issue; accuracy of the changes being made are. Even when I'm coding in an IDE, I'm not touch-typing like a 1960s typist. I spend more time thinking/contemplating than typing.

It's not a vi/vim thing. Emacs was just as confusing to me. I'm not proposing or suggesting anything so much as observing how a new, less effective technique of consuming HN was given praise "just because it's done in Terminal". There is a perverse hatred of the GUI or even things considered intuitive in the linux world, which I understand are inherited from the unix world, which is very, very old.

I just don't understand why we can't pay homage to that legacy, but still advance the needle. What the developer did was nice, showed skill, deserves some props, but not useful.

Making a character-based editor that could be used by grandma for the next 20 years in linux would be.

Seriously, another one?
Tried installing... Installation bombed with errors:

  running build

  running build_py

  running build_ext

  building 'urwid.str_util' extension

  error: Unable to find vcvarsall.bat
----------------------------------------

I have Python 2.7 and VS2010 Express installed and have already done most of the things SO recommends, such as setting up path variables, etc....

Any other ideas?

Maybe windows guy can help you. I don't have it.