HN.zip

Why are there both TMP and TEMP environment variables? (2015)

32 points by ankitg12 - 12 comments
Semaphor [3 hidden]5 mins ago
> My recollection is that most CP/M programs were configured via patching. At least that’s how I configured them. I remember my WordStar manual coming with details about which bytes to patch to do what. There was also a few dozen bytes of patch space set aside for you to write your own subroutines, in case you needed to add custom support for your printer.

Huh. That is interesting, it was before my time, and I never heard of this :D

zabzonk [3 hidden]5 mins ago
Yes, it was definitely a thing. The patching code had to be in Z80/8080 machine code. I wrote higher performance keyboard and display routines for my copy of Wordstar using this feature.
xg15 [3 hidden]5 mins ago
I didn't know it was such a chaos.

So I guess the moral of the story is: Ensure they always point to the same path, or else...

QuantumNomad_ [3 hidden]5 mins ago
> My recollection is that most CP/M programs were configured via patching.

I honestly would have liked that better for a lot of programs than the dotfiles they litter all over my home directory.

fredoralive [3 hidden]5 mins ago
Part of the philosophy of the slightly odd suckless people is their projects are mostly configured by changing the source code and recompiling. This is I suppose a similar approach in a modern open source vein. Although their general asceticism makes their projects a bit of an acquired taste I suspect.
ozlikethewizard [3 hidden]5 mins ago
Yea this is something I'd love to see standardised, a distro that was able to enforce a .config folder somehow would be a winner for me. Think weve probably missed the boat though.
9dev [3 hidden]5 mins ago
As these things go, there obviously is a standard for this called the XDG Base Directory Specification[0], which elegantly solves almost all configuration path needs—and has been ignored, violated, or only partially implemented, since forever.

[0]: https://specifications.freedesktop.org/basedir/latest/

Jedd [3 hidden]5 mins ago
1995-ish. Telstra (Australia Telecom). Probably about 50k desktop computers across the organisation. One day a small file turned up in everyone's network home directory called null. A *nix person had evidently had a go at writing a .bat file.

Why do we need to adopt extant standards? (I was going to ask, why standardise? But realised that might confound the North Americans. : )

lelanthran [3 hidden]5 mins ago
>One day a small file turned up in everyone's network home directory called null. A *nix person had evidently had a go at writing a .bat file

I assume that they first tried /dev/null which failed, so then moved onto just plain null?

Otherwise it would not make sense that a unix programmer did this. More likely ula dos programmer misspelled NUL as null.

3form [3 hidden]5 mins ago
Unix programmer remembered that in there's no /dev/null in DOS and that it's something shorter, and tried null which worked. Didn't check the directory contents afterwards. So basically your first sentence - doesn't seem at all unlikely to me. (I mean, I think it happened to me at least once too)
jtoledo [3 hidden]5 mins ago
I've already created a 'NULL' file, but it was not a Unix thing... It was just because I got confused if it was NULL as in the programming languages I usually use.
NSPG911 [3 hidden]5 mins ago
always shove it to `%LOCALAPPDATA%/Temp`, or `~/AppData/Local/Temp`, and don't think otherwise