Slashdot Mirror


User: John+Campbell

John+Campbell's activity in the archive.

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

Comments · 305

  1. Re:C strings...(with FREE code :)) on Review:Beginning Linux Programming · · Score: 2

    int ci_getstr(char **buffer)
    {
    int length = 0;
    char ch;
    if (*buffer)
    {
    free (*buffer);
    (*buffer) = (char *) malloc (1);
    }
    else
    {
    (*buffer) = (char *) malloc (1);
    }
    do
    {
    ch = getchar();
    if ( ch != '\n')
    {
    if (ch == '\b')
    {
    if (length)
    {
    printf ("\b \b");
    length--;
    if ( ( *buffer = (char *) realloc (*buffer, length) ) || (!length) );
    else
    {
    return 0;
    }
    }
    else
    {
    printf ("\a");
    }
    }
    else
    {
    if (*buffer = (char *) realloc (*buffer, length+1) )
    {
    (*buffer) [length] = ch;
    length++;
    printf ("%c", ch);
    }
    else
    {
    return 0;
    }
    }
    }
    } while (ch != '\n');
    if (*buffer = (char *) realloc (*buffer, length+1) )
    {
    (*buffer) [length] = '\0';
    }
    else
    {
    return 0;
    }
    return 1;
    }

    /* This one is designed to work with the tty echo turned off... if you have echo turned on, take out the printf()s. For reading passwords and stuff, take out the printf()s _and_ turn off tty echo. */

  2. Re:C strings... on Review:Beginning Linux Programming · · Score: 2

    One of the first things I did after I got comfortable with C programming was to write a set of functions that would malloc() space for strings on the fly... I still use those functions in almost everything I write; they're probably the oldest code of mine that's still in use...

  3. Re:This is the stupidest thing... on Watch Web's first "Open Company"? · · Score: 2

    If you think this is the stupidest thing that's ever been on Slashdot, you've obviously never read Katz's bit about the sex-bots...

  4. Re:The most fun I had on A Brief History of Squirt Gun Technology · · Score: 2

    I had one of those. Super Soaker, my ass - I'd take one of those shotguns any day.

    Those shotguns had a choke knob on them... on the wide setting, they were pretty short range, but they'd soak your target from neck to knees, and you didn't even have to aim them. On the narrow setting, they made a smaller splash, but they could match the range of the Super Soakers.

    Only problems were rate of fire - it took some serious effort (at least for a twelve-year-old) to work the pump, which made it slow, and lack of ammo - the clip was huge, but the thing pumped out so much water that it only held five, six shots.

    The thing eventually died when a little plastic bit in the pump mechanism broke... we were never able to find a glue strong enough to hold it together against the force of the pump springs. Before that, though, I'd used it to wipe the grins off the faces of any number of Super-Soaker wielders...

  5. Re:Messaging Systems... on ESR says Microsoft is right, for once · · Score: 2

    I just run an IRC server on my box. If someone wants to get hold of me, they can log into my IRC server and /summon me.

  6. Re:There is no money in star trek.. on Beaming Money · · Score: 2

    Tell that to the Ferengi.

  7. Re:They Live! on LCD Monitor For Your Eyes Only · · Score: 2

    I think that may have been the worst movie I've ever seen. We were watching it one night at Vermont Tech, 'cause there wasn't anything else to do, and we only got one channel... they kept going to commercial break, showing *one* commercial, then going back to the movie...

    We were sitting around yelling, "More commercials! No! Not the movie! Ahhh! We want to see more commercials!" at the TV screen.

  8. Eh? on Less Television in Online Homes · · Score: 3


    lynn:~$ less television

    television: No such file or directory

    lynn:~$ _



    Methinks I need to get out more...

  9. Re:*Shrug*'s get no sympathy ... on Mozilla M8 Released · · Score: 2

    Not only that, there is a Solaris package available for download. That's what I've been using, because I've been unable to get it to run on Slackware, even with libc6.

  10. Re:Slashdotted on AMD Athlon 600 Preview · · Score: 2

    You're comparing it to the wrong chip. Everything I've seen and heard about the K7 indicates that it'll beat the pants off not just the Celeron but the Xeon at the same clock speed... and it clocks faster, too. If you compare a K7's price tag (and we're talking $400 or so for the 500s) to a (slower) Xeon's, AMD comes out ahead by a serious margin...

  11. Re:Cascading Style Sheet Probs - Not Just Netscape on Mozilla M8 Released · · Score: 2

    Yeah... sad, isn't it? I've personally come to the decision that when a usable Mozilla is finally released, I'm going to go to pure HTML 4.0 with only CSS for formatting on my personal pages. If people don't want to make the choice between plain grey pages and screwed up CSS formatting, they can get a real Web browser. I'm not going to spend my personal time supporting their some-"standard"-we-just-made-up browser, especially if they're going to make me make a choice as to which non-standard browser to support.

    My employer's page is another matter, but I'm really looking forward to the day when I can dump the layers and layers of proprietary extensions from that, too...

  12. Re:Micro$oft Pressure on Merced Design Completed · · Score: 2

    Linux will not be a 32-bit OS on Merced. If it can be made to run natively at all (and Linus has been quoted as saying that this is a "done deal"), it'll be full 64-bit, just like it is on Alpha and UltraSparc.

  13. Re:Ultracool! on The Matrix to have two sequels · · Score: 2

    Even better... "Matrix--" and "Matrix++"...

  14. Re:Pronounciation on Linux Today - now with audio · · Score: 2

    "Leenooks" is the correct (Finnish) pronunciation, but I, for one, have never been able to get my American throat around those Scandinavian vowels...

    The accepted Americanized pronunciation is "Lynn-ucks", and that's actually how Linus usually seems to pronounce it (I'm basing this observation on his keynote speech two Linux Expos back). We probably won't steal your lunch money if you say "Lie-nucks", but we may point and laugh and throw offal. :)

  15. Recall notices on Lightsabers Recalled · · Score: 3

    Am I the only one who thought that, "Customers should stop using these lightsabers immediately," was funny?

    "Your lightsaber use you should not. Defective, your lightsaber is, mmm?

    "Use leads to spring dislodging. Spring dislodging leads to battery overheating. Battery overheating leads to acid burns. Acid burns are the path to the Dark Side..."

  16. Re:it gets better on 3D pics made using visible light · · Score: 2

    This can only be considered good if you're on the same side as the SWAT team... and remember, the cops aren't necessarily the good guys... especially in, say, China...

  17. Re:What is 3D on 3D pics made using visible light · · Score: 2

    Actually, this is 3D, it's just not an image... it's a model that can then be rendered into an image that can be displayed in whatever method you like, including stereoscopic goggles if you're so inclined.

    At least that's how I'm interpreting the complete lack of useful detail in the article...

  18. Re:a question... on New ESR paper: The Magic Cauldron · · Score: 2

    You said it yourself: "... and benifits from improvements made by the community."

    You now have a better accounting package than you started with, with no extra investment on your part. You then just need to answer the question of whether the advantages you gain from the better accounting package outweigh any competitive advantage you might have from being the only one with a not-as-good accounting package.

    Of course, in an increasingly free-source world, odds are that sooner or later someone will create a free source accounting package, and then your competitive advantage will dissolve anyway...

  19. Re:Why buy 600 MHz ? on AMD Athlon (K7) Ships · · Score: 2

    Well, SMP motherboards tend to be noticably more expensive than UP boards. Many programs don't make good use of the second (third, fourth, etc...) processor. Some people will buy the 600 just to have the latest and greatest. And, of course, most people run Win9x "for the games", and it just doesn't support SMP.

    If I can find a reasonably priced dual board, that 500x2 option sounds real nice for a Linux box, though...

    And all the reliable speculation (as opposed to the "D00D! INT3L R00lZ AMD'Z A$$" stuff (and the converse)) I've seen indicates that this chip is going to be the "fastest x86 ever" that they bill it as...

    And, yeah, the Cyrices had their problems. My 6x86M2-233 will run neck-in-neck with a Celeron 333a doing kernel compiles (though some of that's probably just faster disks and stuff in the Cyrix box), but it gets its butt kicked at Quake and the like. Cyrix's FPU has always sucked big-time. They made a bet that office applications were going to be more important than games in the future, and they lost. They are good machines for a programmer who spends more time compiling than fragging, though.

    Another thing to keep in mind when comparing clock speeds is that the Cyrices are not clocked as fast as the number stamped on them seems to indicate... my "233" is a 200MHz processor, and your "150+" was, I believe, a 120MHz chip, so comparing a 150+ to a 120 is a fair comparison... comparing it to a 150MHz Pentium isn't, really. And there's no way to really compare on price... the most expensive Cyrices are so much cheaper than the cheapest Intels...

  20. Re:Great... an immoral fur company... on LinuxWorldExpo announces speakers, presenters · · Score: 2

    Nothing wrong with dog fur... hides is hides. If you're going to object to the idea of fur coats in general, I could respect that, though I wouldn't agree. But there isn't any real difference between dogs and all the other critters that few people seem to object to getting made into coats.

    Cat fur coats, on the other hand... well, killing kittens is just plain wrong, and no one should do it, ever. That's because cats aren't animals, they're short furry people with tails.

  21. Re:attempt to avoid the Bow Wow Wow of K9??? on K7 Renamed "Athlon" · · Score: 2

    Yeah... I'd much rather have a "Katmai" than a "Pentium III". And "Mendocino" sounds so much cooler than "Celeron"...

    The marketroids can name them whatever they like. I'm going to keep calling them "K7", anyway...

  22. Re:Thin Clients on Ask Slashdot: Linux Diskless Clients? · · Score: 2

    If you're using the client as not much more than a dumb terminal, you don't need much memory. It's possible to run a Linux machine in 8M of physical RAM and no swap at all... I've been doing it with a diskless 386-16 for quite a while now. If you want X, you'll need more RAM, of course, but for telnet/ssh, 8M is fine.

  23. Re:Misconception alert! on Satellite Radio Coming in 2001 · · Score: 2

    Yes, to a certain extent you're trading signal for bandwidth. With analog, the information is lost in the transmission process. With digital it's lost during the digitization process. The difference is that with digital you get to choose which information you're going to lose, and, except under extreme circumstances, you're always going to get back all the information you put in. With analog, you will never get back all of the information you put in, and you have no choice as to what information you lose.

    And, as a purely practical matter, a digital signal is able to tolerate, without degradation, interference that would render an analog signal unusable. That would seem to me to qualify as a more robust signal.

  24. Re:Argh!!! on Linux IDE from Cygnus · · Score: 2

    I just consider any language that requires you to type "1.0" instead of "1" when assigning to a float terminally brain-damaged. Strong typing is a good thing (Perl's bitten me a couple of times because of its almost complete lack of typing), but typing _that_ strong is ridiculous.

  25. Re:Argh!!! on Linux IDE from Cygnus · · Score: 1

    Because Ada is evil and bad.