4 ms·
> My problem is that C was elevated to a role of prestige and power, its reign so absolute and eternal that it has completely distorted the way we speak to each
by titzer 5y ago
> My problem is that C was elevated to a role of prestige and power, its reign so absolute and eternal that it has completely distorted the way we speak to each other. Rust and Swift cannot simply speak their native and comfortable tongues – they must instead wrap themselves in a grotesque simulacra of C’s skin and make their flesh undulate in the same ways it does.
Lol at this. Love this eloquent style, and pretty much agree. However, C's reign is not absolute. Virgil compiles to tiny native binaries and runs in user space on three different platforms without a lick of C code, and runs on Wasm and the JVM to boot. I've invested 12+ years of my life to bootstrap it from nothing just to show it can be done and that we can at least have a completely different userspace environment. No C ABI considerations over here. It can be as romantic as just you and the kernel in Virgil land. Heh.
- 999900000999 5y agoAnyway to build a GUI app? Definitely looks like a cool project. Can you write an OS in it, for microcontrollers ?
- titzer 5y agoHmm, very interesting question. I think you could interface with X windows via IPC, but you'd have to build that IPC layer, which ultimately boils down to pipes/sockets. So that route would be doable, but probably a steep climb. Another option would be to compile to Wasm and then import GUI-related functions that are then implemented in the Wasm host environment, e.g. JavaScript. As for microcontrollers, that was in fact, Virgil I, circa 2006. :) My prototype compiler back then generated C code and then you could compile with avr-gcc. Nowadays, I don't have a C backend or native backend for microcontrollers, so it'd require a new backend and a new exe format. Or maybe again, try to compile Wasm to AVR.
- mumblemumble 5y agoBut how would you link a library written in Rust to a Virgil program? Or vice versa? That's the real problem the author is ranting about. If you've solved that, too, then I think that the author's article isn't the only Rust team member who'd like to talk to you.
- Turing_Machine 5y ago> But how would you link a library written in Rust to a Virgil program? Or vice versa? Sounds like that's Rust's problem, or maybe Virgil's? Why is it C's problem? If Rust is going to "replace C" for systems work, as the more grandiose claims would have it, it's going to have to replace all of C. It's not like writing a POSIX-like system is that hard. It's a lot of work, sure, but it's been done multiple times, by unpaid volunteers at that. This complaint basically boils down to "We can't/won't/haven't reimplemented this low-level stuff in our whizzy new language, and that's somehow C's fault".
- valleyer 5y agoYour argument reads like: you shouldn't need to run Rust programs unless _the entire operating system_ is first rewritten in Rust. I doubt you really mean that, though...
- Turing_Machine 5y agoNo. More like "You shouldn't whine about the C infrastructure unless you're planning to replace it with something better."
- kaba0 5y agoC is only used for FFI because it provides a well-defined, stable interface for function calls that can be easily implemented by another language.
- hoseja 5y agoThe article argues against every word of this statement.
- Turing_Machine 5y agoThe article is wrong.
- cobertos 5y agoAnd they say romance is dead lol
- erichocean 5y agoAre you planning to do an arm64-darwin port for Virgil?
- titzer 5y agoYes, this would be very useful. I have it listed here [1] and am hoping to get either a student or a volunteer to do some work there. [1] https://github.com/titzer/student-projects https://github.com/titzer/student-projects