News for hackers. Stuff that matters.
Re:New Rust runtime turned on. What next? by Locke1689 on Friday August 09, 2013 @12:39AM (#6183781)
I think you have a somewhat inaccurate mental model of how things are done.

For one, it doesn't really make sense to talk about the CLR when you talk about bootstrapping C#. My project (the Roslyn C# compiler) is a 100% C# implementation of the C# compiler. One thing to keep in mind is that we don't target the CLR.

The C# compiler is not a compiler from C# to the CLR, it's a compiler from C# to the CIL (Common Intermediate Language). It's completely reasonable to imagine a machine which runs CIL in hardware instead of in a VM. In this case the answer to the question of whether or not the C# compiler is bootstrapped is, "Yes. Completely."

Moreover, it wouldn't make sense to ask whether or not the CLR is self-hosted -- it's called the "Common Language Runtime" for a reason. It's a language-independent virtual machine. In this sense, implementing it in C++ makes just as much sense as implementing it in machine code.

Now, my argument here was meant to be without loss of generality. To ask whether or not a language is bootstrapped shouldn't really depend on a runtime, since any language which requires a runtime cannot, by definition, have the runtime written in said language. In this sense, we should only ask whether or not the compiler is bootstrapped, not the entire environment.

Re:New Rust runtime turned on. What next? by dkhenry on Friday August 09, 2013 @08:47AM (#6185247)
We can imagine something that runs the CLR in hardware, and we can imagine something that runs the JVM in hardware ( actually those things exist , but they don't and both the CLR and JVM are incapable of creating programs that _can_ run on hardware without C shims.

Rust is in almost the same boat since they are using the LLVM, but the LLVM differs from the JVM and CLR since it can generate stuff to run on hardware without a shim.

Re:New Rust runtime turned on. What next? by j_s on Friday August 09, 2013 @02:08PM (#6187254)

  > actually those things exist , but they don't 
Not sure what you were trying to say here; one "Java in hardware": http://en.wikipedia.org/wiki/PicoJava
Re:New Rust runtime turned on. What next? by dkhenry on Saturday August 10, 2013 @12:10AM (#6190019)
Really big formatting fail. There should be a close parenthesis after the exist. I know the JVM in hardware implementations "exist", but they aren't real implementations since they lack many of the OS like features (Threads , I/O , ... ) That the JVM gives you. Even though we can run byte code in hardware we can't just copy a class file to a processor and execute it. It still needs a run time and a OS to make it full spec.
Re:New Rust runtime turned on. What next? by lucian1900 on Friday August 09, 2013 @05:46AM (#6184651)
It can be possible to write the runtime for a language that requires one in the language itself, as long as the runtime is only necessary for part of the language. Then, the runtime would merely have restrict itself to the parts that don't require a runtime.
Re:New Rust runtime turned on. What next? by Locke1689 on Friday August 09, 2013 @12:22PM (#6186545)
Of course, but my emphasis on "requires" was meant to deal with those cases, as it can be argued that that would constitute two languages -- one managed and one native.