3 ms·
My comment might be unwarranted but at this point, considering Rust might be also an option.
by adamnemecek 7y ago
My comment might be unwarranted but at this point, considering Rust might be also an option.
- AnimalMuppet 7y agoAll right, same question: Is there a "Rust: the good bits" book that someone can recommend?
- adamnemecek 7y agoThere is the Klabnik one from NoStarch and the Blandy one from O'Reilly. The first one is more towards beginners, the second one is pretty advanced, you build some relatively advanced things. I own both. Part of the appeal of Rust is that there aren't as many bad parts as with C++.
- pjmlp 7y agoI like Rust, but it still has to grow up a bit to be an option for GUIs, iOS/Android, game engine middleware, Windows/macOS systems programming. It will eventually get there, but it isn't there yet.
- adamnemecek 7y agoYou make them yourself. With Rust you might not need those things as much, because you roll these things yourself. What are the GUI frameworks in other languages? Qt? wxWidgets? GTK? These are all so, so, so bad. I'm saying this as I'm writing my own GPU-rendered immediate-mode GUI toolkit with multiple rendering backends. I can't do this in any other language, like...I would legit get stuck on the build systems. You are right, it would be better if there were somewhat better frameworks but I'm ok writing my own. As an aside, my long term dream is to write a next-gen OS in Rust. GPU-first, new application paradigms, compiler comes with the OS, first-class networking support. The languages empowers you to an insane degree. What Windows/macOS systems programming would you want?
- pjmlp 7y agoNo I don't, I rather be productive doing what I am supposed to do in first place. Some examples, DriverKit, COM/UWP, WinUI, Metal Shaders, CUDA, SYSCL, Treble, Unreal/Unity. For all of those I already have a good mix of Swift, .NET, Java/Kotlin and C++, as they are the official OS SDK languages, writing in Rust would just slow me down in its present state. Bad UI toolkits?! Best that Rust currently has is Gtk-rs and that is being nice versus what those toolkits and GUI tooling are capable of.
- adamnemecek 7y ago> Metal Shaders Write a wrapper, it's easy in Rust. Follow this example https://github.com/gfx-rs/metal-rs https://github.com/gfx-rs/metal-rs > CUDA There's a wrapper. https://docs.rs/cuda/0.1.0/cuda/ https://docs.rs/cuda/0.1.0/cuda/ > DriverKit There's a wrapper https://github.com/dcuddeback/iokit-sys https://github.com/dcuddeback/iokit-sys. > Gtk-rs GTK is terrible, Gtk-rs is putting a lipstick on a pig. I need 2D rendering but also power to touch the gpu to write a shader, to use gl_VertexID when I feel like it. The thing about rust is that that I can legit write my own bindings for any lib written in c/c++, anything else. Like you go from zero to dependency included, building in less than 10sec. The build process is insane. Check out this port of nanovg https://github.com/sunli829/nvg https://github.com/sunli829/nvg. NanoVG is a popular project with many contributors, this port is a single person project that's better in many ways. With rust you literally just do "git clone https://github.com/sunli829/nvg" https://github.com/sunli829/nvg" "cd nvg/nvg-gl" "cargo run -p nvg-gl --example demo-cutout" You go from git clone to drawing something interesting to screen in 10 seconds of human time (there might be some time spent building dependencies but whatever, I don't need to touch anything).
- pjmlp 7y agoAll those projects are toy examples, barely with any usable code on them. As for compile speeds, I very much doubt it takes 10 seconds, given the current state of being forced to compile the world from scratch without any support for binary libraries and the continuous posts regarding compiler slowness. If I want to draw a SVG, I just drop it into my application, no need to compile anything. https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.imaging.svgimagesource https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.med...