I agree to all but your last paragraph: Eliminating poverty would have no efect, I would guess that drug dealers are not really poor and still sell drugs... As long as you can ear money by selling drugs it will be done. And even if drugs were sold by the goverment (they would actually have to be sold under price to really avoid the black market) it only avoids the problems with dealers not the problems of drug abuse. E.g. when addicted to crack you nearly cannot have enough money to buy drugs, you will consume as much as possible and that will cost a _lot_, hereby inducing crime.
You are right in a way, this argument was given before anyone actually benchmarked the chip; afterwards I never heared it again... Run-time optimization is tricky to say at best and I don't really expect it to be faster than the native chipset. (There are other advantages, of course) After the code was run you can say which optimization would have been great but if you have to optimize at runtime it is difficult to say if a very expensive optimization should be used or it. _If_ the code will be called very often it might be ok but if the code is only called once or twice you might actually loose performance because of the expensive optimization.
And for those zealotes out there, usually from the Java fraction: Don't tell me: "Oh, but the smart optimizer will notice this all at runtime, runtime optimizition is much better and faster and all..." You can actually proof that for some (most) code it is not possible to determine if a line of code will be called. (see computer science) At best you can find a heuristic and even this is difficult (look at the normal CPU branch prediction; this is very basic to say at least) and probably expensive, too.
Thats true. I observed Exult nearly from start (when it was only a viewer, before you added the fsm dialogs etc.) and check regulary but only mailed you once when it refused to run under NT. Personally I was interested in the project but had no time to contribute so I did not mail...
Not exactly, Java _requires_ exceptions when following null pointers or at illegal array access so the code _has_ to check this, regardles of the implementation. Trust me, I tried to write a realtime adaptive huffman compression in Java and even after a lot of fine-tuning the C++ implemenation was more than 2x faster. Of course the C++ implemenation was carefully fine-tuned, too:) Most benchmarks I see which compare Java to C++ just compare more or less tuned Java code to bad C++ code (they don't even use the keyword inline, much less register etc.) and then are happy to find that Java is faster... It should be possible to disable these checks for time-critical code.
I don't know MacOS (at least not very well) but memory protection is _very important_! Not only to prevent a application from crashing the system but some other techniques like memory mapped files (not a good example, take anything that uses virtual memory) basically require memory protected because otherwise you would pollute the address space of other application. Imaging a application reserving 1GB of (uncommited or file-backed) memory; imaging running this application 4 times... With memory protected this is no problem, each application has its own address space, but without you are in trouble.
C++ only provides nested classes. (equivalent to static inner classes in Java) Of course it's quite simple to construct a inner class from this... Btw, Java does the same; The so called inner classes are just classes containing a pointer to the parent class and since Java lacks a notation of friends the parent classe contains some "hiddden" public methods to grant access to private/protected entries. (Not very nice if you ask me, you could call this methods from a hand-crafted class that is not a inner class)
no pipes! - v. important That's wrong. You can use pipes the same way as UNIX (at least under NT, I don't know the rest), redirect stdin/out/err etc., pipe between programs etc. useless options _That_ from a UNIX user!:) Most UNIX programs have a _lot_ of options, most of them used rarely... By the way, it's a stupid argument, that is not OS specific a tsr for history functions Come on, unter DOS/95 perhaps but not NT. Use a reasonable shell. the shell is not seperable That's wrong, you can replace it even under DOS (4DOS if I recall it correctly, never used it) I actually found the shell on the amiga more useable than DOS!!!! Don't know, I have never used an amiga but you can use the bash if you like. (available for Windows) All serious developers use Unices That's stupid. (reminds me of an old argument against democracy, but I can't quote it in english).
I don't thinks the OS is that important for development; with reasonable efford you can develop under nearly any OS (including debugging) and deliver it for a complete different OS (after some (but few) additional debugging, of course:), I do it all the time.
What exactly is "productive" about rebooting because your beta app crashed the system or you're not sure whether the app might work after a reboot? Don't be childish. To tell you a horrible truth: Windows does not crash every two seconds and also Linux crashes sometimes. Not that I would call Windows superior but your claim is plainly wrong. (I'm an OS agnostic, I use whatever available/suited, currently I develop under NT for Solaris but this changes often)
on Win32, that'd be inside GDI, right Impossible. If that would be done (hooking BitBlt etc.) _every_ Bitmap-Copy would have to be checked which includes double-buffering etc. The System would be unbearable slow. So they probably only hook in IE
I would think county TLDs are quite a good idea because there _are_ a lot of things specific to a single country (think of goverment. for example). A company that is only available in a certain country; cultural information etc.
Of course these "come.to" adresses are quite stupid but that's an other matter
To be fair the NT security model can be quite efficient is much more expressive than the very simple used in Linux. Of course you should immidiately modify the default settings... (and disable the guest account for example, restrict HD access etc. )
This is what is really bad with NT security, the default settings are a joke; but the base concept is quite good.
That's indeed an interesting point: Most people will hesistate to steal from a shop because they a) fear to be caught b) don't wont to harm the shop owner because they would hate it if it happened to themself (in that order, if you ask me. And for many people only a!)
Concerning software many people don't hesistate to copy software because a) it's unlikely they will be caught b) it's not that obvious that they harm someone.
To make this clear: I don't want to defend the license agreements described in the article but I can understand that software industry tries to prevent piracy. After all most people need to earn money to survive (and not all firms are as big and financial successful as Microsoft)
Of course; its stupid to hesistate to buy software. If software which costs money avoids a single day of work for you it's probably worth the money. (depends on the price, of course...:) Keep in mind what your own work-hour costs (at least when you earn money), software can be worth the price quite quickly.
I will surely buy Kylix (in the C++ version), the current development tools under Linux are a real pain! Of course I might be slightly biased because yesterday the DDD crashed my whole PC four times so that I had to use the reset button. Four times! This has never happend to me under NT! Ah, in a few hourse I might have calmed down and just call the development tools suboptimal...:)
But then you would not be compatible with Delphi/C++Builder. For current users of Delphi/C++Builder it would be _very_ convenient to port an application by simply recompiling (with a few changes, of course... or some more...:) At least in C++Builder (I don't know Delphi) you are free to use any graphical library you like, you _can_ use VCL (and look like Windows) but you can as well use QT or whatever you like (but of course the integrated GUI builder is for VCL)
Im glad that linux puts research into the hands of users, and out of the hands of universities and big corps.
Perhaps I'm biased (beeing in university) but I don't think the users (whoever they are) can do the same research as universties, at least for three reasons:
1. Knowledge. While I'm not a OS specialist I concentrate on databases and there the knowledge (and experience) needed to create something really new and usefull you won't get in an afternoon. Of course the so called users can be as skilled as any researcher but I don't think it's common.
2. Time and money. To really invent something different takes a lot of time and is a full-time job, which most users simply can't afford to do so.
3. Teamwork. This _may_ be an invalid point because you can also communicate using EMail etc. but from my experience I would say that talking whith someone doing something similar is very usefull and you often get new ideas durint the talk. Remember, research is not about implementing something known but about creating new ideas.
Of yourse I'm not Mr. Pike but I would guess that he meant that you should create something new just because it's new (and I agree with this point). This doesn't mean that you can't use your old, well tested Emacs but if all people only say "Hey, Emacs can do everything you will ever wish to do and even much more" you never dare to create something totally different and perhaps find something usefull. Of course most experimental programs will be failures but some may be something really different and after all, that's what research is for.
There's two factors you neglect, though: faster development time, and cheaper software. Perhaps. On the other hand you _could_ use the advanced technology to do new things instead of making the same things easier. Therefor I hate the argument (note that I did not say it's true, that's not the point) the "slow Java doesn't matter, machines are always gettings faster". Of course no one would try to write a normal program in assembler just to get the fastest possible program but think it's still reasonable to care for performance. And real performance increase you get by algorithm and not CPU.
Which brings me back to the toppic: most commonly used algorithm are very old...
Re:Reminds me of this UNIX "virus" I recieved once
on
Gnutella VBS Worm
·
· Score: 1
But that isn't really necessary, the file has just to lure the user to run it (a trojan perhaps) and than spread. On the other hand I could think of better ways to do this than Gnutella but it would be possible...
... if you're running the raw 1.3 then your running Hotspot 1 -- client. Try Hotspot 2 for Servers
That's true, I only use the standard JDK 1.3. Perhaps someday... (I code quite a bit in Java but only for fun; I earn money with C++:)
Memory usage is ok, total memory usage of all processes is about 80MB which is well below 128MB (no swapping). Oh, I just remembered that I even have a Microsoft JVM installed (a short check later...) it's about as fast as the Sun JDK, perhaps a tiny bit slower (about 1-2%, could be inaccuracy)
You can examine Hotspot code by breaking within the loop in a good debugger or Software ICE and examining executing byte code.
When I'm really bored I will try it...:)
However I was curious and analysed the Borland C++ code which did everything reasonable beside avoiding tail recursion (if you "enforce" that by modifying the code it gets much faster...:) Than I checked the IBM JDK (1.2) which is almost identical in performance to the C++ code so the JIT will probably produce the same code. However the Sun JDK 1.3 is much slower. (btw. all on a 128 MB 450Mz PIII NT 4.0 SP 6)
In general if you expect the Hotspot JIt to asct liek a C compiler you WILL find the results strange.. its much more advanced, frankly.
Um, actually C++ was much faster than Java (as given above; try the benchmarks yourself if you don't believe me). And I don't see why in this very simple example C++ couldn't optimize as well as Java, there is nothing to gain here from runtime information.
I was quite astonished by this benchmark, especially the fibancci part; there is virtual nothing to optimize her beside perhaps calls and inlining (which all compilers should handle somewhat descend in this simple case) and tried to reproduce the benchmark using the given source code. The results where somehwat different from their results...
Results on unmodified (*) source taken from the website: (Average values given by the program)
Sun JDK 1.3 HotSpot + javac: 111.8,120,123,120,119.0,119.8,120,118.8
Borland CBuilder 5 C++ mode, max optimization (IDE button+PPro setting+use registers): 133,135,130,131,132,131,132,131
(*) I adjusted the baseline for my PC but that's just a constant factor to the results for all programs.
Of course if you do yourself a havor and change the declaration of doFib from "int doFib(int fib)" to "inline int doFib(register int fib)" the results are much better...:)
Again Borland CBuilder as above: 210,188,162,161,161,161,161,160
I would think the benchmark is somewhat strange, especially at the fibonacci benchmark both languages should be nearly the same (given a reasonable JIT resp. C++ compiler) since the function is so simple that it could be written by hand in ASM without any trouble!
Seeing is believing. By the way I don't really think it's true, Java simply lacks the ability to express some things. For example when using containers in Java you always have to cast (and check the type), in C++ you may use templates which avoids this cast. If you add garbage collection to C++ (which can be done) Java is (nearly) a subset of C++ so I don't see where Java has advantages; you could even use bytecode und JIT for C++ if you meant to do so (can't find the link but someone made a proof-of-concept compiler to the JVM). The main advantage of Java is a well defined class library (especially the GUI) which is missing from C++ but that's a different matter, the _language_ Java is nothing special (in my opinion at least)
What's wrong with earning money? Usually you expect that someone likes music if he makes it but I really don't care; if he makes good music in order to earn money so be it. Usually you _have_ to earn money to make your living and if you are honest music isn't that expensive (if you really want to you could probably afford to buy a new CD each day which should be enough for most people)
I would think P!=NP because it would be nice if P==NP. If P==NP you could solve all NP-hard problems (sadly nearly all interesting problems are NP-hard) in P, which would be a good thing, and experiences teaches us that nothing is ever easy.
Of couse you could earn a lot of money of you find a method to solve a NP problem in P...:) (RSA aside, a _lot_ of real-life problems are NP, TSP for example)
I agree to all but your last paragraph: Eliminating poverty would have no efect, I would guess that drug dealers are not really poor and still sell drugs... As long as you can ear money by selling drugs it will be done. And even if drugs were sold by the goverment (they would actually have to be sold under price to really avoid the black market) it only avoids the problems with dealers not the problems of drug abuse. E.g. when addicted to crack you nearly cannot have enough money to buy drugs, you will consume as much as possible and that will cost a _lot_, hereby inducing crime.
You are right in a way, this argument was given before anyone actually benchmarked the chip; afterwards I never heared it again... Run-time optimization is tricky to say at best and I don't really expect it to be faster than the native chipset. (There are other advantages, of course) After the code was run you can say which optimization would have been great but if you have to optimize at runtime it is difficult to say if a very expensive optimization should be used or it. _If_ the code will be called very often it might be ok but if the code is only called once or twice you might actually loose performance because of the expensive optimization.
And for those zealotes out there, usually from the Java fraction: Don't tell me: "Oh, but the smart optimizer will notice this all at runtime, runtime optimizition is much better and faster and all..." You can actually proof that for some (most) code it is not possible to determine if a line of code will be called. (see computer science) At best you can find a heuristic and even this is difficult (look at the normal CPU branch prediction; this is very basic to say at least) and probably expensive, too.
Thats true. I observed Exult nearly from start (when it was only a viewer, before you added the fsm dialogs etc.) and check regulary but only mailed you once when it refused to run under NT. Personally I was interested in the project but had no time to contribute so I did not mail...
Not exactly, Java _requires_ exceptions when following null pointers or at illegal array access so the code _has_ to check this, regardles of the implementation. :) Most benchmarks I see which compare Java to C++ just compare more or less tuned Java code to bad C++ code (they don't even use the keyword inline, much less register etc.) and then are happy to find that Java is faster... It should be possible to disable these checks for time-critical code.
Trust me, I tried to write a realtime adaptive huffman compression in Java and even after a lot of fine-tuning the C++ implemenation was more than 2x faster. Of course the C++ implemenation was carefully fine-tuned, too
I don't know MacOS (at least not very well) but memory protection is _very important_! Not only to prevent a application from crashing the system but some other techniques like memory mapped files (not a good example, take anything that uses virtual memory) basically require memory protected because otherwise you would pollute the address space of other application. Imaging a application reserving 1GB of (uncommited or file-backed) memory; imaging running this application 4 times... With memory protected this is no problem, each application has its own address space, but without you are in trouble.
C++ only provides nested classes. (equivalent to static inner classes in Java) Of course it's quite simple to construct a inner class from this... Btw, Java does the same; The so called inner classes are just classes containing a pointer to the parent class and since Java lacks a notation of friends the parent classe contains some "hiddden" public methods to grant access to private/protected entries. (Not very nice if you ask me, you could call this methods from a hand-crafted class that is not a inner class)
Not that I like DOS but your claims are wrong...
:) Most UNIX programs have a _lot_ of options, most of them used rarely... By the way, it's a stupid argument, that is not OS specific
:), I do it all the time.
no pipes! - v. important
That's wrong. You can use pipes the same way as UNIX (at least under NT, I don't know the rest), redirect stdin/out/err etc., pipe between programs etc.
useless options
_That_ from a UNIX user!
a tsr for history functions
Come on, unter DOS/95 perhaps but not NT. Use a reasonable shell.
the shell is not seperable
That's wrong, you can replace it even under DOS (4DOS if I recall it correctly, never used it)
I actually found the shell on the amiga more useable than DOS!!!!
Don't know, I have never used an amiga but you can use the bash if you like. (available for Windows)
All serious developers use Unices
That's stupid. (reminds me of an old argument against democracy, but I can't quote it in english).
I don't thinks the OS is that important for development; with reasonable efford you can develop under nearly any OS (including debugging) and deliver it for a complete different OS (after some (but few) additional debugging, of course
What exactly is "productive" about rebooting because your beta app crashed the system or you're not sure whether the app might work after a reboot?
Don't be childish. To tell you a horrible truth: Windows does not crash every two seconds and also Linux crashes sometimes. Not that I would call Windows superior but your claim is plainly wrong.
(I'm an OS agnostic, I use whatever available/suited, currently I develop under NT for Solaris but this changes often)
on Win32, that'd be inside GDI, right
Impossible. If that would be done (hooking BitBlt etc.) _every_ Bitmap-Copy would have to be checked which includes double-buffering etc. The System would be unbearable slow. So they probably only hook in IE
I would think county TLDs are quite a good idea because there _are_ a lot of things specific to a single country (think of goverment. for example). A company that is only available in a certain country; cultural information etc.
Of course these "come.to" adresses are quite stupid but that's an other matter
To be fair the NT security model can be quite efficient is much more expressive than the very simple used in Linux. Of course you should immidiately modify the default settings... (and disable the guest account for example, restrict HD access etc. )
This is what is really bad with NT security, the default settings are a joke; but the base concept is quite good.
That's indeed an interesting point: Most people will hesistate to steal from a shop because they a) fear to be caught b) don't wont to harm the shop owner because they would hate it if it happened to themself (in that order, if you ask me. And for many people only a!)
Concerning software many people don't hesistate to copy software because a) it's unlikely they will be caught b) it's not that obvious that they harm someone.
To make this clear: I don't want to defend the license agreements described in the article but I can understand that software industry tries to prevent piracy. After all most people need to earn money to survive (and not all firms are as big and financial successful as Microsoft)
Of course; its stupid to hesistate to buy software. If software which costs money avoids a single day of work for you it's probably worth the money. (depends on the price, of course... :)
:)
Keep in mind what your own work-hour costs (at least when you earn money), software can be worth the price quite quickly.
I will surely buy Kylix (in the C++ version), the current development tools under Linux are a real pain! Of course I might be slightly biased because yesterday the DDD crashed my whole PC four times so that I had to use the reset button. Four times! This has never happend to me under NT! Ah, in a few hourse I might have calmed down and just call the development tools suboptimal...
But then you would not be compatible with Delphi/C++Builder. For current users of Delphi/C++Builder it would be _very_ convenient to port an application by simply recompiling (with a few changes, of course... or some more... :)
At least in C++Builder (I don't know Delphi) you are free to use any graphical library you like, you _can_ use VCL (and look like Windows) but you can as well use QT or whatever you like (but of course the integrated GUI builder is for VCL)
Im glad that linux puts research into the hands of users, and out of the hands of universities and big corps.
:)
Perhaps I'm biased (beeing in university) but I don't think the users (whoever they are) can do the same research as universties, at least for three reasons:
1. Knowledge. While I'm not a OS specialist I concentrate on databases and there the knowledge (and experience) needed to create something really new and usefull you won't get in an afternoon. Of course the so called users can be as skilled as any researcher but I don't think it's common.
2. Time and money. To really invent something different takes a lot of time and is a full-time job, which most users simply can't afford to do so.
3. Teamwork. This _may_ be an invalid point because you can also communicate using EMail etc. but from my experience I would say that talking whith someone doing something similar is very usefull and you often get new ideas durint the talk. Remember, research is not about implementing something known but about creating new ideas.
(Of course, just my oppionion
Of yourse I'm not Mr. Pike but I would guess that he meant that you should create something new just because it's new (and I agree with this point). This doesn't mean that you can't use your old, well tested Emacs but if all people only say "Hey, Emacs can do everything you will ever wish to do and even much more" you never dare to create something totally different and perhaps find something usefull. Of course most experimental programs will be failures but some may be something really different and after all, that's what research is for.
There's two factors you neglect, though: faster development time, and cheaper software.
Perhaps. On the other hand you _could_ use the advanced technology to do new things instead of making the same things easier. Therefor I hate the argument (note that I did not say it's true, that's not the point) the "slow Java doesn't matter, machines are always gettings faster". Of course no one would try to write a normal program in assembler just to get the fastest possible program but think it's still reasonable to care for performance. And real performance increase you get by algorithm and not CPU.
Which brings me back to the toppic: most commonly used algorithm are very old...
But that isn't really necessary, the file has just to lure the user to run it (a trojan perhaps) and than spread. On the other hand I could think of better ways to do this than Gnutella but it would be possible...
... if you're running the raw 1.3 then your running Hotspot 1 -- client. Try Hotspot 2 for Servers
:)
That's true, I only use the standard JDK 1.3. Perhaps someday... (I code quite a bit in Java but only for fun; I earn money with C++
Memory usage is ok, total memory usage of all processes is about 80MB which is well below 128MB (no swapping). Oh, I just remembered that I even have a Microsoft JVM installed (a short check later...) it's about as fast as the Sun JDK, perhaps a tiny bit slower (about 1-2%, could be inaccuracy)
You can examine Hotspot code by breaking within the loop in a good debugger or Software ICE and examining executing byte code.
:)
:) Than I checked the IBM JDK (1.2) which is almost identical in performance to the C++ code so the JIT will probably produce the same code. However the Sun JDK 1.3 is much slower. (btw. all on a 128 MB 450Mz PIII NT 4.0 SP 6)
When I'm really bored I will try it...
However I was curious and analysed the Borland C++ code which did everything reasonable beside avoiding tail recursion (if you "enforce" that by modifying the code it gets much faster...
In general if you expect the Hotspot JIt to asct liek a C compiler you WILL find the results strange.. its much more advanced, frankly.
Um, actually C++ was much faster than Java (as given above; try the benchmarks yourself if you don't believe me). And I don't see why in this very simple example C++ couldn't optimize as well as Java, there is nothing to gain here from runtime information.
I was quite astonished by this benchmark, especially the fibancci part; there is virtual nothing to optimize her beside perhaps calls and inlining (which all compilers should handle somewhat descend in this simple case) and tried to reproduce the benchmark using the given source code. The results where somehwat different from their results...
:)
Results on unmodified (*) source taken from the website: (Average values given by the program)
Sun JDK 1.3 HotSpot + javac: 111.8,120,123,120,119.0,119.8,120,118.8
Borland CBuilder 5 C++ mode, max optimization (IDE button+PPro setting+use registers): 133,135,130,131,132,131,132,131
(*) I adjusted the baseline for my PC but that's just a constant factor to the results for all programs.
Of course if you do yourself a havor and change the declaration of doFib from "int doFib(int fib)" to "inline int doFib(register int fib)" the results are much better...
Again Borland CBuilder as above: 210,188,162,161,161,161,161,160
I would think the benchmark is somewhat strange, especially at the fibonacci benchmark both languages should be nearly the same (given a reasonable JIT resp. C++ compiler) since the function is so simple that it could be written by hand in ASM without any trouble!
Seeing is believing. By the way I don't really think it's true, Java simply lacks the ability to express some things. For example when using containers in Java you always have to cast (and check the type), in C++ you may use templates which avoids this cast. If you add garbage collection to C++ (which can be done) Java is (nearly) a subset of C++ so I don't see where Java has advantages; you could even use bytecode und JIT for C++ if you meant to do so (can't find the link but someone made a proof-of-concept compiler to the JVM).
The main advantage of Java is a well defined class library (especially the GUI) which is missing from C++ but that's a different matter, the _language_ Java is nothing special (in my opinion at least)
What's wrong with earning money? Usually you expect that someone likes music if he makes it but I really don't care; if he makes good music in order to earn money so be it. Usually you _have_ to earn money to make your living and if you are honest music isn't that expensive (if you really want to you could probably afford to buy a new CD each day which should be enough for most people)
I would think P!=NP because it would be nice if P==NP. If P==NP you could solve all NP-hard problems (sadly nearly all interesting problems are NP-hard) in P, which would be a good thing, and experiences teaches us that nothing is ever easy.
:) (RSA aside, a _lot_ of real-life problems are NP, TSP for example)
Of couse you could earn a lot of money of you find a method to solve a NP problem in P...