nixers
A capital 'i' - Printable Version
+- nixers (https://nixers.net)
+-- Forum: General (https://nixers.net/Forum-General)
+--- Forum: Community & Forums Related Discussions (https://nixers.net/Forum-Community-Forums-Related-Discussions)
+--- Thread: A capital 'i' (/Thread-A-capital-i)


A capital 'i' - Igrom - 17-03-2019

Online handles are, from my experience, for life*. Regrettably, mine was chosen before embarking on my computer adventures, and so it begins with a capital letter. I half expect to stick out like a sore thumb here.

I have reached this forum through xeno's private website. I do not, however, remember how I ended up there. I would like to say hello to every active user on the website and hail any past greats.

I am a software engineer living in Zürich. After several adolescent infatuations (teenage love never ends well) with Linux distributions, I settled on packing my data bags and moving away from an unimpressive Windows 10 OEM installation to use Linux full-time. I have since become quite productive (objectively, per keystroke :)) and unspeakably happy about the facilities for creating a keyboard-centric workflow.

Much has been said about the virtual terminal and the shell. Personally, I find it indispensable and a cornerstone of successful and creative work on a computer. There are many tools within the kaleidoscope of Linux software worth their mention, but the fundamentals such as sed, grep, find, (m)locate and (n)vim, included with most distributions and adequately introduced in books such as Unix Power Tools gather every bit of lasting praise they deserve. At the same time, I cheer on the curious and zealous who sweat to bring modern alternatives with competing functionality, such as rg, to the table.

I am no operating system zealot, but surely an ardent enthusiast of one (Linux). The promised fruits of the UNIX philosophy are bestowed upon me daily. I have aliases, functions and scripts which solve genuine problems I encounter. I can use the pipe to join programs and the impression of sheer power it makes on me hardly ever disperses.

I work on a Thinkpad X1 Yoga 3rd [2018] and also have an HP Spectre X360 [2017].

As a welcoming gift, I humbly offer the recently written SEGA Plymouth theme generator found at https://github.com/Igrom/plymouth-theme-sega.

Best regards,
Igrom

*Curiously enough, I have met many a video game player who changed them almost weekly...


RE: A capital 'i' - venam - 18-03-2019

Welcome to nixers Igrom.
You seem like an open minded person curious about the world.

(17-03-2019, 07:53 PM)Igrom Wrote: Much has been said about the virtual terminal and the shell. Personally, I find it indispensable and a cornerstone of successful and creative work on a computer.

This may be a thread on its own because we haven't discussed this yet on the forums but:
What are, in your opinion, the advantages or learning the terminal interface when it comes to computing.

For me it's about tackling the ingrained mysticism about interfaces and what should be. In sum, erasing expectations and opening the world of possibilities.

NB: I love your writing style.


RE: A capital 'i' - jkl - 18-03-2019

Welcome to nixers. I'm curious why people who enjoy the "fruits of the UNIX philosophy" always get stranded with the "anti-UNIX" Linux. But at least it is a valid first step into a bright future.


RE: A capital 'i' - Igrom - 18-03-2019

(18-03-2019, 01:56 AM)venam Wrote: Welcome to nixers Igrom.
(17-03-2019, 07:53 PM)Igrom Wrote: Much has been said about the virtual terminal and the shell. Personally, I find it indispensable and a cornerstone of successful and creative work on a computer.

This may be a thread on its own because we haven't discussed this yet on the forums but:
What are, in your opinion, the advantages or learning the terminal interface when it comes to computing.

For me it's about tackling the ingrained mysticism about interfaces and what should be. In sum, erasing expectations and opening the world of possibilities.

Hi venam.

Modularity and composability have been named as desirable traits in mechanical, hardware and software engineering. In software, patterns satisfying these principles can be observed in the OSI model, in my bootstrapping procedure (thanks, podcast*) and in userspace code --- hopefully, the one I write, too...

Why have them? It cuts down on cost. For a company, that's time and money. For me, it is my time, potentially my money (salary/second * time if it's during working hours) and, for the me with finite curiousness and attention span, the likelihood of following through with the side project and not quitting in a fatigued humour. It is real cost with real consequences.

I don't know of any mechanism for composing GUI applications with little expended effort. In many cases, Quite often I was interested in an intermediate state of my data that I could not output.

Before switching to Linux, I tried to conceive a shared standard for composing GUI applications. In its design, an application would typically resemble the back of a rack of audio hardware: with jack sockets next to each logical, visually grouped block of functionality. By clicking and dragging the left mouse button from a jack to another --- even to a different application --- I would be able to tee the output elsewhere. I would also be able to click the jack to e.g., set a breakpoint to inspect and manipulate the data in an editor.

The bulk of what I described are pipelines (and it's difficult to find a more graphic synonym than 'tee').

Another point against GUI is that the design of a particular task's execution --- such as trimming a video --- is an iterative process that they not always faciliate. Just yesterday I was writing a README.md file for the `plymouth-theme-sega` repository and opted to include in it an animated preview of the theme.

To generate the .gif, I ran the following commands in the terminal:

Code:
ffmpeg -framerate 25 -f x11grab -i :0 output.mp4 # notice the video is not full-screen
xrandr # look up the output of xrandr
xrandr | grep -P '(?<=current )[^,]+' -o | tr -d ' ' # look up my screen resolution
ffmpeg -video_size $(xrandr | grep -P '(?<=current )[^,]+' -o | tr -d ' ') -framerate 25 -f x11grab -i :0 output.mp4 # successfully record screen session

ffplay output.mp4 # notice that the video needs to be trimmed. Jump to the segment of interest and note the approximate timestamp in the console output
while :; do read; ffmpeg -i short.mp4 -ss 00:00:$REPLY out.mp4; ffplay out.mp4; done # iteratively trim the video according to my second and microsecond guesses. Check visually

ffmpeg -y -i out.mp4 \
-vf fps=25,scale=640:360:flags=lanczos,palettegen palette.png && \
ffmpeg -i out.mp4 -i palette.png -filter_complex \
"fps=25,scale=640:360:flags=lanczos[x];[x][1:v]paletteuse" output.gif && browse plymouth-theme-sega.gif # taken from StackOverflow

vim README.md
git add README.md examples/plymouth-theme-sega.gif
git commit --amend && git push --force

At this point, I refreshed the project's GitHub page to see that I had misspelled the project's name when configuring the Plymouth theme and have thus recorded a video of 'plymouth-theme*s*-sega' instead of 'plymouth-theme-sega'. I corrected the Makefile but would have to recreate the .gif.

Individually, each task could have been served by a graphical application, but then I would not have been able to repeat my input. In the terminal, I pressed the Up arrow to highlight the previous commands and run them. That Up arrow is that killer feature that graphical applications do not replicate --- and another reason for working in the terminal.

Lastly, both screen recording and subsequent video trimming, as well as amending and force pushing the top commit landed as aliases in my .rc file. That, too, I cannot readily get in a graphical application.

Sometimes I don't care for repeatability or the graphical application supports it. And sometimes, tabbing over fields and buttons is quicker than typing out a complicated command. For example, I would not use `curl` over Postman for anything complex.

*I enjoy your podcast and recommended it to a relative --- a newcomer who has just started work as helpdesk for CentOS users.


RE: A capital 'i' - Igrom - 18-03-2019

(18-03-2019, 06:47 AM)jkl Wrote: Welcome to nixers. I'm curious why people who enjoy the "fruits of the UNIX philosophy" always get stranded with the "anti-UNIX" Linux. But at least it is a valid first step into a bright future.

Hi jkl.

The Linux community supplies me with device drivers, desktop environments, software --- choice and, most importantly, sane, working-out-of-the-box defaults in each category, as well as general troubleshooting by virtue of critical mass.*
Furthermore, the experience gained through using Linux on my personal computer can be applied to the Linux virtual machines I encounter at work.

*The argument can be extended to show why I picked Ubuntu as my first distribution... I've been going for several years on it now.

Some of the above, if not all, may be available on non-Linux UNIX-like systems. In your opinion, what will I gain by switching to something else --- and which alternatives do you favour?

I am not knowledgeable about other operating systems. If I am stranded, what is outside of my reach that I may not know about?


RE: A capital 'i' - jkl - 18-03-2019

"Device drivers" are mostly coming from Linux to UNIX via FreeBSD rather quickly. Regarding software and desktop environments, I wouldn't know which of those (except systemd which you really shouldn't use anyway) was exclusive to Linux. Depending on your "workflow", the answer to better alternatives may vary. All systems have a different set of applications available.

(18-03-2019, 11:27 AM)Igrom Wrote: In your opinion, what will I gain by switching to something else

The fruits of the UNIX philosophy, not the wannabe-Windowsyness (I just made that word up) of the GNU/Linux community, gradually replacing "one tool for one purpose" by "let's just have one tool that does everything", like systemd (a giant piece of garbage which absorbs most of the core system daemons) and GNU Emacs (a Lisp Machine emulator that comes with an editor module, a mail client, several games, a terminal emulator - and can even be used as a window manager today).

(18-03-2019, 11:27 AM)Igrom Wrote: and which alternatives do you favour?

Honestly, it depends.
  • The true UNIX philosophy lives on in Plan 9, UNIX's original successor, and its modern distribution 9front. It won't work as a good daily driver though: no "modern" web browser is available for it (yet?).
  • illumos (a continuation of OpenSolaris) is the only true free System V UNIX. I use its distribution OmniOS on one of my servers and I'm quite happy with it. OpenIndiana happens to be a decent desktop distribution, although it has its very own weirdnesses (and a unreliable website). On any illumos distribution you have access to large parts of the pkgsrc software repository as well.
  • OpenBSD, a derivative of the BSD operating system, is a fine daily driver for laptops. You might want to try it.

Linux is a very disappointing environment in many, many ways. Admittedly, sometimes it is your best choice - not for gaming (although it is much better than OpenBSD for that, it still is way behind Windows), but e.g. for closed source drivers. I own, among others, a Gentoo Linux machine (switched from Void a while ago) - the ath10k WiFi firmware is not available on UNIX/BSD just yet.

(18-03-2019, 11:27 AM)Igrom Wrote: what is outside of my reach that I may not know about?

A well-thought operating system where the kernel and the userland were actually made by the same people.


RE: A capital 'i' - Igrom - 18-03-2019

Note: I posted the record-and-trim script in https://nixers.net/showthread.php?tid=1743&pid=20010#pid20010.


RE: A capital 'i' - Igrom - 18-03-2019

@jkl: thank you very much for the list. I'll look into the distributions.

(18-03-2019, 11:52 AM)jkl Wrote:
(18-03-2019, 11:27 AM)Igrom Wrote: In your opinion, what will I gain by switching to something else

The fruits of the UNIX philosophy

I understand your complaint about bloat in systemd and imagine that, for advanced, lower-level system tinkerers that bloat is synonymous with a lack of modularity and (re)composability.

At the same time, I have heard complaints about extraneous switches in core tools (cat -v considered harmful). My impression is that this redundancy, while not necessary compatible with the UNIX philosophy, does not impair the application of the two above principles of modularity and composability. Within the option bloat in cat, for example, there continues to exist a tool that does one thing and one thing well: `cat` with no options. By using this subset, it seems to me that I can have that elusive fruit without moving to a different system.

Or is there a different fruit that I am ignorant of? Do you have in mind an anecdote where that other operating system enabled you to do more than you could have readily done on Linux? I'm okay with moving away from Linux if I am constrained by it.

When you are disappointed in Linux, is it because of superior theoretical possibilities on other operating systems, historic difficulties with realizing tasks on Linux, or both?

I recognize the choice of some to champion free software on their machine. I consider free superior, but am myself okay with using a proprietary piece of code if I cannot work around it.


RE: A capital 'i' - jkl - 18-03-2019

(18-03-2019, 12:44 PM)Igrom Wrote: I understand your complaint about bloat in systemd and imagine that, for advanced, lower-level system tinkerers that bloat is synonymous with a lack of modularity and (re)composability.

... while computer novices are basically doomed to have a system with random start/stop errors and generally weird behavior in strange corners of the system - and they don't even have the choice to replace the erroneous parts of the system anymore. Or is there a Ubuntu version with runit instead of systemd?

But systemd was only one example for the hostility towards the UNIX philosophy. I thought you liked it as well, so I was wondering why you chose Linux instead.

(18-03-2019, 12:44 PM)Igrom Wrote: At the same time, I have heard complaints about extraneous switches in core tools (cat -v considered harmful).

My favorite comparison is the true command: It had a size of 0 bytes on UNIX (it basically spawned a shell and returned a success doing so), it has 80 lines in today's GNU system and even includes the false command. And a --version parameter (if "true" ever will be changed to "quux" or something?). And a --help parameter (if you don't know how to use true ... sane operating systems have manpages for that, just saying).

