Slashdot Mirror


User: ufnoise

ufnoise's activity in the archive.

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

Comments · 75

  1. Re:My heterogeneous experience with Cell processor on Panic in Multicore Land · · Score: 2, Informative

    The Cell has one PowerPC core ("PPU"), which is a general purpose PowerPC processor. Nothing exotic at all about programming it. But then you have 6 (for the Playstation 3) or 8 (other computers) "SPE" cores that you can program. Transferring data to/from them is a pain, they have small working memories (256k each), and you can't use all C++ features on them (no C++ exceptions, thus can't use most of the STL). They also have poor speed for double-precision floats.

    I find the most useful parts of the STL, don't even use exceptions. It just has a lot of undefined behaviors. There is only one call, at, for vectors and deques that will throw a exception directly. The STL is mostly concerned with being exception safe. Do you have a reference for C++ programming the cell processor concerning the exceptions?

  2. Re:That was just terrible... on How to Keep Your Code From Destroying You · · Score: 1

    The real thing is to used named constants where it makes sense. #define is the crudest approximation of that, C can use enums, C++ can use "const" for compile-time values, etc.

    In a real project, you have to scope your constants otherwise you'll have a billion of them in "everything.h" and every time you touch it, the world will rebuild. So nix the "centrally located" file theory.


    Actually, if you worried about that. Create an everything.cc and compile it separately. Then use extern in everything.h.

    in everything.h:

    extern const int num_players;

    in everything.cc:

    const int num_players = 5;

    If you worried about performance in optimized builds, have a macro define trigger everything.h to include everything.cc.

    #ifdef NDEBUG
    #include "everything.cc"
    #endif

    And for the love of god, use namespaces to encapsulate global variables.

  3. performance math libraries and atomic operations on Is Assembly Programming Still Relevant, Today? · · Score: 1

    high performance math libraries are often written for specific CPU's using a combination of Assembly and FORTRAN (intel MKL, AMD ACML).

    The gnu implementation of the C++ string class update reference counts using atomic assembly instructions instead of mutexes (lock add).

  4. Re:VMware to avoid hardware compatibility problems on Sun Is Giving Away Solaris 10 DVDs · · Score: 1


            When I installed Solaris last year, there were no drivers to support my hardware.

    What hardware might that be?


    Unfortunately downloading the NIC driver is hard when your NIC is not working. I couldn't get either of my network cards working. Also not fun is getting the NVIDIA graphics card to work. The drivers I am using now in Linux for my Nforce 4 chipset are:

    skge
    forcedeth

    I was able to download drivers and burn them to the CD. Unfortunately I was either unsuccessful comprehending how device drivers in Solaris work, or it had difficulty recognizing the hardware.

    VMware seemed like an excellent solution since it was free (as in beer), and I don't like rebooting.

  5. VMware to avoid hardware compatibility problems on Sun Is Giving Away Solaris 10 DVDs · · Score: 4, Interesting

    When I installed Solaris last year, there were no drivers to support my hardware. I was able to get it to work in VMware and it worked great. There was file which you had to tweak for the interface, but that was about it.

  6. make sure your academic advisor is on board on Ideal Linux System for Newbies? · · Score: 1

    If you are pursuing a PhD, make sure that your committee chair is on board with your decision. He (or she, or it) may often need to exchange files with you. If he is predominantly a windows user, you may have a difficult time, unless you make it easy for him to see your stuff. I preferred to use latex and linux, while my advisor preferred windows and word. It was not fun helping prepare presentations or figures for him from my work. In the end, I am sure he was pretty pissed off by my decision. My colleague used Miktex and word together on windows, and it was a mess for him to keep synchronized with revisions from his professor.

    In addition, you may not need to have linux installed if you are free to use the department computers. Better yet, use the same distro that they do, since you may get some IT help from the support staff.

  7. what about windows only drivers on HP's Windows Bundle Trouble · · Score: 1

    If the video/audio/whatever is windows only, then the machine will not be fully functional with Linux, BSD, Solaris, DOS, or whatever.

  8. Re:Perhaps... on Is Google Too Smart For Its Own Good? · · Score: 4, Interesting


    However, take into consideration the simple fact that after working for such a software giant, you will have non-compete clauses for several years, and quitting Google to someday form your own business seems less than attractive.


    Are non-compete clauses enforceable in California? Are out of state non compete contracts enforcable in California? According to this Wiki the answer to both questions is no.
    http://en.wikipedia.org/wiki/Non-compete_clause#En forceability_in_the_State_of_California

    Does anyone know if Google requires you to sign a non compete clause?

    Working at a large software company in the Silicon Valley, I just had to sign a paper when I started saying my employment was "at will". It also said I wouldn't try to get other employees to leave the company for a period of two years after I left the company.

    You can't steal intellectual property and take it with you. You can certainly continue to work in the same area, even if it means having to move to California.

  9. lower your mtu or go to starbucks on Limiting Bandwidth Hogs on Public Wireless Nets? · · Score: 3, Informative

    If you reduce your mtu, you might be able to squeeze some packets through and reduce latency. At least that is what I did when sharing a 56K modem connection. This also helps when your webbrowser is trying to download multiple images simultaneously.

    Otherwise, go to Starbucks and pay $.10 cents a minute, because hardly anyone else will.

  10. Re:Any 64 bit GPU's? on High performance FFT on GPUs · · Score: 1

    It's the precision. I am solving a set of fully coupled partial differential equations. With only single precision, the matrices being solved may not be accurate enough and it may be impossible to get a solution.

  11. Any 64 bit GPU's? on High performance FFT on GPUs · · Score: 2, Insightful

    While interesting, I need IEEE 64 bit double precision for my scientific applications. Are there any 64-bit floating point GPU's out there?

  12. Re:Unsafe Languages? on Secure Programming in GNU/Linux Systems: Part I · · Score: 2, Informative

    C is an unsafe language, and the standard C library string functions are unsafe.

    "Secure Programming Cookbook for C and C++ : Recipes for Cryptography, Authentication, Input Validation & More"
    by John Viega, Matt Messier.

    This is an excellent book which discusses many of the issues with writing safe code. They present safe versions of many of the standard C library functions.

    In addition, the C++ STL string classes are very well written for doing string handling in a safe manner.

  13. Re:Libgoto is fast but not open-source on Goto Leads to Faster Code · · Score: 5, Informative

    From the article: Some programmers have suggested that Mr. Goto has not joined the open-source movement because he wants to protect his secrets and strategies from competitors. That is not so, he said recently, noting that the Goto BLAS software is freely available for noncommercial use. And he said he was preparing an open-source version.

  14. Re:Same reason classical music is often overlooked on Open Source Engineering Tools? · · Score: 1

    There is also liability involved when doing engineering software.

    Not really. The liability is on the person using your software. If a bridge falls, its the civil engineer who certified the plans that is held liable. The worst thing that could happen is that the engineer goes to jail and they no longer need a license for your software.

  15. Re:Why oh why?!! on Learning to Code with a Boardgame · · Score: 1
    Your argument violates the prinicipal of not doing premature optimization. The choice between ++x and x++ should depend on readability.


    It is one thing if x is an integer. But if it is an object, the ++x is typically faster.


    In C++:
    ++x typically means increment and return the value
    x++ typically means create copy, increment, return copy


    This can potentially be an expensive operation and the compiler may not be able to optimize out the copy operation for anything but the simplest datatypes.


    I don't see this as premature optimization, and I am clearly stating that by using ++x that I don't need the temporary value.

  16. Re:Let's don't get ahead of ourselves on TrollTech to IPO? · · Score: 1
    You can just feel the object oriented speed penalty in both kde and trolltech windows, compared gtk or win32 api c.

    Sure. What about comparing programs that actually do the same instead of some that just somehow look similar? There is no such thing as an "object oriented speed penalty".


    Actually, there is the well known "Stepanov's abstraction penalty" related to many OOP concepts. In C++, this effect can be minimized by using more modern compilers and attempting to understand what the compiler does behind the scenes. The advantage with C over C++/OOP for speed is that the operations behind performed are more visible in the written program, and can be tweaked.


    Personally, I like C++ much better than C for programming. The language enhances my productivity, even if there is a cost associated with some of the OOP constructs I choose to use.


    Also, in the past, kde startup has been known for ridiculous start times as the dynamic linker is tries to resolve all the symbols from the large number of shared libraries it uses.

  17. Re:before anyone says it on Intel Ports Developer Tools to Mac OS X · · Score: 1

    Before anyone says it, this won't replace GCC on XCode. Intel's compiler is expensive and is not 100% compatible with GCC. It also doesn't support PowerPC so as long as they're supporting both architechtures they can't use ICC exclusively.

    The intel compilers are free for non-commercial use. At least on linux and I'm pretty sure for windows.

    Also, it is always a good idea to test your code on as many different compilers as possible. This makes sure that it will be easier to port later on.

  18. large functions in c++ on Effective C# · · Score: 5, Insightful


    Often Wagner's recommended approach is contrasted against bad practices, or practices which might be optimal in other languages but work poorly in C#. An example of this would be Chapter 4's Item 31: "Prefer Small, Simple Functions," where Wagner shows how smaller functions are generally more efficient than larger functions with complex loops. This probably confounds experienced C++ developers, but it's a prime example of how valuable this book is. Wagner shows that .NET's Just-In-Time compiler pays less cost when calling functions than it does trying to wade through convoluted loop logic. His recommendation? Write "the clearest code you can create. Let the JIT compiler do the rest."

    I don't know how he got the impression that experienced C++ developers would be confounded by short functions. By using short inlined functions, C++ developers don't pay any cost by breaking up large routines.

  19. Email Alias and Sender ID on Hotmail To Junk Non-Sender-ID Mail · · Score: 1

    I was under the impression with SPF, if you have an email alias provided by your organization, you cannot use it as your From address if you want to send it from another server.

    For example IEEE provides me an email alias, but they do not provide me an smtp service. I cannot use my ieee address on the From line and send it to an SPF using service.

    Is this true with Sender ID as well?

  20. Syntax and Order of evaluation problem on Effective C++, Third Edition · · Score: 1
    For:
    c+=c+++++c;


    From g++:
    foo.cc:5: non-lvalue in increment
    From Sun CC:
    "foo.cc", line 5: Error: Operand for operator "++" must be an lvalue.


    There may also be an issue with:
    c+= c++ + ++c;
    Because while precedence rules apply, it may be undefined which of the 2 arguments to the + operator get evaluated first. This is very dangerous and non-portable code.


    For example:
    #include
    using namespace std;
    int main() {
    double c=0;
    c+=c++ + ++c;
    cout << c << "\n";
    }


    ~/ctest> g++ -O2 -Wall foo.cc ; ./a.out
    4
    ~/ctest> g++ -O2 -ffloat-store -Wall foo.cc ; ./a.out
    1

  21. Re:I see a flaw. on Water Now More Awesome Than Previously Thought · · Score: 1

    I will have to try to make a siphon with a hose and a pool.

    You can use the water jet in your pool to push the water up the hose and out of the pool. Once it is started, it will keep going. This is how we used to drain excess water from our swimming pool.

  22. Re:Why is this a bad things? on Mozilla Uncooperative With OSS Groups on Security? · · Score: 1

    This is a perfect way to end up in rpm hell.

    If you try to remove the firefox rpm, rpm will complain about dependency problems from tools which rely on firefox.

    If you force the uninstall, you need to make sure firefox is installed where the other tools can find the firefox libraries.

    I end up keeping the old rpms installed, but running the binary directory from the install directory. Any apps running off the old firefox libraries are unsafe. This is ok with me, since I don't use any of those programs. Unfortunately I can't remove those programs without breaking some other dependency.

  23. Re:*sigh* on RMS Weighs in on BitKeeper Debacle · · Score: 1

    As for the maturity exhibited by the "unbunched panties of the BSD community"--what has that achieved for them? The many variants of BSD are certainly excellent from a technical perspective and are popular for web hosting and security, but there is a reason for the "BSD is dead" jokes--it is invisible to the general public and has no presence at all on the desktop. RMS and others might come across as wingnuts at times, but it is their dedication to ther beliefs and their inthusiasm for the free software movement that has made GNU/Linux as successful as it is.

    Isn't Mac OS X a BSD kernel? It is quite popular on the desktop.

  24. Re:Sometimes C++ programmers miss the point on C++ Creator Confident About Its Future · · Score: 2, Informative
    When programmers are a major cost (believe me, at Wall St. firms, they are a huge cost compared with the cost of machines), you should optimize the amount of time they spend waiting for compiles. We have a C++ library that is around 250,000 lines of code, that compiles in around 2 hours (and this is after a lot of work to try to make the compilation as fast as possible). We also have a 1,200,000 line java library that compiles in around 3 minutes. Any way you play it, programmers still spend a lot of time in the write code / compile / test cycle. In fact, this is where they spend most of their time.


    Perhaps you need to take a look at your build system.


    If an incremental change to you program is triggering a massive recompilation of everything there may also be a problem in how include's are being handled or your make files. There are several well known techniques to reduce this.

  25. Re:DUL Listed on Should You Trust MAPS? · · Score: 1

    How do you find a way find a way around the forward/reverse DNS lookups not matching? If you've got a way to do this, I'd like to hear about it. Couldn't the malware figure out the ip address of the machine he is running on, do the dns lookup, and then use that as the HELO. If your email was being denied because your forward and reverse records did not match, then your mail server and/or DNS were not configured correctly. The onus is on *you* to do things the right way. The guy on the other end of the wire was doing his best to protect *his* mail server. The admin who blocked said he was following the RFC's. The RFC says that you are only able to use the incorrect HELO/ELHO for logging purposes, not to deny email. He was therefore incorrect in doing this if he was telling me he was following the RFC's. Incorrect HELO/EHLO should only be advisory and left up to his commercial customers to filter with their anti-spam software. He was telling me only 1 or 2 legitimate email customers a day out of thousands for his commercial clients. If I was using his service, I would find this unacceptable.