L B wrote: |
---|
If they're program needs to create a shortcut, and I for whatever reason need to help them, I would only help them find the platform-independent way of doing it. |
I am morally opposed to writing code that only works on one platform no matter what settings/environment is it compiled with. |
Also, I personally find an in-game/in-app debugger easier to deal with than using the default console window |
I'm morally opposed to using console windows for anything but seeing the output to std::cout, std::clog, and std::err. Anything more is misusing the console in my view. |
If you think it's stupid of me not to help someone just because I don't morally support what they're doing, you're implicitly calling a lot of people stupid |
chrisname wrote: |
---|
But there isn't a platform independent way to create shortcuts. There might be a library that wraps it up, but it's such a trivial thing, there's no point adding extra dependencies to your program to do it. You may as well write it yourself for every platform you plan to support and then have your Makefile or IDE only include the files relevant to each platform, or use the preprocessor for conditional compilation. |
chrisname wrote: |
---|
Ridiculous. Not every program needs to run on multiple platforms. Many programs are specific to one operating system, like a program that modifies system files or files related to another program that is not cross-platform (such as a game). Someone might be writing a program specific to a certain system because they want to learn that system's API. Or maybe they're doing a homework exercise and the program only needs to run on one platform. Like helios said, writing cross-platform code isn't always trivial, and like I said, it isn't always necessary. If it's non-trivial and unnecessary, why bother? It's just a waste of time. |
chrisname wrote: |
---|
Why? The console is a convenient interface for lots of different types of programs. Not to mention that console programs are more flexible for reuse by other programs, because you can redirect their input and output to pipes, sockets, files and even the input and output of other programs. Say you were writing a text editor and you wanted to use sed for regular expression find-and-replace (rather than re-implementing all of sed yourself just to use it in one program). Because sed is a text-only program, it's trivial to pipe the input and output. You could even redirect its input and output to a socket and run it across a network. You can do that with programs that only operate on text, but not with graphical programs. And say someone wants to write a text game. Who are you to say they shouldn't because you think the console should only be used for the things you use it for? |
chrisname wrote: |
---|
I said that it was stupid not to help someone because of the specific moral views being discussed. The same doesn't apply to everything you don't morally support. Some things are reasonable. These are not those things. You're coming off narrow-minded. |
L B wrote: | |
---|---|
chrisname wrote:
Where I live, we have freedom of religion. I'm not religious, so I don't in any way involve myself with religious things. I also don't treat anyone differently because of their religion. The same applies here; ... |
Duoas wrote: |
---|
Er, the same does not apply, and it is a logical fallacy to link them. The first issue is that you are confounding the sense of the word 'moral'. The morality of <insert religion here> upon human society is a profoundly different creature than the so-called 'morality' of using the Windows console or writing platform-dependent code. |
Duoas wrote: |
---|
You have actually been treated quite fairly by chrisname: he has not questioned your intelligence nor your integrity, nor your skill nor your character in any way. He has pointed out that the argument you are using here is nonsense. |
Duoas wrote: |
---|
Just say that you won't do it because you find it objectionable. No one can rightly give you a hard time for that. |
|
|
while( true ) {}
but I have seen it written as example code in some respectable text book, and I have found that it works quite nice. L B wrote: |
---|
I've experienced a consistent theme that my arguments and ideas are nonsense. |
I thought that this was my whole argument and point of view? |
while (true)
is a wannabe. You can safely ignore him.L B wrote: |
---|
That's what I meant as being the platform-independent way of doing it. I have a bad habit of aliasing "portable code" as "platform-independent". |
Specialty programs are a side-effect of the failure to make various platforms and hardware consistent and compatible. |
Can't I make it harder to do something wrong for the benefit of others? |
So, what you're saying is, I should help people color and format their console output and set the character's position on the screen because you can pipe the input and output to things that aren't even a console window. I also don't see how your argument is in any way against my statement... |
someone said they have a problem with while( true ) {} but I have seen it written as example code in some respectable text book, and I have found that it works quite nice. |
http://www.cplusplus.com/forum/beginner/86027/#msg461611 |
for(;;)
rather than while (true)
, especially for C where true is not defined.BEFORE - Initialisation Start of loop MAIN BODY CODE INCREMENT END CONDITION End of loop |
chrisname wrote: |
---|
But how do you know the guy asking for help making shortcuts on Windows isn't writing the library that wraps that on multiple platforms? How do you know he hasn't already written the code to do it on Linux? Even if he is making a Windows-only program, why should you care? He may have very good reasons for not supporting other platforms. Maybe Richard Stallman and Linus Torvalds once beat him up and stole his lunch money. Like I said before, maybe he's doing a homework assignment that only needs to support one platform. In that case he would have a deadline, and writing extra code to support other platforms would be a waste of time. Don't forget that not every program can be written at the pace of the author. Programmers often have time and budget constraints as well as priority features that must be implemented, even at the expense of portability. |
chrisname wrote: |
---|
And so everyone should put extra effort into making code run on multiple platforms when they don't need it to run on those platforms? Game developers don't target Linux or BSD or OS X because their target market largely uses Windows, Xbox or PS3. People who produce mods for games don't see the point in targeting any platform other than the ones that the games they're modding run on. There are other types of programs that don't need to be cross-platform too, like the homework assignments I've mentioned three times now, and the program that modifies system files that I've now mentioned twice. |
chrisname wrote: |
---|
I'm not saying you can't, and I'm not even saying you shouldn't, I'm saying that these things are not wrong. |
chrisname wrote: |
---|
That's not what I said. Did you see the example about text-based games? You must have, since you included it in your quote. If text-based games are a valid use of the console, and text-based games use coloured and formatted output, then using coloured and formatted output is also valid. To believe otherwise, you either have to believe that no-one should make text-based games, or that text-based games should never use coloured or formatted output. |
chrisname wrote: |
---|
For future reference, any time you start an argument with "so what you're saying is", you're probably about to commit this fallacy: http://en.wikipedia.org/wiki/Straw_man |
chrisname wrote: |
---|
Not every program need to be cross-platform and not every program needs a GUI. |
LB wrote: |
---|
I don't help people who want to e.g. color the output of their console. |
chrisname wrote: |
---|
If someone is making a graphical application with a console for debugging, they might still want coloured output (my RPG uses the console window for debug, info and error messages (all three of which are in different colours (grey, white and red respectively)) as well as for interaction with the game engine (like the console in many games, but since my game isn't fullscreen there's no need to reinvent the wheel, I can just use the normal console)). Even so, not every application needs to have their own GUI (don't forget that the console is really just a GUI displaying text), many wouldn't make sense with a GUI because they only need to process text. |
LB wrote: |
---|
I personally find an in-game/in-app debugger easier to deal with than using the default console window, even with portable code. I'm morally opposed to using console windows for anything but seeing the output to std::cout, std::clog, and std::err. Anything more is misusing the console in my view. |
chrisname wrote: |
---|
Why? The console is a convenient interface for lots of different types of programs. Not to mention that console programs are more flexible for reuse by other programs, because you can redirect their input and output to pipes, sockets, files and even the input and output of other programs. Say you were writing a text editor and you wanted to use sed for regular expression find-and-replace (rather than re-implementing all of sed yourself just to use it in one program). Because sed is a text-only program, it's trivial to pipe the input and output. You could even redirect its input and output to a socket and run it across a network. You can do that with programs that only operate on text, but not with graphical programs. And say someone wants to write a text game. Who are you to say they shouldn't because you think the console should only be used for the things you use it for? |
LB wrote: |
---|
So, what you're saying is, I should help people color and format their console output and set the character's position on the screen because you can pipe the input and output to things that aren't even a console window. |
L B wrote: |
---|
Text-based games are wrong in my opinion, therefore I consider your argument invalid. |