On the other hand the court that made this decision must consist of the dumbest assholes ever. Ever. Unfucking believable.
Amen. In fact I think this is unconstitutional. You are supposed to undergo a trial by 12 of your peers. How can an average joe be considered a peer of a multinational software company? Why should the opinion of people who do not have the foggiest clue about software engineering, matter?
Next question. Why can't the defence find say 10 well-known cases of prior art, present them, and win? Is it truly a case of whoever has the most money wins? If so they should reduce trials to each side presenting the sum of its assets as a figure and whichever is higher wins. That would clear out all the court backlogs and save on legal fees.
It's hard to discuss such abstract situations, but in the case you describe my first thought would be that the 'package' would delete any 'classes' it 'owns' when the package is destroyed, and it would also have a function to 'disown' a package (returning the pointer to the calling code, which could then assign it elsewhere or manually delete it etc.) So you would 'new' the object, but in normal circumstances, would not have to 'delete' it.
Ah fair enough then. I quite like cleaning up other people's mess though, as I get the chance to feel intellectually superior when I produce better code. Terrible isn't it:)
While I think "write-once, run-anywhere" is a bit of a misnomer, it does actually live up to the hype, imho.
Good to see someone cutting through the FUD, half of a java flamewar is about whether or not this is true.
You can't really appreciate it however, until you've spent weeks porting C code between platforms, and a few hours porting similar Java code.
Frankly, you should have written portable C code in the first place. The only porting required should be if you are using a non-portable 3rd party API and have to convert the code to use some 4th party API. Also if you feel nice you could add code to support some non-standards-compliant compilers.
I do agree that the Java program will have the least work required in porting, though.
This is a missconception of yours. In Java, you CAN'T clean up. In C++ you say
delete x; x = null; , in Java you just say
x = null;
Correction.. in modern C++ you say
(that is, nothing). Good C++ coding involves the RAII idiom, which means that you arrange things in such a way that resources are automatically released when they go out of scope. You almost never have to use 'delete' in C++; code that does use it can be re-factored to use RAII (eg. automatic storage or smart pointers). C++ programs sprinkled with memory-management code are a sure sign of a bad port from C or Java. Java ports stick out like a sore thumb: they 'new' everything under the sun.
The thing I hate the most about Java is its reuse of established TLAs. For example, the extension ".jar" is, first and formost, an archiver format (by Robert Jung, developer of ".arj"). I still have some archives in this format (it gives notably superior compression to zip). Also, JSR is the name of a respected technophile and last time I looked, he didn't have a version number. <obligatory_sarcastic_comment> I suppose this fits in nicely with the "embrace and extend" philosophy of the big corporations.
So, this new way of processing nuclear waste will benefit all other Western nations besides the USA.
Great! All other Western nations besides the USA are interested in looking after the environment, world peace, democracy, and an end to chemical warfare, so it'll fit right in.
It isn't valid in C89 (ANSI C), because main must either take no parameters, or take one of type (int) and one of type (char **). However, ANSI C compilers are allowed to silently compile this program (and perhaps fail at runtime).
Calling a function without prototype assumes the function was declared as:
int f(); (NOT int f(...) as another poster mentioned, this isn't even a valid declaration as there must be at least one non-variadic parameter) which means that the number and type of the parameters are not yet known, and it is undefined behaviour if any call to f doesn't match[%] the actual definition of f(), wherever that might be.
Calling a variadic function without prototype is specifically undefined behaviour (for example, many compilers use a different calling convention for variadic functions to non-variadic functions, as another poster mentioned). However if the convention is the same (eg. gcc on IA32) then it's likely to work correctly. (But still non-portable, obviously).
[%] The number of arguments must be the same, and they must have the same types after the default argument promotions: float->double, and (integer-type-smaller-than-int)->int, (other-types)->(stay-the-same)
There is no modification twice between sequence points in that code. Note that ',' '?' and ':' are all sequence points.
The code you quoted is exactly identical to:
if (++c > 31)
{
c = !r--;
printf("\n");
}
else if (c r)
printf(" ");
else if (~c & r)
printf(" `");
else
printf(" #");
However the original code has undefined behaviour in other ways:
- invalid definition of main()
- failure to return an int from main()
- calling of variadic function printf() without a prototype
Having said that, running it (and presuming you're on a system where the above UBs don't cause trouble), produces a surprisingly cool effect considering the size of the program.
Fo sho. I saw advertising for a movie 'How to Make an American Quilt'. I thought it was going to be a tutorial on how to install patches for Windows. Unfortunately it was Winona Ryder.:(
IE appears to start up fast because most of its library code is already in memory (it was started during the Windows boot process). Third party developers can't compete with that. For a more meaningful comparison, enable Mozilla's "live in systray" thingy, then once the PC has finished booting, open it and you will find it appears quickly.
Also, I believe that Firefox doesn't use, or doesn't have access to, the same fast rendering OS-level libraries that IE uses (although this could, of course, be FUD).
FWIW I find the latest Firefox to be nearly comparable in speed to IE (what's lost in delays is made up for in other ways, AFAIC)
Hey. In your journal there is a thread where you whinge at Slashdot for not supporting Mozilla. The thread doesn't allow posting so that's why I'm posting here; in fact it is well known to be a Mozilla bug (there was some discussion of it in the most recent Mozilla article on slashdot).
Mandrake is well known for being a 'newbie' distro (ie. one that windows users would like the most). So it doesn't surprise me that it is hard to upgrade.
BTW some distros (eg. Debian) allow the distro to be upgraded with 1 command.
The good thing with source-based stuff is that you never have dependency problems. It takes less time for a newbie to learn how to build from a source tarball, than it does to resolve wrong dependencies for even one reasonably-sized project. I hate dependencies. They also mean your HD fills up with gunk (6 slightly different versions of the same library, etc.)
By contrast, I can't keep a Linux distro on a box for longer than about two years. I can modify a spec file and rebuild a RPM with (the second cousin of) the best of them, but at some point things just stop building properly. The solution? Upgrade to a new distro.
Maybe you are doing something wrong. I've had a box running just fine for several years of the same distro, installing new things from time to time. I'm sure there are thousands of slashdotters who can jump in with their tale of the Debian 2.0 box they installed 10 years ago etc. etc.
Of course if you want a new kernel series and new glibc series, then a distro upgrade might be the way to go. But that is comparable to a windows 'upgrade' such as W98 -> W2000 so you have nothing to complain about there either.
I like the approach of IceEdit (a message editor from the old BBS days). If you registered with a hacked key, then everything appeared to work fine, but it would actually post your message backwards (ie. each line was reversed), causing great humiliation.
Perhaps the US can partially fund an implementation of the Star Wars defence system for Seoul. Then they can 'debug' it at no risk to American life, and also get the opportunity to wipe out NK
Don't worry, Bruce Willis is on standby with a suitcase of neutronium and an oil drill
On the other hand the court that made this decision must consist of the dumbest assholes ever. Ever. Unfucking believable.
Amen. In fact I think this is unconstitutional. You are supposed to undergo a trial by 12 of your peers. How can an average joe be considered a peer of a multinational software company? Why should the opinion of people who do not have the foggiest clue about software engineering, matter?
Next question. Why can't the defence find say 10 well-known cases of prior art, present them, and win? Is it truly a case of whoever has the most money wins? If so they should reduce trials to each side presenting the sum of its assets as a figure and whichever is higher wins. That would clear out all the court backlogs and save on legal fees.
RAII is not always possible
Usually yes, but not always, no.
It's hard to discuss such abstract situations, but in the case you describe my first thought would be that the 'package' would delete any 'classes' it 'owns' when the package is destroyed, and it would also have a function to 'disown' a package (returning the pointer to the calling code, which could then assign it elsewhere or manually delete it etc.) So you would 'new' the object, but in normal circumstances, would not have to 'delete' it.
Ah fair enough then. I quite like cleaning up other people's mess though, as I get the chance to feel intellectually superior when I produce better code. Terrible isn't it :)
And BTW, we are talking English here, not Latin.
While I think "write-once, run-anywhere" is a bit of a misnomer, it does actually live up to the hype, imho.
Good to see someone cutting through the FUD, half of a java flamewar is about whether or not this is true.
You can't really appreciate it however, until you've spent weeks porting C code between platforms, and a few hours porting similar Java code.
Frankly, you should have written portable C code in the first place. The only porting required should be if you are using a non-portable 3rd party API and have to convert the code to use some 4th party API. Also if you feel nice you could add code to support some non-standards-compliant compilers.
I do agree that the Java program will have the least work required in porting, though.
This is a missconception of yours. In Java, you CAN'T clean up. In C++ you say
delete x; x = null;
, in Java you just say
x = null;
Correction.. in modern C++ you say
(that is, nothing). Good C++ coding involves the RAII idiom, which means that you arrange things in such a way that resources are automatically released when they go out of scope. You almost never have to use 'delete' in C++; code that does use it can be re-factored to use RAII (eg. automatic storage or smart pointers).
C++ programs sprinkled with memory-management code are a sure sign of a bad port from C or Java. Java ports stick out like a sore thumb: they 'new' everything under the sun.
The thing I hate the most about Java is its reuse of established TLAs. For example, the extension ".jar" is, first and formost, an archiver format (by Robert Jung, developer of ".arj"). I still have some archives in this format (it gives notably superior compression to zip). Also, JSR is the name of a respected technophile and last time I looked, he didn't have a version number.
<obligatory_sarcastic_comment> I suppose this fits in nicely with the "embrace and extend" philosophy of the big corporations.
DUH, people who hate windows hate it because they had the problems..
Warning: Unknown(/usr/www/users/salcan/index.php): failed to open stream: Permission denied in Unknown on line 0
Warning: (null)(): Failed opening '/usr/www/users/salcan/index.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0
The grass is always greener on the other side..
knoledge is cheap.
knowlege is priceless.
Dictionary is $2.50
So, this new way of processing nuclear waste will benefit all other Western nations besides the USA.
Great! All other Western nations besides the USA are interested in looking after the environment, world peace, democracy, and an end to chemical warfare, so it'll fit right in.
It isn't valid in C89 (ANSI C), because main must either take no parameters, or take one of type (int) and one of type (char **). However, ANSI C compilers are allowed to silently compile this program (and perhaps fail at runtime).
Calling a function without prototype assumes the function was declared as:
int f();
(NOT int f(...) as another poster mentioned, this isn't even a valid declaration as there must be at least one non-variadic parameter)
which means that the number and type of the parameters are not yet known, and it is undefined behaviour if any call to f doesn't match[%] the actual definition of f(), wherever that might be.
Calling a variadic function without prototype is specifically undefined behaviour (for example, many compilers use a different calling convention for variadic functions to non-variadic functions, as another poster mentioned).
However if the convention is the same (eg. gcc on IA32) then it's likely to work correctly. (But still non-portable, obviously).
[%] The number of arguments must be the same, and they must have the same types after the default argument promotions: float->double, and (integer-type-smaller-than-int)->int, (other-types)->(stay-the-same)
There is no modification twice between sequence points in that code. Note that ',' '?' and ':' are all sequence points.
The code you quoted is exactly identical to:
if (++c > 31)
{
c = !r--;
printf("\n");
}
else if (c r)
printf(" ");
else if (~c & r)
printf(" `");
else
printf(" #");
However the original code has undefined behaviour in other ways:
- invalid definition of main()
- failure to return an int from main()
- calling of variadic function printf() without a prototype
Having said that, running it (and presuming you're on a system where the above UBs don't cause trouble), produces a surprisingly cool effect considering the size of the program.
Fo sho. I saw advertising for a movie 'How to Make an American Quilt'. I thought it was going to be a tutorial on how to install patches for Windows. Unfortunately it was Winona Ryder. :(
IE appears to start up fast because most of its library code is already in memory (it was started during the Windows boot process). Third party developers can't compete with that. For a more meaningful comparison, enable Mozilla's "live in systray" thingy, then once the PC has finished booting, open it and you will find it appears quickly.
Also, I believe that Firefox doesn't use, or doesn't have access to, the same fast rendering OS-level libraries that IE uses (although this could, of course, be FUD).
FWIW I find the latest Firefox to be nearly comparable in speed to IE (what's lost in delays is made up for in other ways, AFAIC)
Hey. In your journal there is a thread where you whinge at Slashdot for not supporting Mozilla. The thread doesn't allow posting so that's why I'm posting here; in fact it is well known to be a Mozilla bug (there was some discussion of it in the most recent Mozilla article on slashdot).
Mandrake is well known for being a 'newbie' distro (ie. one that windows users would like the most). So it doesn't surprise me that it is hard to upgrade.
BTW some distros (eg. Debian) allow the distro to be upgraded with 1 command.
The good thing with source-based stuff is that you never have dependency problems. It takes less time for a newbie to learn how to build from a source tarball, than it does to resolve wrong dependencies for even one reasonably-sized project. I hate dependencies. They also mean your HD fills up with gunk (6 slightly different versions of the same library, etc.)
By contrast, I can't keep a Linux distro on a box for longer than about two years. I can modify a spec file and rebuild a RPM with (the second cousin of) the best of them, but at some point things just stop building properly. The solution? Upgrade to a new distro.
Maybe you are doing something wrong. I've had a box running just fine for several years of the same distro, installing new things from time to time. I'm sure there are thousands of slashdotters who can jump in with their tale of the Debian 2.0 box they installed 10 years ago etc. etc.
Of course if you want a new kernel series and new glibc series, then a distro upgrade might be the way to go. But that is comparable to a windows 'upgrade' such as W98 -> W2000 so you have nothing to complain about there either.
So move your vendors to non-MS platforms, or stop whingeing.
1) it only lasts 60 seconds
2) if used , it can't be used again until the minute is up
Let me guess, this was designed by a male..
Looks like the image thumbnails only work in MSIE too? On the 'Images' section all I see is a bunch of white rectanges.
(Normally I wouldnt care, but someone in another thread noted that if you search for 'asdf' you get a picture of some big tits)
Hondas are powered by java?
Broken link in parent post, it should be: ICFP programming contest.
I like the approach of IceEdit (a message editor from the old BBS days). If you registered with a hacked key, then everything appeared to work fine, but it would actually post your message backwards (ie. each line was reversed), causing great humiliation.
Perhaps the US can partially fund an implementation of the Star Wars defence system for Seoul. Then they can 'debug' it at no risk to American life, and also get the opportunity to wipe out NK