Slashdot Mirror


User: wtarreau

wtarreau's activity in the archive.

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

Comments · 142

  1. Re:solution on Spam Capital of the World · · Score: 1

    spam is profitable as long as 0.01% of the spammed masses buy the pills. As long as there are just a few idiots buying into the crap, we all get spammed

    as long as there will be humans, there will be more than 0.01% of idiots. Either you kill the hundred millions of dump people to stop them from buying the pills, or you kill the hundred millions of smart people to be sure that all the spammers will be within them. There is no solution to this: smart people will always abuse the dumbest ones.

  2. Buy cheap common boards, don't use crappy devices on Simple, Bare-Bones Motherboards? · · Score: 1

    Buy a cheap common board, and simply don't use the crappy devices provided with it. I personally don't know anybody using the onboard sound cards. They're just good enough to be connected to $5 plastic speakers, but the signal/noise ratio is absolutely awful. Onboard NIC and USB can sometimes be good though. Anyway, an all-in-one board will cost you less than the rare board with just what you want.

    Willy

  3. Re:What I'm curious about on Firefox 1.1 Boasts New Features · · Score: 1

    I have firefox running on an always-on PC. I need to restart it every few weeks because it constantly slows down up to the point where it takes a minute displaying freshmeat. When it does this, it eats *LOTS* of CPU cycles doing nothing, and a lot of memory too. While I'm typing, it's already eating 94 MB RSS. This is a lot for a browser with a few tabs and no plugins.

    Willy

  4. Necessary on low-level code and interfaces on Comments are More Important than Code · · Score: 2, Insightful
    Having spent much time on low-level code (assembly or complex C primitives), I can say that comments are important when it is difficult for the reader to understand the sense of group of lines.

    In assembly, this is totally necessary. For example, this old DOS code :
    mov ah,7 # 7=character printing function
    mov bl,7 # color code : 7=white
    mov cx,1 # one char
    mov al,[esi] # character to print
    or al,al
    jz end # stop on NULL char
    inc esi
    int 10 # print it
    end:
    Obviously, without the comments, you won't understand what I wanted to do, and you could for example suppose that I could have replaced 'mov bl,7' by 'mov bl,ah' since they were identical, which was pure coincidence.

    In higher level code, on tree-walking functions, or in finite state machines, you need to comment your intent, because you'll always put bugs, and the only thing which counts is the algorithm that you validated by hand on paper. So you explain what you tried to do, and anybody reading your code (including you) will then understand why some transitions don't work as expected.

    I often ask friends to comment their interfaces so that even themselves know if their input is valid. Example below:
    // opens file "f" for read/write, creates it if it does not exist,
    // creates the parent directories if needed. If f is NULL or empty,
    // opens stdin. Returns 1 if OK, otherwise 0.
    int open_file(char *f)


    But on the other end, I hate useless comments such as all cited in other posts (eg: print "x" on console). They make it difficult to read code.

    Following such rules will generally help people understand your code, and help yourself maintaining it over the years. That's also one reason I quickly forgotten how to code in perl :-)

    Willy
  5. Easy ! on Linux Server Break-in Challenge · · Score: 1

    > The root partition could be on a read only media such as a CD-ROM, right? In which case nobody could ever win.

    Easy:
    # mount -t ramfs none /any/dir
    # touch /any/dir/my_email@my_domain
    # pivot_root /any/dir /

    and your new root will be the dir which was previously under /any/dir. Of course, you'll have to mount /dev and to restart some services (eg: kill -1 1 to restart TTYs), but you get the idea.

    Willy

  6. Done something similar on Piezo-Acoustic iPod Hack · · Score: 5, Interesting

    On an old computer 15 years ago (it was not really a PC yet), I had no sound output and wanted to experiment with sound processing. so I used the 5" floppy drive's LED which I could blink up to about 100 kHz, in front of which I put a photodiode connected to my amplifier's input. I had to turn of the lights to remove the 50 Hz background noise, but then I could hear the sounds really well. I even played using a PWM code to be able to output analogue levels.

    It was funny to do all this when computers were not as equipped as they are today. Now we're just users and nothing more.

  7. You haven't checked for a long time then ! on Intel to Spend $2B To Stay In The Game · · Score: 1

    I've yet to see an AMD equipped server. If even 5% of all servers are equipped with AMD processors I'll be amazed.

    There are companies who only buy HP DL145 or Sun V20Z to fill their racks. Yes, they are dual Opterons in 1U form factor, and they perform very very very very well... Far better for most tasks than any dual Xeon available today, for about the same cost (even slightly lower indeed).

    They are clearly recommended to anyone needing very high-speed memory, I don't think there is anything comparable in the PC world today. Check around you, I think you need to take a closer look to this changing world.

    Willy

  8. The bloat is BEFORE sendfile() on Is Apache 2.0 Worth the Switch for PHP? · · Score: 2, Interesting

    For most web servers on Linux, once the server has figured out what static file to send, it calls sendfile() and the rest of the work is entirely in the kernel

    The problem with apache performance lies in everything that it executes *before* sendfile() is called. Sure you'll be able to serve *ONE* static file at wire speed, but when it comes to serve *many* files per second, the initial overhead puts the foot on your way.

    And unfortunately, apache is not good either for serving large files because of the important memory (and scheduling) cost of each concurrent thread (or process in case of preforked). Apache is good as an application server, not as a static content server.

    willy

  9. Useful for oops addresses on Google Suggest Dissected · · Score: 1

    I don't agree, I found it useful to search for linux kernel Oops addresses. Start typing your address as 0xc0... and the results start to narrow down to something matching yours or very near yours.

    willy

  10. ...and it can print ! on New Spoofing Vulnerability in IE · · Score: 1

    I would add that I encountered an MSIE recently and was shocked to discover that it still cannot print the pages displayed on the screen. Oh yes, you can click "print", but it will spread over several pages
    in width and heigth, which is completely unusable. I
    really was amazed to see that firefox and opera were
    the only ones able to resize before printing ! I wonder how M$ can have distributed its browser with such limitations !

  11. it often freezes on Firefox Reaches 10 Million Downloads · · Score: 1
    it often freezes for me when there are some flash advertisements which take all CPU. After a few tens of seconds, I see the flash animation slow down, then I cannot switch to another tab and it finally totally freezes consuming all CPU, so I have to kill it manually. Very frustrating.

    Also, you can easily kill it running this script :
    <script>
    var x="0123456789"
    for (i=0;i<30;i++)
    x+=x
    </script>
    --
  12. I *do* use a VAX on NetBSD 2.0 Released · · Score: 1

    But it makes me wonder why people would expend effort banging their heads against old obsolete junk that no one is ever going to run? Old VAXStations and VMEBus junk? What masochist would even bother trying to get that stuff to run?

    I use a VAX as a reverse proxy. It has a very reliable hardware once you replace the disk. I mean it's basically unkillable and does not need particular cooling. It has never crashed yet, so it just provides always-on services which I don't have to worry about.

    Moreover, there are not many exploits for those architectures, and people who have sufficient skills to write them are very rare. For this reason, it does nearly never need any upgrade, and it's just a server which lives by itself.

    So I hope that my vax will still be supported for at least 10 years from now.

    Willy

  13. Solutions for Questions 1-6 on Programming Puzzles · · Score: 1
    Questions 1-6 are relatively easy, it takes about 10 minutes to solve them all.

    1. Write a "Hello World" program in 'C' without using a semicolon.

    You don't need a semicolon after a closing brace :
    main() {
    if (printf("Hello world !\n")) {}
    }
    2. Write a C++ program without using any loop (if, for, while etc) to print numbers from 1 to 100 and 100 to 1;

    Use recursion instead of the loop. A pre-initialized increment is reverted once it reaches 100 (using a division) :
    int inc(int i, int j) {
    printf("%d\n",i);
    j -= (i/100) * 2;
    i += j;
    return i ? inc(i, j) : 0;
    }

    main() {
    inc(1, 1);
    }
    3. C/C++ : Exchange two numbers without using a temporary variable.

    This one is well known to people who write assembler code, simply use 3 XOR. Note that Q13 is the same.
    #define SWAP(a, b) { a^=b; b^=a; a^=b; }
    4. C/C++ : Find if the given number is a power of 2.

    A power of 2 has only one bit equal to 1. So the same number minus 1 has this bit set to zero, and all bits below set to 1. If you AND the two values, you get zero only if the number is a power of 2 or zero.
    int ispower2(int i) {
    return i && !(i & (i-1));
    }
    5. C/C++ : Multiply x by 7 without using multiplication (*) operator.

    To multiply by anything without using a multiplication operator, do exactly as you would if you didn't have the 'mul' instruction on your
    processor : binary shifts & adds. 7 == 4 + 2 + 1, so x*7 == x*4 + x*2 + x*1
    int times7(int i) {
    return (i<<2) + (i<<1) + i;
    }
    6. C/C++ : Write a function in different ways that will return f(7) = 4 and f(4) = 7

    Relation between 7 and 4 ? 7+4==11, 7^4==3, 7*4==28, etc... Note that other values give undefined results.
    int f74_xor(int i) {
    return i ^ 3;
    }

    int f74_sub(int i) {
    return 11 - i;
    }

    int f74_div(int i) {
    return 28 / i;
    }

    int f74_if(int i) {
    return (i == 4) ? 7 : 4;
    }
    Other questions take longer code and need real boring programming. Q10 is the same as Q5. I've seen a program which did Q11 once. The trick is *not* to lose time trying to put the program into a string, and instead, call a function which adds all necessary delimitors and escape where necessary. Q13 is Q3.

    Have fun,
    Willy
  14. Re:Not pigs, but cigarettes on Cleansing Hardware Of Dead Pig Odors? · · Score: 1

    My first PC-compatible had been used by a hard smoker. It smelled so bad that I had to disassemble it and wash it with the shower in the bathtub. There was an awful brown smelly juice pouring out of it. After a few minutes, the liquid began to clear up. Once it only looked like clean juice, I realized it would be hard to dry all the parts. So I put them outside, facing the sun and in the wind. Believe it or not, sun+wind still are the best dryers you can think of.

    However, it was a 8088, and all chips were DIL. Nowadays, with BGA chips, I suspect that water drops might be captured by these chips and become
    hard to remove.

    I don't remember how I cleaned the 5"1/4 drives,
    though. And there was no hard disk, so it was not too hard.

    Good luck !
    Willy

  15. it's NOT hard drive on New Lubricant Leads To Faster Hard Drives · · Score: 1

    I always suspected the term "hard drive" was invented

    It's not "hard drive" but "hard disk drive" or "hdd" if you prefer. The "hard disk" was only the platter you put into the "hard disk drive".

    willy

  16. Re:Is it just me or are people stupid these days? on AMD and Intel Update CPU Roadmaps · · Score: 1

    it's not you, people really are stupid. They didn't even notice that eventhough integer perf dropped between 3.4 and 3.6 GHz, flotting point perf did increase, so it proves that the CPU really has a higher frequency and is not throttling due to heat. Moreover, if it was throttling, it would certainly be by a few percent !

    Willy

  17. Re:Probably on DoubleClick Hit by DDoS Attack · · Score: 2, Insightful

    Do you consider it unethical to read a newspaper without reading their ads? Record a TV show and then fast forward through the commercials later? Get up and get food/go to the bathroom during commercials? Throw away mail flyers for products? Use a text based browser? Have a visual imparement?

    In all these cases, you are ignoring/blocking ads.


    This is not the same situation. When you block ads
    from a site, you don't even load the image from the ad site, so the page publication doesn't get accounted at the ad site for the site you're consulting.

    You have a plain right not to look at the ads, but if you want to do the same as in :
    - your newspaper, then let them here and don't
    remove them
    - the TV, then load them but don't display them
    (eg 1px*1px images)

    It's the action of PREVENTING THE PUBLICATION which is dishonest to the site you're consulting. They have contracts which say that they have X clients per day and the ad is on the home page so X clients will SEE it. And you're changing those numbers (not you alone, of course), while the site still pays for bandwidth and hosting. Note that it's not the responsibility of the site that you click or not. It's the problem of the advertiser. But you should at least be fair and load the images, even if you know how to prevent them from rendering. It will be the same as buying the newspaper, and throwing away all the ads pages.

    --

  18. Re:Sad news on DoubleClick Hit by DDoS Attack · · Score: 1

    I totally agree with you. In fact, I often use Opera and never tried to remove the ad banner because it's in a corner I don't pay attention to, it doesn't slow down the navigation and it finances part of their development. But I know lots of people who called me nuts because I didn't block this !

    On the other side, I have already added a few ad servers in my /etc/hosts to block them because they were so slow that I regularly couldn't access some common sites. Now I have another problem, many ads use flash and I don't have the plugin on my 'thin client' and mozilla always asks me if I want to download it (cannot be turned off !). I think I will either block these sites using flash or block the content-type on the proxy.

    Anyway, I consider that if ads can be a revenue for free sites, and they're not too intrusive (= they don't generate errors, they load fast and do not take all the screen), I don't see why I should private the site from this revenue.

    I read from a donkey a few comments above that there was no problem blocking all ads because people like him were already accounted for. This is non-sense. It's the exact same logic as people
    stealing in shops because it's already accounted for. Or people saying there's no reason to vote because there are the same proportion of non-voting people in the other camp.

    --

  19. Re:Trying to make stability swipes at MS.... on GNU/Linux Clears Gov't Procurement Hurdles · · Score: 2, Informative

    If you really do get such kernel panics, either you have a REAL problem with your hardware, such as a defective memory stick, or you are systematically hitting a particular and undiscovered kernel bug which is only triggered in your setup.

    In both cases, you are STRONGLY ENCOURAGED to post one of your panic dumps, or even oopses if you also get some, to linux-kernel@vger.kernel.org so that people can help you resolve the problem.

    Kernel panics are *EXTREMELY RARE* on reliable hardware. I'd say that if you even had ONE in a YEAR, it should be reported.

    But please help us help you, and don't uselessly spread some FUD about linux reliability. I have installed some production machines which now have >750 days uptime, so if it was not reliable, I would already know it.

    willy

  20. What to buy then ? on HP Recall on 900,000 Notebooks · · Score: 0, Offtopic

    My previous crappy sony vaio finally died and I have to find another notebook to replace it. I'm looking for a techie notebook. I need an internal floppy disk, an integrated RS232 serial port, an integrated NIC, and *no* nvidia chipset nor graphics, because I use it to develop on linux and don't want to change my job to accomodate their drivers. I was looking for a decent display between 1280x1024 and 1600x1200. The ASUS L3 and L5 lines of products match those criteria, but we have 3 of them at my company and their display is so poorly contrasted that we have to put our hands around the area we want to read in sunny days.

    I finally found a few HP's matching all these criteria. I don't like their fisher-price-like notebooks, but I was resigned to buy one anyway. Now what should I buy ? I'm lost !

    Thanks in advance for any advices,
    Willy

  21. That's not the REAL problem ! on Intel Puts the Lock on Overclocking · · Score: 1


    That's not the problem ! The REAL problem is what happened to the first athlons and the cyrix P200+. A very few people overclock their processor, and are proud of their games performance. They share their experiences in forums, and when a few of them have a poor cooling and their systems occasionnaly crash, they complain loudly and all other ones remember "what a shitty CPU".

    Then after a few weeks, months, etc... the press says "XXX is not that stable, there are lots of problems encountered with them".

    I have overclocked for a long time, and did found a use in this practise. For example, my P166+ wasn't fast enough for real-time audio processing, but was nearly fast enough. It was a 133 MHz chip. Pushing it to 150 was OK, but it was very very very hot (it ran at 4.7V instead of 3.52) !. It was not stable during hot days, but it could save me a lot of time avoiding to sample to disk then process, then listen.

    I now do have a dual Athlon XP 1800+. Yes, XP !
    Not overclocked, but definitely not a configuration supported by the maker. I was warned that I could encounter stability problems in SMP, but as it were some of the very first ones, they were exactly the sames as the MPs. Indeed, the bios even sets their CPUID to "athlon MP" at boot (and I was surprized that the BIOS could do this)!

    I even slowed the fans down not to hear them anymore. The CPUs get up to 95C at full load, but everything works fine. This machine is rock stable, but if it did cause me even a very few trouble, do you know what I would do ? Certainly not send the CPUs back to the seller, only replace them for a supported setup. I madd a bet, I won, that's OK. If I had lost, it would have been OK too.

  22. This moron runs an INFINITE LOOP !! on DVDCCA Claims Patent on CSS · · Score: 1

    The exact same post already appeared at least twice, one on 2004/01/25, and one on 2003/09/24. It's annoying that there are people who can only cut-n-paste text portions each time a subject happens. The previous posts were here :

    http://yro.slashdot.org/yro/04/01/25/1541255.shtml ?tid=155&tid=99
    http://slashdot.org/comments.pl?sid=79769&cid=7042 812

    Some days, slashdot looks like bots are responding to other bots, with us humans only reading the debate...

    And no, I'm no a bot and I haven't posted this in the past.

  23. SUN RELIABLE ???? on Sun's new UltraSPARC workstation: the Blade 1500 · · Score: 1

    I'm wondering if you have used Sun in production environment to say that they are reliable ! It's the crappiest hardware I have ever seen. I don't even speak about U10, those which you need to buy 6 to get 5 nearly working, but even up to E420, you can get several failures a year per machine, sometimes RAM, sometimes CPU cache, sometimes the onboard NIC. All I would agree is that I haven't seen many disk failures yet (but they don't build them). Nowadays, they are build with the same base components as PCs, but are probably much less tested, and design flaws tend to last longer.

    Oh, and I forgot the support : "Hello, my RAM is dead, the system hanged on production twice today, and the machine asks me to replace U202". Reply : "first, please ensure that you're up to date with OS patches" ! Fuck you! How do I install patches on a non-booting system ? This is non-sense.

    Definitely not what I would recommend anywhere.

  24. Re:Fry? = NO risk on AMD Optimal BIOS settings + Overclocking Guide · · Score: 1

    Unless you do things completely wrong (eg: mount the heatsink so that it doesn't touch the die), there's no risk of frying the CPU. I was so much annoyed with the noise of my dual XP1800 that one day I decided to compile a kernel with fans unplugged. I was monitoring the temperature in parallel. It hung after about one minute, and the sensors reported 97C for both processors just before it hung. The heatsinks were *very* hot ! So I could replug my fans and slow them down so that the CPUs don't reach this temperature. They usually reach 90-92 during intensive compilation, and I've yet to see them fail.

    Willy

  25. Re:Outstanding! on GIMP goes SVG · · Score: 0, Offtopic

    I understand it's exciting to post on Slashdot and all, but, you seriously just posted a message that does not contain a single correct statement. That's pretty... err, lame.

    Yes it does contain a statement (a useless one, though), but it's hidden in his sig : "i am batman" :-)