5 ms·
Why are so many people intent on taking C away from us? The fact that you can run everything from Erlang to Python to Lisp to a JVM on the same machine and und
by haberman 16y ago
Why are so many people intent on taking C away from us?
The fact that you can run everything from Erlang to Python to Lisp to a JVM on the same machine and under the same OS is thanks to C, not in spite of it!
C exposes the machine at a low level, which means that you can innovate in the language/VM space without having to beg the runtime gatekeepers to please implement your new experimental semantic. Anyone can generate machine code that will run directly on the hardware -- I recently wrote a JIT that parses Protocol Buffers 2x the speed of any existing parser. Don't take away from the the ability to do this!
Higher level VMs like the JVM can impose further constraints -- this is already possible today. But those VMs can compete for popularity in user-space without imposing limitations on the kinds of VMs you can write directly on the hardware.
- jerf 16y ago"The fact that you can run everything from Erlang to Python to Lisp to a JVM on the same machine and under the same OS is thanks to" Turing completeless, not C. "you can innovate..." We have. We've innovated for 40 years. It turns out we've learned some stuff since then, and it's time to move some of those innovations down to the lower parts of the system. Sorry, that means bumping C. But I assure you, I will celebrate C and put it on a pedestal and remember it fondly, even as I'm shoving it out the door and glad that it is no longer the constraint for all future systems. It's not that it sucks, it's that it's basically used up. An immense amount of problems with modern computing basically boil down to having C at the lowest level of the system, and we aren't going to fix them until we get something else at the lowest level. The hardware model that it embraces is simply not appropriate for building the networked future on.
- haberman 16y ago> Turing completeless, not C. Be serious. Brainfuck is Turing-complete: are you suggesting that other programming languages could reasonably be implemented on top of it? Almost every single VM or programming language implementation is written in C. What are people going to write programming languages in when you take C away from them? > We have. We've innovated for 40 years. It turns out we've learned some stuff since then, and it's time to move some of those innovations down to the lower parts of the system. So your opinion is basically that it's time to stop innovating, because now we know the best answer. What do you have to say to the fact that I wrote a JIT two weeks ago that effectively improved the state of the art in network protocol parsing? How is that not part of "the networked future?" Your arguments that C is holding us back are vague and unconvincing. People write VMs all the time. Code that runs on these VMs can be as insulated as you want from the underlying system. The entire web is built on JavaScript which doesn't know a lick about C -- how would that whole ecosystem be any better if C wasn't underneath it? I argue it would be much worse, because the radical performance improvements of the last 4 years (which came from writing JITs that target the bare metal) would not have been possible. You can pry address spaces and machine code from my cold, dead hands.
- jerf 16y ago"Be serious. Brainfuck is Turing-complete: are you suggesting that other programming languages could reasonably be implemented on top of it?" Be serious yourself. With that sort of hostile characterization, I have little interest in following up in a dead conversation. You don't appear to have spent even a second trying to understand what I'm saying before leaping to a nonsensical strawman. (And I am well aware that understand != agree. But you didn't take the time to even know what you disagree with.) "So your opinion is basically that it's time to stop innovating," No, it's time to resume. C is not where the innovation is.
- haberman 16y agoI spent a lot of time trying to understand what you were saying, and because it was unclear to me I asked very specific questions, none of which you answered: - what will people write language implementations in, if not C? - why don't you consider my JIT an innovation worth supporting? - if C is a barrier to innovation, why is the JavaScript landscape so thriving? My point about Brainfuck (that's a language by the way, not a slur, in case that wasn't clear) is that Turing-completeness says almost nothing about the systems-level capabilities of the language. Turning completeness means that a language can calculate Pi: it doesn't mean that it can open a file or send data over a network, and it says nothing about efficiency. So when you argue that Turing-completeness is what makes it possible to run lots of different kinds of VMs on the same machine, it's hard to take such an argument seriously.
- jerf 16y ago"So when you argue that Turing-completeness is what makes it possible to run lots of different kinds of VMs on the same machine, it's hard to take such an argument seriously." Turing completeness is why you can run a JVM on top of a C environment. It means that any computation that C could do, the JVM could do. It means that I can run a JVM on top of any Turing Complete environment. The JVM could be ported to a modern day Lisp machine. The JVM could run on a Russian ternary machine. C does not get "credit" for enabling the existence of the JVM, because the JVM could run on any Turing complete substrate. You have the causality backwards. "- what will people write language implementations in, if not C?" The new systems languages will be written in themselves! What do you think C is written in? "Bootstrapping." "- if C is a barrier to innovation, why is the JavaScript landscape so thriving?" Wrong question for what I'm talking about. Javascript has no innovation of interest to systems level programming, it's just a thin layer over C. I'm talking more like something like Go, which is hampered by the fact that it can't really use C libraries properly because Go can't grab and schedule C routines properly. Or how E [1] is really hampered by the fact that it basically can't work properly in a C environment, its whole schtick really only works if it's down to the OS level. The entire point is that I want to replace the foundation, so it can do things that C basically can't. Like, write a secure operating system, which C is incapable of, despite immense amounts of effort. Basically, why is UNIX still the preeminent OS? Yes, it was good, I know that, there's a reason why it's the only survivor of its time period, but where's the capabilities-based system? Where's the thing we can't even think of because we're too stuck on C? Why is one of the preeminent kernels of the day, the Linux kernel, still adding an average of two security vulnerabilities a week, the same ones, over and over? Why are buffer overflows still coming out in 2011? Why do I still get segmentation faults in 2011? Why are we building the very foundations of our system on a language that all but mandates such failures, when we know how to not do that? C. As for any response you might have as to why C is still worth it, my reply in advance is that every one of those things is room for "innovation", much of which has already been done. [1]: http://www.erights.org/ http://www.erights.org/
- Goladus 16y ago> Turing completeless, not C. C's mix of portability, simplicity, flexibility, and expressiveness made it the ideal choice for developing operating systems that had to run on a wide variety of architectures. Perhaps a simple example of where C gets in the way would help clarify your case.