Jump to content
  • Advertisement

ZQJ

Member
  • Content Count

    589
  • Joined

  • Last visited

Community Reputation

496 Neutral

About ZQJ

  • Rank
    Advanced Member
  1. ZQJ

    Linus Torvalds and C++

    Quote:Original post by Promit Quote:Original post by ZQJ we'd probably still be somewhere around Windows ME if Microsoft didn't think it had anything to worry about.Can we all please agree to avoid this kind of bullshit rhetoric? I'd hate to start dropping the rate hammer on people over something like this. Wow. I guess I should think more carefully before making throwaway comments. I do think MS has focused more on security, partly because Windows was a virus writer's heaven for a long time (and in comparison to any *nix variant, it really was). And no, I'm not going to try and dig out links to prove that; it's just a general impression I have from the last 10 years or so. Quote: Quote: I can't say I'm a huge fan of Java or C# - they still have to much C/C++ in them IMHO Do you realize that now your reasoning sounds a lot like his? Not to mention the whole "better language" thing to start with. Languages are tools. Some of them are better for some situations than for others. C has its place. C++ has its place. So do Assembly, Java, C#, Python, Lisp and Ruby. I disagree - I think it is possible for one language to be generally better than another, but I should define my terms better - I was thinking without regard to performance or standard library design, because they can restrict your choices of tool, but that's not to say I can't speculate on what would be chosen if neither was a factor. I was also ignoring any other random restrictive factor like being required to work in a web browser or some language-specific environment, or interacting well with some other code.
  2. ZQJ

    Linus Torvalds and C++

    I can appreciate Torvald's hatred of C++: it just lacks so many features a good language should have (closures and reflection particularly). However, there are much better languages than C++ out there. Let's start with Python, as I actually know that. Or from what I hear, Ruby. Or the old warhorse, Lisp (although that has it's fair share of detractors; it certainly doesn't look pretty). I can't say I'm a huge fan of Java or C# - they still have to much C/C++ in them IMHO, although C#'s a pretty good compromise. But it's a version control system FFS, it's hardly going to be using masses of CPU. And don't tell me 'maybe he doesn't know Python', you can learn Python in one day if you're a good programmer. On the other hand, he has pretty successfully lead the development on what is probably the largest community software project for over a decade. Even for people who don't use Linux (and I'm using it now), we'd probably still be somewhere around Windows ME if Microsoft didn't think it had anything to worry about.
  3. ZQJ

    boost::format overkill?

    If the logger is like that (i.e. just has a write() function), why not alter it to use the Boost.Streams library and wrap it up into an ostream? Then you can use boost::format with it anyway, since that works with ostreams.
  4. ZQJ

    Faith, God and Santa Claus

    I think that scientifically speaking, god does not exist. This is not to say that science cannot prove the nonexistence of god logically, but physical sciences don't work with pure logic. Since no useful scientific model contains the existence of god (for useful, read "makes experimentally verifiable predictions", and of course, differs from all models not containing god in those predictions), it follows (scientifically, not logically) that god does not exist, in line with Santa Claus, the Loch Ness Monster, the Flying Spaghetti Monster, etc. Of course, this kind of reasoning means that science can be wrong and from time to time has to revise its conclusions based on new evidence. As of yet, the evidence for god is not there. This does not stop plenty of scientists believing in god. But clearly, they don't attempt to apply scientific reasoning to the existence of god. I can't find a Wikipedia link (but I'm sure there must be one), but it's pretty widely observed that people try very, very hard to stick to their beliefs, so unless there is an unavoidable inconsistency they will prefer a vastly complex explanation that preserves their belief over a simple one that does not (bible study people seem to work this way). Albert Einstein is in fact famous for having done this twice - when creating general relativity he added a 'cosmological constant' term because he refused to believe the universe was expanding, and he tried to make a working 'hidden variable' theory for years because he wouldn't accept the nondeterminism of quantum mechanics. However, he did later take back the cosmological constant when Hubble found that the universe was expanding.
  5. Quote:Original post by Symphonic So probability that every roll is a success is P^n probability that n-1 rolls is a success is P^n-1 Actually, not quite. The first one is right. The second one isn't. This is actually a binomial distribution problem (see Binomial Distribution, I think that covers pretty much everything). As for the bonus question: it's really very hard to say, but the computational power you'll need to compute it either way is probably minimal, unless you're doing it for vast numbers of die in which case SiCrane's method is the one to use.
  6. ZQJ

    Are 64 bit video cards really 64 bits?

    In C++ floats are 32-bit (on most platforms anyway), and the same goes for C#. I don't think DX ever supported 64-bit floats (i.e. doubles), and since OpenGL is discontinuing their use in the API for 3.0, I think the answer is no. On the other hand, I do remember reading that nVidia would be adding double precision support in the professional cards for GPGPU stuff (CUDA) at some point, but that's pretty irrelevant for game development. What's the graphics card that claims to be 64-bit? Edit: Just noticed, this should probably be moved to DX or Graphics forum.
  7. That code looks fine. Do you get an meaningful error message when the program terminates (this would be compiler dependent)? Otherwise, how are you sure it's an ns::Bad_Exception that is really thrown? If it's completely mysterious, the only thing that I can think of is that if an exception is thrown while another exception is in the process of being thrown, then your program will terminate (this is why you don't throw exceptions from destructors).
  8. ZQJ

    Vote Mr Splashy Pants

    It's now at 30% - seems like a runaway winner. Edit: that's what I get for not refreshing before I post.
  9. Well, I'm not sure exactly how difficult this would be in your situation, but what you really want is to get your compiler to generate MINPS and MAXPS instructions. That will allow you to do four elements of the array at a time. For GCC look at X86 builtins in the manual for how to get this (and take a look in pmmintrin.h). Edit: didn't read that part about portability carefully enough. If you don't want to sacrifice any portability, I think your options are a bit thin beyond what you have. You can always have a backup version that gets compiled if any of the optimized versions aren't good enough.
  10. ZQJ

    BSP Map Loading?

    I did write a Quake 3 map loader once. Loading the BSP files themselves is fairly easy - it's much more annoying to have to load and parse the custom shader files Quake 3 uses (have a look here).
  11. ZQJ

    [STL\set] unsorted?

    In that case I think I see what your teachers are getting at: you don't need to construct the tree at all. From those pairs, you can straightforwardly construct a map from children to parents (i.e. via std::map), then use that to walk up the tree (which you'll need to do twice, as you're checking if either one is an ancestor of the other).
  12. The best one I can think of is Fallout 2 - you still have to do basically the same thing at the very end of the game to save the world, but when you finish you get a bunch of ending screens telling you what happened in the various towns in the game world in the end, and you can change those by your actions.
  13. ZQJ

    [STL\set] unsorted?

    The real question for a problem like that is what the input format of the data is. Actually finding out if one node is an ancestor of another is a very simple problem, inputting the data may be a little more complex.
  14. ZQJ

    Duke Nukem Forever in 2008!

    Assuming that DNF does eventually see the light of day, they'll probably tone it down massively from DN3D anyway. They'll probably want mainstream success, and I'm not sure mainstream success and the line "No one steals our chicks, and lives" go together.
  15. Quote:Original post by binchawpz Latex is indeed very pretty. The prettiness comes at the cost of automation, however. When using Latex you take a step back and basically give Latex hints about how you want your document to look. Word isn't any better really - I know a guy who had to spend about 2 hours laying out his final project report for his degree because whenever he moved one diagram, Word automatically reshuffled all the other (already correctly positioned) ones. It was just an exercise in moving things around until he got something he found acceptable. I'd like to say that I was smart, and used Latex.
  • 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!