(18-03-2019, 12:44 PM)Igrom Wrote: By using this subset, it seems to me that I can have that elusive fruit without moving to a different system.

It is not a proper subset. GNU sed's -i parameter behaves very differently from (e.g.) macOS sed's. Which one does the right thing? Do you know without looking up the manual? Which one would you target if you write shell scripts for a living and why?

(18-03-2019, 12:44 PM)Igrom Wrote: Do you have in mind an anecdote where that other operating system enabled you to do more than you could have readily done on Linux?

FreeBSD gave me native ZFS (also available on illumos, of course).

(18-03-2019, 12:44 PM)Igrom Wrote: I'm okay with moving away from Linux if I am constrained by it.

I can't decide for you if Linux constrains you. If it does what you want it to, there is no much reason to move on. The grass is always greener on the other side though.

(18-03-2019, 12:44 PM)Igrom Wrote: When you are disappointed in Linux, is it because of superior theoretical possibilities on other operating systems, historic difficulties with realizing tasks on Linux, or both?

The childish community annoys me (as if "it's not Windows" was enough reason to choose an operating system...), the init wars (systemd vs. runit vs. SysV init vs. whatever) are the new editor wars and just as destructive, the license does not cater my taste and the slowly increasing influence of anti-male feminists shows that they probably don't even want me as a user. (I left FreeBSD for the same reason though. If you're curious, browse the 2018 web about "code of conduct"s.) The atrocities of the GNU "ecosystem" which implicitly promotes itself as anti-POSIX are only the icing on the cake to me.

