Live data from Hacker News

Show HN: Promptui – Rich UI elements for cli prompts in Go

github.com

21–30 of 47 posts

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#21
post #3

I like this. Do similar projects exist for other languages?

While not quite the same, the REPL of the Julia programming language supports modes as plugins. Out of the box there is the Julia mode for writing julia code, shell mode for shell commands and help mode for getting help on functions. But I've seen lots of interesting ways of extending this.

E.g. one of the debuggers for Julia, Gallium simply adds some new modes. So you can be in stepping-through-code-mode and then at any time switch back to Julia mode and inspect variables at that point in the execution stack.

Another mode is a package mode being developed for the new Julia package manager. So when adding, removing, updating, creating etc packages you can go into package mode and get behavior relevant to working with packages.

I had the idea of creating a mode for a board game, e.g. a Settlers of Catan mode, which is focused on issuing commands relevant to that game.

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#22

I've been dreaming with a sci-fi world where at some point the web get's so awful, that a small group splits to an alternate hypertext reality that is only text based.

I dunno. I have little problem with images etc. The problem i have is the attempts to "app-ify" by turning every site into a GUI via JS.

The initial idea of the web as a source of linked static documents were fine. Heck, even early CGI sites may have been fine. It was AJAX(?) that brought the madness.

And btw, late gen terminals from DEC could show images (and perhaps even videos by abusing the protocol).

https://en.wikipedia.org/wiki/Sixel

https://saitoha.github.io/libsixel/

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#23
post #15

I've been dreaming with a sci-fi world where at some point the web get's so awful, that a small group splits to an alternate hypertext reality that is only text based.

Some people keep Gopher alive, apparently -- so maybe that's where survivors will take refuge after the JavaScript ad tracking apocalypse finally comes.

Not sure if gopher is the right fit.

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#24
post #5
post #3

I like this. Do similar projects exist for other languages?

I'd be interested in something like this for python

prompt_toolkit is, IMO, the standard by which all of these types of libraries should be measured.

It's incredibly easy to get started with, and lets you build crazy wonderful things like pt_python and pgcli/mycli.

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#25
post #15

Earlier quoted context omitted.

Some people keep Gopher alive, apparently -- so maybe that's where survivors will take refuge after the JavaScript ad tracking apocalypse finally comes.

Not sure if gopher is the right fit.

In the post-JavaScript apocalyptic nightmare, the few remaining working terminals will be green-on-black CRTs with nuclear launch instructions burned in the screens. Gopher is a good fit.

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#26
post #15

I've been dreaming with a sci-fi world where at some point the web get's so awful, that a small group splits to an alternate hypertext reality that is only text based.

Some people keep Gopher alive, apparently -- so maybe that's where survivors will take refuge after the JavaScript ad tracking apocalypse finally comes.

> Some people keep Gopher alive, apparently -- so maybe that's where survivors will take refuge...

Maybe just links[0]/elinks[1]/lynx[2]...

[0] https://en.wikipedia.org/wiki/Links_(web_browser)

[1] https://en.wikipedia.org/wiki/ELinks

[2] https://en.wikipedia.org/wiki/Lynx_(web_browser)

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#27

I've been dreaming with a sci-fi world where at some point the web get's so awful, that a small group splits to an alternate hypertext reality that is only text based.

>alternate hypertext reality that is only text based

Except the text is aligned vertically and the terminal scrolls horizontally.

You've just logged into... the Twilight Zone.

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#28
post #3

I like this. Do similar projects exist for other languages?

I feel the need to mention "newt" [0][1] here.

It's the C library behind whiptail, a reimplementation of dialog, which is a cli app for making menus. Incidentally, dialog is usually what you see when you get a semi-gui install with many Linux distributions.

Being C, you can use it with just about everything.

[0] https://en.wikipedia.org/wiki/Newt_%28programming_library%29

[1] https://pagure.io/newt

Re: Show HN: Promptui – Rich UI elements for cli prompts in Go

#29
post #5

Earlier quoted context omitted.

I'd be interested in something like this for python

prompt_toolkit is, IMO, the standard by which all of these types of libraries should be measured. It's incredibly easy to get started with, and lets you build crazy wonderful things like pt_python and pgcli/mycli.

For REPL like things prompt_toolkit is great. For anything else (menus, forms) i find it difficult to use or at least discouraging.
Post reply on HN