Slashdot Mirror


User: master_p

master_p's activity in the archive.

Stories
0
Comments
4,214
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 4,214

  1. Re:How does this work? on Alternative To the 200-Line Linux Kernel Patch · · Score: 1

    From what I understand so far, process grouping is a mechanism that allows better load balancing between I/O tasks and interactive tasks. Am I correct so far?

    Well, it surprises me that an interactive task is not considered an I/O task. Take a video player, for example: doesn't it send video frames to the the video card? it's primarily an I/O task.

    Here is another example: browser scrolling. When a browser view is scrolled, a huge amount of data are sent to the video card. So this is also an I/O task.

    So both 'classic' I/O (disk operations like compiling) and video/audio I/O are actually the same thing, i.e. moving large blocks of data around.

    Then, shouldn't the correct approach be an algorithm that prioritizes I/O based on intended usage? the display I/O should get a higher I/O priority on desktop systems than disk I/O or network I/O tasks, and vice-versa on servers.

  2. Re:Expensive Price on Anti-Smartphone Phone Launched For Technophobes · · Score: 1

    Or the manufacturers want to have a large profit.

  3. Can the detectors detect all harmful substances? on TSA Pats Down 3-Year-Old · · Score: 1

    If the detectors can detect all possibly harmful substances, then why does the pat-down procedure exist?

  4. Why an one-way mission and not an "Orion" ship? on Scientists Propose One-Way Trips To Mars · · Score: 1
    Instead of throwing money away on one-way missions, why not build a spaceship like this:
    1. project orion-style propulsion.
    2. artificial gravity by rotation
    3. an electromagnetic shield

    According to studies, it would have been feasible in 1958, so I don't see why it would not be feasible by now, considering the huge technological progress from that time.

    The ship could be big enough to host a small city (the Super-Orion project speaks of an 8 million ton ship, which is extremely massive and not necessary; a 500,000 tone ship would do). It would have manned shuttle craft, that would allow personnel to land on and take off low-gravity planetary bodies. It would have all the required equipment for scientific studies.

    Such a ship would make space travel between Earth, the Moon and Mars a commodity. The initial cost may be big, but it will pay off later, and most importantly, there would be no need to senseless deaths of people as in the one-way trip.

  5. Re:What about C++? on The Coming War Over the Future of Java · · Score: 2, Insightful

    Often someone's API will be so template-heavy that it takes a full minute (per compilation unit) just to parse their silly headers.

    Simply not true. I use boost heavily on a 120 kloc project, and it takes under a minute to compile everything from scratch. And I use quite a lot of boost features.

    Which is sad because I've never had the same issue with enormous C headers or when referencing a good half of the .NET runtime in a C# compilation.

    You are comparing apples with oranges. Neither C or C# have templates.

    The real problem there, which the GP missed, is the fact that every type must include the header of every type it contains a value member of in its own header. So if I want to keep d3d11.h out of my UI code, then my bridge renderer classes must either dispatch through virtuals, a tedious PIMPL, or not actually use any D3D types as value members, complicating other code for no good reason.

    It's not a problem at all. First of all, the compiler will only parse a header once, if guarded by #ifdef. Secondly, you can use precompiled headers.

    Link-time code generation is old news, object sizes could be resolved then.

    The number of things that can be done in link time is limited. Object sizes play a big role in optimizations, and you can't do some of them at link time.

    With GC I pay a fixed performance cost

    The cost of the GC is not fixed in any meaning of the word 'fixed'. It depends on the complexity of the graph. If your graph is very complex, the GC might take a lot of time to do its job.

    With RAII I have to go around making sure everyone is actually using shared_ptr (or whatever) at every single call site.

    How is that a problem of the language? it's a problem of your development team, not the language. If you have a shitty development team, they can easily mess up a Java program as well.

    Leveraging RIAA kind of demands that such destructors exist.

    You mean RAII obviously (I understand why you wrote RIAA though; it's customary to read something against RIAA at least once per day on slashdot). Yes, RAII demands destructors, and stack unwinding demands destructors to be invoked, but you are in control of it: if your loop is time-critical, then you can get raw and avoid them.

    Sure, if they don't delay it another five years while all the compiler vendors run off and implement incompatible subsets of the proposals because they're tired of waiting for the committee to stop bickering.

    No compiler vendor has implemented a subset incompatibly. The only thing that is left is to clear up move semantics. Other than that, c++0x is ready. I am already using it in GCC 4.5, with exceptional results in code clarity.

    Boost? I thought we were being careful about what we include so as to keep compile times down.

    It's not so bad as you make it to be. Even using boost::bidirectional_map takes very little time to compile on modern machines.

    Templates are useful, until someone goes nuts with traits types and multiple levels of tag-type-param-to-overloaded-function and your debug build ends up six or more orders of magnitude slower than your release because inlining is off.

    Show me a case such as you describe.

    Yes, I use them, but the time spent making sure they aren't being misused is non-trivial and needs to be counted against the time saved by using them.

    Bullshit. You are just quoting something you read over the internet. Show us a such a case.

    So have I. But don't forget the bit where someone spent countless hours making sure everybody else was following the rules and sticking to those libraries, rather than wandering off into std:: or inventing their own little su

  6. Re:Alternatives? on The Coming War Over the Future of Java · · Score: 1

    #include <QApplication>
    #include <QPushButton>

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);

    QPushButton hello("Hello world!");
    hello.resize(100, 30);

    hello.show();
    return app.exec();
    }

  7. Re:What about C++? on The Coming War Over the Future of Java · · Score: 3, Insightful

    C++ has an astonishingly complicated grammar, which means that compilation takes forever and other tools don't work as well as they do for languages with simpler grammars, like C or Java.

    Modern c++ compilers are extremely fast; not as fast as Java compilers, but considering they do much more many things (templates for example), then they are quite fast. They are so fast that compiling large code bases with them is extremely viable, and it's a task done everyday by millions of developers.

    C++ doesn't really have compile-time encapsulation: if you add a private member to a class, you need to recompile everything that uses that class even though the class's public interface didn't change. That woudn't be so bad in and of itself except that C++, again, takes forever to compile.

    How is that a big problem? you make it sound like it's a colossal problem, but in reality, it's not. Unless your class is used by every other class or function, the recompilation is minimal. The benefit of this is that you can use value classes in c++, whereas in Java you can't, every class is by reference, which is stupid.

    C++ also doesn't have run-time encapsulation or really any serious run-time error checking that you don't do yourself. Yes, it's for performance reasons, but some people are working on problems that aren't performance-critical and would prefer a language that doesn't pound nails through our dicks. (if it doesn't have encapsulation, why do they call it "object oriented?")

    If you refer to arrays, vector::at() is your friend. If you are not disciplined enough to use it, then you don't belong in programming. You can even use smart pointer classes that throw a null pointer exception, if you really want it. In any case, it's not anything like you say it is.

    1) If you've allocated some memory for an object, and then you throw an exception, you don't have that pointer anymore, and because C++ doesn't have garbage collection you've just leaked memory. The only way around this is to implement garbage collection yourself; C++ weenies call this "RAII" and if they're really far down the rabbit hole they sometimes don't even realize that it's just them implementing shitty reference-counting garbage collection.

    RAII is actually superior to Java's garbage collection. It's much more critical for big applications to release as much memory as possible upfront.

    2) You can't throw exceptions in destructors. Well, you can, but when an exception is raised, all the destructor for objects on the stack are called, and if one of them throws an exception while you're already handling an exception the program terminates. Seriously, that's what the standard says, I'm not making this up. So you can't throw exceptions in destructors, or call any function that might throw an exception.

    How is that even a problem? Java's unpredictable finalization order is way more of a problem.

    3) In every major compiler I've used, exception handling support is implemented in such a way that it slows down every function call you make. Yes, it's only slightly, but it means if you really care about performance, you can't use exceptions, and if you don't care about performance why the hell are you using C++?

    Read this first: http://www.open-std.org/jtc1/sc22/wg21/docs/TR18015.pdf Exception handling has a cost only if there are non-trivial destructors to execute. Since C++ allocates most objects statically, the performance cost is factored into the program as if no exception was thrown. On the other hand, in Java, you pay the price in garbage collection.

    And even if you want to use them they're almost worthless; I mean you can't even get a goddamn stack trace out of them.

    True, but you can have other meaningful information, such as the file

  8. Sorry, but completely uninteresting. on Gosu Programming Language Released To Public · · Score: 1

    I am sorry for saying this, and I say it with all good intentions, but this language seems completely uninteresting to me. There is already Scala, Closure, JRuby, and a myriad of other JVM languages.

  9. Re:Wow... on Oracle To Monetize Java VM · · Score: 1

    So, Microsoft, who tried to kill c++ with MFC in favor of Visual Basic will acquire Qt, the best c++ library? what an irony.

  10. Re:Good. on Oracle To Monetize Java VM · · Score: 1

    So what would you replace it with?

    Ada? it's as efficient as c++ and as safe as an imperative language can be.

  11. Re:Scala, Groovy, Ada. on Oracle To Monetize Java VM · · Score: 1

    You forget the cost of going through the collectable objects and invoking their finalizer. The cost of the gc is not only allocation and deallocation, it's also the cost of scanning the graph, relocating objects, updating pointers, restoring ghost references, and invoking the finalizers.

  12. Re:The beauty was in a lack of explanation! on The Science of Battlestar Galactica · · Score: 2, Informative

    Please mod parent up.

    Technobabble is not bad if it has legitimate reasons to exist. It's only bad if it covers the weaknesses of the script writers. In the Star Trek series, Technobabble got ridiculous in the last seasons of TNG, but largely in Voyager. It is no coincidence that this happened just after Rodenberry died.

  13. Re:Doesn't matter what he did on The Science of Battlestar Galactica · · Score: 1

    Everything is a business. Networks, software houses, banks, hospitals, schools, industries, power companies...should all these exist ONLY to make money? making money is necessary for sustaining the business, but all these offer necessary services for us as well.

    It's funny that you come on in a TV sci-fi show discussion and claim that businesses exist only to make money. Is it a failure of education, or a failure of TV sci-fi shows to pass a message through?

  14. Re:Name one on Flash Comes To the iPhone Via App · · Score: 1

    The web is full of video now. How can you say you can browse without video? There are lots of technical presentations in video only...a lot of news items...a lot of interesting home made videos...to imply that in 3 years you never needed any form of these seems totally impropable to me.

  15. It will put a lot of strain on the thumb. on 8pen Reinvents the Keyboard For Mobile Devices · · Score: 1

    One-handed messaging is usually performed with the thumb. The thumb can easily push the little buttons on the small keyboard of a mobile phone, or the virtual keyboards of newer phones, but it cannot do cyclic movements consistently without being strained too much.

    If you are curious about this, take a small glass and try to wipe it using your thumb by doing circular movements. Sooner than later, you'll feel the pain.

  16. Re:Arguing about "worth" is difficult on Is the ISS Really Worth $100 Billion? · · Score: 1

    With $600B, USA could have built an Orion-class spaceship in space, complete with nuclear propulsion, rotating modules for gravity, manned and unmanned shuttles for landing to/taking off planets, huge science labs, etc. We could already have visited Mars by now.

  17. Re:It's a space station on Is the ISS Really Worth $100 Billion? · · Score: 1

    Correction: it's a station 460 km over the surface of Earth. Space is so vast, that ISS distance from Earth can hardly be called 'space'.

  18. Re:The alternative on Is the ISS Really Worth $100 Billion? · · Score: 1

    If they had devoted 100 billion dollars to work related to gravity and superconductors, we would have been a lot more closer to real space travel.

  19. Re:Important engineering lessons on Is the ISS Really Worth $100 Billion? · · Score: 1

    The biggest benefit of the ISS is it teaches us how to operate indefinitely in space.

    Not interstellar space. We have to learn a lot more things for that.

  20. Technical information on the bug? on Adobe Warns of Critical Flash Bug, Already Being Exploited · · Score: 1

    Does anyone have any information on the technical side of the bug? is it a buffer overflow, wild pointer, stack smashing etc? I've searched online but I couldn't find any technical information about it.

  21. Re:When it's done on For Firefox 4, You'll Need To Wait Until 2011 · · Score: 1

    3DRealms said the same thing.

  22. Re:This is just embarrassing. on Power Failure Shuts Down 50 US Nuclear Missiles · · Score: 1

    China is also good at playing long term strategy games. Its 5000 year history has plenty of examples. If the Chinese decide that they want to be the world's super power, the US nuclear arsenal plays no significant role against that, simply because the Chinese will fight you with ways you will not understand until it is too late.

  23. Re:Oh god! Not 50 nuclear missiles! on Power Failure Shuts Down 50 US Nuclear Missiles · · Score: 2, Insightful

    Let me guess: "free world" equals the United States?

  24. Re:Where is the fun? on Are Games Getting Easier? · · Score: 1

    What kind of multiplayer? cooperative or competitive?

    Personally, what I enjoy most from games is exploring imaginary worlds, and that's why I play first-person shooters and adventure games. I certainly would enjoy it going on quests with friends.

    I think that competitive multiplayer games are a waste of time, because doing the same thing over and over just to get some satisfaction that I am better is nothing more than ego gratification.

  25. Can a galaxy form in such a short period of time? on Record-Breaking Galaxy Found In Deep Hubble Image · · Score: 2, Interesting

    So can a galaxy be created in 600 million years?