(18-03-2019, 12:44 PM)Igrom Wrote: I consider free superior, but am myself okay with using a proprietary piece of code if I cannot work around it.

A computer is a tool. I haven't really studied the source code of any of my daily applications in years - because why would I want to?


RE: A capital 'i' - xero - 18-03-2019

Quote:welcome to nixers



RE: A capital 'i' - pkal - 18-03-2019

(17-03-2019, 07:53 PM)Igrom Wrote: Online handles are, from my experience, for life*. Regrettably, mine was chosen before embarking on my computer adventures, and so it begins with a capital letter. I half expect to stick out like a sore thumb here.

I don't know, I've changed mine over the years a few times... But this-or-that-way welcome!

(18-03-2019, 01:04 PM)jkl Wrote: My favorite comparison is the true command: It had a size of 0 bytes on UNIX (it basically spawned a shell and returned a success doing so), it has 80 lines in today's GNU system and even includes the false command. And a --version parameter (if "true" ever will be changed to "quux" or something?). And a --help parameter (if you don't know how to use true ... sane operating systems have manpages for that, just saying).

Then again, do you really want to spawn a shell and everything it brings with it just to write 0 to a specific place in memory? Try it yourself, if you want to: amusing ./true is an empty file, how much longer does
Code:
time for x in {1..1000}; do ./true; done
need than
Code:
time for x in {1..1000}; do true; done
? On my system GNU's version is ~600 times faster? And considering that true is used a lot if shell scripts, I really can't complain.

