Live data from Hacker News

Modernize your Bash Scripts by adding GUI

medium.com

21–30 of 72 posts

Re: Modernize your Bash Scripts by adding GUI

#21
Ok, so I guess since here is HN, everyone is going to say... "Why would you 'modernize' your bash scripts? Isn't the point of scripts to avoid the GUI altogether? GUIs are inefficient, blah blah blah...". And there is a bit of truth in that, but that's not the whole story. (And since I guess I'll be downvoted heavily, I would suggest you to read this block of text before you do.)

This blog post is basically about using GUI inputs to get user input. Which means it's an interactive script, and the direct non-GUI equivalent is a TUI. Which means the script is not something that you will be automating for, but more just of a convenient interactive tool.

And by definition TUIs are an inferior version of a GUI, for example it usually won't handle terminal size changes, localization, etc... So it makes plenty of sense to make that a GUI for the sake of having a better input. (And I won't call that 'modernization', but it's a better option than presenting a calendar UI from your bash script or having me input a unix timestamp or something else.)

So then you might say that hey the command line equivalent of that GUI input is flags, not interactive input, but well you can make a CLI that gets it's parameters from flags and gracefully fallback to interactive input if you don't have sufficient information.

(And no, TUIs are not more efficient than GUIs. CLIs might be, because of shell piping and it's automation techniques. But TUIs are inferior, full stop.)

Re: Modernize your Bash Scripts by adding GUI

#22
post #14

Earlier quoted context omitted.

Too heavy? The executable I just built is 19K. I like it for localhost. Did you wind up picking something else?

Sorry for my poor choice of words. What I wanted to say was that I prefer using software that does exactly what I need and nothing else. For some people it might sound silly, but I enjoy the suckless philosophy.

I use notifications only for things that take a long time so I can disengage work on something else for a while.

"long build has completed"

is pretty much my primary notification.

Re: Modernize your Bash Scripts by adding GUI

#23

"Tired of displaying raw text on Console?" Nope. I am a scripter. I will never get tired of raw text, but I sure get tired of GUIs, fast. If the author had pitched this as a way to make the scripter's scripts accessible to others who do not understand scripts, I would have a different response.

I feel like notifications would be the only thing on that list I could see myself using. I know you can make the terminal make a noise, but I sometimes prefer visual alerts.

Re: Modernize your Bash Scripts by adding GUI

#25

"Tired of displaying raw text on Console?" Nope. I am a scripter. I will never get tired of raw text, but I sure get tired of GUIs, fast. If the author had pitched this as a way to make the scripter's scripts accessible to others who do not understand scripts, I would have a different response.

Last sentence of the first paragraph "But if it is used by a general audience it is obviously good to have some user friendly interactions."

I stopped reading after the sentence I quoted. If he had led with a title like "Tired of GUIs...", then I would have kept reading.

It's the pitch I am commenting on, not the software. I want more "raw text", not less.

Re: Modernize your Bash Scripts by adding GUI

#26
As a terminal user, nearly all the time, I'm mostly inside the terminal so they don't make as much sense to me.

However I'm not _always_ a terminal user. Sometimes I'm a browser user and sometimes I have to use spreadsheets too.

In these contexts I use other programs which have GUI's, sometimes quite minimal, like a screenshot app for example.

I can certainly imagine getting a spreadsheet into a defined set of columns and then executing another app which asks a set of questions and then does something with that data, maybe even only draws a graph (as I despize drawing graphs in spreadsheets).

In this context, I feel that I may well write BASH, but opening a terminal would be as jarring as leaving it under normal circumstances...

So I feel these kind of tools are useful.

Shameless plug: Funnily I'm working on the opposite. Integrating STDIN/STDOUT into the GUI via a WebView, because I want that command line control but I there are occasions where there are benefits in using a GUI (graphs etc) - https://github.com/forbesmyester/wv-linewise

Re: Modernize your Bash Scripts by adding GUI

#28
post #24

Can’t read the article, guess I’m out of free reads this month/week. I wish there was some kind of rule against posting medium.com links on HN. That would incentivise people to use some other tools, for example dev.to or personal blogs.

Just go incognito in the meantime..

Re: Modernize your Bash Scripts by adding GUI

#29

"Tired of displaying raw text on Console?" Nope. I am a scripter. I will never get tired of raw text, but I sure get tired of GUIs, fast. If the author had pitched this as a way to make the scripter's scripts accessible to others who do not understand scripts, I would have a different response.

I feel like notifications would be the only thing on that list I could see myself using. I know you can make the terminal make a noise, but I sometimes prefer visual alerts.

./dosomething && mail user -s job done

Re: Modernize your Bash Scripts by adding GUI

#30

Scripts are useful, even to the non-technical. Easily adding some GUI to a user-facing script is a good thing.

Agreed. While most people on this website would probably not use it, this can only expand the use of bash scripts to the general public, and encourage the next generation to get interested in them.

That runs the risk of family techies being condemned to debugging bash scripts when they're inevitably less portable and we'll tested than one would hope.

Please, show some humanity: think of the techies.

Post reply on HN