If you think that you probably don't understand C...
As I wrote elsewhere in this thread
Have a look at the "If it were easy" thread on comp.arch, and/or read any recent comments by Mike Stump - and more importantly the rebuttals.
Several of the contributors were on various C/C++ standardisation committees, or know where the bones are buried in languages and processors, or have dug intel out of a very well publicised hole. In short, they know their stuff.
I was horrified at how much C and C implementations had changed since K&R days.
Since we run Linux as the OS on machine tools, we need to have deterministic performace. We use a version of Linux with real time options, and have typical worst-case jitter of 5 - 20 us over days of testing. (Some particular hardware interferes with the RT latency, and we don't use those configurations for machine control.)
I finally retired my last Win95 system. I still have it, to refer to if something archival needs to be retrieved.
That system had ISA bus, and a DMA card to control my home-made laser photoplotter (for making circuit board master artwork). I was worried the computer would die and leave the photoplotter unusable. I finally replaced it with a Beagle Bone running Linux, and a bit of code to use the Beagle Bone's PRU microcontroller to emulate the DMA card. It works quite well, and now doesn't depend on any unobtainable parts. While I was at it, I made the PRU decompress run length encoded plot files, so the files are a lot smaller that what was used on the Win95 system. Also, the Win95 system had only 10 MBit/second Ethernet, which slowed things down a bit.
Hmmm, well, I've been using Linux as my main desktop since about
2000. Years ago, there were some "issues" I will certainly admit. Ubuntu 10.04 had some problems with odd-sized LCD screens. But, I am really happy with the current Ubuntu 12.04, and my kids are using it, too, for web browsing, schoolwork, and such. Their schools use this "blackboard" system, which is REALLY Windows-centric, basically they say right up front, Windows XP or above required, no other OS'es supported. But, after a little bit of complaining, it all works, too.
One place I've totally struck out is updates for a Garmin GPS. You log in, and it says OS not supported. I guess it is because they can't be certain you can't figure out a way to make copies of the update file.
Oh, and I do some embedded system design, and a lot of PCB design, and FPGA design. I still use an old (but very good) schematic/PCB package that runs under Windows. I run XP under VMware on the Linux system.
As were there in Windows. You've simply gotten around them in Linux. More or less.
1600x1200 is "odd sized"? The type was it all works, too.
Complaining? Your computer listens to complaints?
You guess. Well, the point being that it *doesn't* work. Some "you guess" isn't good enough. This is very common with Linux. I don't want "you guesses". Sorry.
More crap software between you and getting your work done. No thanks.
You can write bad code in any language, true. However, C/C++ has the inherent advantage of much finer control of the machine, as well as native code optimization.
The fact that the third-party code made even the _Java_ version faster means that somebody somewhere wasn't paying enough attention to his choice of algorithm.
Cheers
Phil Hobbs
--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics
160 North State Road #203
Briarcliff Manor NY 10510
hobbs at electrooptical dot net
http://electrooptical.net
The corresponding disadvantage is that you have to have knowledge of and exercise far finer control of the machine. That kind of expertise is inherently scarce and hence the ability to deliver solutions (ugh!) is limited.
More importantly, you have to understand what someone who left the company 3 years ago assumed about the way their code & data would interact with other code & data. If you want optimisation with C, that's *very* difficult to get right - witness the bewildering array of gcc's optimisation options. Get one of those wrong, and you are very subtly screwed.
Besides, the optimisation techniques used in Java runtimes are surprisingly efficient, since they are based on what the code is actually doing on this processor, as opposed to what the compiler can safely (or unsafely) infer might happen on similar machines. C's appalling aliasing rules vastly limit the ability to optimise.
Consider the the experience found in HP's Dynamo project and compiler. Take C code that is cpu/memory bound and run it on processor X to determine performance. Run an emulator of processor X on processor X, and in the emulator instrument the hell out of the code to find what it is actually doing. Optimise the C binary, and run it in the emulator.
Find the *emulated* code is as fast or *faster* than the *raw* binary running on the *raw* processor. True both for -O2 code, and even for -O4 code!
That's a very strong indication of the lack of ability for C compiler optimisation.
No. There isn't time to reinvent all the wheels in the world, and with Java it is easy to find high quality code that can be simply intermixed with your code in the same binary. That simply doesn't happen with C/C++ (how many mutually incompatible string classes are there?)
On a sunny day (Thu, 02 Oct 2014 20:30:43 +0100) it happened Tom Gardner wrote in :
I think, as you are clueless too it seems, you see things completely out of context.
But 4 sure keep peeking at registers, your boss pays for the time I am sure. You prob do not even know hat they are for. You must be a really crappy lousy clumsy programmer to write C code that needs register level debugging. So hand in had with the decadent one you are relying to you go.
On a sunny day (Thu, 02 Oct 2014 13:37:43 -0400) it happened Phil Hobbs wrote in :
I am not sure, but in all these years after thousands and thousand lines of code nothing like that ever happend to me. Think about it.
Maybe you should start with kernighan & ritchie the c programming language its online now for free:
formatting link
And then, after doing come coding, read: libc.info its on your computah, or should be. I unzipped all parts and catted it all together. With those 2, and some help from google if you get stuck, you should not have those problems.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.