|
From: James R. <rey...@bi...> - 2022-02-08 00:44:06
|
I’m glad to hear some people have pull requests. I’m going to put off converting the indentation and instead I’ll work on setting up a testing environment to rapidly test changes. I hope anyone out there with possible patches can submit them all soon. Another choke point change I’d like to make is to move all the source files into a new dir named “src”. I’m aware this will probably be a big change so I likely won’t work on it for a long time, if I do it at all. I guess to finish my indentation discovery, I thought I’d post what I found with various editors. Shows it correct: - - vi - - emacs (I didn’t actually test it) - - nano - - cat - - xedit - - github.com and gitlab.com - - TextEdit (ironic, don’t you think?) Shows it incorrect: - Xcode - BBedit - VSCode - Sublime Text - bat (https://github.com/sharkdp/bat) - micro (https://micro-editor.github.io/) - Textadept - I’m pretty sure all Windows IDE’s I believe this is a historical issue. That is, *almost* everything that didn’t take the Gypsy/Larry Tesler fork in the road, basically Unix CLI stuff, uses 8-space tabs, and everything that took the fork in the road uses 4. Larry Tesler worked on Gypsy in 1975 at Xerox Parc. It was the first GUI word processor and was the first to include cut, copy, and paste as we know it. In contrast, emacs and vi were released in 1976. The ideas in Gypsy basically became the foundation for every GUI text editor we have today. Of course, the ideas in Gypsy didn’t even start to be available to the public until the Macintosh was released in 1984. So emacs and vi were the best editors for a long time and used by probably all developers. I think the fork in the road started when IDE’s became a thing in the 80’s, if I understand history correctly (I was a bit young when this all happened). I’m pretty sure the Windows IDE’s used 4 spaces for tabs. I don’t know what other IDE’s did (MPW, Borland stuff, ISPF, etc), except I believe Larry Tesler had some input into MPW, since he worked at Apple and worked on the Object Pascal that was in the Lisa, which was used to program the first Macintosh apps and was transitioned to the Mac. The exceptions are github.com/gitlab.com and TextEdit. TextEdit actually uses 4-space tabs unless the file ends with “.c”. I think that’s kind of humorous that Xcode uses 4 spaces but TextEdit uses 8. But github.com and gitlab.com show 8-space tabs for every file extension I tried (including .txt). I found this in the css for github: .tab-size[data-tab-size="8"] { -moz-tab-size: 8; tab-size: 8; } So someone made a decision to do it. Anyway, I just looked at a bunch of c source code (https://opensource.apple.com/releases/, the linux kernel, some freebsd code, gcc, httpd, ffmpeg, lua). Most of the files used tabs. Some used 4 spaces. And a few used 2 spaces. But I only found one file that had spaces and tabs in the same line the way the radmind project does, but it wasn’t as systematic as the radmind source files, so it might’ve been a mistake. Anyway, if you still don’t know what I’m talking about, here is what the radmind source files do. To get this: { { { } } } The radmind source does this: Space Space Space Space { Tab { Tab Space Space Space Space { Tab Space Space Space Space } Tab } Space Space Space Space } When you have tabs that are set to 4 spaces, it ends up looking like this. { { { } } } Anyway, I am done talking about this now. James |