Slashdot Mirror


User: Maian

Maian's activity in the archive.

Stories
0
Comments
164
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 164

  1. Re:How are they measuring? on Comparing Memory Usage of Firefox 2 vs 3 · · Score: 1

    No, it's that they don't always use them. It isn't trivial to just plug in a GC for an existing project. Besides changing your memory API to utilize the GC, there can be subtle bugs that result after the switch, which costs QA time and money. And even then, a GC isn't always the best solution.

    Why? Because there are performance downsides to using them. Many C++ project opt to use reference counting instead, and manually make sure there aren't any cyclical references. I think the Gecko engine uses reference counting for most things, and only uses a GC for its JavaScript engine. I could be wrong though. Microsoft's COM model is all based on reference counting. I think its newer .NET framework uses a GC though.

    FYI, I use that GC you linked for many of my C++ projects. It works pretty well for my purposes, but my projects are all relatively small.

  2. Re:PR inside the USA is more important on Chinese Sub Pops Up Amid US Navy Exercise · · Score: 1

    It could work the other way too: military faltering => pour more money into military. If you want to be really cynical, this is Navy PR to get more money to research this "new threat".

  3. Re:Language Plugins on MS, Mozilla Clashing Over JavaScript Update · · Score: 1

    Firefox supports Python I think, but it doesn't support it right out of the box. It requires the user to download the whole Python package, which is at least 20mb last I checked. Mozilla is fine with supporting different languages, they just don't want to ship the runtimes for them.

    With that said, I do indeed wonder if they could take the Flash plugin installation route with alternate languages. The problem though is that it should not be automatic - that's a large security whole waiting to be exploited. It should require consent but in a user-friendly way. Namely, whenever a user navigates to a page that requires Python or Ruby or whatever, something notifies them - probably something like the extension installation "popup" - to automatically download the appropriate runtime and optionally restart the browser afterwards.

  4. Re:But will it detect sarcasm? on Software To Evaluate Facial Expressions Developed · · Score: 1

    When it comes to subtle expressions, they vary a lot between people. Sarcastic expressions, for example, can be hidden (where the person relies on his words to convey the sarcasm). Some people can master the "retail smile" so well, you'd think they were worshiping their employers (hello Apple).

  5. Re:Ted Stevens? on McCain on Net Neutrality, Copyright, Iraq · · Score: 1

    What do the false pretenses have to do with maintaining an army capable of invading nations? Whenever WW3 comes about, it would suck if our voluntary army no longer had the manpower to invade (think drafting). Yes, the Bush administration's advocation and handling the Iraq war is reprehensible, but you shouldn't overreact and blame the military. As far as I can tell, the military did its job well - it's just the state department and politicians and all the nepotism that screwed it up.

  6. Re:This is well and good but.. on Dell PCs with Ubuntu Are A Little Less Expensive · · Score: 1

    Ubuntu (and any non-Windows OS) can't run Windows-only games. It's not the fault of Linux or Ubuntu, and MS may be an evil monopoly, but most people don't care - it's just a practicality issue. Consider also that not all gamers are that tech-savvy since it's becoming mainstream, so I won't be surprised if Dell support was to get swamped if they heavily promote Ubuntu. Dell really needs to put a label that Windows games cannot run on Ubuntu, or should provide Windows emulation software (and even then, they'd still need a warning).

  7. Re:Diversity in the races on StarCraft, Nothing But StarCraft · · Score: 2, Insightful

    Protoss in general has the most powerful starcraft, so I'm not surprised that countering carriers is difficult.

    With that said, here's my experience with countering them:

    • Prevent them from getting too many carriers. All those BGH players like to bunker up and tech up, leading to this types of situations. These tech tactics are vulnerable to rushing, which is why most custom BGH games have the 15-min no rush rules. If you're playing a normal game, I will guarantee you that pure teching will get you no where if you're playing against an enemy that knows how to scout and rush. If the Protoss player has the time and resources to build up a fleet of carriers, you're probably already losing.
    • Protoss: Psi Storm. 'nuf said. Corsairs work too.
    • Terran: Valkyries are the best counter. In fact, if the carriers don't have any escorts, valkyries are enough to take them out (though it'll take some time and the Protoss player will no doubt that withdrawn his carriers by then). Battlecruisers micro-ed well with their yamato cannons also work, but it's so easy to accidentally yamato an interceptor. Sci Vessel is nice, but it's a generic Protoss counter.
    • Zerg: Personally, I think this race has it the hardest when countering carriers. Scourges are the obvious counter, but they are hard to micro, and it's easy to accidentally target an interceptor. If you're going ground, defilers are the best counter, since both their plague and dark swarm are really effective against carriers. Devourers are okay against carriers, but they are more of a counter against battlecruisers.
  8. Re:I don't want AI on Next Gen Beautiful But Brainless? · · Score: 1

    Here's an example of a game where intelligent learning AI would be useful: Galactic Civilizations 2. GalCiv2 is a turn-based game that can take a long time to finish, and I don't think you'll find many random people who will play with you for that length of time. So the developers decided to forgo multiplayer and opted for a strong adaptive AI instead. From my experiences with that game, I commend them for that decision.

    Another example: the Sims. I think it's pretty obvious here that learning AIs would enhance this game. This applies to any simulation-oriented game.

    Even for non-simulation RPG games, learning AIs could be useful. While there are always going to be people that want predictable always-beatable AIs, I expect that at least some will want challenging and human-like opponents in situations where human players don't suffice. Human behavior online is somewhat constrained by the fact that the humans know that they are playing a game and that they can choose whether to play or to quit. Consider a dungeon crawl being invaded by a group of heroes. Would you want to play as the villain when the odds are against you? So the villains are typically NPCs, and this is where my original point comes in: there will be at least some that still want challenging and human-like villains in these situations.

  9. Re:I don't want AI on Next Gen Beautiful But Brainless? · · Score: 1

    Obviously not all coop games are like that. Think RPGs, or coop FPS games like Halo, or even RTS defense games.

    Cool demo btw

  10. Re:Hmm on Next Gen Beautiful But Brainless? · · Score: 1

    That "only thing" is very hard to get right. You can't just randomly generate more if/thens randomly - that would be incredibly inefficient. Don't underestimate how incredible the human brain is :)

    What you're arguing for is basically adaptability and learning. In fact, it seems like you're proposing that the AI should be modeled as a Markov process (probabilistic finite state machine). Machine learning is an ongoing research topic. I myself am participating in one such research group (neural networks, specifically neuroevolution).

  11. Re:I don't want AI on Next Gen Beautiful But Brainless? · · Score: 1

    Then who would the enemy be? You can't play such a game without an enemy, so of course, you can't play a coop game without an enemy. And guess what the enemy would have to be in this case?

  12. Re:Invisibility cloaks are today's perpetual motio on A Step Towards an Invisibility Cloak · · Score: 1

    You're neglecting one key fact: perpetual motion is impossible because it violates the laws of thermodynamics. What laws does cloaking violate?

  13. Re:Time to Learn How to Program on The Book of JavaScript · · Score: 1
    Private members

    Do you consider Python to be object-oriented? The "private" members of classes on Python are defined such that the names are prefixed with 2 underscores, i.e. __foo is private while bar isn't. The private var names are mangled so that they aren't easily accessible outside the class, but they are still technically public.

    You can use this same idiom with JavaScript - just prefix the members you intend to be private with 2 underscores (or something equivalent). There's no name mangling in JS, but that's not really important. The biggest downside to this approach is that object enumeration (for (k in o)) still enumerates over private vars.

    You could also take advantage of closures to simulate private members, as has already been demonstrated elsewhere here, but I generally don't recommend that since it does use more memory and is slower.

    Inheritance

    JavaScript is a prototype-based language, where each prototype itself can have a prototype, and so forth. When you do obj.prop, the engine traverses this prototype chain to search for a property called "prop". I call this prototype inheritance.

    To do mixin inheritances, just copy all the properties of the mixin object with the target object's prototype (using object enumeration):

    for (var k in mixin)
    klass.prototype[k] = mixin[k];

    If you're coding for Mozilla JavaScript (for intranet or non-client-side stuff), you can take advantage of its nonstandard __proto__ property to handle mixins:

    function Serializable() {}
    Serializable.prototype.serialize = function() { print("serialize"); };

    function Base() {}
    Base.prototype.foo = function() { print("foo"); };

    function Klass() {}
    Klass.prototype = new Serializable();
    Klass.prototype.__proto__.__proto __ = Base.prototype;

    x = new Klass();
    x.serialize();
    x.foo();
  14. Re:This will cause problems on Jeff Hawkins' Cortex Sim Platform Available · · Score: 0, Redundant

    It could also lead to "a new, more advanced algorithm for blocking spam" too. Intelligence goes both ways :)

  15. Re:a high rate of homogeneous connection requests on A New Approach to Mutating Malware · · Score: 1

    Correct me if I'm wrong, but you can still generate hundreds of connection requests on dialup - most will just timeout.

  16. Re:Huge arrays? on MIT's Millimeter Turbine to be Ready This Year · · Score: 1

    I'd be a lot more exceited about artificial photosynthesis
    Solar cells? They produce electricity instead of sugar, but we got enough of the latter anyway :)
  17. Re:3 was the last worthwhile version. on Netscape 9 to Undo Netscape 8 Mistakes? · · Score: 3, Informative
    You got 2 things wrong:
    1. Netscape 4 didn't use Gecko. At all. It was built on top of Netscape 3. The first Netscape to use Gecko was Netscape 6 (they skipped version 5 as a marketing ploy).
    2. Gecko supports CSS. Netscape 3 doesn't. Want to try viewing /. in Netscape 3? Be my guest. Now the old /. - that's a different story :)
  18. Re:3 was the last worthwhile version. on Netscape 9 to Undo Netscape 8 Mistakes? · · Score: 1

    Frankly, I'm not really sure what Gecko's strength is anymore, now that WebKit is open source.
    Extensibility.
  19. Re:Survey says... on At Least 25 Million Americans Pirate Movies · · Score: 1
    1. You're right on the fact that the survey was skewed.
    2. You're wrong on saying that 2600 people isn't enough. Learn your math: http://en.wikipedia.org/wiki/Margin_of_error
  20. Re:Firefox is a fucking mess. on Bjarne Stroustrup on the Problems With Programming · · Score: 3, Interesting

    Actually, they do plan a major revamp of the Mozilla base. So major that they're going to use a tool to help automate the process.

  21. Re:I can't remember on The Mathematics of Neuroscience · · Score: 1

    This "ol' religious community" you speak of is only the religious right. I know of plenty of religious people who don't have anything against neuroscience as long as the research is ethical (i.e. no human babies chopped up). I'm not religious myself, so I don't understand their rationales and can't explain how they reconcile this matter of mind and soul.

    P.S. It's "reckon" not "recon".

  22. Re:Deevolution? on Scientists Regrow Chicken Wing · · Score: 1

    Not an evolutionary biologist, but I've taken evo classes before and we had to read a paper concerning this very topic. You pretty much nailed it.

  23. Re:ECMAScript... on Adobe and Mozilla Foundation Collaborate on ECMAScript · · Score: 1

    Or you could simply just say JavaScript, since practically no one intends to code in pure ECMAScript (JS code just usually ends up being compatible with ES)... Okay, JavaScript's a stupid name too, but it's too late to change names now.

  24. Re:This can't be a good thing. on Adobe and Mozilla Foundation Collaborate on ECMAScript · · Score: 2, Insightful

    I won't deny that it may result in more memory usage, but the virtual machine would make Mozilla's JavaScript engine faster [1]. And remember that JS is extensively used in Mozilla's GUI, and in fact, they intend to migrate more non-critical C++ code to JS in the future (for faster development, security, etc.).

    [1] http://weblogs.mozillazine.org/roadmap/archives/20 06/11/project_tamarin.html

  25. Re:Good in Theory on No More Coding From Scratch? · · Score: 1

    Well, if computer scientists ever manage to create a theorem-proving framework that can test code validity, and programmers start programming on top of that framework and produce enough testcases, then simple bugs won't be as much as problem anymore. Granted, that's a big if, but we are talking about the future here, who knows what comp scientists will discover by then, or what methodology software engineers will devise.