7 ms·
As I've pointed out before, I think this problem didn't exist in 01974, or in CP/M at all, ever; I think CP/M was perfectly capable of creating files named AUX.
by kragen 5y ago
As I've pointed out before, I think this problem didn't exist in 01974, or in CP/M at all, ever; I think CP/M was perfectly capable of creating files named AUX.H, or PRN.H, RDR.H, CON.H, LPR.H, etc. IIRC, even CP/M PIP (which is what actually implemented the special device names) required the colon to indicate that you meant a device. So if you wanted to print FOO.DOC on the printer in CP/M PIP you could say PRN: = FOO.DOC but not PRN = FOO.DOC. You could also, I think, say B: = FOO.DOC to copy FOO.DOC onto drive B:.
The problem was introduced, IIRC, in MS-DOS.
- anonymousiam 5y agoThe various DEC operating systems (RT-11, VMS, etc.) had PIP (Peripheral Interchange Program) which allowed you to copy files to devices (such as a printer). CP/M had PIP, but did not implement the devices in the filesystem, which MS/DOS did. The result of putting specially named files in the operating system was that files were not always files and strange behavior would occur in fringe use cases. The basename (without the extension) had certain reserved names such as CON, PRN, AUX, PTR, PUN, etc. Originally these names always had a trailing colon to identify them as devices, but MS/DOS dropped that. MS/DOS kept the trailing colons for disk drive identification, but not much else. This capability could be used to make a batch files (.BAT) without any editor on the system. One could type: COPY CON RUNME.BAT, and then type in the wanted lines of the batch file. The end-of-file character (^Z 0x1A) was the same on CP/M and DOS, unlike (^D 0x04) on Unix. https://gordonbell.azurewebsites.net/Digital/RT-11%20System%20Users%20Guide%201977.pdf https://gordonbell.azurewebsites.net/Digital/RT-11%20System%...
- dTal 5y ago>files were not always files and strange behavior would occur in fringe use cases. coughs in Unix
- anonymousiam 5y agoTrue, device nodes and other special files exist in Unix, but they are usually contained to special directories.
- cperciva 5y agoYou can create sockets and fifos anywhere. Device nodes are the only special ones which are generally confined to specific locations.
- deleted 5y ago[deleted]
- umanwizard 5y agoI think on BSDs at least you can theoretically put device nodes wherever you want (but there’s no good reason not to put them in /dev where everything expects them to be).
- skissane 5y agoI'm pretty sure on Linux too there is nothing stopping you from putting a device node in any directory either. By convention they live in /dev (or its subdirectories), but there is nothing technically enforcing that convention. (udev assumes they live under /dev. I'm not sure if /dev is hardcoded in udev or configurable. But you don't have to use udev anyway, you can create device nodes manually.)
- yjftsjthsd-h 5y agoYeah, it's just a mknod away provided your filesystem isn't mounted nodev
- tremon 5y agoRunning a service inside a chroot might require some combination of /dev/{null,random,console,log} to be present inside the chroot, and bind-mounting /dev exposes the entire underlying system (raw disk nodes) inside the chroot. So there's actually a good reason for being able to create device nodes outside /dev.
- cperciva 5y ago
- inopinatus 5y agoThe comparison to Unix stumbles because the behaviour of named pipes, Unix-domain sockets, and device special files, in a regular filesystem, is not based on their filename, but on the arguments to mknod(2) at their creation.
- scruffyherder 5y agoIt goes back to version 2 where there was a planned merge of Xenix and dos. You can even get it using the Unix path slashes in the 2.11 source code.
- Stratoscope 5y agoHaving worked with both CP/M and DOS back in the day, I'm pretty sure you are correct. This does bring back fond memories. In the early days of Windows 1.x, the way to get debug/log output was with the OutputDebugString() function. This wrote the output to the AUX device, which would be a serial terminal or printer. I didn't have one of those, but did have the IBM Monochrome display sitting idle while Windows ran on the CGA or EGA display. So I wrote a little DOS driver called AUX.SYS (with source code in AUX.ASM) to redirect AUX output to the Monochrome display. That did not work very well! I couldn't even edit my source file. After a while I figured out the problem and renamed the driver to OX.SYS and OX.ASM for the source. Homophones to the rescue!
- rpeden 5y agoFor what it's worth, OutputDebugString() still exists and works in Windows 10. It just displays the text in the Visual Studio output window, but it's neat how much Windows 1.0 code will work without too much modification on Win10.
- naikrovek 5y agoMicrosoft go to great lengths to do everything possible to make that backwards compatibility happen. only after the last 32-bit version of Windows 10 goes out of support will some of these things begin to get fixed. and even then it will not be a priority.
- deleted 5y ago[deleted]
- ptr 5y agoThis isn't just for backwards compatibility, OutputDebugString is a crucial function and hasn't been replaced with anything afaik. We use it all the time. Why fix something that isn't broken I guess?
- Stratoscope 5y ago
- wyldfire 5y agoHyrum's Law [1]. By the time they figured it out it was too late. Orrrrr maybe they just threw it on the backlog and never thought about it again ;) [1] https://www.hyrumslaw.com/ https://www.hyrumslaw.com/
- amake 5y agoThis is actually mentioned very deep into the thread: https://twitter.com/Foone/status/1058928459462787072?s=20 https://twitter.com/Foone/status/1058928459462787072?s=20
- anothernewdude 5y agoWhat is great is that things like Pypi and NPM all have packages that require the creation of such files, locking out windows from ever mirroring them.
- vbezhenar 5y agoWhy old tech uses UPPERCASE so much?
- dmurray 5y agoThe oldest encodings didn't always have both upper and lower case letters. So you picked one. For reasons of backwards compatibility similar to the one discussed here, DOS and Windows then decided to treat upper and lower case interchangeably in most contexts. FAT is a case-insensitive file system. As for why default to uppercase instead of lower case, I think just a matter of style. Unix and C favour lower case, FORTRAN and COBOL and your keyboard keycaps favour upper case.
- lloeki 5y ago> why default to uppercase probably to make sensible use of limited display abilities of early hardware, fitting characters in 8x8 boxes and making it readable on blurry fat beam glowing green screens quickly becomes a problem with lowercase (size, readability, ascenders, descenders, baseline), whereas uppercase is comparatively easy.
- kragen 5y agoearly hardware didn't have pixels or, except for debugging, screens; it had typebars which slammed bits of type into an inked ribbon and the paper. we're talking about 01930s to 01970s here. the baudot code didn't have separate codepoints for upper and lower case. in point of fact, it didn't have separate codepoints for numbers ('figures') and letters either; it had shift characters called 'figures' and 'letters'. but why uppercase rather than lowercase, you might ask? well, http://wiki.c2.com/?CapitalizingGod http://wiki.c2.com/?CapitalizingGod has the following story, but i don't know if it is correct. We may remember that ancient teletypes, printers, and terminals would bang out their output in all upper case. When this technology was first being standardized, the researchers did usability studies and found that people read lowercase text more easily than uppercase. But management decided to use uppercase instead. The reason? If only lowercase was shown, then there would be no means for CapitalizingGod. anyway, by the time people started putting screens and pixels on computers in the 01960s to 01980s, the uppercase-only tradition was very well established.
- musicale 5y agoFortunately nobody ever tried downloading PRN.JPG