Slashdot Mirror


User: pclminion

pclminion's activity in the archive.

Stories
0
Comments
6,218
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 6,218

  1. That C++ version sucks. on 108 Ways To Do The Towers of Hanoi · · Score: 3, Interesting

    That's the worst C++ feature-masturbation I've ever seen.

    Here's a version using C++ template metaprogramming I just whipped up:

    #include <iostream>

    template <int N, int From, int To, int Using>
    class HanoiSolver
    {
    public:
    static void solve()
    {
    HanoiSolver<N-1, From, Using, To>::solve();
    std::cout << "Move " << From << " to " << To << std::endl;
    HanoiSolver<N-1, Using, To, From>::solve();
    }
    };

    template <int From, int To, int Using>
    class HanoiSolver<0, From, To, Using>
    {
    public:
    static void solve()
    {
    }
    };

    int main()
    {
    HanoiSolver<10, 1, 2, 3>::solve();
    }

  2. AI on The Most Incorrect Assumptions In Computing? · · Score: 1
    Most of the examples being posted are doubts about what computers were capable of that turned out to be completely incorrect. I'm going to go the other way.

    We constantly hear that "true" artificial intelligence is right around the corner. In the sixties, we thought it'd all be worked out by the seventies. During the seventies, it was the eighties that would rocket us into the future. Now, people are talking about computers with the computational capacity of the human brain by 2020. And yet we still don't have a program that can decisely beat the top chess players in the world 100% of the time. And chess isn't even the hardest game out there (from a computational standpoint).

    I'm going to go out on a limb here and say that in the year 2020, we're going to be claiming that true AI will be invented by 2030. And that assumption will be just as wrong as it ever was.

  3. Re:Why Windows? on Microsoft to Charge for FAT File System · · Score: 2, Informative
    Since static memory sticks have no problems with random access, it doesn't make sense to use traditional filesystems which were designed to minimize seek latency involving mechanical components.

    What are you talking about? How about this 2.2 GB microdrive I want to get for my digital camera? Are you telling me that thing isn't organized into blocks? Right.

    There's a reason the flash standards specify block devices instead of treating the thing as a (relatively slow) RAM stick. It's a form factor and data access protocol, not a particular media type. Making it use blocks is the best way to support the broadest range of storage technologies.

  4. That's too bad... on What Has Number Portability Done For You? · · Score: 1
    I've been waiting for this to switch AWAY from T-Mobile. I barely get any coverage in my own apartment, and my phone (an older Nokia) has said "Roaming" on it for the past month and a half. The response when I call up is "Oh yeah, we're rebooting some of the towers, that should be gone by tomorrow..." I suppose a newer phone might not have these problems, but they refuse to give me a new phone for free -- and I think I deserve one, seeing as I've shelled out over $2,700 to them over the last three years. I simply refuse to pay for a new phone, at least not for a phone from T-Mobile.

    At least they're not charging me roaming fees.

  5. Re:Show me the code.. on What's Wrong with the Open Source Community? · · Score: 1
    They are not more important because they have the ability to program; they are more important because they contribute something.

    Then we disagree on the importance of constructive criticism and suggestions. I see those things as contributions. Programmers tend to trap themselves in a small mental room where they can't see outside of their immediate task (in case it still isn't clear, I'm a programmer). People who make big-picture suggestions help to break us out of that box. Code is really of secondary value. Any competent programmer can turn a clearly spelled out suggestion into code. It's more rare for someone to have a good idea. Turning these people away because they can't program is insane.

    If you want to "help people", that's a noble and commendable goal. But, just because someone is writing open source software doesn't mean they want to help people.

    With all due respect, you have no idea what I want.

    I hate to tell you, but that's not part of the deal. If you really want changes to be made, make them yourself, or entice (ie pay, encourage, renegotiate) someone else to do it for you.

    First of all, I thought constructive criticism and suggestions fell under the heading of "encouragement." Second, what happened to the concept of doing something for the benefit of someone else? This is something nearly all world religions (or to be more expansive, "philosophies of peace") teach, yet those who try to act in such a way are usually labeled insane in today's world. The way I'm reading what you've said is that you're utterly baffled by the fact that I want to give people what they want, not what I want. You make the statement that "this isn't television; it isn't the movies". You are only reinforcing this idea that being selfless is insane and dangerous. People who go to third world countries to help those in poverty are making true sacrifices -- their health, livelihood, family, etc. The free software developer is only sacrificing his or her time. Can't we at least do that?

    I'm not saying that there shouldn't be priorities or that programmers should immediately run out and implement anything anyone asks them to do. But when a person has written software and released it to the world with a free license, this is a tacit statement that the programmer wants other people to use the software. You've just said that most programmers don't do this for the betterment of other people. Therefore, in my mind it is clear that they must be doing it for their egos.

    If your code is really for pleasure, and to serve your own needs, what purpose is there really in releasing it? It seems like ego stroking to me.

  6. Re:A shift of focus on Kernel Exploit Cause Of Debian Compromise · · Score: 1

    Normally I wouldn't respond to an obscure comment, but I will in this case: what the hell do you mean?

  7. Re:The kernel patch... on Kernel Exploit Cause Of Debian Compromise · · Score: 4, Insightful
    It's only "gory detail" to those who are capable of reading the code: i.e., the crackers. The entry for that patch in the ChangeLog basically reads: "Bounds checking on do_brk()". Only a programmer will recognize that this is a security problem, and the ChangeLog entry is vague and doesn't explain the importance of the change.

    If fixes are made which affect security, the ChangeLog should clearly spell out that it was a SECURITY fix. I guess people don't want to admit that they have found a security problem...

  8. Re:A shift of focus on Kernel Exploit Cause Of Debian Compromise · · Score: 1

    Sorry, some days I doubt my own comprehensibility :-)

  9. Re:A shift of focus on Kernel Exploit Cause Of Debian Compromise · · Score: 5, Informative
    The "nice" thing about kernel exploits (from a cracker's perspective, of course), is that it doesn't matter what sort of userland software is running on the machine -- if you can get local access, by whatever means, it is very easy to boost yourself to root.

    Traditional local root exploits are all based on overflowing a setuid application or server. But if the box doesn't have any vulnerable apps installed, the attacker is SOL. However, if the kernel itself is exploitable, it no longer matters whether those setuid programs are present. All you need is to somehow acquire local access, and wham, you are root.

    To summarize, kernel exploits are very convenient for turning local user account compromises into full-blown root compromises.

  10. Re:Show me the code.. on What's Wrong with the Open Source Community? · · Score: 4, Insightful
    When did I say you were doing anything wrong?

    Let me expand what I said just a little bit. There are two classes of complaining users. The first class are just whiners, who complain about the state of things but can't provide any opinion on where things should be going. Case in point, people on the FreeType list saying "The rendering of this font sucks, you need to fix it."

    There is another class of complainers who complain in useful ways, for example: "The rendering of this font sucks, all the stems for the lowercase characters are too wide. Perhaps this is a problem with the autohinter when using composite glyphs?" The complaint spells out the problem, and suggests where to look for a solution.

    Some people on the list are even nicer; they provide code. These people are, of course, the most helpful in the long run, but there is no reason to treat them as more important than anyone else simply because they have the ability to program a computer.

    It is attitudes like yours which are preventing more people from adopting Open Source. Maybe your goal is to maintain OS as the elitist club that it currently is, but many people (myself included) feel that it should be opened up to a wider audience. Why do we feel this way? Because we think people deserve access to free software that fits their needs. It's a philosophical issue. It's called, "Wanting to help people." And helping people does NOT equate to imposing your way of thinking on them.

  11. Re:Show me the code.. on What's Wrong with the Open Source Community? · · Score: 3, Insightful
    telling people who write software that you can use at no cost and have full access to the source that they need to be doing things differently is about the most egocentric thing you could possibly say.

    Read your own post and tell me again who's egocentric?

    Your sentiment parallels that of many others, namely: "We've provided you with all these things, for free, and you complain? Peon! How dare you question us!" Sounds like you want to be God. Give 'em what you want, and if they complain, well damn them to hell.

    In closing, go away and write some code. If you can't do that, then just go away.

    In other words, you feel that open source should be by developers, for developers. You're entitled to that opinion, but bear in mind that it relegates the OS community to a little corner of reality, where nobody in the real world cares about what you do, and nothing that you do matters. If you want to be a useless, egotistical prick, that's your prerogative. I'm more interested in creating useful software to serve people's needs.

  12. Re:The pre-empt problem: on Linux 2.6.0-test11 Kernel Released · · Score: 1

    Yeah, like the guy is going to go unplugging/plugging keyboards into a running production server. Right. You do realize you can blow your motherboard away like that, right?

  13. Re:Thank you on Linux 2.6.0-test11 Kernel Released · · Score: 1
    The reason the oops dumper is a bad idea is this possible sequence of events:

    1) Kernel bug causes it to accidentally write random garbage all over itself. The oops dumper is part of the code affected.
    2) The kernel crashes and invokes the oops dumper.
    3) The corrupted oops dumper happily trashes your entire disk.

    You'll NEVER convince a core kernel developer that this is a good idea. The ONLY good thing a kernel can do when it determines that it has been corrupted is simply STOP RUNNING.

  14. Re:Expose?!? What About Edge Flipping? on Expose Metacity With Expocity · · Score: 1
    A lot of people find automatic edge flipping to be highly irritating (including myself). It makes it very difficult to easily move the pointer over a sidebar control panel without accidentally flipping to a new desktop. It's nice to "lazy mouse" and just hurl the pointer to the bottom of the screen when you need to hit a button.

    I use KDE, which supports magic edges, but I turn that off. I still get fast access to virtual desktops by holding Shift+Alt and using the cursor keys to flip around (KDE doesn't come configured that way, you have to set it up).

  15. Re:Strouhal numbers on Airspeed Velocity Of An Unladen Swallow · · Score: 1
    No, J = N*m therefore J*m = N*m*m, not a newton.

    Also, 'f' nearly always means frequency. Physicists use big 'F' for force.

  16. Re:Strouhal numbers on Airspeed Velocity Of An Unladen Swallow · · Score: 1
    I don't know where you're getting fA/c = energy... Assuming you're talking about light, then A is the electric field (volts per meter), so fA/c = volts per square meter, which isn't energy.

    The only way fA/c could be energy is if A is measured in joule-meters. I have no idea what a joule-meter is :-)

  17. Re:What is CNET smoking? on So, HP, What Exactly Are You Trying To Sell Us? · · Score: 0, Flamebait
    So now being funny via gross sarcasm is considered "trolling?" What the hell is wrong with these people? Do you actually think anyone with half a brain cell would take that seriously? It's only a troll if you're trolling, for fuck's sake.

    There's a word for people who can't distinguish parody and reality, I think it's called "idiot."

  18. Re:Beyond -O3 on Genetic Algorithms and Compiler Optimizations · · Score: 1
    Considering that (for gcc at least) the only major difference between -O2 and -O3 is enabling function inlining and loop unrolling, that makes sense. -Os helps because small code is more likely to fit in cache. Similarly, -O2 outperformed -O3 because it doesn't inline functions and therefore increase code size.

    Optimization used to be all about straight-line execution and loop unrolling. These days, branch prediction pretty much obsoletes both. It's far more important to keep code size down and maintain cache coherence.

  19. Re:Natural language on Whistle While You Work · · Score: 1
    I take it you disagree with Pinker's proposition that language is an evolved trait? I'm a rather hardcore believer in the "language instinct" but I admit I'm not a linguist and I haven't had much exposure to the opposing viewpoints. Or are you making a more specific statement about modern day linguistic faculty?

    Surely if the ability to process language evolved, then language itself could evolve through similar selective pressure? Imagine ancient hordes of protohumans warring with each other. The groups who communicate most effectively will win out over those who can't. Perhaps the evolution of human language was driven by warfare?

  20. Re:Natural language on Whistle While You Work · · Score: 1
    Why must it take so long to communicate something complex when it can be carried over the internet in a fraction of a second?

    Because from communication theory we learn that to overcome noise in the transmission channel we need to introduce redundancy (i.e. reduce the bitrate). Natural language evolved in harsh natural environments where we are surrounded by different kinds of noises. All it takes is a chirping bird, hissing snake, rolling boulder, etc. to obliterate that little tiny sound that conveyed so much information. The solution is to be redundant, so that accidentally mishearing one sound won't destroy the entire message. For example, if you change just a single bit in a bz2 file, chances are you've destroyed the ability to recover ANY data at all (well technically, any data within that block).

    This linguistic redundancy shows up in many forms. For example, the gender of subject and verb must agree in nearly all known human languages. If you didn't quite hear the subject, you can often infer it from the gender of the verb. There are all sorts of little redundancies in human language, but they make total sense when you consider that humans evolved in very noisy environments.

    As for why the internet can transmit information so much faster than human speech, this has to do primarily with bandwidth. Claude Shannon's bandwidth theorem relates the bit rate of a channel to its noise and bandwidth. One way to increase bit rate is to decrease noise. The other way is to increase bandwidth. Since we don't have the ability to directly reduce noise, we must resort to large bandwidths. The internet has massively more bandwidth than human vocal cords are capable of producing (or for that matter, more than the human brain is capable of processing in realtime).

  21. Re:Theyre everywhere! on Ready or Not, Biometrics Finally in Stores · · Score: 1
    I can see a day where your credit card number is quantum encrypted on a microchip implanted in yoru skull.

    Unfortunately quantum cryptography doesn't work that way. In fact, quantum "crypto" is sort of a misnomer -- it's a way to transmit information in a secure fashion. It has nothing to do with storing information in a secure fashion.

    Quantum cryptography applies to data passing over a fiber optic cable. The photon spins are carefully manipulated in such a way that anyone who breaks the cable to sniff the data will necessarily disrupt the signal, and the parties to the secure communication will immediately know that someone is eavesdropping on them. Quantum cryptography does not actually encrypt anything (although there's no reason you can't apply a traditional cipher to the data in the secure channel).

  22. Re:national buy nothing day on Best Buy Uses DMCA To Quash Black Friday Prices · · Score: 1
    1. Buy car.
    2. Sell car.
    3. Use money to pay mortage.

    Sure, you might lose worst case 20% on a car reselling it the day you bought it, but 20% off 5% is still 4%. You won't find a card with cash back at 4%!

  23. Re:Prime? on Great Computer Science Papers? · · Score: 1
    It is prime.

    I'm not magic. I know how to use factor:

    $ factor 9876543211
    9876543211: 9876543211

    And for the previous example:

    $ factor 2654435769
    2654435769: 3 89 523 19009

    It's not prime. However:

    $ factor 2654435761
    2654435761: 2654435761

    This program is more powerful than you probably think:

    $ factor 9817239879871623867
    9817239879871623867: 3 163 20076155173561603

  24. Re:Donald E. Knuth on Great Computer Science Papers? · · Score: 1
    Yes, but 2654435769 isn't prime. 2654435761 is the closest prime. I guess I should have mentioned that :-)

    The primality guarantees that if n != m then H(n) != H(m), even with integer wraparound.

  25. Re:Donald E. Knuth on Great Computer Science Papers? · · Score: 1
    Out of all the incredible things Knuth has done, you pick THIS algorithm as your favorite? :-) I suppose you and he would be in good company together, with your shared love of, uh, positioning characters with extreme accuracy. (No insult, I'm just picking on you friendly-like).

    As somebody who has had to (reluctantly) write digital typographic code, I can certainly attest that there are more problems involved in positioning characters than an initiate to the field could possibly imagine. Ever since I've started doing it, I find that I notice odd things, like, "The spacing between those two lines of text is off by 1/100th of an inch. Don't you SEE IT? It's driving me CRAZY! Who the hell published this amateur crap?"

    On the topic of Knuth, I would say that the most "useful" thing I've learned from him was a simple integer hash function. Multiply the integer by the golden ratio of 2^32: 2654435761. Simple, and extremely effective (at least when the values being hashed differ in their lower bits).