Live data from Hacker News

Why is the DOS path character "\"? (2005)

web.archive.org

41–50 of 166 posts

Re: Why is the DOS path character "\"? (2005)

#41
post #17

Earlier quoted context omitted.

IOCP! https://en.wikipedia.org/wiki/Input/output_completion_port

You mean like epoll on Linux?

No, like io_uring which Linux got in 2019 and still doesn't cover everything yet (e.g. currently mkdirat() is being added). It also often falls back to a kernel-level thread pool, since many e.g. file systems don't implement async IO.

Re: Why is the DOS path character "\"? (2005)

#43

In addition to its use as a path separator in DOS and Windows, the backslash character itself is also interesting because it is very likely a modern invention, with the first attestation in 1940s (!). Its original use in ASCII (1960s) was for ALGOL operator digraphs `\/` and `/\`. Its early use as the C escape sequence (1970s, replacing `*` in BCPL) suggests that it carried no significant semantics at that time.

While it was included in early character sets it just wasn't used much - largely because the ubiquitous 029 card punch had no \ key (or [] ... one had to learn the multipunches)

Re: Why is the DOS path character "\"? (2005)

#44

Earlier quoted context omitted.

I really look forward to the day NT's source is released. It's a truly fascinating kernel. Imagine somebody building an entire Unix on top of NT! Like WSL, but even beyond.

What special about NT kernel that's not in linux kernel ?

Object based instead of file handles, with capabilities on everything you can do with them.

Since Vista, official support for a C++ subset.

In kernel IPC, namely LPC, to mimic micro-kernels architectures.

Re: Why is the DOS path character "\"? (2005)

#45
post #6

Thanks to Microsoft's recent release of the MS-DOS 2.0 source code, we can now peek under the hood and confirm that Microsoft specifically intended for the DOS 2.0 file APIs to be compatible with Unix. From XENIX.ASM [1], the code that implements the new API: ; ; xenix file calls for MSDOS ; TITLE XENIX - IO system to mimic UNIX And the CONFIG.DOC [2] file discusses the 'AVAILDEV' option which lets the system mimic U…

Well, there is this different timeline in the universe where Microsoft decides to keep selling Xenix instead of focusing on MS-DOS.

Re: Why is the DOS path character "\"? (2005)

#46
post #20
post #7

Earlier quoted context omitted.

I have a feeling that the "-" character for an option is a unix (multics) only thing. It is also worth looking at https://retrocomputing.stackexchange.com/questions/4695/slas... where there is some discussion of the history. Along with https://retrocomputing.stackexchange.com/questions/7030/why-... and https://retrocomputing.stackexchange.com/questions/4686/wher...

From the third link: > (I still think the Multics path seperator looks more natural >etc>bin - too bad Unix diverted here) Looks more natural indeed. In fact it's visually similar to how paths are stylised in some file picker GUIs.

Yeah but imagine having to use Shift for every path separator you type.

Re: Why is the DOS path character "\"? (2005)

#47

In addition to its use as a path separator in DOS and Windows, the backslash character itself is also interesting because it is very likely a modern invention, with the first attestation in 1940s (!). Its original use in ASCII (1960s) was for ALGOL operator digraphs `\/` and `/\`. Its early use as the C escape sequence (1970s, replacing `*` in BCPL) suggests that it carried no significant semantics at that time.

C also has trigraphs, in case your keyboard does not have a \ you can type ??/ instead.

https://en.wikibooks.org/wiki/C_Programming/C_trigraph

Re: Why is the DOS path character "\"? (2005)

#48
post #41

Earlier quoted context omitted.

You mean like epoll on Linux?

No, like io_uring which Linux got in 2019 and still doesn't cover everything yet (e.g. currently mkdirat() is being added). It also often falls back to a kernel-level thread pool, since many e.g. file systems don't implement async IO.

>since many e.g. file systems don't implement async IO

If we're picking on Linux here we should also mention that this issue cannot exist on Windows because it doesn't support anything else besides NTFS and a couple of options dating back to the 18th century or so.

Oh, and WinFS, of course, F being short for future which is like the horizon, or the communism, always out there just a month or two away.

Re: Why is the DOS path character "\"? (2005)

#49
post #16

Earlier quoted context omitted.

Technically deleting a directory is done with the rmdir command. But rm with flags is flexible enough that I've seen very few people use rmdir

rmdir is usefull when you want to remove all empty subdirs, without touching files or directories with files. Just do 'rmdir *' and you're done.

I like using rmdir even for individual directories that I think are empty just so that I don't accidentally delete any files that I did not expect to be there.

Re: Why is the DOS path character "\"? (2005)

#50

Earlier quoted context omitted.

I really look forward to the day NT's source is released. It's a truly fascinating kernel. Imagine somebody building an entire Unix on top of NT! Like WSL, but even beyond.

What special about NT kernel that's not in linux kernel ?

* It is (with a lot of ifs and buts) a microkernel

* it is optimized for integration with third party software from people who don’t have the source, so for instance the driver model is interesting

* the built in configuration system (the registry) and how it’s used throughout

* the (underused) personalities system you can use to show different apis to different binaries

* the security model is much more interesting, while in Linux you have ‘root’ and everything else, on Windows this is much more granular (unfortunately it’s so complex it’s basically impossible to use).

The architecture is really quite interesting, even though Microsoft didn’t make a lot of use of a large part of it.

Post reply on HN