Why would... someone build something that takes so long to make and then peace out and not maintain it?You can't force the maintainers to work on them
You also can't force people to write drivers in C either, so GLHF?
Why would... someone build something that takes so long to make and then peace out and not maintain it?You can't force the maintainers to work on them
IDK, seems like they solved that problemissue with language bindings
Sadly not. Bindings generators (including SWIG that came before it) can't quite do the full job. Thats why you have many, many bindings in crates.io such as for SDL2.IDK, seems like they solved that problem
They move on to other projects? They get busy with work? They have a kid? So many reasons. Its so common that tools such as cargo-unmaintained have been developed.Why would... someone build something that takes so long to make and then peace out and not maintain it?
Since the API is only accessibly by C, they can *only* write their drivers in C currently. This is why the Rust community has been trying to implement Rust hardware abstraction bindings in Linux for over two years now.You also can't force people to write drivers in C either, so GLHF?
I'd do it willinglyYou also can't force people to write drivers in C either, so GLHF?
The only high level language I have seen that does allow direct interop with C, is basically C++ and Obj-C. Actually one of Stroustrups key design decisions or C++ to be successful was because he understood that interop with C was so important. I imagine that had this not been the case, the language would have failed to receive adoption by the industry.
I do like the "bolt on a basic C frontend" idea. It was my option 1 because it would be easier than writing an entire OS.The Common Lisp compiler Clasp interfaces to C and some C++ by using the LLVM and Clang libraries, aka it properly parses the header files and gets structs and function signatures out of that. In other words, it drags most of a compiler around.
https://github.com/clasp-developers/clasp
Or like Arch users lolRust people are like vegan. You know what they are within the first two or three minutes of your first meeting.
Trends steering OS in my opinion is a disaster.I think it is good that FreeBSD is trying keeping up with the new trends. If rust gives us better performance and less bugs, we should slowly incorporate it into FreeBSD, not change it, yet.
Literally what the Linux Rust developers say they use. But you say it "doesn't work", so I suppose it's a real head-scratcher as to who to believe.Sadly not
Kind of the point, prove it works well enough compared to everything else.they can *only* write their drivers in C currently
If you see the amount of work, the Rust community has put into their Rust abstractions binding layer, it is probably safe to assume bindgen has not been successful at automating the task of generating bindings. As I mentioned before, they have been working on this for years now. So its not much of a puzzle as to what to believe.Literally what the Linux Rust developers say they use. But you say it "doesn't work", so I suppose it's a real head-scratcher as to who to believe.
I'm talking about both kernel land *and* userland. The binding problem is present in both environments. SDL2 is just a nice clean encapsulated example to demonstrate a small library which bindgen can still not quite entirely automate. If you want to see an example of manual binding efforts in the Linux kernel; there are plenty of examples.All your examples are cargo related, but nobody's talking about third parties, just core devs. Nobody is using SDL2 in the Kernel.
Bingo! Hence my earlier recommendation of bolting on a C frontend onto Rust. Evolution rather than revolution is likely to be the only solution at this stage in the game. Which is why Rust is struggling to gain a foothold. People can have an imagination and make up fantasies until the cows come home but they need to be pragmatic if they want to get any work done.It's farcical that a "finding" of that paper is that C++ interops well with C. Of course? Same goes with Objective-C. Both literally bootstrapped off of C!
Now for the crazy bit. For almost any programming language to communicate. I.e:This is the failure of imagination: That nothing can be better than C if it's not C-based.
They don't want open drivers and nobody cares about their opinion on that.
Now for the crazy bit. For almost any programming language to communicate. I.e:
They can't do it. They *have* to go through C.
- Rust <-> Java
- Python <-> Java
- .NET <-> Java
So really, don't think of C as a language at this point. Think of it as the entire computing platform. So naturally C-based languages will have a massive advantage.
- Rust <-> C/FFI <-> Java
- Python <-> C/FFI-JNI <-> Java
- .NET <-> C/Pinvoke-JNI <-> Java
That's objectively false.
And it's not a matter of opinion. The question posed was to determine if GPU vendors willing to rewrite their entire stacks in Rust. Which I highly doubt. Should the Linux kernel devs try to shoehorn Rust into an existing C world for GPUs; they'll just move onto the next (and possibly better) C/C++ based alternative.
So does the V language. Example:The only high level language I have seen that does allow direct interop with C, is basically C++ and Obj-C.
//C function declaration in V
fn C.select(ndfs int, readfds &C.fd_set, writefds &C.fd_set, exceptfds &C.fd_set, timeout &C.timeval) int
....
res := C.select(fd + 1, &read_set, C.NULL, C.NULL, &ts)
I know it's difficult and someone have strong objection to it, but I believe only good solution would be to "compile into C, with inline asm for language-specific implicit parameters (including additional dedicated ELF section) handling. This way, theoretically, no binding-with-C issues can happen.
It can get sillier. A long time ago I worked on software that had initially been developed for NextOS on Next boxes. That was a really elegant early object-oriented platform. Unfortunately, the writing had been on the wall for Next before I came along. New CTO was hired and decided (correctly) that a port to Windows was necessary, and (incorrectly) that the GUI front end for that port would be Visual Basic. Now the VB of the time knew nothing about objects, so a C layer was needed to interop with the C++ back-end. At this point we have have C++ -> C -> VB.Now for the crazy bit. For almost any programming language to communicate. I.e:
They can't do it. They *have* to go through C.
- Rust <-> Java
- Python <-> Java
- .NET <-> Java
So really, don't think of C as a language at this point. Think of it as the entire computing platform. So naturally C-based languages will have a massive advantage.
- Rust <-> C via FFI-JNI <-> Java
- Python <-> C via FFI-JNI <-> Java
- .NET <-> C via Pinvoke-JNI <-> Java
Yeah, maybe my memory's faulty, but I thought it was C++. That's still a weird stack Obj-C -> C -> C++.NeXTStep applications would be Objective-C.
The circus behavior is this entire argument. These are completely different things: one of them is a language with a strong type system (which selling point is not memory safety, but rather lifetime and mutability tracking) and another is a tagged pointer CPU arch extension. The latter helps to reliably crash misbehaving programs preventing bugs from becoming exploitable security issues (consider it a very cheap runtime sanitizer), while the former is aimed at catching bugs at the compiler level, allowing the programmer to spend less time with a debugger.With the supposed purpose of Rust people keep regurgitating; Capsicum/CHERI has already addressed these issues years ago. They simply could've taken the code and made use of it; instead of rewriting entire software ecosystems that work. Pure NIH circus behavior. I don't see why Rust exists outside of these problem cases.
It does actually look close on first look but alas, these are just bindings. This example is basically just manually creating a V binding against the C select(2) function.So does the V language. Example:
//C function declaration in V
fn C.select(ndfs int, readfds &C.fd_set, writefds &C.fd_set, exceptfds &C.fd_set, timeout &C.timeval) int
....
res := C.select(fd + 1, &read_set, C.NULL, C.NULL, &ts)
To overcome that limitation (that V does not have a C parser), V needs you toredeclare the C functions and structs, on the V side, in your .c.v files.Note that such redeclarations only need to have enough details about thefunctions/structs that you want to use.Note also that they do not have to be complete, unlike the ones in the .h files.
Yes, they only get in the way of management...Why spoil a great tradition?
Ah, thats using C2V. Similar to SWIG/bindgen. It did very well though!![]()
Translating DOOM from C to V (blog post draft) · vlang doom · Discussion #15
In this video I'll demonstrate C2V, a fully automatic C to V source code translator. We'll run some simple examples and then translate the entire original DOOM, a shooter game released in 1993 and ...github.com
Doom was automatically converted. Though I’m sure there are still plenty of problems.