6 ms·
What about Rust?
by RaitoBezarius 11y ago
What about Rust?
- kodr 11y agomy thought. is there enough support for OpenGL? I know you can use stuff from C in Rust, so it could be a solution.
- mden 11y agoThere's also https://github.com/tomaka/glium https://github.com/tomaka/glium which seems very promising.
- pcwalton 11y ago> my thought. is there enough support for OpenGL? I know you can use stuff from C in Rust, so it could be a solution. glium is arguably the best idiomatic OpenGL binding in any language anywhere. I program in OpenGL with Rust every day as part of my job these days.
- alkonaut 11y agoExactly. Compilation times and young age might be an issue, but if the guy likes C and Go, then why not Rust? The reason people might want to avoid it can be the same as "Why not D". The answer to that is that it doesn't offer enough over C and C++, which is where Rust is different, and why I think Rust will be huge.
- pandaman 11y agoIs Rust available on consoles? (AFAIK, no) Is it going to be around? (Who can tell?)
- Manishearth 11y agohttps://twitter.com/rustlang/status/598945014824173569 https://twitter.com/rustlang/status/598945014824173569
- pandaman 11y agoAnd for any console other than PSX emulator you can place a SFF PC on a console and run Rust on it (as an added bonus you will get a better API than writing hex numbers into registers).
- douche 11y agoWho cares? Consoles are dead after this generation.
- s_kilk 11y agoWhy? Do you have any evidence to back up this claim? On the contrary, it seems both the Xbox One and PS4 are doing a roaring trade, with gaming overtaking Hollywood in terms of market size and revenue
- clouddrover 11y agoI'm not sure sure about a roaring trade. Games consoles are niche platforms. Look at the numbers: http://www.vgchartz.com/ http://www.vgchartz.com/ The global life to date figures are 12.4 million Wii Us sold since November, 2012. 19.2 million Xbox Ones and 35.3 million PS4 sold since November, 2013. Contrast that with PC shipments, where 70 million in one quarter is considered a bad result: http://betanews.com/2015/10/09/pc-shipments-decline-in-windows-10s-launch-quarter/ http://betanews.com/2015/10/09/pc-shipments-decline-in-windo... Or contrast it with the iPad's quarterly sales: http://www.statista.com/statistics/269915/global-apple-ipad-sales-since-q3-2010/ http://www.statista.com/statistics/269915/global-apple-ipad-... In FY2014 Apple sold 250 million iOS devices: http://www.geeky-gadgets.com/apple-to-sell-its-billionth-ios-device-this-quarter-22-10-2014/ http://www.geeky-gadgets.com/apple-to-sell-its-billionth-ios... Add in Android phones and tablets and the games consoles are dwarfed in comparison, even the 3DS which has sold the most of the current games console generation.
- pandaman 11y agoPeople do not buy PCs, iOS devices and Android phones just to play games. In fact, many people do not play games on these devices at all. E.g. Steam is probably going to be found on any PC that is used for games yet there are just 125M accounts since September 2003[1]. And even if somebody plays a game on a cellphone - they usually do not pay for it [2]. 1. https://en.wikipedia.org/wiki/Steam_(software) https://en.wikipedia.org/wiki/Steam_(software) 2. http://recode.net/2014/02/26/a-long-tail-of-whales-half-of-mobile-games-money-comes-from-0-15-percent-of-players/ http://recode.net/2014/02/26/a-long-tail-of-whales-half-of-m...
- AndyKelley 11y agoI like Rust, but sometimes it is pretty difficult to convince the compiler that one's code is safe. And this does not mean that the compiler is preventing unsafety; there are many safe programs that the compiler rejects. Also, the OP said that compile time was a priority, and compiling Rust code is closer to C++ speed than C.
- pdpi 11y agoThere are many valid programs that static typing rejects, too. Question is whether the trade off is worth it (and the answer isn't the same for everybody)
- Manishearth 11y ago> there are many safe programs that the compiler rejects It's often less about being safe currently and more about being resilient to breaking after further changes in code. I've worked with some C++ codebases that rely on complicated invariants to be safe (so the code looks safe now), and stuff breaks down when certain changes are made. Programming with a C++11 style greatly reduces but does not eliminate this. It takes a while to get a hang of this, but once you figure out the "Rust way" of moving data/references around you tend to hit these errors very rarely. Of course, this takes time to learn which you may not have :) But yes, there are things which Rust could improve upon here, like nonlexical scopes and SEME regions. Which may come soon.
- pcwalton 11y ago> And this does not mean that the compiler is preventing unsafety; there are many safe programs that the compiler rejects. Two nits: 1. The compiler does prevent safety problems. It just happens to rule out some safe programs while doing so. (Although I think this is a bit of a misconception, because with the aliasing rules being used for optimization many things that the Rust compiler rejects that people think are safe are actually not.) 2. You can describe any type system this way. That doesn't mean we don't like type systems.
- Jach 11y agoI think game programmers don't like type systems -- or rather, they prefer the minimal typing necessary for speed improvements and their ability to simplify basic static analysis (with tools or in their heads). I don't blame them, games are a lot of work even for relatively simple things, and to get anything done at a reasonable pace you just need to be able to churn out lots of code that compiles on the first try, and when it doesn't the mistakes should be easy to fix and minimize the time you're spending fighting with the type system (C++ templates come to mind as they're often avoided in games no small reason being the cryptic error messages they can produce). There might be an argument of familiarity, that eventually if they used Rust or Haskell enough it would all come to them as easy as C, but then well known Haskell promoters say things like "if you're using the type system right your code will never compile on the first time."
- dunkelheit 11y agoMaybe in ten years. Great thing about old mature technology such as C is that all gotchas have been tripped over innumerable times and are all well known and codified. Meanwhile new exciting technology like Rust contains unknown number of bugs like http://www.wabbo.org/blog/2014/22aug_on_bananas.html http://www.wabbo.org/blog/2014/22aug_on_bananas.html, undiscovered antipatterns and subtleties. My comment is not meant to bash Rust, on the contrary it is very promising and the fact that it is used to write Servo is likely to significantly speed up its maturation. But as author notes, if you are developing a project under a deadline you don't have time for bugs you didn't cause yourself. So old boring technology is the way to go.
- Rusky 11y agoThat bug was almost a year before Rust 1.0 was released. At this point, Rust is being used in production outside of Servo- for example Dropbox is even using it for their core data storage code. It's certainly not as old-and-boring stable as C, but it's a lot closer than you'd think.
- dunkelheit 11y agoAnd that bug was less than a 1.5 years before now. And Rust is at version 1.5 now. And all changelog entries since version 1.0 (which was released 8 months ago) mention "multiple bugfixes". Of course, that's all subjective, but for me these facts all scream "rapid pace of development, expect multiple annoyances and a couple of major bugs for your particular use case". Dropbox is using Rust in production? Great news! But I'll wait when a thousand of organizations use Rust in production before advocating its use in my own organization. Also, judging by this comment: https://www.reddit.com/r/programming/comments/3w8dgn/announcing_rust_15/cxum0dm https://www.reddit.com/r/programming/comments/3w8dgn/announc... they had incredible rapport with the language core team. That is a luxury not every team using Rust is going to have. Still, great news. I guess I must implement some kind of little personal project in Rust and in the process help iron out a few more quirks.
- steveklabnik 11y ago