Slashdot Mirror


User: sasami

sasami's activity in the archive.

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

Comments · 259

  1. Re:Imprecise floating point! on Intel C/C++ Compiler Beats GCC · · Score: 1
    Please think about these before you write - precision is a very subtle concept when one is considering numerical techniques!

    Indeed, I don't work with numerical code very much, and not at all on x86. (What I do is low-level embedded stuff, and I get vaguely nervous when compilers generate code that I don't expect.) Nevertheless, the manual was pretty clear about the impact of these optimizations, which is why I linked to it.

    Replacing division by multiplication is fine (a/x = aq exactly if q=1/x)

    I admittedly oversimplified this one. Multiplication by reciprocal is obviously fine, conceptually. It's the compiler's implementation that is not precise. The fudge is only an edge case, but it's a pretty big one:

    With some optimizations [...] the Intel® C++ Compiler changes floating-point division computations into multiplication by the reciprocal of the denominator. For example, A/B is computed as A x (1/B) to improve the speed of the computation. However, for values of B greater than 2^126, the value of 1/B is "flushed" (changed) to 0. When it is important to maintain the value of 1/B, use -prec_div to disable the floating-point division-to-multiplication optimization. The result of -prec_div is greater accuracy with some loss of performance.

    Truncation of a float to an integer - exactly how else should truncation be performed if not rounding to nearest integer? Have you ever done any numerical analysis?

    Truncation does not mean round-to-nearest. Or, to be more specific, the truncation operation in ANSI C/C++ does not mean round-to-nearest. It's simply not correct behavior -- and fortunately, I was wrong about this being a default. It defaults to OFF, as well it should. Rounding doesn't happen in C unless you ask for it.


    the idiosyncracies of the floating point unit (80 bit internal storage, stack based registers, etc).

    Being familiar with these idiosyncrasies wouldn't have helped me realize that the 80-bit long double was being "optimized" to a 64-bit ordinary double. I imagine I would also have wasted a lot of time trying to figure out why library calls were failing:

    Use -long_double to change the size of the long double type to 80 bits. The Intel compiler's default long double type is 64 bits in size, the same as the double type. This option introduces a number of incompatibilities with other files compiled without this option and with calls to library routines. Therefore, Intel recommends that the use of long double variables be local to a single file when you compile with this option.
    --
    I like canned peaches.
  2. Imprecise floating point! on Intel C/C++ Compiler Beats GCC · · Score: 5, Insightful
    The article doesn't bother to mention what compiler flags were used to optimize the benchmarks.

    The Intel compiler does not generate precise floating-point code by default!

    From the compiler documentation:
    Option: -mp
    Description: Favors conformance to the ANSI C and IEEE 754 standards for floating-point arithmetic.
    Default: OFF
    Looks like we can't even have IEEE compliance, we can only favor it. More gory details can be found in the manual (warning, big PDF...), but the "optimizations" that shocked me most were:

    Division may be replaced with multiplication by the reciprocal The long double type is identical to normal double "Truncating" from float to integer is actually round-to-nearest!
    These are all defaults. Trading precision for speed can be a lifesaver sometimes, but not in numerical analysis!

    --
    I like canned peaches.
  3. Re:This is embarassing on Tracking Down The AMD "Processor Bug" · · Score: 1
    Oh, that's easy. The engineer who discovered the problem should have realized that it's not necessarily a Windows-specific issue, but a problem that any OS could have. He should have then tried to contact all the OS vendors, not just Microsoft.
    Really? Are you volunteering? When I see software doing something stupid like mapping an uncacheable device as cacheable, I don't stop and say, "Gee, I wonder how many other people are also being stupid!" and then spend my time examining everyone else's code looking for the same goof.

    And yes, I do this kind of stuff for a living.

    --
    I like canned peaches.
  4. Re: Illegalities and Kids... on Educating Youngsters About Piracy · · Score: 1

    Interesting. I've always thought that if I can't pay for something, then I'll make do without it. My mistake, sorry. I guess my upbringing didn't include the "spoiled brat" part, so I don't have that sense of self-righteous entitlement that allows me to demand whatever isn't handed to me on a platter.

  5. Re: Ok, for once and for all... on Educating Youngsters About Piracy · · Score: 2, Interesting
    Yes, indeed, let's set the record straight:

    If you are not a software developer active in the industry, you probably don't know what you're talking about.
    Corollary:

    If you don't have a 401K, or, worse, if you don't know what a 401K is, please shut up.
    Do you actually think that this is all about boxes and manuals and discs in a warehouse? That is not software.

    Do you actually think that this is even about the bits on your hard drive or CD-R? That is not software.

    Software is what I produce after getting up much too early every morning and coming home much too late at night. It involves an often entertaining but really quite exhausting effort on my part, five to seven days per week. When you make an illegal copy, what you are stealing is my time. I live in a country whose economy does not revolve around physical goods. The US economy became services-oriented a long time ago, and I expect fair compensation for my services as an engineer.

    Yes, that compensation may be low, for any number of good reasons. I cannot sue you for persuading someone not to buy my crappy software. And I cannot complain if you persuade someone to buy my competitor's software -- someone in an earlier thread tried to compare Company A's "lost sale" to piracy with Company A's "lost sale" to Company B. In the latter case, my counterpart at Company B has received compensation for writing better software than I did.

    No, what I'm referring to the model that plumbers, auto mechanics, and doctors have followed for years: payment for services rendered. Nothing disappears from a warehouse if I refuse to pay my plumber. You wouldn't call that theft? I've benefited from his services, two hours of his life that he cannot recover. Let's make it more explicit: my doctor removes a tumor, but my medical insurance is fake (I don't like paying the monthly premiums). Have I stolen anything?

    Obviously, I don't contend that the issues are black and white. A large fraction of copies do not represent lost sales, for the usual reasons. There are even cases where infringement is quite justified -- fair use versus DMCA, or Microsoft's despicable "no reimaging" license. I neither expect nor want unfair compensation for my services either.

    PS, I'm all for free software. When I contribute my time to free software, there is still fair compensation, it's just not monetary. I do not expect to feed my family that way.
  6. Re: Illegalities and Kids... on Educating Youngsters About Piracy · · Score: 1
    I think that most of the "pirates" know more about the illegalities of what they're doing more than the actual people aresting them. In fact I would bet my legal software on it.

    You'd be likely to lose, especially if you're talking about pre-college kids. How many have you talked to, personally? I work with about 50 teenage students. Of those who steal software (about half, i.e. most of the boys), perhaps one or two has ever given any thought to the legal or ethical implications. They neither know nor care.

    Let's make this clear by removing the fuzzy issue of copying versus stealing. Instead, assume both extremes:

    Suppose copying software were harmless -- even beneficial. Say, gold coins magically appear in developers' cubicles anytime someone makes a copy. Most kids would neither know nor care.

    Suppose that copying software were literally harmful. Say, developers' bank accounts magically shrink. Most kids would neither know nor care.
    By and large, what they do care about is getting software without paying for it. This is largely equivalent to getting software without having to ask their parents to pay for it. This is largely equivalent to getting whatever they want as long as they can get away with it.

    That is what frustrates me most. It is completely orthogonal to the tired debate on whether piracy is right or wrong. For most kids, right or wrong is simply no match for "what I want." This is typical of teenagers, myself included when I was that age, but that doesn't mean I have to tolerate it anymore. They can form their principles however they like, but if they discard them whenever there's a conflict with "what I want," then they're not principles, they're just excuses.

    This is a point that the NYTimes article seems to miss completely. Telling kids not to do "X" is meaningless (except in very young children, e.g., "don't cross the street"). For all other cases, you cannot teach behavior, you can only teach behavior models.
  7. High School != College on Java as a CS Introductory Language? · · Score: 1

    Much of the discussion here has centered on students who are planning to make a career out of CS. However, an Advanced Placement Computer Science class has an entirely different goal:

    To prepare high school students for the AP Computer Science test.

    The curriculum of any AP class is very strongly dictated by what ETS decides to put on their tests. Of course there are principles to adhere to; of course there will be students who are taking the class out of love for the subject. But if the class is called "AP Computer Science," then it is a disservice to the student if the class is anything but a preparation for the test. The impact on college admissions makes this a necessary evil.

    The AP test, of course, is a crock. A real high school CS course should be able to use any approach, any language, any curriculum, that is necessary to teach the students -- and to change those requirements according to the needs of each particular class. Instead, teachers are shackled by the often inexplicable design of standardized tests.

    This is a shame, because computer programming has enormous value beyond getting a hot job. It teaches a mode of thinking and analysis that is unique, powerful, and broadly applicable. To that end, it is absolutely worth the effort to coddle students who are less talented or less interested. There are posters here who advocate weeding out these students, for no better reason than to eliminate the mere possibility of a "bad programmer" entering the workforce. How petty. I would submit that the appalling lack of critical thinking skills in the general population makes any exposure of computer science to any student a worthwhile endeavor.

    (And, just to be complete, the appalling lack of analytical breadth in tech. industry and tech. education makes any exposure of liberal arts to any engineer a worthwhile endeavor. =)


    ---
    I like canned peaches.

  8. Abstraction on Virtual Child Porn: Is It Illegal? · · Score: 1

    It seems that many posters are looking at this from a viewpoint that's slightly too abstract. Many replies have been in the vein of, "Child pornography is vile, but nothing is so vile that our rights should be abridged to prevent hypothetical events."

    I vehemently agree with that sentiment, but only up to the point where it smacks face-first into reality. My opinion would likely have been different a few weeks ago, before CNN slapped this article on its front page (which then linked to the second article, from last year):

    From http://www.cnn.com/2001/WORLD/europe/UK/01/10/lond on.porn.02/index.html:

    Members of the club, who described themselves as "the cream of paedophiles", had to send in at least 10,000 indecent images of children to join.
    ...
    A library of 750,000 computer images of more than 1,200 victims and 1,800 computerised videos depicting children suffering sexual abuse were found.
    ...
    "The youngest victim was about three months and other victims aged up to about 18 years."
    ...

    From http://www.cnn.com/2000/WORLD/europe/italy/10/28/r ome.porn/index.html:

    A police operation specialising in Internet crime and based near the port city of Naples reported that the Russian paedophile ring ran an operation to kidnap children from orphanages, circuses and public parks and film them while they were forced to commit sexual acts.
    ...
    The material cost between $400 and $6,000 for each video or disc depending on the type of film the customer wanted -- the more horrific, the more costly. The service was divided into several categories. "SNIPE" was the term given by the ring for videos of children filmed nude without their knowledge. "CP" was the code word for ordering an item from a paedophile's "private collection." The most gruesome, police said, was coded "Necros Pedo," in which children were raped and tortured to death.

    These are obviously extreme exceptions. I imagine almost all "pedophiles" do nothing but collect child porn, and those few who aren't satisfied with just porn were already run-of-the-mill molesters and abusers (who can be caught and convicted the usual way). But there is clearly a subset that is orders of magnitude more dangerous, with a "market" large enough to sustain significant organized crime.

    It's worth noting that 750,000 images of 1,800 children comes out to about 400 images per child. I have difficulty reconciling these numbers with the idea of consenting minors having sex for pleasure, so I'm inclined to believe the articles' claim that majority of this material depicts sexual abuse of unwilling children.

    So what does this have to do with virtual child porn? As many have said, it's much too easy to diddle a few pixels in a real photograph to make it look edited. Suddenly, serious sex offenders cannot be convicted, and enforcement goes down the tube. As much as it violates my ideals, I cannot bring myself to look favorably upon anything that makes it harder to convict child abusers! This position has been already been stated several times, and the usual response is, "that's a problem for the police."

    Nothing is so vile that our rights should be abridged to prevent hypothetical events?

    Allow me to submit the opposite opinion: I am willing to cast my rights to the wind, if there is even the possibility of sparing ONE child from such revolting abuse.

    Is this naive? What about the slippery slope? Censorship and Big Brother? Giving up essential liberties for temporary safety? Well, I'd rather take my chances with that, when the time comes. It's much easier to fight runaway legislation than it is to fight organized crime... especially organized crime that isn't even motivated by profit, but by lust -- perhaps the most powerful and irrational of biological drivers. Most posters have characterized this slippery slope as "dangerous," which it certainly is. But child abusers are also dangerous, and it's fairly clear to me which is the greater evil by far.

    In a similar vein, we can also invert the slippery slope. Is it not equivalent to ask, "How many children have to be abused before I should accept an abridgement of my rights?" If the answer is more than "zero," then I've already hit the slippery slope.

    It's easy for me to sit here, safe in my house, and say, "I will not give up my Constitutional rights!" I would love to bury my head in the sand and just leave it at that -- many sex offenders will be acquitted, with or without this law, so what difference can it make if I hold to my high-handed principles and oppose it? Well, let's suppose we can look into the future and see that the difference is exactly one child -- a single pedophile is acquitted who otherwise would have been convicted, and proceeds to rape a single child. Is that a fair price? Let's make it less abstract: would you be willing to watch a videotape of that child being raped, in exchange for quashing the law? Is that a fair price? What if the price were eight children? Eighty? 1800?

    Let me restate my position thus:

    This law might prevent hypothetical child abuse. Eliminating it might prevent hypothetical rights abuse. Both abuses are certain to continue, but it's possible to reduce one of them. Pick one.

    Now, before anyone does so, don't take this and apply it to, say, murder. I'm quite aware that it doesn't apply universally. Yes, that means I'm making an exception for children! Yes, I'm being inconsistent, damn it! But then again, so is the body of law in this and most other countries: children are treated differently, and they deserve to be. If you do not have children of your own, it may be very difficult to understand this at the overwhelmingly visceral, gut-wrenching level that a parent does.

    (In any case, there's no pending legislation that would suddenly make all murderers significantly harder to convict.)

    Now, having said all that, I do not necessarily believe in the good will of those behind this legislation. Orthogonal to ethics, it's obvious that this legislation is overbroad, and should not criminalize anything that is provably fake (such as digitally signed images from known sources, as one poster mentioned), to say nothing of drawings or text. The aforementioned idea of pursuing those cases through tort law is one of the best ideas I've heard in a long time. To go one further, I'm not even sure I would oppose, on legal grounds, consensual underage pornography if the minor could demonstrate sufficient mental and emotional capacity to make such a decision. (On moral grounds I would certainly oppose it, but that's neither here nor there.)

    Of course there's great potential for abuse of the law, but even then, I don't think we're going to see people being arrested for having pictures of 18-year-olds who look like they're 16 -- or even pictures of 16-year-olds who look like they're 16. IANAL, but I don't think a jury is likely to convict with that kind of reasonable doubt. Incidentally, the challenge before the Supreme Court is being brought by the adult porn industry, which is worried about exactly that and nothing else... I seem to remember that they are not challenging aspects that deal with children who are obviously underage. Perhaps that makes much of this discussion moot.


    ---
    '

  9. Re:Scam Scam sausage and Scam on Peter de Jager: Where Is He Now? · · Score: 1

    Most of the competent PC techs on Earth hadn't even been born when much of the problem code was written.

    Banks do not run on PCs.
    Air traffic control does not run on PCs.
    Power plants do not run on PCs.

    If you actually think the Y2K problem was what the mass media says it was, then you must know as little about it as they do.