You can sign up to get a daily email of our articles, see the Mailing List page!
Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through Paypal, Flattr and Liberapay!

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.

16 Likes, Who?
We do often include affiliate links to earn us some pennies. We are currently affiliated with GOG and Humble Store. See more information here.
27 comments
Page: «2/3»
  Go to:

Shmerl 26 November 2018 at 1:11 pm UTC
mirvAh 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


Last edited by Shmerl at 26 November 2018 at 1:13 pm UTC. Edited 3 times.
WorMzy 26 November 2018 at 1:33 pm UTC
Here's hoping the dev moves away from using GTK3.
mirv 26 November 2018 at 1:36 pm UTC
View PC info
  • Supporter
Shmerl
mirvAh 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

I still see that as counter to the idea here - needing all the extras will just mean the project relies on C libs regardless (again, pretty much every system has a libc anyway), Python still (as far as I can tell, some parts will remain that way), and then advocating adding Rust dependencies on top doesn't sound like a good idea in this case. I just don't see a use case for Rust for this project's goals (or at least what I'm interpreting to be the goals).

My own opinion of course. And you've answered quite well why you'd prefer Rust. I fear going too far off-topic, and language holy wars, so I'm going to basically stop here on the C vs Rust front. But cheers!

(P.S - feel free to refute anything I said above of course - I'll still read, consider, and try educate myself some more about Rust in general).
kean 26 November 2018 at 2:27 pm UTC
Really nice, I am just about to get a steam controller
Shmerl 26 November 2018 at 2:48 pm UTC
mirvand then advocating adding Rust dependencies on top doesn't sound like a good idea in this case. I just don't see a use case for Rust for this project's goals (or at least what I'm interpreting to be the goals).

Not any more than advocating for C in this case. If you think mixing languages is bad here, it's bad with C as well. But if you think rewrite is useful, Rust only has advantages over C, offering the same functionality.


Last edited by Shmerl at 26 November 2018 at 2:49 pm UTC. Edited 2 times.
Klaus 26 November 2018 at 3:51 pm UTC
mirv,aluminumgriffin
mirvFrom 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.

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 at 26 November 2018 at 3:52 pm UTC
Hori 26 November 2018 at 3:55 pm UTC
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?

Shmerl
mirvAh 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.


Last edited by Hori at 26 November 2018 at 4:05 pm UTC. Edited 9 times.
Ray54 26 November 2018 at 4:57 pm UTC
View PC info
  • Supporter
Which computer language would I use to write such code really does not matter. I have written specialist USB handling code for Linux and Windows in C and C# respectively, and it was pretty hard to get right. However, I prefer to use languages like Java, Gnome's Vala, Go and Python where practical, and I really like the little Rust coding that I have done. However without knowing the problem area in real detail, I would say that probably the best language for the development is the one that Kozec, who has done it before, chooses. From Liam's text, I assume C for the real-time bit-twiddling and Python for the rest, which sounds sensible to me.

I am not sure when Linux 4.18 will be available with native Steam Controller support, but that must factor in Kozec's decisions.
Shmerl 26 November 2018 at 5:58 pm UTC
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 at 26 November 2018 at 5:58 pm UTC
stan 26 November 2018 at 7:18 pm UTC
WorMzyHere's hoping the dev moves away from using GTK3.
This is what I was hoping for when I read the title of this article. Gtk3 is unusable crap.

HoriSo 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?
This is exactly what’s happening with Gtk3 applications. Gtk2, Qt4 and Qt5 apps look exactly how I want them (using my favourite Gtk2 theme). But it’s impossible to make Gtk3 look and behave correctly.

Also, 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.


Last edited by stan at 26 November 2018 at 7:25 pm UTC. Edited 2 times.
  Go to:
While you're here, please consider supporting GamingOnLinux on Patreon, Liberapay or Paypal. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!

Due to spam you need to Register and Login to comment.


Or login with...

Livestreams & Videos
Community Livestreams
  • Story Time: „Syberia“ (via Wine)
  • Date:
See more!
Popular this week
View by Category
Contact
Latest Comments
Latest Forum Posts