Earlier quoted context omitted.
Macports is my tool of choice, but yes it's the only way to get things done! Unfortunately, plenty of scientific libraries are too obscure to be ported, leaving it to us scientists... Interesting what you say about 10.8 - I might give it a shot then. I will be upgrading soon from snow leopard (2009 MBP) and I was going to wipe and go debian/XFCE, because of all the "new ideas" like "let's not have save as" etc, but i…
Oh no, I think slapping linux on it is the way to go, don't get me wrong :) But I got stuck with it because I had to do ios dev at some point, so I learned to adapt ... I hear arch and ubuntu both work great out of the box on macbooks.
The Unreasonable Effectiveness of C
381–390 of 394 posts
Re: The Unreasonable Effectiveness of C
#382Earlier quoted context omitted.
Macports is my tool of choice, but yes it's the only way to get things done! Unfortunately, plenty of scientific libraries are too obscure to be ported, leaving it to us scientists... Interesting what you say about 10.8 - I might give it a shot then. I will be upgrading soon from snow leopard (2009 MBP) and I was going to wipe and go debian/XFCE, because of all the "new ideas" like "let's not have save as" etc, but i…
I halfway solution I'm reasonably happy with is to have a VirtualBox install of Debian on top of OSX, and install most scientific libraries there. I've considered just wiping and installing Debian as the main OS, but when I first looked the Linux driver support for my MBP wasn't great, and since then I just haven't gotten around to it. VirtualBox works fine for anything that isn't too heavy duty, and anything heavy-d…
Re: The Unreasonable Effectiveness of C
#383To nitpick on a single statement: > C has the fastest development interactivity of any mainstream statically typed language. What? Despite all its shortcomings, Java in a modern IDE effectively has zero build time. The level of interactivity is as fast as that of interpreted languages. I haven't seen anyone manage this with C yet.
I'd rather have a Repl than a "modern IDE". C does not have or need a Repl because it's not designed for giant single programs anyway. Unix is the C Repl.
I noticed in another comment you said you are just learning C, perhaps you should wait till you have written non-trivial C before you declare what tools one does or does not need when writing it? C makes it very easy to make very nasty mistakes, so personally I take all the help I can get. I guess this means you think I'm an awful developer (according to your recent anti-IDE blog post), but I'd rather have code with less bugs than worry about violating some notion of 'purity' or hacker-hardcorness.
Re: The Unreasonable Effectiveness of C
#384Re: The Unreasonable Effectiveness of C
#385Earlier quoted context omitted.
Sorry, I don't see that. What he said is clear to me: The C virtual machine does not provide an accurate model of why your code is fast on a modern machine. He's saying that the abstraction that C provides has deviated significantly from the underlying hardware. Considering the kinds of hoops that modern processor go through, this is a valid point. And the above should answer the sibling's question, too.
He also said "C runs on many systems with noncontiguous memory segments but presents it as a single contiguous space." That is 100% false. In C, pointers to different objects are different. They're not even comparable. There is no concept of contiguous memory beyond that of a single array. Two arrays are not contiguous.
Re: The Unreasonable Effectiveness of C
#386Earlier quoted context omitted.
None of what you said supports your initial claim that the author is ignorant. In fact, even if we pretend that everything you said is true, none of it contradicts the article, or the authors conclusions. Yes, C has lots of areas where other languages are better. And yet, it is still the most practical language to use because of the combination of things that it does well.
"it is still the most practical language" Only in extremely limited contexts: low-level code for operating systems that happened to have been written in C. Otherwise, there is a better language for pretty much every use-case of C.
Re: The Unreasonable Effectiveness of C
#387Earlier quoted context omitted.
low-level code for operating systems that happened to have been written in C You say that like it is an accident that just about every major OS today is written in C or C/C++
"You say that like it is an accident that just about every major OS today is written in C or C/C++" Is there some technical feature of C or C++ that makes those languages good for writing OSes, or that made OSes written in those languages overwhelmingly successful? You might argue that the simplicity of a C compiler made Unix successful because it helped with portability, but C is by no means unique in this regard --…
I'm not arguing that. I'm not even saying I know precisely why C or C/C++ is good. I'm just saying, when every major OS is written in it, can you really dismiss it so easily?
Re: The Unreasonable Effectiveness of C
#388Earlier quoted context omitted.
He also said "C runs on many systems with noncontiguous memory segments but presents it as a single contiguous space." That is 100% false. In C, pointers to different objects are different. They're not even comparable. There is no concept of contiguous memory beyond that of a single array. Two arrays are not contiguous.
Allocate an array that crosses segments. Watch the details be hidden from you.
Re: The Unreasonable Effectiveness of C
#389Oh for heavens' sakes. Yet more ignorance. A more realistic view of C: - C is straightforward to compile into fast machine code...on a PDP-11. Its virtual machine does not match modern architectures very well, and its explicitness about details of its machine mean FORTRAN compilers typically produce faster code. The C virtual machine does not provide an accurate model of why your code is fast on a modern machine. The…
Disclaimer: I am a C programmer. C is straightforward to compile on pretty much every single CPU out there. A C compiler is required to certify many very common CPU's before they go into manufacturing, in fact. You cannot go to silicon, in many fabs, unless you have demonstrated the CPU can handle code; most of the code doing all this testing, is in C (lots of Assembly too). C is a front-line language, at the fabrica…
Re: The Unreasonable Effectiveness of C
#390Earlier quoted context omitted.
problems should be solved by describing a linear sequence of steps (as opposed to logic/declarative programming) Linear sequences of steps processing data arrayed in some linear fashion or others is what computers do. It is certainly what a single core does. So you would rather have someone else write a C program for you that abstracts it away and calls it a new way to program? That's k, just know that you'll still h…
> Linear sequences of steps processing data arrayed in some linear fashion or others is what computers do No, it's what some computers do. It's almost certainly not what the computer you are using currently does. It's quite possible it's not what any computer you've ever used does. > So you would rather ... I'm not expressing a preference. If you think I was, you've misunderstood my comment. I'm making observations,…