Also, looking at false you see that the code has been written to be reused.

Regarding at the 80 lines accusation, one just has to accept that the GNU project values consistency (all coreutilities accept a minimum of flags) over strict minimalism. I respect and prefer that. If the GNU version was actually hard to read or understand, I'd maybe say something else, but I don't think that's the case. And if it still annoys you, just place some other version in your path before GNU's.

(18-03-2019, 01:04 PM)jkl Wrote: A computer is a tool. I haven't really studied the source code of any of my daily applications in years - because why would I want to?

Besides there being a lot to learn, it's not only study, but the ability to actively engage yourself (for personal as well as social sake) and improve or specialise existing tools. That's the funny thing with computers after all, they're "tools" with "tools". Being able to choose one requires the same freedom in the other.

I also wasn't convinced of this until I started spending time with Emacs, and experiencing first hand what software freedom can mean, under the right circumstances.


RE: A capital 'i' - jkl - 18-03-2019

(18-03-2019, 09:23 PM)zge Wrote: Then again, do you really want to spawn a shell and everything it brings with it just to write 0 to a specific place in memory? Try it yourself, if you want to: amusing ./true is an empty file, how much longer does
Code:
time for x in {1..1000}; do ./true; done
need than
Code:
time for x in {1..1000}; do true; done
? On my system GNU's version is ~600 times faster?

