Which is why my History of Technology prof blows a head gasket whenever he reads that Columbus "proved the earth was round".
Not to mention, Columbus sailed to the Gulf and then back again. Magellan actually sailed around it, and should receive more credit than that slick salesman Columbus.
Basically, System.arraycopy() takes Object arguments. Every array in Java is an Object, that's why this works. System.arraycopy() is normally implemented in native code to just binary copy that part of the heap, so it doesn't bother with "types" and stuff like that.
Arrays.sort() and friends, however, are implemented in Java, and need to know the array element types. Whether you should have one method which takes the array as an Object and deduces internally, or you use overloading per array type is an implementation issue. Using overloading means you don't need a cast inside the method, which is nice to avoid.
The total heap size will count up, but it will never, ever count down. Try it. Load up that program and leave it running overnight and throw open your process manager to see if the heap size has shrunk.
It won't.
My bad, I now see you need to add the command-line flag -maxf to the java executable to enable it - by default, it will not shrink it.
E.g. with -maxf0.6 it will release heap memory back to the OS if 60% or more of the heap is free, but will not go below starting heap value (-Xms parameter value)
Interesting googled link that shows the parameters have been in the VM from JRE 1.2 (but IIRC the Windows VM got them in 1.3.x).
While Java will dynamically grow its heap size, it will never, ever shrink it.
Yes, it will. What you wrote was true once upon a time, but hasn't been true for years: The heap can shrink down to start heap size.
Your so-called demo example makes the erroneous assumption that System.gc() actually forces garbage collection. Anyone who actually reads the API docs knows that it doesn't unless you turn off async GC totally.
That would be nice if it were possible. Unfortunately, it isn't (at least on a practical scale, esp. considering that we seem to be at the end of Moore's law).
Actually, it would, but the implementation would be responsible for deducing that they were arrays and what type, instead of overloading with the types as they do now.
Witness System.arrayCopy() which does take Object arguments instead of using overloading.
Er, C# (or rather the CLI) does the same autoboxing and -unboxing. So if it's a kludge, it's a common one not just in Java. This makes Smalltalk and Python the only pure OO languages, I guess.
But Sony fought against established names (Nintendo and SEGA) too. Plus Microsoft when it introduced X-Box was up against Sony and Nintendo (SEGA having halted the Dreamcast).
The big problem would be to find a market segment: The other three have the market divided between them (Nintendo for children and adults, Sony for teens (and some adults) and Microsoft for people who like to watch tits in DOA XXX Beach Volleyball). Not many more niches left.
Are you really this dense? How is modding censorship? Are the posters prevented from speaking? If you browse at -1 you can read everything, nothing is "censored". Modding is just a scoring system, no worse than any other: If Roger Ebert gives a movie one star out of four , that does not prevent the movie from being shown.
Funny, GWB had no problems slapping a huge tariff on steel to protect a few U.S. steel mills, while at the same time endangering THOUSANDS of jobs in the industries that used steel and hence were hurt by the higher steel prices.
The only jobs he cares about are those of the most lobbyist industries.
If Linux got to 20% market share for example, would there be games for it? You bet - who's going to turn down that kind of cash. Would there be preinstalled machines on the high-street? Very likely.
There already are: Doom 3 etc. A more likely reason there are few-ish games for Linux isn't Windows but the industry's embrace of DirectX. Games using OpenGL can be more easily ported, but Direct3D isn't the only part of DirectX that developers make use of.
Oh, and also due to the perception that Linux users don't want to pay for software, e.g. the lacklustre numbers for Borland Kylix.
Ah, just like those "Sex Tourists" we've heard so much about, travelling to Thailand to screw underage kids... The age of consent in Thailand is low (13), but it's doubtful that the sex slaves there can be considered to "consent".
... from high-cost country! News at eleven, right after these messages from Medical Lobby Association.
Price differences between countries lead to across-border shopping, not only for goods but also for services. It's not "outsourcing" anything, it's just normal price-consciousness.
Vase in point: Beer in Europe. Norwegians buy in cheaper Sweden, Swedes in cheaper Denmark, Danes in cheaper Germany, Germans in cheaper Poland, Poles in cheaper Czechia. (Of course, now that both the latter two are EU members, everybody go to Czechia instead, I guess.)
The point is that a MMORPG is not a role-playing game like the ones you play with friends around a table using dice. It's a paid (game) service, a commercial entertainment product. Other rules apply.
Females were treated as slaves - which, given the place and time that this role playing game portrays, was not necessarily an inaccurate representation.
No, slaves and masters were social levels, not tied to gender. There were male and female slaves, and there were male and female members of the households owning the slaves.
But the game is not historically accurate anyway - unless the Egyptians really had robots doing the construction for them.
the entire process of declaring a thrown exception through mutliple layers is an asinine waste of my time Interesting. Which other aspects of creating reliable code do you skip? Do you ever test for null values? Also waste of time, right? C# must suck because you need to add all those "override" whenever you override a method in a subclass - a clear waste of your time.
I loved all those reviews of the first Matrix movie that, despite Warner's insistence "noone can be told what the Matrix is", managed to spoil it in the first paragraph.
Oh, and don't get me started on the voice-over opening of Dark City. If you ever watch it for the first time, turn off the sound during the opening when you see the starry sky! You will have a much better experience.
Or this lawsuit has gone to the americans!
(Internal City of Heroes humor, if you don't get it.)
Which is why my History of Technology prof blows a head gasket whenever he reads that Columbus "proved the earth was round".
Not to mention, Columbus sailed to the Gulf and then back again. Magellan actually sailed around it, and should receive more credit than that slick salesman Columbus.
Welcome to the club: When you enter the workforce, you will no longer be a worker but a "resource".
"Does it help if I say you resources are our most important assets?"
- PHB to Alice
Basically, System.arraycopy() takes Object arguments. Every array in Java is an Object, that's why this works. System.arraycopy() is normally implemented in native code to just binary copy that part of the heap, so it doesn't bother with "types" and stuff like that.
Arrays.sort() and friends, however, are implemented in Java, and need to know the array element types. Whether you should have one method which takes the array as an Object and deduces internally, or you use overloading per array type is an implementation issue. Using overloading means you don't need a cast inside the method, which is nice to avoid.
But the essence is: An array is an Object.
The total heap size will count up, but it will never, ever count down. Try it. Load up that program and leave it running overnight and throw open your process manager to see if the heap size has shrunk.
It won't.
My bad, I now see you need to add the command-line flag -maxf to the java executable to enable it - by default, it will not shrink it.
E.g. with -maxf0.6 it will release heap memory back to the OS if 60% or more of the heap is free, but will not go below starting heap value (-Xms parameter value)
Interesting googled link that shows the parameters have been in the VM from JRE 1.2 (but IIRC the Windows VM got them in 1.3.x).
That would be nice if it were possible. Unfortunately, it isn't (at least on a practical scale, esp. considering that we seem to be at the end of Moore's law).
Actually, it would, but the implementation would be responsible for deducing that they were arrays and what type, instead of overloading with the types as they do now.
Witness System.arrayCopy() which does take Object arguments instead of using overloading.
Oh great! Another java kludge!
Er, C# (or rather the CLI) does the same autoboxing and -unboxing. So if it's a kludge, it's a common one not just in Java. This makes Smalltalk and Python the only pure OO languages, I guess.
But Sony fought against established names (Nintendo and SEGA) too. Plus Microsoft when it introduced X-Box was up against Sony and Nintendo (SEGA having halted the Dreamcast).
The big problem would be to find a market segment: The other three have the market divided between them (Nintendo for children and adults, Sony for teens (and some adults) and Microsoft for people who like to watch tits in DOA XXX Beach Volleyball). Not many more niches left.
mod down (ie censor)
Are you really this dense? How is modding censorship? Are the posters prevented from speaking? If you browse at -1 you can read everything, nothing is "censored". Modding is just a scoring system, no worse than any other: If Roger Ebert gives a movie one star out of four , that does not prevent the movie from being shown.
Funny, GWB had no problems slapping a huge tariff on steel to protect a few U.S. steel mills, while at the same time endangering THOUSANDS of jobs in the industries that used steel and hence were hurt by the higher steel prices.
The only jobs he cares about are those of the most lobbyist industries.
If Linux got to 20% market share for example, would there be games for it? You bet - who's going to turn down that kind of cash. Would there be preinstalled machines on the high-street? Very likely.
There already are: Doom 3 etc. A more likely reason there are few-ish games for Linux isn't Windows but the industry's embrace of DirectX. Games using OpenGL can be more easily ported, but Direct3D isn't the only part of DirectX that developers make use of.
Oh, and also due to the perception that Linux users don't want to pay for software, e.g. the lacklustre numbers for Borland Kylix.
Of course the Firefox-using geeks have money to spend: The money they don't use to buy the CDs and DVDs they download, dirty pirates that they are.
Sorry, no fucking, too busy playing. Now, if I just could get to next level, I'd...
2) The path to becoming a Jedi takes a filthy, sick amount of time.
There should not have been a path in the first place.
Sony, which part of "when gone am I, last of the Jedi you will be" was too hard to understand?
Ah, just like those "Sex Tourists" we've heard so much about, travelling to Thailand to screw underage kids...
The age of consent in Thailand is low (13), but it's doubtful that the sex slaves there can be considered to "consent".
... from high-cost country! News at eleven, right after these messages from Medical Lobby Association.
Price differences between countries lead to across-border shopping, not only for goods but also for services. It's not "outsourcing" anything, it's just normal price-consciousness.
Vase in point: Beer in Europe. Norwegians buy in cheaper Sweden, Swedes in cheaper Denmark, Danes in cheaper Germany, Germans in cheaper Poland, Poles in cheaper Czechia. (Of course, now that both the latter two are EU members, everybody go to Czechia instead, I guess.)
The point is that a MMORPG is not a role-playing game like the ones you play with friends around a table using dice. It's a paid (game) service, a commercial entertainment product. Other rules apply.
Females were treated as slaves - which, given the place and time that this role playing game portrays, was not necessarily an inaccurate representation.
No, slaves and masters were social levels, not tied to gender. There were male and female slaves, and there were male and female members of the households owning the slaves.
But the game is not historically accurate anyway - unless the Egyptians really had robots doing the construction for them.
Hm... risk a $100,000 fine for illegally downloading it, or risk a $1,000 fine for stealing a physical copy when it's released...
"We are all Virgin. I mean, Borg."
the entire process of declaring a thrown exception through mutliple layers is an asinine waste of my time
Interesting. Which other aspects of creating reliable code do you skip? Do you ever test for null values? Also waste of time, right? C# must suck because you need to add all those "override" whenever you override a method in a subclass - a clear waste of your time.
I loved all those reviews of the first Matrix movie that, despite Warner's insistence "noone can be told what the Matrix is", managed to spoil it in the first paragraph.
Oh, and don't get me started on the voice-over opening of Dark City. If you ever watch it for the first time, turn off the sound during the opening when you see the starry sky! You will have a much better experience.
... except the book "Lord Tedric III: Black Knight of the Iron Sphere" was first published in 1981.
I dunno who was the AC that wrote this
Well, DUH! Wouldn't be "anonymous" if you knew, now would it?