3 ms·
In Linux if I want to create a file I call err = open("/path/to/the/file/I/want/to/make", "rw"); In Windows if I want to create a file I call
by valarauca1 12y ago
In Linux if I want to create a file I call
err = open("/path/to/the/file/I/want/to/make", "rw");
In Windows if I want to create a file I call
err = CreateFile(TEXT("input.txt"), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
:.:.:
In Linux if I want to fork a process to create a sub-process I call
err = fork();
err = exec(a.out);
//now two instances of a.out are running!
In windows
bRet = CreateProcess ("myapp.exe",NULL,NULL, NULL, FALSE, 0,NULL, NULL,&sui,&pi);
//now one instance of my app is running...
In conclusion, no. Linx/Posix is far nicer then Windows/NT. There's a reason we've been using the same interfaces since 1973, they're very clean and very nice.
- pjmlp 12y agoThe fallacy is that the world enjoys a lot more diversity in OS systems than just Windows or POSIX compatible.
- angersock 12y agoBoth of your examples explode pretty badly once you start adding the additional Linux/POSIX code to fully match the functionality that the Windows stuff has. Show me the full linux/POSIX code to open a file with different security access modes, with different sharing models, with different dispositions (when should the new file be created, if it should be created, and what should happen to an existing file with same path), with hinting to the OS how to handle the file (should it be encrypted, should it be deleted once all handles are closed to it, etc.). Show me the full linux/POSIX code to open a process while setting the security ACLs and whatnot for it, setting its priority level, setting the environment strings, setting up the stdin/stdout/stderr file descriptors, setting the window position (if any), etc. Linux/POSIX aren't nicer than Windows/NT--they're simpler APIs for a simpler world. That doesn't make them better or worse, they're just different tools.
- orbifold 12y agoLinux/Unix has a significantly lower barrier to entry compared to Windows and a much nicer command line interface that just works by default. Want to install a C compiler? Just run apt-get install gcc and you are golden. Same for python, ruby, haskell and any other language under the sun. I've barely used Windows since I've outgrown the my fascination for computer games, it has nothing compelling to offer for someone working in a scientific environment, who is not forced to use Microsoft Office.
- cobrausn 12y agoYeah, sure, your one cherry-picked use case is awesome. To counter that, I recently tried putting together a wiki server using apt-get, and for some reason the apt-get installed an out of date version of the software that didn't work with the apt-get version of apache I was using, so I ended up having to manually download it anyway and patch a bunch of configuration files. The windows version just used an installer that set it all up right with a few clicks. Maybe now you've 'outgrown' video games you can outgrow thinking that your user experience is authoritative. Better, nicer, whatever, these are all just words people use to praise things that they like. But saying Linux / Unix has a lower barrier to entry than Windows is the kind of thing only a long-time Linux user can say with a straight face. Unless you are talking about money, and then, well... yeah.
- angersock 12y agoWhat if you don't have aptitude (hint: apt-get won't work)? What if I don't want a command-line interface? What if I want to actually debug a large C/C++ codebase? Python/Ruby/etc. are also available on Windows, usually with friendly installers. Look, I'm all for Linux/POSIX from an operations standpoint, but the programming story is merely different, and to pretend otherwise makes one look foolish. EDIT: Also, as cobrausn pointed out, what about when the official sources for the package are hella out of date? Not so friendly then, eh?
- Igglyboo 12y ago>Linux/Unix has a significantly lower barrier to entry compared to Windows Except that everyone and their grandmother knows how to use a windows machine and no one(relatively speaking) knows how to use linux.
- ewzimm 12y agoBut what exactly can they do on Windows that they couldn't figure out in something like ElementaryOS? Get infected with malware? I think most people are actually pretty clueless about how to use Windows effectively, especially now that we are deep into the Windows 8 world.