Even if that mattered (does it even on a PDP-11?), the GNU version is still the worst version of true you might want to use. The Busybox version behind one of your links is probably (technically) the best version of those, but running a pure Busybox/Linux distribution is an acquired taste as well, and you'd still need a good part of other userland utilities.

(18-03-2019, 09:23 PM)zge Wrote: Regarding at the 80 lines accusation, one just has to accept that the GNU project values consistency (all coreutilities accept a minimum of flags) over strict minimalism.

I both respect and avoid that wherever I can if there are better* alternatives available. Non-minimalist utilities are usually much more error-prone than their sane counterparts. I understand that nobody is perfect, but our new fellow explicitly preferred the UNIX way, so it might be a good idea to not start this journey with neglecting POSIX values.

* I have mentioned in the past that I consider GNU Emacs a rather good programming environment. I still think so.

(18-03-2019, 09:23 PM)zge Wrote: Besides there being a lot to learn, it's not only study, but the ability to actively engage yourself (for personal as well as social sake) and improve or specialise existing tools.

I rarely find existing tools sufficiently lacking, but most of the few tools which I wrote to solve my own problems were written from scratch instead of working around historically grown code weirdnesses. Of course, to each their own. If I ever find myself digging through my environment's source code to hunt for bugs or add any features desperately needed, I might as well replace it by better alternatives.


RE: A capital 'i' - venam - 19-03-2019

This thread has quickly moved to the Unix philosophy arguments.
Please post your replies to this topic in appropriate threads such as those:
https://nixers.net/showthread.php?tid=1985 or https://nixers.net/showthread.php?tid=1996


RE: A capital 'i' - z3bra - 19-03-2019

Welcome to nixers Igrom! And congratz on having jkl express and details his aversion about Linux rather than simply trolling "Linux is no unix tho" as the traditional welcome message :P
You'll certainly learn lot of things there, and it is always good to get new people with fresh ideas onboard!

Don't hesitate to dig out old threads and give your opinion ;)


RE: A capital 'i' - jkl - 20-03-2019

I'm constantly trying to improve myself. ;-)