Live data from Hacker News

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

devblogs.microsoft.com

91–100 of 102 posts

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

#91

Earlier quoted context omitted.

I use lowercase for my personal environment variables. It works well since most programs only depend on variables in all caps. Hadn't thought of using MY_

Case-sensitivity reduces portability. "Different strokes", I guess. (literally and figuratively!)

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...

> Uppercase and lowercase letters shall retain their unique identities and shall not be folded together.

> The name space of environment variable names containing lowercase letters is reserved for applications.

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

#92
post #32

A great example of a decision that likely received little to no thought from an early developer but that has long legs and will stick around forever.

One table at the core of an S&P500 product I briefly worked on will always be named "attornies" because somehow nobody caught it early on.

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

#93
post #32

A great example of a decision that likely received little to no thought from an early developer but that has long legs and will stick around forever.

One table at the core of an S&P500 product I briefly worked on will always be named "attornies" because somehow nobody caught it early on.

REFERER is forever in the http spec.

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

#94

> These surface vibrations are so minute that they are not critical from a mechanical point of view (unlike e.g. vibrations due to imbalance), but they can cause serious acoustic problems. The reason for this is that when the fan is running, there is a pressure difference between the intake and the outlet side of the fan (lower pressure on the upside of the blades, higher pressure on the downside of the blades). From…

You appear to have commented on the wrong post.

Oh, I apparently did. Oops. Too late to delete.

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

#95
post #86
post #80

Earlier quoted context omitted.

I remember the words "peeking" and "poking", but this may have been specific to basic.

Yes, most Basics had peek and poke commands with which you could read and write specific memory locations. For example - parentheses may or may net be needed, depending on the Basic implementation: X = PEEK( 123 ) would read the byte at memory location 123 and store its value in X. Then POKE( 123, 42 ) would change the byte at 123 to be 42. But these didn't normally have so much to do with patching executables to add…

That unlocked a memory of me seeing my computer lab teacher after class in 5th or 6th grade to ask her about the applications of PEEK and POKE. I’d picked up a copy of the GW-BASIC manual from a used bookstore. She’d never heard of those commands. Ended up promptly locking up one of the school computers by poking random numbers to random addresses.

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

#96

> 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.

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.

the general asceticism, frign (on the board of suckless.org e.v.) setting his mailserver hostname to a nazi bunker, them picking a torch march through the german countryside as a bonding activity instead of literally anything else... yeah. at that point why would one want to bother trying to acquire the taste?

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

#97
post #27

Earlier quoted context omitted.

The line between "configuration" and "modding" is pretty thin. One could say that the difference is whether the developers intended the changes you're making to be possible or not, but what about programs with dedicated modding APIs?

At the time (early to mid 1980s) I think we would say "patching". The Wordstar devs certainly did mean you to do this - the memory locations available were fully documented, and I seem to remember they supplied a small patch utility to incorporate your code into the Wordstar executable.

Some time before that it would have been "painting", when you used conductive paint to patch the microcode on your CCROS (Card Capacitor Read-Only Store) machine.

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

#98
post #49

Earlier quoted context omitted.

Wikipedia says it was created in 1974, so something's definitely off with the time line here.

Intel 8080 was launched in April 1974 and the development system for it, "Intellec 8 Mod 80", was available soon after that. CP/M could be developed only after the launch of the 8080 and the delivery of the development system. In UNIX, the environment variables were added in the Seventh Edition (1979-01), together with the Bourne shell. I do not remember whether any other command interpreters used something equivalen…

See https://www.youtube.com/watch?v=TpHKygZ7OHY

CP/M 1.0 was demoed to Intel in 1974, but they didn't buy it. iCOM FDOS was the first operating system that was available to people, and it sure didn't have environment variables.

Anyway, these operating systems didn't have multiple directories. But you could use CP/M 2.x's ASSIGN command to bind a logical name to a physical name. Minicomputer operating systems had this, also IBM mainframe had JCL DD commands.

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

#99
post #5

> 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…

Not only that, the operating itself was configured by a process known as "sysgen". You relink the entire operating system with options set the way you wanted. It was generally a miserable slow process.

At least on PDP-11 that's how it went for something like RSX-11. I believe same is true for early IBM mainframe operating systems like DOS 360- I think all programs had to be relinked because one option you had was to move things around in memory, and ancillary programs had to know the memory map.

Even later: I wrote a device driver for Xenix: you got a link kit for the OS, you relinked it with your custom driver object file included.

On CP/M you patched the running image (perhaps with DDT), then use the CP/M SYSGEN command to install it on a disk.

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

#100

Earlier quoted context omitted.

Ohh acquired taste it is.. I had two stints with suckless software. First, when i was in early twenties when I had a lot of time in the world, and thought the manliest way to talk to a machine is all through low level C code. Had a whole flow to patch it and heck the code is so well written and commented, i was able to understand it. Then, i guess life happened and i discovered more interesting stuff to spend time on…

> I don’t want to patch it manually or solve merge conflicts I wonder, is this really such a big problem? How often do people add patches or change their config? I've configured my st once and haven't touched that build for years. I use only few patches like scrollback, custom colortheme and a "plumb" for few scripts. I've also had an opportunity recently, to try a "modern" and trendy terminal and I can't see myself…

Not frequently, however in experimental phase where you need to debug if any specific combination of patch is causing issues, it helps a lot. For instance, I had issues with my delete key not working even with delkey patch and then after trying to enable patches incrementally I zeroed in on the fixkeyboardinput patch. Sure I can do this in a VCS flow but, it feels magical what a bunch of ifdef’s simplify the process to. And I feel it is still suckless philosophy since the code still compiles to exactly what you need.

Additionally, it helps lower the barrier to entry for a lot of people, who would have shied away from the manual patching flow. You’d be surprised how often i have seen people squint with default xterm on our servers, not knowing how to configure it and messing around with xrdb. (Which takes a while to propagate across LSF clusters). With flexipatch it feels easier to introduce it to them since I just say run make after any config changes to apply the setting and restart the terminal emulator.

Ohh i tried wezterm and ghostty. Couldn’t get them working using just software rendering. And once st worked, I realized I don’t need it tbh.

Post reply on HN