Jump to content

Edit History

ym123

ym123

On 4/15/2020 at 5:23 PM, BTGBullseye said:

I see you're one of those CLI purists... A GUI is designed to BE those scripts and one-liners, so you don't have to type them. It's so you can click a button to run that script instead of having to type the script name to run it. You have a fundamental misunderstanding of the entire purpose of the GUI, its functionality, and its capabilities.

Except you can not, I have yet to see a GUI that can be extended in that way, and even if there is, they probably handle composability very very badly.

In a shell you can compose everything very easily, I can use find to list all the files with a specific filetype, and then grep to search for a string in them, and count the number of files that contain that string. This is a very basic example so yes many file managers will be able to do but that's only because it is built into the file manager, but there are many many other features that you may need but are not built into them (or other programs).
Here's a better one, a few days ago I wanted to count how many hours of movies I have downloaded for various reasons, so I just wrote a script that did so in a few minutes.

#!/bin/bash
var=0
echo "Calculating..."
while read -r line
do
	var=$(python -c "print($var + $(ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i "$line"))")
done < <(find . -iname \*.mkv)
printf "%s hours\n" "$(python -c "print($var / 60 / 60)")"


Another example, yesterday I wanted to organize my torrents, so I moved some into another folder using transmission's ui, only to realize the transmission only moved the torrents' content, not the files I had also created in their folders (which makes sense I guess), again the fix was easy, use rsync and shell globbing to automatically sync the two folders and then delete old ones ` for i in *; do rsync -axuv --remove-source-files --progress ~/Drive/"$i"/ "$i"; done`.
Something that would've taken half an hour (~100 torrents) took 3 minutes.
GUIs just can't be composed like that, and those tasks may seem pretty rare, but similar ones come up often enough that GUIs lack of ability to perform them is extremely annoying.
Also, who said that you have to type everything? why not have them bound to keyboard shortcuts and aliases? ? 
Again, I'm not saying CLI is the end all be all interface (try creating a movie or a 3d model with a CLI lol), but it is just that it has a lot of merits that shouldn't be ignored, and that will potentially be lost if linux ever goes "mainstream". 

ym123

ym123

On 4/15/2020 at 5:23 PM, BTGBullseye said:

I see you're one of those CLI purists... A GUI is designed to BE those scripts and one-liners, so you don't have to type them. It's so you can click a button to run that script instead of having to type the script name to run it. You have a fundamental misunderstanding of the entire purpose of the GUI, its functionality, and its capabilities.

Except you can not, I have yet to see a GUI that can be extended in that way, and even if there is, they probably handle composability very very badly.

In a shell you can compose everything very easily, I can use find to list all the files with a specific filetype, and then grep to search for a string in them, and count the number of files that contain that string. This is a very basic example so yes many file managers will be able to do but that's only because it is built in the file manager, but there are many many other features that you may need but are not built into them (or other programs).
Here's a better one, a few days ago I wanted to count how many hours of movies I have downloaded for various reasons, so I just wrote a script that did so in a few minutes.

#!/bin/bash
var=0
echo "Calculating..."
while read -r line
do
	var=$(python -c "print($var + $(ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i "$line"))")
done < <(find . -iname \*.mkv)
printf "%s hours\n" "$(python -c "print($var / 60 / 60)")"


Another example, yesterday I wanted to organize my torrents, so I moved some into another folder using transmission's ui, only to realize the transmission only moved the torrents' content, not the files I had also created in their folders (which makes sense I guess), again the fix was easy, use rsync and shell globbing to automatically sync the two folders and then delete old ones ` for i in *; do rsync -axuv --remove-source-files --progress ~/Drive/"$i"/ "$i"; done`.
Something that would've taken a half an hour (~100 torrents) took 3 minutes.
GUIs just can't be composed like that, and those tasks may seem pretty rare, but similar ones come up often enough that GUIs lack of ability to perform them is extremely annoying.
Also, who said that you have to type everything? why not have them bound to keyboard shortcuts and aliases? ? 
Again, I'm not saying CLI is the end all be all interface (try creating a movie or a 3d model with a CLI lol), but it is just that it has a lot of merits that shouldn't be ignored, and that will potentially be lost if linux ever goes "mainstream". 

×
×
  • Create New...

This website uses cookies, as do most websites since the 90s. By using this site, you consent to cookies. We have to say this or we get in trouble. Learn more.