i am constantly surpurrised by the things people don’t know about how unix-like systems work

today @wallhackio learned that both sides in a pipeline run in parallel*. who the fuck expects them to opurrate in sequence?? maybe normal people i guess. (not that bumby is remotely normal but)

* purrocess scheduling is extremely more complicated than that, i know

i was complaining about how i once helped my ex write a script in fish and got snagged by fish running pipelines synchronously and did not even remotely expect that bumby would just expect a shell to work that way in the furst place

@aescling But why would you want a pipeline to run synchronously?

@aescling If I understood correctly what "synchronously" means, that it first waits for the left side of the pipe to run, soaks up all its inputs, and only then starts the right side, that sounds horrible... Imagine if you do cat enormous-file.txt | grep some-string, it'd have to try to soak up all contents of enormous-file.txt and run out of memory instead of actually grepping like it's supposed to!

Admittedly, that cat is unnecessary and a bad habit on my side, you could just do < enormous-file.txt grep some-string, but it's hard to get rid of that habit, and in a normal shell, it doesn't really matter...

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.