If you've read GamingOnLinux regularly, you will likely know how I am a big fan of SC Controller [GitHub]. It's a user-made driver and interface for using and mapping the Steam Controller. It's also now going under some major changes.
After previously noting how they weren't happy with certain issues surrounding Linux (like the Code of Conduct), the previous release was going to be the last for a while. Glad to see them back though, it's an incredibly useful tool.
So what's going on? Well, the developer "kozec" is rewriting large parts of SC Controller from Python to C with an aim to make it "much more portable" including Windows support and eventually Android.
For those interested, you can see the code on GitHub which is in a separate branch. They've also release version 0.4.9.1, which is the first rather experimental build with it using the new code.
Quoting: mirv,aluminumgriffinQuoting: GuestFrom a source code perspective, C is actually a very portable language. It might also have fewer dependencies, especially if you stick to POSIX, and quite probably a lower memory footprint once compiled. But I suspect in this case it's more that C can be used to create abstractions over the platform dependent sections, and python bindings will be provided on top of those.
Quoting: aluminumgriffinQuick thing about the C vs Python for being portable.
A python interpreter is a quite hefty penalty, and also there are C-compilers for _far_ more target-systems than there are platforms with python-interpreters.
Also, with C you basically "only" need to port the libs in use (with shims for everything you don't care about) when moving to an esoteric platform (this kinda was the purpose of C to begin with) while with Python you need to port the entire intepreter.
For a bit extreme case that still is easy to imagine - consider the case of an arduino (say, for an homebrew arcade machine). What would you find the easiest to do: port a C-program to fit into a couple of kB of memory, or try to wedge an entire interpreter in those same kB?
And as an aside, when working from another language it is a lot easier to interface with C than with Python (the former is often fairly automated as well as being common, not so about the latter).
Fair points. I actually had to look up Arduino though, but it makes perfect sense that someone might want to couple a commodity control device there.
The reason for my question was that I was under the impression, that C would outright sabotage the portability when targetting mainstream mobile devices, though that impression as apparently wrong.
I'm still confused though, as to whether the GUI portion CAN be portable that way.
Last edited by Klaus on 26 November 2018 at 3:52 pm UTC
I am not sure when Linux 4.18 will be available with native Steam Controller support, but that must factor in Kozec's decisions.
Quoting: HoriYou all forget that there are waaay more people able to program in C than there are people able to program in Rust. Unless there's a very good improvement from which the application would get a real, noticeable benefit, you'd want to stick with the more popular choice.
That shouldn't be an impediment to use a newer language. Using this logic, everyone should have used FORTRAN forever. The benefit is always noticeable if you choose between C and Rust. The only blocker I can think of, is if the primary developer himself doesn't want to learn Rust.
Last edited by Shmerl on 26 November 2018 at 5:58 pm UTC
Quoting: GuestAlso, it makes no sense to use Rust unless you’re in love with it. It’s a complicated language used by very few programmers. It’s much better to use C.
All languages have trade-offs. You pay for C simplicity with its primitivism and a big and painful overhead of code stability and correctness verification (unless you simply don't care about the later and the result can end up being a crashing mess). I'd take language complexity for the price of much higher default code correctness built into the language.
Last edited by Shmerl on 26 November 2018 at 8:19 pm UTC
Quoting: HoriQuoting: WorMzyHere's hoping the dev moves away from using GTK3.So that we end up with yet another application that doesn't properly or at all respect the system-wide theme that we want to have?
No thanks.
They could get it to work out fine if they basically imitate the official Steam Controller Configurator. In that case, they would keep consistency with Steam (as opposed to the DE theme) which is fine. Actually, in my personal opinion that would be even better.
Of course, people who don't use Steam might disagree... but then again, how many people (if any) are there who use an SC but not the Steam client?
Quoting: ShmerlQuoting: GuestAh ok, a personal preference thing rather than a technical one.
On a technical level, C is a better choice here, for ease of cross-platform support on something that is lower level and may require kernel interaction. Pretty much everything is going to have a form of libc, and target platforms will have a lot of support (from compilers and build systems, to additional libraries that might be needed) already in C.
It's both and the reason for preference is technical, not simply one of taste. Rust can interact with kernel all the same by the way. Rust does depend on libc at present.
See https://github.com/rust-lang-nursery/portability-wg/issues/13
And an interesting example here: https://github.com/tsgates/rust.ko
You all forget that there are waaay more people able to program in C than there are people able to program in Rust. Unless there's a very good improvement from which the application would get a real, noticeable benefit, you'd want to stick with the more popular choice.
"Unless there's a very good improvement from which the application would get a real, noticeable benefit, you'd want to stick with the more popular choice."
On a side note, way too many programmers have a similar attitude towards open APIs like OpenGL and Vulkan and sadly they don't consider cross platform support as a considerable benefit.
Quoting: sarmadIs this driver better than valve's own driver? Valve's driver doesn't work out of the box and you have to tinker with udev files to get it to actually behave like a normal controller (for games that has built in controller support).
I don't know about other distros, but for Ubuntu and derivatives, you can install `steam-devices`, and everything should work just fine.
Quoting: aFoxNamedMorrisI am on Ubuntu as well, and no, installing `steam-devices` is not enough to get the controller to work for all games. There are still games that require tinkering with udev files.Quoting: sarmadIs this driver better than valve's own driver? Valve's driver doesn't work out of the box and you have to tinker with udev files to get it to actually behave like a normal controller (for games that has built in controller support).
I don't know about other distros, but for Ubuntu and derivatives, you can install `steam-devices`, and everything should work just fine.
See more from me