logoalt Hacker News

pcthrowaway • yesterday at 2:53 PM • 4 replies • view on HN

Every time you rely on the current working directory, that's invisible state then. Even without multiple single-letter directories each maintaining their own state.


Replies

SoftTalker • yesterday at 5:48 PM

Same with $PATH and other environment variables. You learn this the hard way with cron. I use full pathnames for everything in a cron script because it's too much work to reason about how the cron environment differs from my normal working environment or even a root shell's normal environment.

taeric • yesterday at 5:08 PM

I think I could be ok with it, as long as I can query it. Preferable if I have a way to directly interact with it that isn't just moving things around; though honestly this is no different than many physical machines. Consider, what does the accelerator pedal do in a car that is not in gear? And consider that changing gears is done on a completely separate input mechanism.

(Really, people don't engage more with physical machines to consider programming. We insist that everything has to be distilled down to symbolic functions. Preferably limited inputs and a single output. If only life was so accommodating.)

➕ show 1 reply
lelanthran • yesterday at 3:11 PM

> Every time you rely on the current working directory, that's invisible state then.

And you think adding to it will improve things?

➕ show 1 reply
Carrok • yesterday at 3:04 PM

My shell displays the current path, how is that invisible?

➕ show 1 reply