3 ms·
> Copilot 3.9, a stream-based DSL for writing and monitoring embedded C programs, with an emphasis on correctness and hard realtime requirements. I hate to say
by urthor 4y ago
> Copilot 3.9, a stream-based DSL for writing and monitoring embedded C programs, with an emphasis on correctness and hard realtime requirements.
I hate to say it.
This is something that actually, genuinely should, be re-written in Rust.
- wudangmonk 4y agoRust, the one true programming language that will save us all. Repent! and confess your sins so that Rust may have mercy upon your soul.
- adamnemecek 4y agoRust is the legit the best thing that has happened to the industry in the last 30 years.
- Bellend 4y ago- looks for rust jobs - finds none
- GuB-42 4y agoThe software is written in Haskell. I don't know much about it but it doesn't look like a bad choice. Remember that it is just a compiler / test tool, it is not the embedded part, that would be the target. I don't think Rust brings much to the table here. It uses C as a back end, which is a sensible thing to do since it is the default in embedded software development, few embedded toolchains support Rust. And it is just a backend, they could have output machine code directly, but C is more universal and you can take advantage of all the C compiler optimizations. Using Rust for this would get you all of the disadvantages and none of the advantages that Rust has over C. Now, maybe you mean writing embedded code in Rust instead of C, at least, now you have a point, Rust has features that I think would be well suited for critical embedded software. But that's also what Copilot tries to do, if anything, Copilot competes against Rust (and ADA). I say that in the sense that they all address the same problem (safety) and you have to choose one solution, not that they are enemies.
- urthor 4y agoI meant the embedded C back-end, yes. Rewriting the Haskell DSL doesn't really make sense.
- UncleEntity 4y agoDon’t think anyone would stop you…
- rzzzt 4y agoThis alternative Rust compiler's intermediate representation is C code, which is then run through another compiler to produce the final output: https://github.com/thepowersgang/mrustc https://github.com/thepowersgang/mrustc Should its author generate Rust from Rust? Would it be better if Copilot produced object files or executables directly, or used eg. LLVM IR?