If you examine the ASM to see *why* your code is running so much faster, you will often find that gcc noticed you put something where it wasn't supposed to be, and weren't using it. Move stuff that doesn't need to be recalculated every loop out of the loop, and you probably won't see a huge difference.
So which is easier:
Saying '-O3' to Gcc, or
Making gcc compile output the asm files, visually inspect those for optimization opportunities, try to massage your C/C++ code into yielding better assembler. (All the while probably making your code harder to read for humans).
One problem with your analogy is that all those languages are (approximately) equally expressive, ie. sentences are not disproportionately more complex in one language over another when expressing the same ideas. However, if there was another easily spoken language which allowed you to condense the story without losing detail/content, wouldn't you use it?
This is just one fundamental difference between programming languages and natural languages.
just joking, but being an expert in one area does not automatically make you an expert in another area. (Not that his advice about trusting brand names and doing you own testing wasn't good, I'm just saying...)
Maybe you forgot to change the partition type of the 'old partition' to RAID Autodetect? Or maybe you forgot to change the root= kernel parameter in lilo.conf or grub.conf?
If an object is in scope, it's in a clean state. If it's not in scope, it's not.
Incorrect. If you get a CannotReadMoreException while running the code snippet the GP gave, you have no idea whether or not "string" has an appropriate semantic value -- Note that it was declared in another scope and may even have had other values assigned to it! You can mitigate this type of thing slightly by having appropriate destructors for the variables in question (and never using pointers directly!), but handling this is a lot more tricky than it seems at first. This is in fact one of the reason exceptions suck: they hide a lot of the context of which an operation failed. If you want to know which operation failed, you have to have try { } blocks around each operation and you have to introduce more scopes simply because of the way statement sequences work. This makes code incredibly ugly, which is why many people don't do it, leading to subtle bugs.
There are lots of things which simplify error handling in C++ (like destructors for automatic variables), but I have this sneaking feeling that strengthening the data types of C (or C++ for that matter) into having types like "Success $RESULT" and "Failure $SOMETHING" and forcing people to looking at return values might have a much greater effect and be more readable in the end...
Gentoo [...], they all crash within 1-3 hrs, especially if I do something CPU intensive.
You must be doing something strange or possibly have flaky hardware which Ubuntu doesn't "excercise". Gentoo has been absolutely rock solid on my AMD64 (64 bit) using the recommended gentoo-dev-2.6.8 and gentoo-dev-2.6.9 kernels.
You can CHOOSE to pay by cash, you can CHOOSE to turn off your cell phone. You CANNOT choose who scans for RFID tags and you CANNOT choose not to have a passport (unless, of course, you don't plan on doing any overseas travelling).
moron trap. Learning a language is a one time thing. If you spend 1 week learning a language which lets you write programs 7 times faster vs. your "already known" language, which do you think will come out on top in the end? (Hint: If you write more than 7 programs it will be the new language). Sure, libraries *are* a factor, but please don't tell me that C doesn't let you write programs faster than symbolic assembler (yet giving you the exact same libraries to work with).
I have to disagree with you on whether it's spam, however. Just making up statistics here, but I'd guesstimate that the sender address of >99,99% (probably even more) of all virus emails is forged and probably points at an innocent third part. That means that the message from the virus scanner is completely and utterly worthless to the reciptient (i.e. the "sender" of the virus email). That makes it "junk" or "spam" in my book.
You're right that there isn't much you can do, but I usually check to see if the mailer-daemon/postmaster address in the message looks legit and send off a boilerplate message saying something to the effect of "what you're doing is stupid and counterproductive, please stop".
Hopefully SPF can stop some of this sender spoofing.
I suspect, is that you need to install using administrative privileges and try to a do a search using a severely limited account to see if the search will let you see stuff which you're not supposed to.
The theory, I believe, is that when you install as admin., it installs a "search server" and any unprivileged users which install afterwards just get a "search client" which connects to this server (via TCP over localhost or whatever). If the server returns results which allow the client to see stuff it's not supposed to, then there is information leakage (and quite a grave one at that). If not, then it's a load of hot air.
Is the maintenance really that much more challenging?
Yes. All the other obscure things which only 0.1% of everybody uses, they are small isolated pieces of code (like some random driver). What we're talking about here is adding lots of highly non-trivial code to the core of linux (you know the kernel/ subdirectory of the kernel source) which only 0.01% of people will actually need/use. So, yes.
I also think it would be quite arrogant of the RT people to expect this to be added without serious thought (and possible reworking). (NOTE: I'm not saying they do/did expect it to, just that it would be arrogant to do so)
C was designed by programmers who wanted to create a versatile, powerful language that would get the job done
Only the last of those was actually a motivating factor for the creation of C. C was created specifically for implementing UNIX because no other "high-level"(*) langauge of the time could actually "get the job done". They simply weren't low-level enough. Sometimes you just need to be able to do horribly unsound things like unchecked typecasts, accessing memory directly, etc. However, almost no user-space software should ever need to do any of these things and should definitely be written in higher-level languages. Just check any security mailing list and compare the number of security problems stemming from improper C usage (unchecked buffers, improper casts, etc.) to 'real' security flaws (default passwords, lacking credential checks, etc.).
I don't know about development practises where you work, but liking a language is almost never a good criterion for choosing it. I would, however, accept "I need to do 'unsafe' things", or "I need to be really portable"(**) as valid reasons.
Oh, and C is by no means "versatile" or "powerful", just look at LISP or any ML dialect.
(*) Pascal et al. were considered high level at the time... personally I wouldn't consider anything that doesn't have 1st class closures to be "high-level".
(**) C is the most portable language currently in use. There are very few Turing Complete platforms which don't have a C compiler.
this is a perfect example of why you should NOT use a boolean for a tristate variable. You are abusing a boolean (which can also be NULL) to contain an enum with three different states (Yes, No, SmackedMeInTheFace). What you actually want is proper enumeration support. That would force people to be explicit about precisely what values are allowed and about how/when they can be combined.
I think most people's gripe with NULL is that things become horribly undefined when you have automatic coersions and start to applying boolean logic.
mentioning profits? Whether or not you are profiting from using a patented invention has nothing whatsoever to do with enforcement of said patent. Conditions of use stipulated by patent owners can be completely arbitrary, i.e. "you must release any software using this patent under an OSS license", "you must pay me $1 for every item sold", or "you must stand on one leg while using this patented algorithm". Of course, the latter is somewhat less enforcable, but still... whether or not the patent-using party profits is completely irrelevant.
so of course levels are going to be higher now than they used to be.
Now, if you meant "levels are higher now than they would have been without our presence", then you might be "more" correct, but even then there is the possibility that humans putting out CO2 could in fact cause some sort of negative feedback effect where the "final" levels of CO2 wouldn't in fact be lower than they would otherwise have been. The point is: Without much more solid evidence of causation (correlation isn't even close to good enough if you want to "prove" a positive) there is no way to know, and using such faulty logic is dangerous and counterproductive. (You know you really have to watch out when words like 'obviously', 'clearly' and 'of course' are being thrown around.:))
It's not that I don't tend to intuitively agree with you that it seems likely that we are affecting CO2 levels (although I am far from certain that it's any more than a 'blip' in the grand scheme of things) -- I just don't know of any proof and admit as much.
I won't respond to the rest of your post which is basically alarmist rhetoric based on the false assumption that the mere potential for grave consequences of something we don't even know is happening requires us to Act Now.
would also suggest that declaring an entire industry evil and contemptable because Joe ScriptKiddie downloaded Kazaa and can steal easily is pretty rediculous.
Oh please. It just might be because of the price fixing, the monopoly they've created, or any number of other shady business practises.
I guess you really showed your true colours when you started calling in 'stealing'. It's not stealing (regardless of how much you call it that or want it to be).
But this one industry is being attacked in a unique way, and isn't being given time to adjust
Cry me a fucking river. Corporations exist for the sole purpose of making money and do not deserve any sympathy whatsoever. While it's slightly beside the point, do you think all the IT people whose jobs are being outsourced are "given time to adjust"? What about all the manual labour at the time of the industrial revolution? Nope. (and so on and so forth)
Oh, and regarding breaking the DRM on iTunes: Maybe people don't want their music DRM'ed? Maybe people want to do whatever they damn well like with the music they've bought?
I think a large part of the problem is that people have been crying wolf for a long time. After a while you just tune out... and so they have to shout louder which just makes people tune out even quicker...
(Not that I don't agree with the ridiculousness of the whole SUV-thing in the US. It just amazes me how many people actually seem to see it as some sort badge of honour. "I pollute *this* much!")
So what you're saying is: "They've increased because they must have". That's a great argument.
We've come up with many many ways to pump out more of it, and we weren't doing that a few hundred years ago. The planet puts out CO2 on its own, and now we are adding to that, so of course levels are going to be higher now than they used to be.
I think you missed the logic train. "We put out a lot of CO2" does not in any way, shape, or form mean that "The global level of CO2 is increasing because of us". There may be natural fluctuations which we are nowhere close to understanding and which would completely automatically dwarf anything put of by humans.
Yes, I wasn't so much arguing the point as the phrasing. Actually, I'm not even really sure what I make of this whole thing. It does seem abundantly clear to me that the RIAA/MPAA's of this world have some competition whether they like it or not. The cat's out of the bag, so whether it's "information that wants to be free" or whether it's just that "people want stuff for free" seems largely irrelevant to me. They will have to adapt or die. They can certainly try the whole "outlaw all P2P" thing, but I think it's basically just a way of prolonging the inevitable. The thing with technological progress is that it has a tendency to streamroll over anything in its path, regardless of business models and whatnot.
And I would caution about calling diamonds essentially worthless on/. Diamond drills come to mind:P
Yes, yes. Should have had the obligatory IANAE disclaimer on that.;)
In the case of the musician here, there is no incentive for any post-production work to be done.
Oh, I don't know... maybe he or she would like to have continued patronage? The incentive would essentially be survival against the competition... and let's not forgot the desire to express oneself artistically, of course -- although most of the current mainstream 'artists' seem to go more for cash than artistic expression. (Not that I blame them, as such. It's probably much easier to just give up on trying to do something which actually advances the arts and just do some cheesy pop album for all the teenagers of the world).
[Genetic Engineering]
isn't something we can ever expect a group of willing volunteers to ever produce for free.
You are very likely to find university students who are interesting in just about anything and while they certainly won't do the work (labour) for free (or just 'for the benefit of mankind' as they say), most PhDs work for a pittance compared to what industry can offer. That tells me that their motivation is less money-centered than you seem to think.
There is a difference between "worthless" and "can't be sold". Many things are (essentially) worthless, but can still be sold for a great deal of money (and vice versa). Diamonds come to mind.
Are you serously suggesting that anything which can be represented digitally is NOT a thing?
He/she is certainly suggesting no such thing. You went from him/her saying "a digital copy of a music recording is not a thing" to "anything which can be represented digitally is not a thing". So... no.
But even so... Let's see... certainly something which is (as opposed to just "can be") represented digitally has some properties which "things" (as in "physical object") do not. For example, they can be copied at virtually no cost. So if you'd said: "[...] something which is represented digitally [...]", I would certainly have agreed with that statement. However, your phrasing is very clever and ambiguous. Let's use a painting as an example: A paiting can be (albeit incompletely) represented digitally, but that certainly does NOT mean that the original painting is not a thing. However, it can still be argued (and rightly so, I think) that the digital representation of that painting is not a "thing" (because it can e.g. be copied at will, something which "things" cannot). So it all hinges on someone's interpretation of the "anything" in your statement, ie. whether "anything" is in fact meant to be the original "thing" or whether it is the digital representation you're talking about.
... so when I need a webserver, I just
/dev/urandom | perl
$ cat
It usually works in 3 tries or less.
So which is easier:
Hint: It's not the second one.
One problem with your analogy is that all those languages are (approximately) equally expressive, ie. sentences are not disproportionately more complex in one language over another when expressing the same ideas. However, if there was another easily spoken language which allowed you to condense the story without losing detail/content, wouldn't you use it?
This is just one fundamental difference between programming languages and natural languages.
just joking, but being an expert in one area does not automatically make you an expert in another area. (Not that his advice about trusting brand names and doing you own testing wasn't good, I'm just saying...)
Maybe you forgot to change the partition type of the 'old partition' to RAID Autodetect? Or maybe you forgot to change the root= kernel parameter in lilo.conf or grub.conf?
Incorrect. If you get a CannotReadMoreException while running the code snippet the GP gave, you have no idea whether or not "string" has an appropriate semantic value -- Note that it was declared in another scope and may even have had other values assigned to it! You can mitigate this type of thing slightly by having appropriate destructors for the variables in question (and never using pointers directly!), but handling this is a lot more tricky than it seems at first. This is in fact one of the reason exceptions suck: they hide a lot of the context of which an operation failed. If you want to know which operation failed, you have to have try { } blocks around each operation and you have to introduce more scopes simply because of the way statement sequences work. This makes code incredibly ugly, which is why many people don't do it, leading to subtle bugs.
There are lots of things which simplify error handling in C++ (like destructors for automatic variables), but I have this sneaking feeling that strengthening the data types of C (or C++ for that matter) into having types like "Success $RESULT" and "Failure $SOMETHING" and forcing people to looking at return values might have a much greater effect and be more readable in the end...
is that there is this perception among the general populace that polygraph tests are (nearly) infallible.
You must be doing something strange or possibly have flaky hardware which Ubuntu doesn't "excercise". Gentoo has been absolutely rock solid on my AMD64 (64 bit) using the recommended gentoo-dev-2.6.8 and gentoo-dev-2.6.9 kernels.
But hey... use whatever makes you happy!
You can CHOOSE to pay by cash, you can CHOOSE to turn off your cell phone. You CANNOT choose who scans for RFID tags and you CANNOT choose not to have a passport (unless, of course, you don't plan on doing any overseas travelling).
moron trap. Learning a language is a one time thing. If you spend 1 week learning a language which lets you write programs 7 times faster vs. your "already known" language, which do you think will come out on top in the end? (Hint: If you write more than 7 programs it will be the new language). Sure, libraries *are* a factor, but please don't tell me that C doesn't let you write programs faster than symbolic assembler (yet giving you the exact same libraries to work with).
but somewhat besides the point.
I have to disagree with you on whether it's spam, however. Just making up statistics here, but I'd guesstimate that the sender address of >99,99% (probably even more) of all virus emails is forged and probably points at an innocent third part. That means that the message from the virus scanner is completely and utterly worthless to the reciptient (i.e. the "sender" of the virus email). That makes it "junk" or "spam" in my book.
You're right that there isn't much you can do, but I usually check to see if the mailer-daemon/postmaster address in the message looks legit and send off a boilerplate message saying something to the effect of "what you're doing is stupid and counterproductive, please stop".
Hopefully SPF can stop some of this sender spoofing.
I suspect, is that you need to install using administrative privileges and try to a do a search using a severely limited account to see if the search will let you see stuff which you're not supposed to.
The theory, I believe, is that when you install as admin., it installs a "search server" and any unprivileged users which install afterwards just get a "search client" which connects to this server (via TCP over localhost or whatever). If the server returns results which allow the client to see stuff it's not supposed to, then there is information leakage (and quite a grave one at that). If not, then it's a load of hot air.
Yes. All the other obscure things which only 0.1% of everybody uses, they are small isolated pieces of code (like some random driver). What we're talking about here is adding lots of highly non-trivial code to the core of linux (you know the kernel/ subdirectory of the kernel source) which only 0.01% of people will actually need/use. So, yes.
I also think it would be quite arrogant of the RT people to expect this to be added without serious thought (and possible reworking). (NOTE: I'm not saying they do/did expect it to, just that it would be arrogant to do so)
Only the last of those was actually a motivating factor for the creation of C. C was created specifically for implementing UNIX because no other "high-level"(*) langauge of the time could actually "get the job done". They simply weren't low-level enough. Sometimes you just need to be able to do horribly unsound things like unchecked typecasts, accessing memory directly, etc. However, almost no user-space software should ever need to do any of these things and should definitely be written in higher-level languages. Just check any security mailing list and compare the number of security problems stemming from improper C usage (unchecked buffers, improper casts, etc.) to 'real' security flaws (default passwords, lacking credential checks, etc.).
I don't know about development practises where you work, but liking a language is almost never a good criterion for choosing it. I would, however, accept "I need to do 'unsafe' things", or "I need to be really portable"(**) as valid reasons.
Oh, and C is by no means "versatile" or "powerful", just look at LISP or any ML dialect.
(*) Pascal et al. were considered high level at the time... personally I wouldn't consider anything that doesn't have 1st class closures to be "high-level".
(**) C is the most portable language currently in use. There are very few Turing Complete platforms which don't have a C compiler.
this is a perfect example of why you should NOT use a boolean for a tristate variable. You are abusing a boolean (which can also be NULL) to contain an enum with three different states (Yes, No, SmackedMeInTheFace). What you actually want is proper enumeration support. That would force people to be explicit about precisely what values are allowed and about how/when they can be combined.
I think most people's gripe with NULL is that things become horribly undefined when you have automatic coersions and start to applying boolean logic.
mentioning profits? Whether or not you are profiting from using a patented invention has nothing whatsoever to do with enforcement of said patent. Conditions of use stipulated by patent owners can be completely arbitrary, i.e. "you must release any software using this patent under an OSS license", "you must pay me $1 for every item sold", or "you must stand on one leg while using this patented algorithm". Of course, the latter is somewhat less enforcable, but still... whether or not the patent-using party profits is completely irrelevant.
Informationsuperhighwaysquatting. Now then... where's my prize?
Now, if you meant "levels are higher now than they would have been without our presence", then you might be "more" correct, but even then there is the possibility that humans putting out CO2 could in fact cause some sort of negative feedback effect where the "final" levels of CO2 wouldn't in fact be lower than they would otherwise have been. The point is: Without much more solid evidence of causation (correlation isn't even close to good enough if you want to "prove" a positive) there is no way to know, and using such faulty logic is dangerous and counterproductive. (You know you really have to watch out when words like 'obviously', 'clearly' and 'of course' are being thrown around.
It's not that I don't tend to intuitively agree with you that it seems likely that we are affecting CO2 levels (although I am far from certain that it's any more than a 'blip' in the grand scheme of things) -- I just don't know of any proof and admit as much.
I won't respond to the rest of your post which is basically alarmist rhetoric based on the false assumption that the mere potential for grave consequences of something we don't even know is happening requires us to Act Now.
Oh please. It just might be because of the price fixing, the monopoly they've created, or any number of other shady business practises.
I guess you really showed your true colours when you started calling in 'stealing'. It's not stealing (regardless of how much you call it that or want it to be).
Cry me a fucking river. Corporations exist for the sole purpose of making money and do not deserve any sympathy whatsoever. While it's slightly beside the point, do you think all the IT people whose jobs are being outsourced are "given time to adjust"? What about all the manual labour at the time of the industrial revolution? Nope. (and so on and so forth)
Oh, and regarding breaking the DRM on iTunes: Maybe people don't want their music DRM'ed? Maybe people want to do whatever they damn well like with the music they've bought?
I think a large part of the problem is that people have been crying wolf for a long time. After a while you just tune out... and so they have to shout louder which just makes people tune out even quicker...
(Not that I don't agree with the ridiculousness of the whole SUV-thing in the US. It just amazes me how many people actually seem to see it as some sort badge of honour. "I pollute *this* much!")
So what you're saying is: "They've increased because they must have". That's a great argument.
I think you missed the logic train. "We put out a lot of CO2" does not in any way, shape, or form mean that "The global level of CO2 is increasing because of us". There may be natural fluctuations which we are nowhere close to understanding and which would completely automatically dwarf anything put of by humans.
Yes, yes. Should have had the obligatory IANAE disclaimer on that.
Oh, I don't know... maybe he or she would like to have continued patronage? The incentive would essentially be survival against the competition... and let's not forgot the desire to express oneself artistically, of course -- although most of the current mainstream 'artists' seem to go more for cash than artistic expression. (Not that I blame them, as such. It's probably much easier to just give up on trying to do something which actually advances the arts and just do some cheesy pop album for all the teenagers of the world).
You are very likely to find university students who are interesting in just about anything and while they certainly won't do the work (labour) for free (or just 'for the benefit of mankind' as they say), most PhDs work for a pittance compared to what industry can offer. That tells me that their motivation is less money-centered than you seem to think.
There is a difference between "worthless" and "can't be sold". Many things are (essentially) worthless, but can still be sold for a great deal of money (and vice versa). Diamonds come to mind.
He/she is certainly suggesting no such thing. You went from him/her saying "a digital copy of a music recording is not a thing" to "anything which can be represented digitally is not a thing". So... no.
But even so... Let's see... certainly something which is (as opposed to just "can be") represented digitally has some properties which "things" (as in "physical object") do not. For example, they can be copied at virtually no cost. So if you'd said: "[...] something which is represented digitally [...]", I would certainly have agreed with that statement. However, your phrasing is very clever and ambiguous. Let's use a painting as an example: A paiting can be (albeit incompletely) represented digitally, but that certainly does NOT mean that the original painting is not a thing. However, it can still be argued (and rightly so, I think) that the digital representation of that painting is not a "thing" (because it can e.g. be copied at will, something which "things" cannot). So it all hinges on someone's interpretation of the "anything" in your statement, ie. whether "anything" is in fact meant to be the original "thing" or whether it is the digital representation you're talking about.