Live data from Hacker News

Ask HN: Good examples of interactive command-line user experience?

news.ycombinator.com

61–70 of 83 posts

Re: Ask HN: Good examples of interactive command-line user experience?

#61
post #6

git

Sad to see this in the grey. Git is unintuitive to those who don't understand it. If you read about its internals and learn how it works, the command line gets much better. It's well documented and it gives you a whole lot of power and insight into the inner workings of the VCS. Things like launching your editor to do more complex commands, plugging a script into git bisect, these are all great design choices.

I personally think mercurial (hg) is much more intuitive than git. Even for use with git, via hg-git[1].

Can't quite put my finger on it, but some subtle differences seem to nudge the user towards more usable workflows than bare git.

[1] https://hg-git.github.io/

Re: Ask HN: Good examples of interactive command-line user experience?

#62

The first tool that came to mind for me was htop [0] with ncurses. It's a friendly alternative to top. I've previously used ncmpcpp [1] without any major complaints, although it's been a few years since then. It's an mpd [2] client written with ncurses. On my personal servers I use goaccess [3] to analyze access logs. I remember being able to pick it up pretty quickly on my first try. Only tangentially related, but y…

Great list! Thanks a bunch.

Re: Ask HN: Good examples of interactive command-line user experience?

#64
The symbolics accept/present system (part of Dynamic Windows). Unfortunately if you haven't used it, all I couldn't find was Gene Ciccarellis' PhD thesis: https://dspace.mit.edu/bitstream/handle/1721.1/6946/AITR-794...

Basically: Lisp supports idempotent type-based printing (print something in a form that can be read back to identify the same object -- basically unremarkable these days; consider python's __repr__ and __string__) as well as human-friendly printing.

The presentation system was remarkable in that when you printed an object it printed in the user-friendly form, but when the text was read back the IO system knew what the object was and so acted as if a machine-readable representation had been printed. It also used the type hierarchy to support mouse action in "ordinary" text, thus if you needed a SHAPE object, the mouse would highlight "Square at 4,4" and "Circle centred at 5,5, radius 7" as if it were #. In fact the "printed" representation need not be textual.

Also BSD4.1 sh is quite good one !:... and ^...^ etc were added.

As a side note, IIRC Emacs started out as Ciccarelli's TECO init file around '75/76 or so.

Re: Ask HN: Good examples of interactive command-line user experience?

#65

It's a terrible idea, but an excellent example of experience: https://github.com/nvbn/thefuck [TL;DR -- typo a command, type 'fuck', will run the command you should have run]

by "terrible idea" you must mean "greatest operator experience of all time and surely no evil could come of this"

Re: Ask HN: Good examples of interactive command-line user experience?

#66
post #32

There was a talk at Pycon 2017 about this [0] that's pretty good. He(amjith) goes through several examples with his favorite being bpython [1] and even covers writing such a thing in python live on stage. [0] https://www.youtube.com/watch?v=hJhZhLg3obk [1] https://bpython-interpreter.org/

click is another package that implements a lot of these things.

http://click.pocoo.org/6/

Re: Ask HN: Good examples of interactive command-line user experience?

#67
post #64

The symbolics accept/present system (part of Dynamic Windows). Unfortunately if you haven't used it, all I couldn't find was Gene Ciccarellis' PhD thesis: https://dspace.mit.edu/bitstream/handle/1721.1/6946/AITR-794... Basically: Lisp supports idempotent type-based printing (print something in a form that can be read back to identify the same object -- basically unremarkable these days; consider python's __repr__ and…

For the modern version of this, see CLIM or McCLIM

Re: Ask HN: Good examples of interactive command-line user experience?

#69
post #20

Earlier quoted context omitted.

Which python libraries do you prefer? Inquirer is def the HTML inputs of the terminal but I got pretty far with it. My use case was Fairly Simple™ though. What other UI components do you think it's lacking?

I like python_prompt_toolkit, though I think the learning curve can be a bit steep. It gives you a ton of flexibility, which I really appreciate, but I have a hard time remembering how all the pieces interact. I hope I don't sound overly critical of people's open source work, because I've used and really appreciate both Inquirer and PPT. Just seems like there's yet to be a canonical library for this problem set.

It'd be really nice to see one in go or something else I could ship around easily w/o needing NPM and node, etc.

I'll give PPT a swing. I haven't used it before. Thanks!

Post reply on HN