6 ms·
Rust is the greatest. It’s my go-to for virtually anything that it could reasonably be used for (a lot). After using it exclusively for a while and getting com
by jmartin2683 4y ago
Rust is the greatest. It’s my go-to for virtually anything that it could reasonably be used for (a lot). After using it exclusively for a while and getting comfortable and fast with it, I can’t see any good reason to use anything else for most purposes.
- pjmlp 4y agoGUI programming at the same level as MAUI, SwiftUI, Jetpack Compose, Qt, WPF,...
- jmartin2683 4y agoI will say thats one thing that I do absolutely none of. A lot of movement in that space, but clearly a lack of support on the level of C/C++.
- sebzim4500 4y agoYeah GUI is really the biggest missing part of the ecosystem. To be fair it is an extremely difficult problem; there is a reason there are so many electron apps out there.
- pjmlp 4y agoNot really, the reason is laziness and seeing nails everywhere, instead of picking the right tool. Coding GUI/TUIs since MS-DOS and Amiga 500 days, and Web since 1996.
- pas 4y agoA lot of times a cross platform non-native GUI is the right tool. Same UX on every platform. What's not to like? Allows faster iteration for small teams, you can use TS and doesn't even have to think about Swift/ObjC/Java/Kotlin/C++, and you can use whatever you like for the backend.
- pjmlp 4y agoPWA then.
- pas 4y agoYes, but the platform gods say not really. https://news.ycombinator.com/item?id=32441258 https://news.ycombinator.com/item?id=32441258
- int_19h 4y ago> Same UX on every platform. What's not to like? Speaking as a user, that's exactly what I don't like. I don't care about same UX on every platform; I'd rather have consistent UX across apps on the same platform.
- pas 4y agoSometimes you work on a platform that does not have a native style. (Eg. kiosks.) Or the native app is just an extension of a very website-driven service. (Eg. an app for event management, ticket admissions.) As a user I prefer something that works, making sure one thing works consistently is easier than testing different native things that implement the same functionality. (Oh, and as a user I very much prefer that it does implement the same functionality.)
- FridgeSeal 4y ago> What's not to like? Native interfaces and behaviour are preferable over whatever options the app developer chooses to support. In the case of electron apps, effectively running multiple browsers is also in the “what not to like” basket. Native apps often have less input latency, and are significantly nicer to use. > Allows faster iteration for small teams As a user, I’d much, much prefer slower iteration if it meant the resulting app was better. Electron apps thrashing out pointless updates every other day just because they can isn’t always a positive in my book.
- pas 4y agoWhat's the native interface when Apple/Google/Samsung changes that every year (or two years)? What's the native interface of a kiosk at a car wash? (Where we used a touch screen running full screen Firefox and the users saw the same thing as they saw on their phone where they managed their wash coupons and whatevers.) On desktop I don't run slack, discord, teams (and whatever wants to run separately) separately, if something that doesn't do meaningful local I/O and/or computation cannot run in a browser, then I don't use it if I can avoid it at all. And I hopefully can keep my streak of not developing nor shipping any forced electron based mess. VSCode is fast. I'm surprised too. While native Windows things are just slow all over (with a beefy modern desktop). Seriously, how the fuck can the start menu be this ridiculously slow? I have like 50 things installed, and I use about 5 of those. And it takes forever to find those as I start typing. (I have KDE flashbacks!) Oh and super native Firefox is also a disaster when it comes to speed (I search for the same bookmarked pages in the awesomebar - the combined location and search bar, I have disabled the search part, because the UX was horrible, so it should just search in the local recency shorted LRU cached list of pages ... and it's dog slow and dumb). Big billion dollar unicorns push those meaningless updates, not small teams (at least in my experience).
- debug-desperado 4y agoProbably a lost cause at this point since most GUI toolsets are too object-oriented to comfortably wrap and call with Rust. Do a web view with Tauri instead.
- lenkite 4y agoHoping Tauri supports mobile at some point. Maybe it needs to wait till the EU bureaucrats force open Apple's walled garden.
- pjmlp 4y agoOr chose a better tool for the job, picking languages based on platforms, not picking an hammer and then trying to find a nail that fits.
- pornel 4y agoGUIs don't exist by themselves, but serve a program. Rust may still be the best language for the non-GUI part of the program. I've once picked ObjC for a whole program based on its native GUI, and spent way too much time chasing bugs caused by its thread-unsafety (Cocoa bindings are a trap in multi-threaded programs).
- pkolaczk 4y agoI haven't found any problems using GTK bindings in Rust. It is actually easier and nicer than in C, especially with additional support like relm4 (but even the manual approach is good enough). Who said GUI must be OOP?
- pjmlp 4y agoThe Gtk+ library you depend on.
- felipellrocha 4y agoI am on the same boat. It's just too good. There are flaws, for sure, but it seems like the language itself is going on an incredibly good direction.
- monkmartinez 4y agoI have some serious FOMO with Rust... I have been using JS and Python for everything the last few years. Will you please recommend some Primers/Resources/Tutorials for Rust for someone like me? That is, basically a script basher that glues everything together with Python.
- jmartin2683 4y agoI just read the book (the Rust programming language, free online) cover to cover and started porting all of our Python (command line) apps. It was much, much easier than the internet led me to believe going into it. Just take the time to really internalize them ownership stuff… the rest is syntax and patterns.
- lawn 4y agoThe Rust Programming Language book is usually the first thing people recommend. https://doc.rust-lang.org/book/ https://doc.rust-lang.org/book/
- dwaltrip 4y agoJS and Python are my primary languages. I've toyed around with Rust, and it is pretty cool. There were a number of nice moments where I was surprised with how much it felt like I was writing high-level code. However, the overall learning curve is huge, especially if one is mostly used to garbage-collection (like me). If you are doing web stuff, I'm sure Rust can be used effectively. But it is non-trivial and there are serious tradeoffs (learning curve, lack of ecosystem for web, hiring, etc). Teams would be better off sticking with python or JS for most web projects. Some perf-heavy backend or infra projects could possibly benefit from Rust, but otherwise it doesn't seem like the best choice to me. It is definitely a cool language that seems to be gaining serious momentum. Could be fun to mess around with.
- Tainnor 4y agoRust is probably great for systems programming, and might have other nice, modern features that make it compelling outside of that niche, but as a web developer, I simply don't care about manual memory management and fighting with the borrow checker. I understand why it exists for certain tasks, but I can just use a garbage collected language instead (preferably a modern and expressive one, like Kotlin) and save myself a lot of trouble, because in the end, the performance hit often doesn't matter.
- jmartin2683 4y agoBuilding a basic rest api with rocket is no more difficult than doing the same with Sinatra or flask once you have the hang of it. Arguably much easier if you count time chasing down bugs from unexpected runtime behavior.
- davidatbu 4y agoYou know, I would be with you, but: 1. The versatility of Rust means I can use it for truly "the full stack". E.g., in my current side project, I'm using rust to do audio decoding, resampling, running a speech recognition model, the backend of the app, and the frontend! Though I haven't yet started on all of those components, I expect to get some major simplification in my code because of this. 2. The "modern and expressive" languages all have fatal flaws, _for me_. Swift has a poor cross platform story/community, Kotlins tooling is poor if you don't use intelliJ, ocaml has a reputation of poor documentation. I understand that not all of these things will bother people as much as they bother me, but they do bother me a lot. Tbh, I'm still on the lookout for a lang that is actually statically typed(no TS or python), has an expressive type system, a good cross platform story, good, non proprietary tooling, and is at a slightly higher abstraction level than Rust.
- deleted 4y ago[deleted]
- Tainnor 4y ago1. sounds like a project where Rust is indeed a good fit. As for 2, I'm very happy with Kotlin for the most part. I agree that there's no point in trying to use it without IntelliJ, but... IntelliJ is really good, and the community edition is free. Yes, the startup times can be slow and annoying, but what I get in return is IMHO worth it (even more so if you use Ultimate and frameworks like Spring). Also, command line tools for Kotlin are IMHO better than for Java, at least (e.g. ktlint). I agree that Swift outside of Apple software is a dead end. Given your constraints, though, why are you ruling out TS (I've never used it, but I heard good things)? And what about Haskell? Though, in all fairness, in your case you're probably comfortable enough with Rust's borrow checker that it doesn't slow you down that much anymore, so I understand why you'd continue using it. For someone who has never worked with it, it's a different story.
- nesarkvechnep 4y agoI like Rust a lot but I don’t see a reason to use it for software systems instead of Elixir.
- realharo 4y agoThe compilation speed is not the greatest. Other than that, it's a great language with a great ecosystem.