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. IE6 is the most secure software on the planet... on State of Colorado Calls Firefox Insecure, IE6 Safe · · Score: 0, Offtopic

    ...made you look, didn't you?

    Not even Ballmer would have said that...

  2. Re:It is a shame... on Smart Immigrants Going Home · · Score: 1

    I don't think so. The reasons are purely economical. There are more jobs in their home countries than in the US.

  3. Doug Engelbart invented hypertext. on The Finns Who Invented the Graphical Browser · · Score: 1

    Here:

    http://en.wikipedia.org/wiki/Douglas_Engelbart

    He also invented the mouse, the GUI, and ARPANET.

  4. Re:Safari doesn't work with Hotmail on Safari Beta Takeup Tops Firefox, IE and Chrome · · Score: 1

    In Japan, computers need no stinking 'e' to access the internet, computers have the internet preinstalled!!!

  5. Re:Beta 4 slower than Beta 3 on Safari Beta Takeup Tops Firefox, IE and Chrome · · Score: 1

    Windows 3.2? is this a new version of Windows? when did it come out?

  6. Re:Why? on Microsoft Brings 36 New Features To Windows 7 · · Score: 1

    Or make the O/S looking like single-user, while being multi-user transparently.

    For example, I don't see why, as a user, can't change the contents of the Windows System folder.

    While I change it, Windows can pretend that I change the one and only Systems folder, while in reality, I change my own copy of the folder.

  7. Re:Using an iPhone makes you look pretty lame? on Why Japan Hates the iPhone · · Score: 1

    I see a new Slashdot meme coming along:

    In Japan, things are better bla bla bla...

  8. Re:ANSI C on Security Review Summary of NIST SHA-3 Round 1 · · Score: 1

    Could not it be done with Haskell? Haskell creates code equal to C especially for math problems (or so they say).

  9. Re:Does it really on MS Publishes Papers For a Modern, Secure Browser · · Score: 1

    Which, in practical terms, means, that Windows is over-engineered. Unix is simpler and achieves the same results.

  10. Re:High performance of C++ equal to D??? on Walter Bright Ports D To the Mac · · Score: 1

    As you already say, if you are very concerned about performance in a situation with lots of small objects you can use structs. Simply ignoring structs because you are too lazy to use them does not make D slow. With a bit of experience and a few rules of thumb it's not hard to choose.

    But structs do not have the same treatment as classes.

    I think maybe you're talking about what is called "scope" now. It allocates the memory for the class on the stack. Yeh, it doesn't cover every possible use case of by-value classes, but it can be a nice optimization.

    And a heck of lot difficult to spot. At least, in C++, it's obvious what is a pointer and what it is not.

    Yes you use structs when you want an efficient aggregate value type. Classes and structs have different semantics in D. It's pretty easy to choose once you get the hang of it. If you are likely to want to put virtual functions on the thing, make it a class. If you want to pass lots of them around by value, make it a struct. If you can count on your fingers how many instances you will have, make it a class -- the hit from allocation won't matter. There is some gray area in-between, granted, but in practice it's usually pretty clear, and the benefit is that you do completely eliminate the slicing problem by going this route. If you really can't decide you can also write the guts as a mixin and them mix them into both a class and a struct wrapper. Or just write it primarily as a struct, and aggregate that struct inside a class. The use cases that are left after all that are pretty insignificant.

    Why do all that? no thanks. C++ is much better in this regard.

    D's template system has gone far beyond C++'s.

    Nope. It hasn't.

    It's even far beyond what C++0x is going to be.

    Nope, it isn't.

    Alias template parameters

    C++ has typedef.

    template mixins

    Mixins are bad from a design standpoint.

    static if

    C++ can do it with templates.

    a host of compile-time introspection facilities, the ability to run regular functions at compile-time

    And introduce big complications in the code.

    type tuples

    Boost provides them.

    D metaprogramming is to C++ metaprogramming as C++ OOP is to OOP in C. It takes a technique that the previous language begrudgingly permitted and turns it into one that is actually supported by the language.

    Nope. The C++ and D template type system are exactly the same. In fact, if you ask Walter, all the template tricks in D are done using the C++'s Turing complete template system.

  11. Re:High performance of C++ equal to D??? on Walter Bright Ports D To the Mac · · Score: 1

    The GC is the way to go for complex application. The reason is simple: the GC has a global overview over all memory usage of the application (minus special stuff like OpenGL textures). This means that the GC can reuse previously allocated memory blocks, defragment memory transparently, automatically detect and elimitate leaks etc.

    But with tripling memory usage, at least. Which does not help performance at all.

    Somewhat less obvious is that a GC allows for by-reference assigments being the default. In C++, by-value is default. a = b will always copy the contents of b to a. While this is OK for primitive stuff, it is certainly not OK for complex types such as classes. In 99.999% of all cases, you actually want a reference to an object, and not copy that object. But, as said, the default behavior of assignment is "copy value".

    It depends on the object. I wouldn't say 99.999%. More like 50%-70%. Forcing all classes to be accessible by reference is silly, in my opinion.

    This is a big problem in practice. The existence of shared_ptr, reference counting pointers etc. are a consequence. We could redefine the default behavior as "pass a reference of b to a", but who will then take care of the lifetime of b? Using a GC, this last question is handled trivially; when the GC detects 0 references, b is discarded.

    The non deterministic nature of finalization creates big problems though. At least with shared ptrs, objects are not held up alive until the gc says it's time to delete them. Which may be never.

    Now, once you have by-reference as default, things like closures get much easier to introduce. Neither D nor C++ have them at the moment, but C++0x requires considerably more efforts to introduce them. Functional languages all have a GC for a reason.

    I disagree. The design of C++0x is retarded. They should have introduced closures by creating value objects which represents the closure.

    D did another thing right: it did not remove destructors, like Java did. Instead, when there are zero references to an object, the GC calls the destructor *immediately*, but deallocates the memory previously occupied by that object whenever it wishes (or it reuses that memory). This way RAII is possible in D, which is very useful for things like scoped thread locks.

    In order to now how many references are to an object, there are only two solutions: a) reference counting, b) object tree traversal. The first one has the problem of cycles, and so it is not used, and the second one is very costly and it is also not used. So, your comment is totally wrong. D has RAII, but it does not use reference counting or object scanning and marking.

    They also simplified the syntax, which is one of the major problems of C++. Creating D parsers is not hard. Try creating a C++ parser.

    Indeed, but not relevant to this thread of the discussion (regarding performance).

    Now, what they got wrong: - operator overloading - const correctness - lvalue return values (which would solve most of the operator overload problems) - no multiple inheritance (which does make sense when using generic programming and metaprogramming; just see policy-based design and the CRTP C++ technique for examples) - crappy standard library called Phobos (getting better though) - and ANOTHER de-facto standard library called Tango, which looks a lot like a Java API and makes little use of D's more interesting features like metaprogramming, functional and generic programming

    And for these reasons and others, C++ is still preferable, in my book, than D.

  12. Re:High performance of C++ equal to D??? on Walter Bright Ports D To the Mac · · Score: 1

    But the syntax is all wrong. It's easy to forget that an object is allocated as 'scope', because the syntax is the same as in heap allocation.

    And the template system is D is exactly the same as in C++. The differences are superficial, only in syntax. D's templates is a Turing complete system, just like in C++.

  13. High performance of C++ equal to D??? on Walter Bright Ports D To the Mac · · Score: 3, Interesting

    I don't think D will ever have the high performance of C++, because D objects are all allocated on the heap. The D 'auto' keyword is just a compiler hint (last time I checked) to help in escape analysis. D has structs, but one has to design upfront if a class has value or reference semantics, and that creates a major design headache. Avoiding the headache by making everything have reference semantics negates the advantages of struct.

    D is a mix of C and Java, with the C++ template system bolted on top. It is no way C++. D is not what a veteran C++ programmer excepts as the next generation C++.

  14. The next version will be even more harmful!!! on New Conficker Variant Increases Its Flexibility · · Score: 1

    The next version will be...

    C++!!!

    And it will be considered harmful!!! :-)

  15. Re:A horse in my wallet. on Coming Soon, 250 DVDs In a Quarter-Sized Device · · Score: 1

    in my wallet, I have a horse

    Oh really? I have a horse near where I have my wallet!!! :-)

  16. Re:People, seriously. on Atlantis Seekers Given Thrill by Google Ocean · · Score: 1

    It may not be Atlantis, but what if it is indeed an ancient city of some kind?

  17. Re:Used to cost way more on Do Video Games Cost Too Much? · · Score: 1

    Yes, more effort goes into a modern game, but the tools have vastly improved as well.

    The price of a game does not reflect the effort to develop it, but the effort to experiment with new engines, graphics tricks, art etc. Most of this effort is thrown away, and the price reflects that.

    If game developer companies were more focused, this would not have occurred.

  18. End to end encryption for a safe internet on Black Hat Presentation Highlights SSL Encryption Flaws · · Score: 5, Insightful

    End-to-end encryption is required at all levels of the internet. Until that is available, the internet will never be secure, because someone will be able to read the non-encrypted data you send and reply with a fake response.

  19. Re:Rocket science? on Arctic Ice Extent Understated Because of "Sensor Drift" · · Score: 1

    Does it matter if the doom is this year or, let's say, in 100 years? it's still doom. You may live, your children may not.

    Why do you look at this in such a narrow view? even if this destruction comes, let's say, in 1000 years, or in 10000 years, it's still something to be concerned with.

    Unless all you care about is yourself and only yourself.

  20. FEAR was an extremely boring game. on Review: F.E.A.R. 2: Project Origin · · Score: 1

    The first few fights were interesting, due to good "AI". But then it was all fighting. No spectacular events in any form whatsoever. Just endless corridors with fighting, and the occasional horror scene that did not blend well to the fighting atmosphere of the game.

    Compare that to HL1...the giant squid monster that hunts with sound, the monster you had to kill using the controls of a satellite, the Indiana Jones-like tunnels roller coaster level, the Grand Canyon level etc!!! one surprise after the other.

    FEAR is, to me, a very mediocre game. The list of superior games is long...

  21. Re:Serves you right on Facebook Scrambles To Contain ToS Fallout · · Score: 1

    TOS is dead, Jim...

  22. Re:Can we stop calling it the "God Particle" yet? on Race For the "God Particle" Heats Up · · Score: 3, Funny

    Ok. How about the Allah Particle?

  23. And if the data stream is encrypted? on New Tool Promises To Passively ldentify BitTorrent Files · · Score: 1

    What would they do? force us to decrypt it? that's a violation of human rights.

  24. Microsoft should release Windows for free. on Post-Beta Windows 7 Build Leaked With New IE8 · · Score: 2, Interesting

    They have so much money coming from their other products...

  25. Re:Misread.. on Fly Me To Which Moon? · · Score: 1

    Apparently, the same one used by 3DRealms to compile DNF...