I think it may actually be the fact that it's easier to have interrupt service routines in C than it is in C++ thanks to name mangling. Just because he has his reasons doesn't mean they are irrational.
Name mangling makes it hard for other languages to use the libraries produced by C++.
The interrupt service routines would require a static function that could be referenced by the vector table and coming up with a way for the static function to reference its object. In pthreads I usually pass a pointer to the object in the static function call, however you have no such luxury with ISR. I'm sure there a way, heck you can just write that portion in C.
Anyway my coffee is kicking in and I wanted to make a correction.
It may be a superset from a syntactic point of view but the mindset is totally different.
I refer to section 1.2 of the C++11 standard that I mentioned above.
For proof just look at how many C programmers still seem to have an irrational hatred of all things C++ (eg. Linus Torvalds).
Someone's personal preference isn't an indication on mindset of a language just that particular person.
Anyway I wouldn't call it irrational. Maybe he doesn't like the performance hit caused by tree searches being done by C++ to resolve function and data addresses, or the larger code size that comes with supporting the additional functions C++ provides. I think it may actually be the fact that it's easier to have interrupt service routines in C than it is in C++ thanks to name mangling. Just because he has his reasons doesn't mean they are irrational.
Found this in the last freely available draft of the C++11 standard Section 1.2:
C++ is a general purpose programming language based on the C programming language as described in ISO/IEC 9899:1999 Programming languages — C (hereinafter referred to as the C standard). In addition to the facilities provided by C, C++ provides additional data types, classes, templates, exceptions, namespaces, operator overloading, function name overloading, references, free store management operators, and additional library facilities.
Hmmm, I wasn't aware that these products allowed you to connect to a centralized server for storing/receiving annotations as far back as 2005.
Yes. We called them file servers and it predates 2005.
In the early days this functionality was marketed as "workgroups" where people could create a document and put it on a centralized server. Coworkers would open the document and make annotations or even modify the document itself (a.k.a. redlining) and save the new version. It was a selling point for Microsoft Office Word and even Adobe Acrobat Pro.
Depends what you mean by valid. The g++ compiler will not complain about your code segment and functions outside of classes are still valid C++. Maybe you are being sarcastic?
I think most of the criticisms come from the fact that you can easily do wrong, not that it isn't possible to do the right thing.
PS: C and C++ are completely different languages, writing "C/C++" only shows your ignorance.
You were making some interesting points then you dropped the ball with this comment. I've been programming C and C++ longer than many of the slashdot crowd have been alive. C++ is a superset of C. I admit I never understood the "C/C++" moniker since I interpret "C++" as C with OO extensions but evidently people like to treat them as two separate entities.
While it is true I can make an application with purely C++ constructs, I often have to designate blocks of code as "C" since name mangling in C++ makes it difficult to do complex applications that required mixed languages.
It's not like Google is going to be trustworthy for the next 20 years... It just means they have an agreement with the FTC to settle everything they have done so far.
I'd hope that the people I issue laptops to are responsible and trustworthy. Personally I don't care if they use the laptop for personal web browsing or e-book, as long as they do it on their own personal time. Most appropriate use agreements say the same thing. I do draw the line at installing programs on the laptop.
However I always strongly suggest people to have their own laptops/computers for personal use. Information stored in the form of cookies, browser history, etc. can be embarrassing or worse. There was a local county worker who was dismissed for inappropriate material being found on his work laptop while it was being serviced by the IT contractor. No one thinks about the laptop failing and having your personal data locked up for the IT repair guy to find. I find it amusing that they warn of key logging (which isn't as wide spread) but aren't as cautious about being caught in a compromising position.
Another (and more appropriate reason for the people I work with) reason being that the company I work for (and most others) consider the use of company equipment for personal financial gain as an offense worthy of dismissal and any goods produced on company equipment as their property. Lawyers are more expensive than a laptop - a.k.a an ounce of prevention is better than a pound of cure.
You really ought to be treating all portable devices as potentially hostile devices and securing (and monitoring) your networks accordingly.
Placing company laptops in a DMZ doesn't always make for a productive work environment nor is your monitoring idea that effective. A compromised laptop can still "behave" in a company private LAN and once connected to a public hotspot send its payload to whomever. There is a reason we like locking down company equipment. Locking down company equipment also has a "cover your ass" attribute that network monitoring alone can't offer. Also depending on the industry there are regulations that may dictate such measures to be taken.
IMO if the user is competent enough to install Linux or their own custom Windows image on there, I don't think you are any worse off than it was previously. Seeing how out of date some IT departments are with patching and service packs, the machine may end up being more secure.
The employee should stick to his/her paid job assignment and let IT do the job for which they are paid. I have company equipment that have two or more operating systems on them, but they were all approved by IT first and my job directly depends on it. I believe altering the contents of a company laptop in such a drastic manner without the consent of IT may be a severe violation of the use agreement.
Re:advantages of multiple inheritance
on
PHP 5.4 Released
·
· Score: 1
The problem with GOTO was that before OO and modular programming becoming the norm, most code were long streams of consciousness that were hard to decipher. GOTO is still being used but not directly by the programmer or more accurately by syntactic sugar offered by the language.
Consider the WHILE loop:
a = 0
while(a < 5) {
println a
a = a + 1
}
It is really similar to (good enough for illustration - I could optimize by using logical not):
a = 0
loop:
compare a to 5
jump to continue if less than
goto exit
continue:
println a
a = a + 1
goto loop
exit:
The GOTO rule has been around so long that it has become an axiom. Unfortunately any (Perl) programmer can agree that there are more powerful ways to really reduce the readability of code. Poorly nested loops, extra long case statement tree, poorly done templates, inappropriately overloaded operators, and C++ being used for evil as prime examples.
I agree. I used to do amateur radio satellite voice contacts and I too would have to deal with the echo. At first it was disconcerting but eventually I just ignored it. The newer radios have a feature that mutes the headsets when you pressed the talk button. However the radio I had was quite ancient and I used the feedback to adjust for doppler.
It appears you are trying to install a printer I never seen before.
Press OK for exceedingly personal and embarrassing pat down, or READ MORE for a way to just pose nude in front of the web cam, or press CANCEL to order your cavity search online.
You insinuate that somehow his time is more valuable than anybody else's. Also there is push back from the OpenSUSE community that insist they like the current security defaults. Anyway I'm pretty sure he wasted more time writing his little rant than it would have taken to make it where his son could use a printer.
One could speculate that he is just demonstrating the consequences of not taking all of his opinions as gospel and giving it the upmost priority on bug tracker.
Yes we know Linus can appear to be a diva on occasions. Do we need to report all of his tweets, rants, or google posts?
Is it unreasonable for a distribution to trust the installer to set the policy for its users? Linus could have gave his son sudo privileges. Even better he could have installed a large database of printer config files to lower the chance that a new printer driver needs to be installed while traveling.
I think its safe to assume that Linus is skilled enough to do either of the above.
What you are describing is more of a function of the OS (Preemptive vs. Cooperative) multitasking.
The OS being used on the ASUS transformer is fairly modern and preemptive. By being preemptive the scheduler is a high priority process that uses an interrupt signal to trigger and perform context switches (switching between process threads). This is not as foolproof as you'd think because I've had Linux slow down to a crawl because of an errant spin-lock without a yield (sleep) which caused the scheduler to wait the full 10ms between context switches and of course the ready/wait issue on the process list which caused the other processes to starve due to the errant process always being ready and therefore selected again. When this happened the response time was slooooow but I was still able to kill the process it just took a while. I do not believe the number of cores would make much difference, since I had this happen on a quad-core processor board.
Preemptive multitasking on an OS that enforces real-time constraints or a much simpler embedded OS that simply gives each process a time slice without checking status are more resistant to this error. However, the likelihood for needing this foolproof of an OS is low which allows Linux and Linux based OS that are soft-realtime to be an acceptable choice in 99.9% of the other cases.
More cores means better multitasking since threads can run in parallel. Also, even for handheld devices you are unlikely to find, for example, a single-core CPU that is four times faster than each core of a quad-core CPU.
According to Amdahl you're looking at 1 / [( 1 - P ) + (P/N)] where N = number of processors and P is the percentage of a program that could run parallel. So if 75% of a program can be made to run in parallel on a quad-core processor we are looking at 1/[(1-0.75)+(0.75/4)] = 2.29, so we are looking at a maximum speed increase of 2.29 times the speed of a single processor not 4 times.
Another major advantage of multi-core systems is if a poorly written piece of software locks up it is highly likely to also be single-threaded and your system will chug along nicely despite the misbehaving program, allowing you to kill the process (by comparison, on a single-core system you're likely to suffer through five minutes of waiting for the system to respond before you are able to kill the process).
I haven't seen this. In fairly modern operating systems you'll have multiple services in operation. This means you'll most likely have more threads in execution than there are cores. Context switches between threads within a core of a multi-core processor will still need to be made. I've had a misbehaving program slow down an embedded multi-core processor board because we were "unlucky" that the OS scheduler was running on one of the same cores and other resources on the processor board were being committed by the errant process (eg. Memory, I/O ports, etc.) so the system is not as foolproof as you'd like since memory takes time to to swap, and deadlocks across cores can happen when a computing resource is shared.
Sure, in an ideal world this wouldn't happen but when it does happen it's nice to not be locked out of your system because of a single process misbehaving.
It really is a speed versus power issue. In an embedded environment, where one would hope that the system was well tested prior to being released to the public, such a safety net is really not required.
This isn't a corporation, it is a facility for education. There are no profits to protect, here, nor is it their job to protect the students from their own habits. It's a waste of time and resources for IT to even be worrying about this.
You're mistaken. Education is one of the functions of an University not the only one. Government research is usually being performed at these same institutions. You may want to check out the university directory sometime and pay attention to the number of doctorates and associates that are associated with research and do not teach.
I remember the good old days when most of my research lab computers were constantly being DDOS attacked from all the student lab computers that had become bots because someone kept installing software from the internet. Before I left that university, they started automatic re-imaging the drives at 2am as an attempt to keep the malware in check. I believe it did a lot to solve the problem.
My point being that IT/management may have valid reasons other than being "lazy" or being "bastards".
Name mangling makes it hard for other languages to use the libraries produced by C++.
The interrupt service routines would require a static function that could be referenced by the vector table and coming up with a way for the static function to reference its object. In pthreads I usually pass a pointer to the object in the static function call, however you have no such luxury with ISR. I'm sure there a way, heck you can just write that portion in C.
Anyway my coffee is kicking in and I wanted to make a correction.
One more thing:
I would hope so since one is a functional language, while the other allows object oriented methodology to be used.
I refer to section 1.2 of the C++11 standard that I mentioned above.
Someone's personal preference isn't an indication on mindset of a language just that particular person.
Anyway I wouldn't call it irrational. Maybe he doesn't like the performance hit caused by tree searches being done by C++ to resolve function and data addresses, or the larger code size that comes with supporting the additional functions C++ provides. I think it may actually be the fact that it's easier to have interrupt service routines in C than it is in C++ thanks to name mangling. Just because he has his reasons doesn't mean they are irrational.
Found this in the last freely available draft of the C++11 standard Section 1.2:
C++ is a general purpose programming language based on the C programming language as described in ISO/IEC 9899:1999 Programming languages — C (hereinafter referred to as the C standard). In addition to the facilities provided by C, C++ provides additional data types, classes, templates, exceptions, namespaces, operator overloading, function name overloading, references, free store management operators, and additional library facilities.
Either way, a divergence between C99 and C++ doesn't fully invalidate that C++ is a superset of C. It just means C99 is a fork. :P
You may have it backwards. Variable length arrays are supported by C++ and wasn't supported by the C language until C99.
In addition to my previous post, my office been doing group work and saving the modified documents using subversion for long while.
Yes. We called them file servers and it predates 2005.
In the early days this functionality was marketed as "workgroups" where people could create a document and put it on a centralized server. Coworkers would open the document and make annotations or even modify the document itself (a.k.a. redlining) and save the new version. It was a selling point for Microsoft Office Word and even Adobe Acrobat Pro.
Seriously this isn't that new of a concept...
Depends what you mean by valid. The g++ compiler will not complain about your code segment and functions outside of classes are still valid C++. Maybe you are being sarcastic?
I think most of the criticisms come from the fact that you can easily do wrong, not that it isn't possible to do the right thing.
You were making some interesting points then you dropped the ball with this comment. I've been programming C and C++ longer than many of the slashdot crowd have been alive. C++ is a superset of C. I admit I never understood the "C/C++" moniker since I interpret "C++" as C with OO extensions but evidently people like to treat them as two separate entities.
While it is true I can make an application with purely C++ constructs, I often have to designate blocks of code as "C" since name mangling in C++ makes it difficult to do complex applications that required mixed languages.
Neuromancer
It's not like Google is going to be trustworthy for the next 20 years... It just means they have an agreement with the FTC to settle everything they have done so far.
I'd hope that the people I issue laptops to are responsible and trustworthy. Personally I don't care if they use the laptop for personal web browsing or e-book, as long as they do it on their own personal time. Most appropriate use agreements say the same thing. I do draw the line at installing programs on the laptop.
However I always strongly suggest people to have their own laptops/computers for personal use. Information stored in the form of cookies, browser history, etc. can be embarrassing or worse. There was a local county worker who was dismissed for inappropriate material being found on his work laptop while it was being serviced by the IT contractor. No one thinks about the laptop failing and having your personal data locked up for the IT repair guy to find. I find it amusing that they warn of key logging (which isn't as wide spread) but aren't as cautious about being caught in a compromising position.
Another (and more appropriate reason for the people I work with) reason being that the company I work for (and most others) consider the use of company equipment for personal financial gain as an offense worthy of dismissal and any goods produced on company equipment as their property. Lawyers are more expensive than a laptop - a.k.a an ounce of prevention is better than a pound of cure.
Placing company laptops in a DMZ doesn't always make for a productive work environment nor is your monitoring idea that effective. A compromised laptop can still "behave" in a company private LAN and once connected to a public hotspot send its payload to whomever. There is a reason we like locking down company equipment. Locking down company equipment also has a "cover your ass" attribute that network monitoring alone can't offer. Also depending on the industry there are regulations that may dictate such measures to be taken.
The employee should stick to his/her paid job assignment and let IT do the job for which they are paid. I have company equipment that have two or more operating systems on them, but they were all approved by IT first and my job directly depends on it. I believe altering the contents of a company laptop in such a drastic manner without the consent of IT may be a severe violation of the use agreement.
The problem with GOTO was that before OO and modular programming becoming the norm, most code were long streams of consciousness that were hard to decipher. GOTO is still being used but not directly by the programmer or more accurately by syntactic sugar offered by the language.
Consider the WHILE loop:
a = 0
while(a < 5) {
println a
a = a + 1
}
It is really similar to (good enough for illustration - I could optimize by using logical not):
a = 0
loop:
compare a to 5
jump to continue if less than
goto exit
continue:
println a
a = a + 1
goto loop
exit:
The GOTO rule has been around so long that it has become an axiom. Unfortunately any (Perl) programmer can agree that there are more powerful ways to really reduce the readability of code. Poorly nested loops, extra long case statement tree, poorly done templates, inappropriately overloaded operators, and C++ being used for evil as prime examples.
I agree. I used to do amateur radio satellite voice contacts and I too would have to deal with the echo. At first it was disconcerting but eventually I just ignored it. The newer radios have a feature that mutes the headsets when you pressed the talk button. However the radio I had was quite ancient and I used the feedback to adjust for doppler.
Whoosh!
It appears you are trying to install a printer I never seen before.
Press OK for exceedingly personal and embarrassing pat down, or READ MORE for a way to just pose nude in front of the web cam, or press CANCEL to order your cavity search online.
I think you meant Adobe.
I assume you would make a custom distribution with SUSE Studio and install it on all of your machines.
You insinuate that somehow his time is more valuable than anybody else's. Also there is push back from the OpenSUSE community that insist they like the current security defaults. Anyway I'm pretty sure he wasted more time writing his little rant than it would have taken to make it where his son could use a printer.
One could speculate that he is just demonstrating the consequences of not taking all of his opinions as gospel and giving it the upmost priority on bug tracker.
Yes we know Linus can appear to be a diva on occasions. Do we need to report all of his tweets, rants, or google posts?
Is it unreasonable for a distribution to trust the installer to set the policy for its users? Linus could have gave his son sudo privileges. Even better he could have installed a large database of printer config files to lower the chance that a new printer driver needs to be installed while traveling.
I think its safe to assume that Linus is skilled enough to do either of the above.
What you are describing is more of a function of the OS (Preemptive vs. Cooperative) multitasking.
The OS being used on the ASUS transformer is fairly modern and preemptive. By being preemptive the scheduler is a high priority process that uses an interrupt signal to trigger and perform context switches (switching between process threads). This is not as foolproof as you'd think because I've had Linux slow down to a crawl because of an errant spin-lock without a yield (sleep) which caused the scheduler to wait the full 10ms between context switches and of course the ready/wait issue on the process list which caused the other processes to starve due to the errant process always being ready and therefore selected again. When this happened the response time was slooooow but I was still able to kill the process it just took a while. I do not believe the number of cores would make much difference, since I had this happen on a quad-core processor board.
Preemptive multitasking on an OS that enforces real-time constraints or a much simpler embedded OS that simply gives each process a time slice without checking status are more resistant to this error. However, the likelihood for needing this foolproof of an OS is low which allows Linux and Linux based OS that are soft-realtime to be an acceptable choice in 99.9% of the other cases.
According to Amdahl you're looking at 1 / [( 1 - P ) + (P/N)] where N = number of processors and P is the percentage of a program that could run parallel. So if 75% of a program can be made to run in parallel on a quad-core processor we are looking at 1/[(1-0.75)+(0.75/4)] = 2.29, so we are looking at a maximum speed increase of 2.29 times the speed of a single processor not 4 times.
I haven't seen this. In fairly modern operating systems you'll have multiple services in operation. This means you'll most likely have more threads in execution than there are cores. Context switches between threads within a core of a multi-core processor will still need to be made. I've had a misbehaving program slow down an embedded multi-core processor board because we were "unlucky" that the OS scheduler was running on one of the same cores and other resources on the processor board were being committed by the errant process (eg. Memory, I/O ports, etc.) so the system is not as foolproof as you'd like since memory takes time to to swap, and deadlocks across cores can happen when a computing resource is shared.
It really is a speed versus power issue. In an embedded environment, where one would hope that the system was well tested prior to being released to the public, such a safety net is really not required.
You're mistaken. Education is one of the functions of an University not the only one. Government research is usually being performed at these same institutions. You may want to check out the university directory sometime and pay attention to the number of doctorates and associates that are associated with research and do not teach.
I remember the good old days when most of my research lab computers were constantly being DDOS attacked from all the student lab computers that had become bots because someone kept installing software from the internet. Before I left that university, they started automatic re-imaging the drives at 2am as an attempt to keep the malware in check. I believe it did a lot to solve the problem.
My point being that IT/management may have valid reasons other than being "lazy" or being "bastards".