Slashdot Mirror


User: HuguesT

HuguesT's activity in the archive.

Stories
0
Comments
3,087
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 3,087

  1. Gcc still a great compiler on IBM Releases Compiler for Power4 and G5 · · Score: 2, Insightful

    Looking at all these pretty graphs, and knowing that in most cases sane people will restrict their optimization to -O2 (-O3 and above are usually unsafe: not as well tested, may change the program behaviour, cut corners with IEEE math, etc), GCC is still looking pretty good.

    In most cases in both FP and Integer, GCC matches XLC up to -O3, sometimes a bit slower, sometimes a bit faster.

    I applaud the work of the GCC people. GCC is the most versatile and portable C compiler, and it's not half bad at optimizing either.

    Thanks too to IBM. Their compiler will surely prove useful in a lot of cases, and a new compiler to try and benchmark is always good news!

  2. Re:Secure programming on Practical C++ Programming, Second Edition · · Score: 1

    What the parent might mean (I'm not sure) is that there are functions and idioms in C/C++ that shouldn't be used because they are unsafe from the security point of view.

    Things like sprintf (use snprintf), gets(), using arrays instead of vectors, etc.

    If every software developer knew them C/C++ might not be the cause of so many buffer overrun-related security issues.

  3. Re:Debugging on Practical C++ Programming, Second Edition · · Score: 1

    So, can't you use a few pixels on the video card as the output?

    I used to program drivers for embedded network cards. I sometime debugged sending morse code to the blinking collision detection LED.

  4. Re:11mp on Sony Shoots For 4-Filter CCD, 8 Megapixel Camera · · Score: 1

    That can't be right. 35mm format is 24x36mm
    11MP with that aspect ratio is 4062*2708 square pixels.

    36mm/4062 = 8 micrometers.

    The wavelength of red is 0.8 micrometers, a factor of 10. The limit in number of pixels would then be 1100MP, 1.1 gigapixels.

  5. Re:What is 35mm equal to? on Sony Shoots For 4-Filter CCD, 8 Megapixel Camera · · Score: 1

    You are right of course that high-quality 35mm are still better than film on the resolution and colour depth sides.

    However there are aspects of digital photography that makes it already better than film:

    - adaptive sensitivity. Great 35mm film is 25-50 ISO. What if you want to take a night shot? 400 ISO film is WORSE than 2 megapixels. try it some time.
    - zero cost of film. You can take as many pictures as you want, and you get instant feedback. The likelyhood of getting a good shot increases with feedback and the sheer number of photo taken.
    - size of camera. Need I say more? for the most part a great 35mm camera is huge, obvious and non-trivial to use compared with a good quality digital.

    I was a doubter until I got to use a digital camera for quite some time. IMHO a consumer 4MP camera is better than film 95% of the time. The newer SLR 6+MP cameras from Nikon and Canon are better than 35mm film in 99% of the cases.

    You will have your 100% better by the time digital comes to 30MP and 10-bit pixel depth, but already you would benefit by having a digital camera in addition of your film one.

  6. Re:people will buy machines on Will Humanoid Robots Take All the Jobs by 2050? · · Score: 1

    The natives were beaten on sheer numbers. However notice that the natives are still around and that possibly in a 100 year they will still be, while the western society and the American Way of Life may have collapsed.

    Nothing is permanent in this world, and cultures are hard to kill. Even in Australia where Aboriginal population have dwindled by 90%, the culture is still very strong.

  7. Re:I'd like to take this oppertunity.. on Head First Java · · Score: 1

    Thanks, that was very informative.

    A few comments ; I thought that the `final' keyword was reserved for whole classes but you are right, it can be attributed to methods only.

    I think the point is often made, at least in C++ circles, that a mandated GC in standard C++ would be non-real-time, because a real-time GC has worse average performance (like you said) and is very OS-dependent. I'm not sure you could implement a real-time GC for current Linux 2.4 for example. It would require kernel support, and so it is fair to compare malloc/free vs. non-real-time GC because that is realistically what developers would face.

    > The work of scanning the stack to discover the
    > rooted objects isn't as bad as you might think,
    > particularly on architectures where pointers
    > have to be aligned, and especially when the GC
    > knows where the pointers in heap resident
    > objects are to be found

    Even on 64-bit architectures? Even with lots of allocations (hand-written lists, etc)? I guess it's possible but non-trivial, and a search is always at least O(log N), right?

  8. Re:Canon i850 is the best on Color Printing Without the Inkjet Mess? · · Score: 1

    According to the linuxprinting, this printer does not work well under Linux. I didn't buy it for this reason and went for the Epson C82 instead. Very happy so far.

  9. Re:Before all the flamers get in. on Qt On DirectFB · · Score: 1

    X is almost 20 year old, not 10. X10 (the first version of the protocol) was announced at MIT in June 1984.

    See this link on the history of GUIs.

    That should give you pause. X was designed and implemented more than a year before any version of Windows. That it has been holding out that long is an amazing design feat. So think again: because it's old doesn't mean it's bad.

    My personal feeling is that X is still better than any version of the Windows GUI. It's more versatile, more powerful and at least it's open. Any replacement will have to be damn good, not just a half baked idea.

  10. Re:remove export on Latest Proposals for C++0x · · Score: 1

    That's strange I find this thread particularly uninformative.

    If you read the EDG paper, they are saying in effect that you can't compile templates to .obj files to be put in a standard .LIB or .a library somewhere, because the users of that template library will need to see the template definition to be able to instantiate it on their own objects and types.

    This opens a can of worms. What do you then compile the template to? Probably some kind of obfuscated source form that your compiler can still read and use to instantiate. Now this obfuscated form is not standard. Presumably EDG compiled this to machine-readable standard C++ that any compiler can read, but what if Microsoft decides to output the template source to some kind of proprietary weird archive format that only they support? What a great way of ensuring that library users will be tied to all current and future versions of your compiler!

    I think this is what EDG meant by the standard not being specific enough about `export'.

    From the above it is relatively clear that export has few benefits. People who ship template library can already obfuscate their template source code and simply document their interface in a manual somewhere, if they really want to do that.

  11. Re:How 'bout range checking like purify? on Latest Proposals for C++0x · · Score: 1

    ElectricFence uses the hardware to do bounds checking on Linux. If you want to detect both overwrites and underwrites you need to allocate two extra PAGES per malloc. This is fine for a whole host of programs, but if you happen to be using say a large priority queue with lots of mallocs you run out of resources very quickly.

    Moreover ElectricFence only check bounds for arrays allocated on the heap. For stack arrays you are stuck (ha).

    ElectricFence is not run-by-default-when-debugging solution. In many cases you need to make extra efforts to make your program run with it, at least use a small input dataset, which may not trigger the bug you are seeing. This is not the be-all and end-all of memory debugging under Linux, by a long shot.

    However it's a good tool and I use it very often. For the other cases where ElectricFence is useless, I use valgrind, and go out for a cup of tea.

  12. Re:I'd like to take this oppertunity.. on Head First Java · · Score: 1

    Hi,

    > Good GC implementations are actually significantly
    > faster than hand memory management (malloc/free)
    > in terms of total CPU time consumed by memory
    > management,

    Can you provide a reference to that, this is interesting and I don't believe it offhand. I can't see why a multi-threaded GC would be better either. It would have to block all the threads as well, and it would have to do at least a log(N) search for garbaged blocks, whereas a hand free is constant time, no search needed.

    > Then again, it's good to keep in mind that most
    > malloc/free implementations don't provide any
    > maximum latency guarantees, either (though average
    > latencies do tend to be less than with GC).

    Similarly there are real-time implementation of malloc/free that do provide maximum latency guarantees. The best approach might be a malloc/free combined with a GC. The frees are used as simple markers and return instantly. The GC is called when CPU usage is low and does the actual free in one go. You get the best of both world at the cost of increased average memory usage.

    You are right about the indirection problem. At least in C++ you can elect not to use virtual methods if you don't need to.

    Finally in my opinion the curse of java is the guarantee that bounds are checked for every array access. This is great during development but there ought to be a way to turn that feature off.

    I work in image analysis where array access is what we do all the time. That aspect of the language is a killing blow.

  13. Re:Nobel peace prize on Linus Torvalds about SCO, IP, MS and Transmeta · · Score: 1

    Unfortunately many people think that the Nobel prize for peace is not such a prestigious award anymore (except for the prize money of course). One sure way to get it is to prosecute as hard and as bloody a war as you can and then stop. Sometimes pretending to stop is enough.

    It worked very well for Kissinger, Sadate and Arafat, for example.

  14. Re:good idea on Microsoft Considers $10 Billion Dividend · · Score: 1

    So there are really at least three bases, right?

  15. Re:Reassignment of terms. on Ink More Expensive Than Champagne · · Score: 1

    Far from it.

    1 gallon = 3.78 litre = 3.78 .10^3 g (assuming density of LSD is 1)

    3.78 . 10^3 g / 100 . 10^-6 g = 37.8 10^6 doses

    not even 38 million people would get high once.

    Population of the planet ~6 billions

  16. Re:Extremely ironic... on Bill Gates On Linux · · Score: 1

    *The* GNU kernel and the Bazaar style of software development.
    Enough said.

  17. Re:hang on there! on Bill Gates On Linux · · Score: 1

    Well the really good thing I like with mplayer and xine is that they allow you to play any chapter on any DVD without having to go through the stupid menu system someone has designed to work with IR remotes.

    Also mplayer/mencoder is a one-stop-shop for a lot of neat things: want to watch TV in a text console? you've got a choice of AAlib for the fun factor and of direct FB access if you don't like X. You want to record and encode this show in real time? there you go. You want to backup this DVD onto a CD? no problem.

    Mplayer is a neat piece of software that brings nearly all multimedia under the one heading.

  18. Re:Oh, come on. on Bill Gates On Linux · · Score: 1

    USB 2.0 is supported just fine on my RH9 worstation (completely run-of-the-mill DELL PC), thank you very much. In fact I was astonished to read that Windows did not support it until very recently.

  19. Re:ATI Linux Drivers on ATI's Radeon Linux drivers no longer supported? · · Score: 1

    On that same topic I have written earlier that the NVidia drivers don't work that well. I'm on RH9, dual-head, SMP. This is not a well-tested setup by nvidia and I have all sorts of weird problems. Under RH7.3 I was running out of shared memory all the time (applications would not even start) and 3D was shoddy.

    With RH9 it is a little bit better for some reason. Now my main problem is that my USB camera does not work any more. It does with the `nv' driver (but no 3d then).

  20. Re:Isn't this suppored by DRI? on ATI's Radeon Linux drivers no longer supported? · · Score: 1

    I agree mostly, but the NVidia drivers suck too. I'm on a SMP system using RH9, dual-head. Under that setup my USB webcam refuses to work. If I use the open-source `nv' driver all is well (but no 3D).

    Previously under RH7.3 I was running out of shared memory after about 2 days of work, all thanks to the nice NVIdia drivers.

    They are there but you have to hope and pray that everything works for you.

  21. Re:It's not that obvious on Pure Math, Pure Joy · · Score: 1

    Transfinite numbers are very useful.

    The discovery that there are different classes of infinites numbers forms the basis of modern set theory, from which one can derive a simple and effective measure theory and the Lebegue integral.

    The Lebegue measure is use *everywhere* in physics and applied mathematics.

    Besides, how would one manage the Hilbert Hotel without them?

  22. Re:Think Different on Apple's G5 Speeds Challenged · · Score: 1

    I get no error messages from icc_7.1 with tth_3.40. It just crashes, after trying to compile it with no message for about 1 minute. Gcc compiles the same code correctly in about a second.

    I do a lot of math but mostly the integer variety (for image analysis). For this gcc is very good, I find.

    I haven't used gcc-3.3 yet. I tend to wait for .1 releases.

    I have hacked into gcc in the past to remove annoying messages and default behaviours (no to improve the compilation), I certainly appreciate
    having the source around.
    Thanks for responding.

  23. Re:Comparing penguins to apples on (When) Will Linux Pass Apple On The Desktop? · · Score: 1

    There aren't that many of them (IE-only pages) to be annoying, and I doubt the vast majority Linux users know how to do that .

  24. Re:RMS is an idiot... on RMS Cuts Through Some SCO FUD · · Score: 1

    I think you misunderstand. RMS is saying exactly the same thing as you. He is not advocating that the Unix code be copied as *this would be illegal*.

    However his opinion is that the copying of software is not unethical, and that therefore it should not be illegal. But he is not advocating that you break the law. He is advocating, rather, that you yourself as a developer, when you next create some piece of code, you make it *legal* for anybody to copy this code. His preferred way of doing that is for you to licence your code with the GPL.

    RMS has created a whole foundation around this idea, and tens of thousands of developers around the world have taken notice. If you are using any GPL code (gcc, Linux, ...), this is directly thanks to that idea.

  25. Re:Live! From Planet Stallman! on RMS Cuts Through Some SCO FUD · · Score: 1

    You are also working on the assumption that you live on an ideal, utopian world.

    In your world people or entities come up with completely unique and original ideas and fully own them. Pieces of of code are the embodiment of such ideas, and because they are original and unique they can be the property of somebody.

    However, ideas and pieces of code are not like a house or a car. More than one person can have them at the same time and no one is deprived.

    In the real world we live in some ideas are not owned by anybody in particular: One click online shopping, the idea of hypertext, a business model, the LZW compression technique, Who really invented them? How do you take into account the fact that most new things are incremental advances? Yet we have a whole system of law designed to protect such fragile pieces as genuine properties.

    Inevitably some of these cases are subject to controversy. Some people feel hard done by, on either side.

    Now let us not forget that IP laws were invented originally to foster creativity and the free exchange of ideas. One gets a reward out of inventing something *and* publishing it in the form of a patent.

    But now these sames laws have been perverted, exactly as in the LZW controversy or in the SCO lawsuit. They are no longer been used to help creativity, they are used to hinder it. The IP laws are used to frighten people, to maintain sources of revenues from long dead sources of IP. They foster the rule and interpretation of law rather than the rule of science and innovation.

    Of course it's fair that genuine authors get revenue and kudos from their intellectual work, Stallman himself is clamouring that.He certainly want the kudos with the whole GNU/Linux thing.

    What he is saying is that the copying and sharing around of toughts in the form of code is in everyone's best interest. He himself singlehandedly came up with the ideas behind the Free Software movement, and quite a bit of useful code as well. He opted to share that code and these thoughts. He encourages everyone to copy them and to do the same to their code. In fact he makes it a requirement that if you use his code in your project then you *must* do as he.

    He is not saying that you should ignore laws and copy things willy-nilly, but that in his opinion and as demonstrated in his acts, the copying of code is ethical and should be encouraged.