Slashdot Mirror


User: sbrown123

sbrown123's activity in the archive.

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

Comments · 597

  1. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    I already gave you a link to THE ANSI standard. You can look forever for books to support your case, the standard will not change to fit your twisted view on how the C language works. And yes, some book authors for programming languages are sometimes very wrong as they take things like datatypes for granted and do not reference the ANSI standard for the language.

    >> It's pretty hard to do a compare operation with bitwise operators. And even if one could, I shouldn't have to.

    (132 8) 20

    Left shift 8 bit positions, compare result to be less than 20 with result being false.

  2. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    >> What part of "at least" don't you understand? Standard C guarantees that a byte is at least 8 bits, a short is at least 16 bits, and a long is at least 32 bits. If you don't believe me, please go read the C standard or post a reference. I am right, you are wrong about this.

    http://www.lysator.liu.se/c/

    Theres an article with my name on it from Oak Road Systems (article about portable C/C++ programs). Go there, and theres more links to the ANSI standard from it. The link above has articles with plenty of other links. Enjoy. No you werent right.

    >> No, this is nice for performance. It makes it more difficult to achieve cross-platform compatibility

    When I said small footprint this means memory size. Performance is import in multiple factors but I believe you are only thinking in the terms of program execution speed. In that case, moving 16-bit variables is slower than moving 32-bit variables. Where is the point?

    >> Which is why Java is brain damaged as a general purpose language. Yes, you can kludge around the lack of unsigned data types, but I shouldn't have to do very slow 64 bit arithmetic just to be able to deal with a 32 bit unsigned value.

    Dont use 64 bit arithmetic. Use bitwise operators. Thats pretty simple.

  3. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    >> Sheesh, man, please go read the C standard before spouting BS. A long variable is at least 32 bits (actually, they specify a range of values). A short is at least 16 bits. A char is at least 8 bits.

    You seem to be confused that C has defined datatypes still. Okay. Go to your include directory. Find a file called "limits.h". Read it. Word datatype size should be defined in a file called "wordsize.h" (sometimes depending on your compiler this may be wrapped into just limits.h).

    Now ask yourself this: why define these if they are standard? Could it be, maybe, someone decided that they could be variable depending on the platform you are using? This would explain why a C integer's on a MIPS processor are smaller than those on a i386 processor?

    C datatypes are not set in stone. This is nice for C making small footprints but bad for crossplatform capability. Java, which has to work on multiple platforms, just set standard sizes that a "int" would always be 32-bits.

    >> Assign a long variable (32 bit) to 4,000,000,000. Assign that to a 64 bit variable. Watch it get butchered into a negative value, because Java treats it as a signed value, which is then signed extended.

    Java long variables are 64 bits in size. Okay, take a 32 bit signed variable in C and go past its maximum range. You will get a negative number. Wow, it works just like Java! Go past the bounds on an unsigned integer and what do your get? A mess. Java does not "butcher" variables any different then C does for its signed variables. If you dont want it to become a negative number, use a larger datatype.

  4. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    >> True, but irrelevent. If you are reading a 32 bit unsigned value from a file, it is what it is, 32 bits. If in C I assign that to an "unsigned long", I know I am safe no matter the word size, since C guarantees me that a long is at least 32 bits.

    But if you are expecting to read in, say a unsigned int from a fopen, what size is the uint datatype on the different platforms running Unix? C has no set in stone datatype sizes as they vary upon platform.

    >> I know I am safe no matter the word size, since C guarantees me that a long is at least 32 bits.

    Not true. What is the word datatype size on a Palm or that on a Mainframe?

    >> Nope. If you assign a 32 bit unsigned value that happens to have the high bit set to a 64 bit signed value, it will sign extend the value. You have to mask it off to be safe.

    What? There is no unsigned values in Java, so according to your own words masking is STILL not needed.

  5. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    Didnt know about IPv6. But read up on it. Seems you didnt. Its states:

    ---(TAKEN FROM THE IPv6 SPEC)----
    struct in6_addr {
    u_int8_t s6_addr[16]; /* IPv6 address */
    }

    This data structure contains an array of sixteen 8-bit elements,
    which make up one 128-bit IPv6 address. The IPv6 address is stored
    in network byte order.
    ---(TAKEN FROM THE IPv6 SPEC)----

    Lets see, that means that instead of 4 8-bit addresses they are using 16. So, they ARE STILL using 8-bit addresses and not a single datatype to store the IP. Subnet masking can still be done on single bytes for the complete address.

    >> As a matter of fact, many DEC and IBM computers used 36 bit words.

    Yep, theres some weird ones out there. Like Palm with 4 byte integers. Glad I dont program in C too much and have to deal with such annoying issues. Java removes this issue by having a set-in-stone bit size for ALL it datatypes despite platform and making them all signed. This is why it crosses platforms so easily. No one has yet to find why unsigned datatypes are so important. Could be because they are not...

  6. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    >> only that your understanding of the structure of IP addresses is wrong.

    No, my method is correct. You are most likely thinking IPs are 32 bits rather than the sum of four bytes with each byte representing an address class of A,B,C, and D. The problem occurs in that if they ever run out of addresses and make more, they would add another byte. This means that if you are storing IPs in 32-bit datatypes rather than a group of bytes, your program will break. Let me know if you have ever heard of a 36-bit datatype in C/C++ or any other language. Im curious.

  7. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    "chars" in Java are 2 bytes long, a signed. If you wanted it unsigned, you'd use "byte" which is 8 bits long or 1 byte in size.

  8. Re:Argh. Quality not Quantity on Linus Retiring from Kernel Dev · · Score: 1

    Thin pickins out there. I sometimes feel kinda evil and hit up ZDNet. I do my part in bashing Microsoft supporters on thier Talkbalk forums. They are just so much fun to mess with!!

  9. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    You missed the joke. The last comment was used to disagree with the original poster. The comment was worded incorrectly on purpose.

  10. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    If you are just talking about storage of the IP, Java "int" datatype is 32 bits. This means it would store it just fine. So what does your point have for needing unsigned data types?

  11. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    >> two 32 bits Unix epoch-style dates.

    On what platform are you using? Unix data types change size due to platform. So a program you write to compare to 32-bit dates would not work in the future on 64 bit systems as they will use a datatype, called the same, but at a different integal type.

    >> You mean, move it a larger data type and mask it off.

    No, just use a larger data type. There is no need for masking in Java as conversion between datatypes is pretty seamless like C.

  12. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    IP addresses consist of four numbers not exceeding 255. Or, exactly 1 byte. Java has a datatype called "byte" which is 8 bits or, for your info, 1 byte in size. So, in this case Java would store it smaller than a unsigned int.

  13. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    >> try converting a string to an int or vice-versa

    Java String functions are not that hard after you get to know them. They are much easier to learn compared to C methods.

    >> who need to overload operators
    Overloading is a construction of lazy programmers who did not completely plan out what variables will be passed. Laziness and poor programming lead to bad software.

    >> anyone who values performance

    Performance? Compared to what? Java is generally compared to C, which is pretty darn quick. Its will probably never beat C, but it beats out alot of other languages.

    >> And certainly not anyone who isn't stuck in academia with their head up their butt. Java is on its way out,

    Down with all those idiots in schools!! They think they know everything with those books and they're education!

  14. Re:Who uses java. on CPAN Shifts Focus · · Score: 1

    Why would you need a unsigned data type? If the value is too large for the current data type: use one larger. Are you running on a Commodore 64 and worried about the extra 4 bytes?

  15. Re:Who uses java. on CPAN Shifts Focus · · Score: 2, Insightful

    Actually Java does not use signed types due to cross platform compatibility. C and many other languages have issues in that integal variables change size based on platform.

  16. April fools on nVidia/AMD Merger Announced · · Score: 2, Informative

    Yeah. This one is too easy to spot. I like the ones that keep you guessing.

  17. Re:Go moz! on Mozilla Tree Closes for 1.0 · · Score: 1

    They could have just rushed it out the door with alot of bugs. The best things take time.

  18. Re:Opera faster at what? Loading up? on Mozilla Tree Closes for 1.0 · · Score: 1

    True, except in the case with SSL pages. On those I notice browsers go in this order:

    1. IE (Yes, its a sad day).
    2. Mozilla
    3. Netscape 6.2
    4. Opera

    Moz still needs to fix up SSL speeds. IE probably cheats and misses doing stuff Moz wastes time playing with (i.e. using web standards).

  19. Re:Happy St. Paddy's Day Mr. Sullivan on Microsoft Case Enters Crucial Penalty Phase · · Score: 1

    I would love to see it televised also. The problem is Microsoft has put alot of effort and money to keep this case out of the public eye. This is so they can shuttle in thier paid for senate, cogressional, and white house lacky's to speak in thier favor.

  20. Re:ICANN't on ICANN Board Spurns Democratic Elections · · Score: 1

    Good point bringing up the Olympic IOC. Has anyone noticed how rich the board members of the IOC are? ICANN should have been a not for profit organization made up by internationally elected individuals who have no finacial connection with ISPs or governments. This would result in a truly free internet with no political or finicial agenda's. But there is too much $$$ involved in the internet for such freedom to go without those trying to own as much of its control as possible.

    I say down with ICANN. We should elect our own board and force our ISPs and governments to accept it. Down with ICANN!

  21. Re:Is this what you're looking for? on AOL Beta Testing Gecko-Based Browser · · Score: 1

    No scripting? Well what will the script kiddies do? Dosent anyone think of the script kiddies? They will be deprived of their virus writing capabilities for browsers with this kind of change!!

  22. Re:No evidence whatsoever. on The Incredible Shrinking Antenna · · Score: 0

    That is incorrect. People using cell phones while driving are more likely to get into car wreaks than those not.

  23. Re:"Flash" is a good name for the product on Macromedia Pushes Flash For All Things Web · · Score: 2, Insightful

    I see only one problem with Flash sites: Navigation. Too often I have found myself trying to figure out how to get a Flash site to do what I wanted. With HTML pages, links and buttons were generally always easy to recognize. And the Foward, Back, and Reload buttons did just what they are suppose to.

    If Macromedia wants to push off a complete Flash web solution, I would want this problem resolved before I would ever think of using it.

  24. Re:Ok, ok. on Microsoft Seeks Dismissal with 9 Dissenting States · · Score: 1

    Troll.

    Anyhow Ill answer it cause I have some time to burn.

    1. Cheapness is a factor. Why purchase a OS at $199 when you can get a better one for free?

    2. Downloading is a possiblity but the various distros are sold in stores or can be mailed to your house.

    3. Again, see #1.

    4. I get the same feeling of having to reinstall Windows on peoples computers when it crashes. Typically, you dont "reinstall" Linux, just recompile or install a new version of the kernel.

    5. The "purdy" GUI's are an affect of people enjoying those "purdy" GUI's on Windows and Macs. And having a program around for 20 years is quite an accomplishment as it must be very stable and well designed. Adding a GUI is just an added feature to something like that.

    6. I doubt anyone believes computers to be a babe magnet, even Linux users. Linux users are in many ways like car mechanics. Women are generally not attracted to them neither for what they do in their time but rather by their dedication to what they do.

    7. Penguins are cool. A flightless bird that likes to swim. Its up there with the platipuss.

    8. I have a thing for Linus: Impressed. Creating an OS cannot be very easy. How many OS's have you made?

    9. Actually, they probably stole your credit card info from your Windows PC through one of the many security holes in Windows and just used that to access the porn sites. You'll find out about the security hole in a couple weeks when security agencys will be allowed by Microsoft to let you know.

    10. To not repeat #1, I must say its always nice that you dont feel so bad if there is a problem in Linux as you didnt pay much to own a copy. I think thats what jades me most with Microsoft products in that I pay good money for crappy wares.

    MICROSOFT - "Bill, I Now Understand Megalomania"

    P.S. Anyone can do cheap shots. It takes a better person to use facts in an argument.

  25. Re:Gnome can't die on Could Mono Kill Gnome? · · Score: 1

    Replacing is not always possible. It depends on their patent. If its a process that is patented and you write new code that performs a similar function, you could be legally sued. A good example is Amazon's "one-click" patent. Sure, you could built a shopping system that works the same, uses your own code, but you could still be sued if you copied the process.

    Code is generally not patented, rather the outcome. This is because any basic programmer could simply rearrange the code a bit and call it a new work.

    I doubt Intel would truthfully use a patent in this way. Microsoft will most likely add functionality to C# that they in turn patent and Mono would not be allowed to simulate. Mono could do likewise but will in turn kill any cross-platform to Windows capability. Thats a killer since Windows is on something like 95% of the PCs out there and Gnome is on, may we say, .001%?

    I have seen very little that impresses me with the whole .NET initiative. Miguel may be a big wig within the Gnome group but he can be replaced.