Jump to content
  • Advertisement

phresnel

Member
  • Content Count

    3046
  • Joined

  • Last visited

Community Reputation

953 Good

About phresnel

  • Rank
    Contributor
  1. Just about the technical side: 2) C++ wouldn't allow it, even if I wanted it - the function parameters are too identical so the function names would collide.[/quote] C++ allows to overload on const and non-const references.
  2. phresnel

    What is bigger?

    NaN is neither nonzero, nor isn't it nonzero. Dividing anything by NaN yields NaN again, which is neither nonzero, nor isn't it nonzero, nor is it infinity. Whereas when you divide a non-zero number by NULL, the result will be infinity. Therefore, the real question is whether NaN not being infinity not or not not being infinity is worth more than x/NULL, with x!=0, which always gives infinity. Wait. ... ... Theeeeeerefore, NaN is bigger. NULL means invalid, but the result of a computation that uses NULL as one of the operands is not necessarily invalid, whereas NaN always stays NaN, never mind you push or pull or accumulate or pop it. Hear ye: NaN is he true dominator of thy scientific number cruncher, whereas the fool NULL hides deep deep in thy pipeline.
  3. phresnel

    What is bigger?

    Ich verstehe nicht so ganz, was das "Auch" dort bedeuten soll.
  4. phresnel

    Texture a Sphere

    nitpick: URIs always use forward slashes to seperate directory names. Actually, when you copy and paste the url target, you get http://www.mperfect.net/cfMDX/_images%5CMeshes.JPG i.e. you now have _images%5CMeshes.JPG as a filename. The corrected version is http://www.mperfect.net/cfMDX/_images/CMeshes.JPG
  5. phresnel

    Coder or Programmer

    ... and of course there's "hacker", to make the confusion even worse. Personally, I mostly use the nouns "[software] developer", "[software] programmer", and the verbs "hacking", "tweaking", "coding", "programming" (so basically all of them). I don't put too much meaning in those.
  6. phresnel

    Coder or Programmer

    I don't know whether "skip acting like a prima donna" is 100% equivalent to a german saying which goes "Die beleidigte Leberwurst spielen" ("To act like a offended liverwurst" ), the dictionary proposed it. It roughly means "don't feel offended by things that weren't intentionally offensive, within some social group". It is usually not used to offend people. To those of you who didn't just bash me, but actually argued: Thanks for the input, I'm sorry this turned into an argument over what I didn't intend, and if you felt insulted by me, believe me, it wasn't my intention. [/quote] Anyways, believe us that nobody intends to offend you.
  7. Nitpicks: Every compiler available is a "command line compiler", even Microsoft's and the Apple-sponsored LLVM. MinGW is not an IDE and doesn't come with an IDE.
  8. phresnel

    Texture a Sphere

    You should never rely on floating point equality: http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17 . I would make those integers again, and within the loops, convert them to angles.
  9. phresnel

    Coder or Programmer

    Imho, the only harsh posts in this thread were made by you. Others are only harsh in your opinion and yours only, and I actually don't know why. Skip acting like a prima donna. This thread contains some useful information. Sidenote: Using memcpy, malloc and mmap all day is not necessarily the equivalent of being decent. In many use cases of C++, using it all day is exactly the opposite of being decent. And for every non-POD type, they are simply wrong and yield undefined behaviour. So skip that, too.
  10. You need to rework your post. Before reposting, use the "Preview"-Button.
  11. I propose to post any solution in this thread. PM kills the purpose of this forum and makes the whole thread absurd.
  12. Unfortunately, you must flatten out the library dependencies yourself. So, if you have libfoo.lib which depends on libbar.lib, and frob.exe ... foo.exe | libfoo.lib | libbar.lib then you have to make the project file of foo.exe like that: foo.exe | | libfoo.lib libbar.lib If it wouldn't be like this, libraries would grow to monstrous size, as they would have to include the full set of each and every symbol of recursively included libraries. Compilation of libraries would take significantly longer to compile, as for the huge symbol tables, as well as for the possibillity of (indirect) mutual dependencies.
  13. Though this is not common, I think most people assume that setters are infallible, including enterprise frameworks like DevExpress or Qt. If you assign something to a setter, it is expected that it will succeed, as with constructors. If it fails, than via an exception. Consider that a setter is basically used like an assignment, and people don't assume that a simple assignment may fail. In your case, it should be like class Foo { string name; string Name { get { return name; } set { if (!IsNameValid(value) throw SomeMeaningfullException; name = value; } } static bool IsNameValid(string name) { /* do validation and return accordingly */ } } class Bar { void doSomething() { string n = "Mario + Luigi"; if (!Foo.IsNameValid (n)) MessageBox.Show (string.Format("Invalid name \"{0}\"", n)); else ... } }
  14. Uhm ... There are only two "mainstream" packaging systems, debs and rpms. And in many cases, carefully stuffed packages install on many distros that understand the package in question. The last deb I've personally distributed e.g. would install on at least Ubuntus 10.x, Debians 5.x, Mint and gNewSense (others not tested). O.P.: Maybe ELF Statifier could be of interest to you, though it completely circumvents the whole idea behind package managers. An extravagant idea could also be to setup a virtualbox-image
  15. phresnel

    How many of you use C for game programming?

    You just haven't worked on a big enough application. The underlying issues are still there, you just haven't hit them yet. [/quote] Oh trust me I have. My own personal project is quite big [/quote] My own main project is not so big (just 60000 lines, roughly), but there's a lot of data-sharing. Keeping track of all the sharing would be near-impossible with raw pointers. Sub-components may insert new objects into parent-objects, and vice-versa, whole trees are passed into external components, data structures are extended, et cetera. Without shared_ptr's, I would really have a hard time keeping it correct while doing all the mutations. Which code in my codebase depends on properly managing specific objects? Which are forbidden to releasre objects? Et cetera. And if this paragraph is slightly chaotic, then that's by intention. Of course, a lot is possible (see e.g. the kernel linux), but the more you automate, the more time you have for actual features your users are interested in. and I don't have problems because I actually know how to control it[/quote] But your users possibly don't. They won't help you as RAII would in exceptional cases. The number of flow-permutations in only a small sized project of <10KLoC is usually big enough already to make good testing a nightmare, and automating the right deletion moment even for exceptional cases helps a zillion tons.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!