Prev: THE MIND OF MATHEMATICIANS PART 7 " SPATIAL MATHEMATICS , VALUE OF 1 and 3
Next: Exactly why the theories of relativity are complete nonsense- the basic mistake exposed!
From: Evan Kirshenbaum on 1 Mar 2010 11:28 Peter Moylan <gro.nalyomp(a)retep> writes: > Evan Kirshenbaum wrote: >> Peter Moylan <gro.nalyomp(a)retep> writes: >> >>> Admittedly the common "off by one" errors are often caused by >>> zero-based subscripting. With most programming languages, though, >>> such an error will make itself evident the first time you run the >>> program, when you run off the end of the array; and the exception >>> information will quickly lead you to the cause of the crash. It's >>> safe to declare subscript ranges in any way that is natural to the >>> application, as long as the generated code includes range >>> checks. The main thing that makes C so unsuitable for real-world >>> applications is the paucity of run-time checks. >> >> The existence of which, of course, along with the concommitant >> overhead, being one of the main reasons that other languages were >> considered unsuitable for real-world applications. >> >> Fast, safe, and easy to write a compiler for. Pick two. >> > I take your point, but the world has changed since such decisions > were made. Yeah, but a lot of the code bases in use go back that far, and rewriting from scratch is a difficult proposition. The slide from C to C++ is relatively easy and allows you to encapsulate safety in library classes, but changing the language more radically is a whole 'nother ball of wax. > The computer I'm now using has a processor that's about 100 times as > fast as the one in the first PC I ever had. Either you're a lot younger than I thought, or it's *way* more than 100. I believe that the last time I looked at it, processor speed (in terms of work that can be performed) was essentially on a Moore's Law curve, which gives you a factor of ten every five years. (It's not just cycle time; it's how much you can get done in a cycle due to the instruction set, pipelining, multiple cores, etc.) > I'm doing a job at present that requires a lot of real-time graphics > processing, and it turns out that we have a lot of spare processor > time. And the genetic programming runs I was doing last year (in a system written in C++) had the processor pegged (on 4 cores each for 16 machines) for hours. There's a spectrum. I do most of my programming in Java these days, but every time I look at rewriting that system, I throw up my hands. There's just no way it can match the performance (largely through templates and inlining) or maintainability. (Java's designers made some silly (but understandable) choices when they added parameterized types. (Some good ones, too, don't get me wrong.)) > Besides, it's been true for a number of years now that software > written in high-level languages often runs faster (up to about a 5% > improvement) than the same software written in C. That's because > modern compilers do a lot of code optimisation, but with a low-level > language a lot of optimisation possibilities aren't applicable. When I was in school, C was considered an HLL, and the same point was made: since control flow is explicit, you can do a lot more optimization. Which optimizations did you have in mind that don't apply to C++? > As for range checks: some processors now in use do a range check in > a single machine language instruction. The same instruction as the fetch or set? That would probably be enough. Which processors do that? (I'm woefully behind on modern processor architectures.) > Your "easy to write a compiler for" is more to the point. With the > kinds of processor that are typically used for embedded > applications, compilers are available for exactly one language, so > the programmer has no choice. -- Evan Kirshenbaum +------------------------------------ HP Laboratories |On a scale of one to ten... 1501 Page Mill Road, 1U, MS 1141 |it sucked. Palo Alto, CA 94304 kirshenbaum(a)hpl.hp.com (650)857-7572 http://www.kirshenbaum.net/
From: Hatunen on 1 Mar 2010 11:37 On Mon, 1 Mar 2010 16:16:10 +1300, "PaulJK" <paul.kriha(a)paradise.net.nz> wrote: >Hatunen wrote: >> On Sun, 28 Feb 2010 18:14:54 -0500, "Brian M. Scott" >> <b.scott(a)csuohio.edu> wrote: >> >>> On Sun, 28 Feb 2010 15:59:23 -0700, Hatunen >>> <hatunen(a)cox.net> wrote in >>> <news:68tlo51lbskir5ingugspogfsu33pcguo9(a)4ax.com> in >>> sci.math,sci.physics,sci.astro,sci.lang,alt.usage.english: >>> >>>> On Sat, 27 Feb 2010 18:57:10 -0500, "Brian M. Scott" >>>> <b.scott(a)csuohio.edu> wrote: >>> >>> [...] >>> >>>>> That may be another point of contention: pleasantly cool >>>>> means about 25�, and really good weather starts at about >>>>> 30�. And 5:30 or 6:15 is a nice time to go to bed. >>> >>>> I do hope you mean celsius degrees. >>> >>> I do indeed; Rob's posting from Oz. >> >> When mentioning temperatures I always try to remember to use "C" >> or "F". > >Don't forget "R" and "K" ! I, for one, make very few posts requiring either. -- ************* DAVE HATUNEN (hatunen(a)cox.net) ************* * Tucson Arizona, out where the cacti grow * * My typos & mispellings are intentional copyright traps *
From: Hatunen on 1 Mar 2010 11:42 On Sun, 28 Feb 2010 20:19:23 -0800 (PST), "Peter T. Daniels" <grammatim(a)verizon.net> wrote: >On Feb 28, 9:40�pm, Hatunen <hatu...(a)cox.net> wrote: >> On Sun, 28 Feb 2010 15:44:53 -0800 (PST), "Peter T. Daniels" >> >> >> >> >> >> <gramma...(a)verizon.net> wrote: >> >On Feb 28, 6:29 pm, Hatunen <hatu...(a)cox.net> wrote: >> >> On Sun, 28 Feb 2010 11:09:57 -0800, David Harmon >> >> >> <sou...(a)netcom.com> wrote: >> >> >On Wed, 24 Feb 2010 09:56:25 -0500 in alt.usage.english, tony cooper >> >> ><tony_cooper...(a)earthlink.net> wrote, >> >> >>As far as I can tell, the only employers that are closed on >> >> >>President's Day are government offices, schools, and banks. To the >> >> >> >There is no such holiday as "President's Day" to US government offices. >> >> >http://www.opm.gov/Operating_Status_Schedules/fedhol/2010.asp >> >> >> Interesting. I had assumed there was. And I see that there is one >> >> in some states. Certainly businesses think there is one in their >> >> sales advertisements. >> >> >The Post Office was closed for Presidents' Day in 2010. >> >> Not an American post office. They were closed for Washington's >> Birthday, no matter what a sign on the door or whatnot might have >> said. > >Don't be ridiculous. Washington's Birthday is February 22 (Gregorian), >and Presidents' Day was observed on Feburary 15. You need to see the site that someone cited back there somewhere. The Federal holiday is officially Washington's Birthday, but is celebrated on a Monday. There was a move once to create a Presidents' Day holiday, but it wasn't passed. Google for - presidents day - abd see for yourself. -- ************* DAVE HATUNEN (hatunen(a)cox.net) ************* * Tucson Arizona, out where the cacti grow * * My typos & mispellings are intentional copyright traps *
From: Hatunen on 1 Mar 2010 11:45 On Mon, 1 Mar 2010 04:51:09 -0800 (PST), "Peter T. Daniels" <grammatim(a)verizon.net> wrote: >In some states, we think Lincoln was pretty important, too. > >We note that you moved to a part of the country where Lincoln is >despised. But that is not the question at hand. >In case you can't remember, Lincoln was born on the very same day as >Charles Darwin, and his birthday was a state holiday in each of the >two states I lived in before 39 years ago.. What this has to do with the federal holiday of Washington's Birthday escapes me. -- ************* DAVE HATUNEN (hatunen(a)cox.net) ************* * Tucson Arizona, out where the cacti grow * * My typos & mispellings are intentional copyright traps *
From: Hatunen on 1 Mar 2010 11:46
On Mon, 1 Mar 2010 05:47:53 -0800 (PST), "Peter T. Daniels" <grammatim(a)verizon.net> wrote: >> Is your "We" an insular "We" or a Royal "We"? �For what group do you >> speak? �New Yorkers, linguists, or generally-considered-to-be-potty >> cross-posters? > >If you have so much trouble interpreting simple English, why do you >hang around a.u.e.? More irony. -- ************* DAVE HATUNEN (hatunen(a)cox.net) ************* * Tucson Arizona, out where the cacti grow * * My typos & mispellings are intentional copyright traps * |