Earlier quoted context omitted.
No, that's an example of someone not knowing the language very well. You should have written something like, "which is the company that...". I can't think offhand of any language that's really better here in a sense of being more efficient, except probably Classical Latin which is horribly complicated and of course a dead language.
>> Presentation by the Joyent CTO btw, who hired a lot of the old Sun Solaris team. > No, that's an example of someone not knowing the language very well. I disagree. The sentence is clear and unambiguous as written. The subject of the first part of the sentence is the CTO himself. If the continuation of the sentence is intended to switch subjects, then it must be written so. For example, '... by the Joyent CTO, whos…
Is it time to rewrite the operating system in Rust? [slides]
131–140 of 144 posts
Re: Is it time to rewrite the operating system in Rust? [slides]
#132Earlier quoted context omitted.
No, that's an example of someone not knowing the language very well. You should have written something like, "which is the company that...". I can't think offhand of any language that's really better here in a sense of being more efficient, except probably Classical Latin which is horribly complicated and of course a dead language.
Czech allows you to specify that with a change of one letter depending on who you mean (the CTO - který, the company - která) - this depends on different genders of the two words, but is commonly used.
Re: Is it time to rewrite the operating system in Rust? [slides]
#133Earlier quoted context omitted.
Czech allows you to specify that with a change of one letter depending on who you mean (the CTO - který, the company - která) - this depends on different genders of the two words, but is commonly used.
Are they officially calling themselves "Czechia" these days? I saw that on Google Maps recently, I think. It certainly is shorter and simpler than "Czech Republic".
Re: Is it time to rewrite the operating system in Rust? [slides]
#134Earlier quoted context omitted.
Czech allows you to specify that with a change of one letter depending on who you mean (the CTO - který, the company - která) - this depends on different genders of the two words, but is commonly used.
Yea, but the desirable language feature is a differentiation of Joyent and its CTO, based on Joyent being an adjective and CTO a noun, not on noun gender. (Did I set up the problem correctly?)
Re: Is it time to rewrite the operating system in Rust? [slides]
#135I think the question is wrong. People are already writing new operating systems in Rust just because they can. The question is whether we will end up using their efforts or whether we keep on going back to the same monolith kernels we have been using for the last thirty years or so. Whether it is NT, Linux, or any of the BSD kernels, they each have decades of history behind them. These will of course still be around…
> A lot of these implementations have clear merit in the sense that they are faster, safer to use, easier to scale, maintain, etc. Depends on who you ask. Hipp on Rust in 2016: Rewriting SQLite in Rust, or some other trendy “safe” language, would not help. In fact it might hurt. https://blog.regehr.org/archives/1292#comment-18452 > drivers written in Rust If you have to write inline assembly, and generally bypass Rus…
----
All that said, it is possible that SQLite might one day be recoded in Rust. Recoding SQLite in Go is unlikely since Go hates assert(). But Rust is a possibility. Some preconditions that must occur before SQLite is recoded in Rust include:
A Rust needs to mature a little more, stop changing so fast, and move further toward being old and boring.
B Rust needs to demonstrate that it can be used to create general-purpose libraries that are callable from all other programming languages.
C Rust needs to demonstrate that it can produce object code that works on obscure embedded devices, including devices that lack an operating system.
D Rust needs to pick up the necessary tooling that enables one to do 100% branch coverage testing of the compiled binaries.
E Rust needs a mechanism to recover gracefully from OOM errors.
F Rust needs to demonstrate that it can do the kinds of work that C does in SQLite without a significant speed penalty.
If you are a "rustacean" and feel that Rust already meets the preconditions listed above, and that SQLite should be recoded in Rust, then you are welcomed and encouraged to contact the SQLite developers privately and argue your case.
----
I follow the Rust story from afar, so I don't know the status of every one of these points.
B and F (FFI and speed) are covered.
C and E (embedded story and OOM recovery) is being actively worked on.
A will improve with time (for example, I suppose that the Rust 2015 dialect will settle at some point, feature-wise, once Rust 2018 is out).
D (branch coverage of compiled binaries) is on the radar, but not addressed yet.
Re: Is it time to rewrite the operating system in Rust? [slides]
#136Earlier quoted context omitted.
> I’m not criticizing pause times, but rather that you can’t rely on code inspection to identify the point of resource deallocation, which is pretty much the flagship feature of a GC :) This is completely wrong. The flagship feature of a GC is memory management, __not__ filehandle management or management of other resources. While many GCs support finalizer hooks, most languages with GCs (Go, Python, etc) explicitly…
In re-reading my statement, I understand the confusion, when I said 'not being able to rely on code inspection is the flagship feature of a GC' I meant, glibly, that non-deterministic deallocation of memory in a way the programmer does not have to (alternatively, cannot) reason about meaningfully. I suppose in reality it depends. Finalizer hooks are absolutely bad, I agree. Which means that resource management has to…
It's not a new vector of error; it's the same vector that C has to deal with.
> resource management has to be grafted on top of a GC memory model
Only if this means "don't bind resource lifetimes to memory lifetimes", which is the solution that every tracing GC language implementation (that I'm aware of) uses. There's nothing stopping you from refcounting file handles just like you would in C. The compiler could even automatically add in the refcounting instructions for you, or the language runtime could have a special GC just for file handles.
Re: Is it time to rewrite the operating system in Rust? [slides]
#137Another important and related question to ask is what role Lua should play in writing drivers and applications on top of a new kernel. NetBSD started on this direction, but exactly what an operating system looks like when it leverages both systems-level and scripting-level programmability waits to be seen. https://www.netbsd.org/~lneto/dls14.pdf https://www.lua.org/wshop13/Cormack.pdf
Re: Is it time to rewrite the operating system in Rust? [slides]
#138Earlier quoted context omitted.
What makes C problematic is that the language is specified in terms of an abstract machine that looks absolutely nothing like real hardware, and executing instructions that make no sense in the abstract machine but are very well-defined in the real hardware is liable to cause problems for the optimizer in the compiler. Is there a language (other than assembly) that would have a closer model to the hardware?
To my knowledge, there isn't any language that really tries to be the kind of "portable assembler" that people try to shoehorn C into. There just really isn't the demand for it, since trying to be a portable assembler requires trading off fidelity to hardware for optimization, and most people would rather have faster code than more accurate hardware representation. The internal IRs of compilers (such as LLVM IR or GC…
Re: Is it time to rewrite the operating system in Rust? [slides]
#139It'll be interesting to see how much use Rust gets within Fuchsia atop the Zircon microkernel.
The current state is, a few hundred thousands of lines, and Google hiring more Rust engineers quite aggressively. I'm also excited to see how it turns out :)
Re: Is it time to rewrite the operating system in Rust? [slides]
#140Earlier quoted context omitted.
The current state is, a few hundred thousands of lines, and Google hiring more Rust engineers quite aggressively. I'm also excited to see how it turns out :)
Any other high profile company/project using Rust ? (beside mozilla of course)