12 ms·
I'm pretty stoked about this. I've been following Rust since 0.4, and it's been super fun to play around with. I have two major problems with it, but none of th
by Jemaclus 12y ago
I'm pretty stoked about this. I've been following Rust since 0.4, and it's been super fun to play around with. I have two major problems with it, but none of them are Rust's fault -- purely flaws of my own:
1) I have no idea what to do with it. I'm primarily a web developer, and I really want to get into systems programming, but I have no idea what to do with it or where to start. I wound up implementing about 50 different Rosetta Code things in Rust 0.9 and 0.10, but I still never came up with a really solid use-case that I could start and finish.
That said, I've been really impressed by rust-doom (https://github.com/cristicbz/rust-doom https://github.com/cristicbz/rust-doom) and the new Iota editor (https://github.com/gchp/iota https://github.com/gchp/iota), and I wish I had the know-how to even start down that path.
2) Given that the last time I touched systems programming was in college (15 years ago), I've found it difficult to wrap my head around some of the concepts (ownership in particular). I actually hung out in the IRC chat room for awhile, but I felt more than a few times that people were treating me like an idiot because of my questions ("Ha! You did X? Why in the world would you do that??"), so I wound up not really going back. I'm sure it was all my imagination and that I'm just being sensitive, but I think it would be very helpful to have more people interested in getting new people on board -- specifically people like me, with over a decade of programming experience in higher-level languages.
I guess the TLDR of this is: I love Rust, but I don't know what to do with it.
Congrats to the Rust team, though. 1.0 is a huge milestone. Good job!
- deleted 12y ago[deleted]
- steveklabnik 12y agoThanks so much! For 1, it's true that it's not clear Rust is going to be great for web development. http://arewewebyet.com http://arewewebyet.com sums things up. That said, Rust does run the backend of Crates.io, and I've been toying around with it as an Ember backend, so we'll see :) 2) I'd love to hear your thoughts on my new ownership guide, which landed last weekish: http://doc.rust-lang.org/guide-ownership.html http://doc.rust-lang.org/guide-ownership.html thoughts very welcome, either here, email, or on the issue tracker. Ownership is the one concept in Rust that hasn't really existed at the language level before, so it's the most unusual thing to grok. > I felt more than a few times that people were treating me like an idiot because of my questions Sorry to hear that. :/ We try to keep it 100% welcoming, but sometimes, people slip through the cracks.
- Jemaclus 12y agoI'll check out the guide, thanks! I don't necessarily need web-based ideas, but I don't know enough about the systems programming ecosystem to have an idea of where to start! A text editor? A game? A virtual planetarium? Machine learning? I have no idea! (Like I said, not your/Rust's problem...)
- kibwen 12y agoThere are a lot of web-based tools that have C implementations, so fun projects may include writing pure-Rust implementations of these. Imagine, say, the CommonMark markdown parser (https://github.com/jgm/CommonMark https://github.com/jgm/CommonMark) implemented in Rust. Making it as fast as the C version would be a challenging optimization problem, but I bet it's doable. :)
- Dirlewanger 12y ago> I've been toying around with it as an Ember backend Care to divulge some of your experiences so far? Like others here, I'm a webdev searching for a point of entry in Rust, and seeing that there's web frameworks out already I thought they'd might work. I want to start a side project with a Backbone/Marionette front but have been wondering whether to use Rails (day job), Node, or now even Rust. Thanks. Just saw your rustforrubyists...definitely going to follow that!
- steveklabnik 12y ago> Care to divulge Even better, you can just look at it: https://github.com/steveklabnik/rustmvc https://github.com/steveklabnik/rustmvc I haven't had the time to make it great, just hacking away. > Just saw your rustforrubyists... I appreciate the sentiment, but you probably shouldn't bother. Once I started working on the Guide, I stopped doing more than minimal upkeep on R4R. I consider it deprecated at this point. :)
- kibwen 12y agoI'm in your boat, I'm a web developer who's always been curious about systems programming and has been following Rust as a way to get into the domain without all the tedious runaround and rampant paranoia associated with manual memory management. But, I still don't know what I should actually do with this knowledge now. :) > I actually hung out in the IRC chat room for awhile, > but I felt more than a few times that people were > treating me like an idiot because of my questions ("Ha! > You did X? Why in the world would you do that??") Unacceptable. I'm an op in #rust (bstrie), so feel free to PM me their nicks and I'll see to it that they treat new users better in the future.
- sanderjd 12y agoAs a counter-anecdote, I'm in a very similar boat as the parent comment, and I have been astounded how consistently all the people in irc who definitely could make me feel like an idiot are unwilling to do so. It is a really refreshing experience after years of going into rooms full of arrogant people who actually don't know very much, as opposed to Rust's irc where everyone seems to know everything and are humble nonetheless.
- kibwen 12y agoThis may largely be because we don't actually know everything, thanks to the fact that Rust changes so quickly that even the experts must constantly re-learn the language. :) But I'm very invested in maintaining that atmosphere of respect as we progress towards stability.
- Jemaclus 12y agoI don't disagree! The vast majority of the IRC group was very helpful! I should have mentioned that in my original post. There was just one particular day where I was struggling with a concept and I felt like people were making fun of me and it just really made me not want to touch Rust for a few months. But that's not really the point. I think the point is that there's a need for a sort of onboarding process for people who have never had to deal with some of these basic concepts. For instance, in web development, there's not a lot of need to know much about ownership or memory. The popular languages (Java, PHP, Python) kinda handle those things for you. So when you dig into Rust, you spend a lot of time thinking things like "wtf is a pointer?" and "wtf is a reference?" instead of actually building something useful. That's a really frustrating part for me. I can build anything I want in PHP or Python or Java. I know those languages like the back of my hand, and if you give me a problem, I can solve it. But then I start with a language like Rust, which concerns itself with all kinds of things I've only vaguely heard of, and then I'm completely lost. Super, super, super frustrating. It's a struggle to do a basic blackjack game -- something I could do in my sleep with Python! So you don't know these concepts, which is already frustrating, and then you go into chat and you say "WTF is a pointer?" and hopefully people say "Oh, dude, it's so easy, imagine. you have this..." instead of "That's basic computer science, man. RTFM." To be fair, I think Rust's documentation back at 0.9 was great. I'm positive it's way better now. But back at 0.9, it didn't answer the questions I had, which is why I had to go to chat in the first place. But yes, most people were very, very helpful and I really did learn a lot. :)
- masklinn 12y ago> 1) I have no idea what to do with it. I'm primarily a web developer, and I really want to get into systems programming, but I have no idea what to do with it or where to start. I'm thinking profiling some stuff and writing native accelerators, in Rust instead of C. More of an excuse than a need, but hey.
- nickik 12y agoWeb developer here, i just srarted to write a interpreter for a small lisp, granted not system programming but I can still use the low level features to my advantage. Its pretty fun, but im looking forware to stability too.
- hga 12y agoWriting a Lisp "in a week" (that would be putting most of your time into the project) is a classic thing to do, and while it indeed isn't exactly system programming, if you keep it simple (e.g. maybe limit it to atoms, lists and fixnums), but include precise GC, you'll learn a lot of things you need. Hmmm, I've been wanting to learn Rust, but I always need a project to learn a language, and I haven't written a Lisp "in a week" yet ^_^. Yeah, thanks for the idea.
- Flow 12y agoI'm trying to write a tiny lisp interpreter in Rust myself. I haven't got very far. Do you have a public repository for a curious fellow hacker?
- nickik 12y agoWell the project actually goes beyond just that, its a bytecode interpreter and I want to experiment with a JIT (something I have wanted to do for years). https://github.com/clojit/clojit-vm https://github.com/clojit/clojit-vm Sadly its not working currently, I started a new job and Im moving so I had very little time the last 2 weeks and I didn't manage to keep up with the changes in rust.
- michaelsbradley 12y agoI'm hoping to port Shen to Rust, but I need to read the guide and learn my way around Rust itself before diving in too naively.
- steveklabnik 12y agoThat would be super exciting.
- shmerl 12y agoMay be someone will create a good Web development framework with Rust? After all there some for C++ already like this one: http://cppcms.com http://cppcms.com
- saiko-chriskun 12y agohttp://nickel.rs http://nickel.rs http://ironframework.io http://ironframework.io
- shmerl 12y agoGood, so things are moving already.
- elektronjunge 12y agoSee http://arewewebyet.com/ http://arewewebyet.com/ for any easy way to track rust's web readiness.
- shmerl 12y agoThanks for the link!
- barosl 12y agoI like their FAQ, which says that other than database servers, application servers can be the bottleneck. http://cppcms.com/wikipp/en/page/faq http://cppcms.com/wikipp/en/page/faq http://blog.cppcms.com/post/42 http://blog.cppcms.com/post/42
- saosebastiao 12y agoI feel like the projects where where rust is best positioned in terms of comparative advantage fall into two categories: 1) Large and complex systems that are slow to evolve due to being written in languages that are unsafe or are relatively poor in abstraction (in addition to the immense domain complexity). Examples: SQL and/or distributed databases, Paxos-ish systems, Operating Systems, IDEs, GIS, etc. 2) Extremely high performance systems on the fringe of research. Examples: MIP/LP/CP/SAT Solvers, Theorem Provers, Formal Verification tools, Rete-based Rule Engines, Machine Learning algorithms and frameworks, Statistical Samplers for MCMC, etc. Unfortunately (maybe, I don't really know if it will turn out well or not), most of the hype for rust comes from back-end web developers. That is fine...I'm sure there is some performance to eek out there...but it is also trying to compete in an area where garbage collection has its greatest competitive advantages (namely, long running server processes). The comparative benefit is relatively small.
- kibwen 12y ago> most of the hype for rust comes from back-end web > developers It may seem that way because 1) most of the hype for anything programming-related these days comes from back-end web developers, and 2) because back-end web developers are the primary audience of HN. At Rust meetups that I've attended I've seen interest in people doing video games, robotics, AI, numerical work, databases... they just don't have as public and excitable a forum as this. :)
- saosebastiao 12y agoI honestly wish we could get some of HN's mobile crowd hyped on Rust. A Rust-y take on Xamarin's ideas would be phenomenal, and with resource constrained phones, the performance gain from not having garbage collection or reference counting would be certainly welcome.
- digikata 12y agoI suspect that crypto libraries and embedded systems might also be good areas for Rust. Basically anywhere that a buffer overflow or memory leak is a relatively high-penalty failure.
- toby 12y agoMy main use for C code is embedded / bare-metal programming, so I was curious if Rust could run directly on ARM boards. I found https://github.com/hackndev/zinc https://github.com/hackndev/zinc but haven't given it a try yet.
- mahyarm 12y agoThink client side native apps. Like a cross platform layer for a mobile/desktop app suite. With web dev, you have the advantage of being able to accept the JVM's relatively long spin up time and it's resulting speed over time. You have the flexibility to use things such as clojure or erlang. Client apps can't accept that kind of restriction very well. I know of many client side libraries that are in C++ because it works everywhere(tm). Being able to maintain them in something like rust would be far nicer.
- kyllo 12y agoDoes Rust have anything like a usable GUI toolkit yet to support client-side native app development?
- FreeFull 12y agoThere are gtk bindings here: https://github.com/jeremyletang/rgtk https://github.com/jeremyletang/rgtk Right now they are failing to build due to a recent breaking change, which made structs not implement Copy by default any more. The library is in active development, so that should be fixed soon enough.
- iso8859-1 12y agoyou may soon be able to do it with Native Client and Pepper
- eridius 12y ago> I've found it difficult to wrap my had around some of > the concepts (ownership in particular). Have you tried reading the Ownership Guide (http://doc.rust-lang.org/guide-ownership.html http://doc.rust-lang.org/guide-ownership.html)? I actually haven't read this particular guide myself (it didn't exist when I got started with Rust), but it sounds relevant :)
- mrcwinn 12y agoJust providing some useless ramblings here... You're a web developer, and you don't know what to do (in terms of how to spend your time) with a language geared toward systems. That makes a lot of sense! At a certain scale, they're different types of work. It's like saying, "I'm a race car driver with a fighter jet. I've always admired them, but I'm just not sure where to fly!" These types of languages, and more broadly any compiled language like C or C++, are very well suited to solve problems that your dynamic or scripted language can't solve at scale. Say, for example, as a web developer you built a website on Ruby on Rails that converts user-uploaded photos to morph, based on some algorithm, into a cute, unique photo of a kitten. You have several concerns here: - Processing the image, hopefully in the background so it's non-blocking and you can control resource needs. - Storage. Is it on a local disk? S3? Something close by but on the network? If you have a performance bottleneck, is I/O an issue? - Memory/CPU. How many resources are needed for n- jobs? Is it starving resources from serving additional web requests (really a separate concern, when you think about it!) I would say for these types of problems (and this is admittedly a contrived example), Rails + some Gem or even pure Ruby might just absolutely suck and eat it. These specialized languages can be a super useful tool for figuring out "simple problems with complicated solutions." They also offer the comfort of compiling down to a binary that might have no external dependencies (so, very portable depending on the compiler/runtime, and probably very reliable). Is that the right thing for a pure web developer to play? Depends on the developer, but it's not surprising you're not quite sure what to do with it. It's possible you just don't have the right type of problem to solve yet. That being said, Rust or Go are still fun to play with! Good for you for exploring.
- Jemaclus 12y agoThat's exactly what I mean. :) A lot of the things I rely on for web development are so advanced under the hood that I don't even know where to begin. Like, let's say I want to write a tool that will let me take photos, resize them, crop them, add watermarks. I don't even... where do you start? I wrote an LZW compressor in Rust 0.9 way back when, and it sucked pretty badly, but I wouldn't even know how to open a JPG or PNG, much less the mystical art of resizing it! Gotta start somewhere, I guess. :)
- ossreality 12y agoI've spent OODLES of time in the rust irc and the only thing I've ever seen is users being told to behave properly for even minor violations of community guidelines. It's also stickied on /r/rust. etc.
- peteretep 12y agoI have found the IRC channel to be an incredibly supportive and helpful place, despite my barrage of dumb questions. I've been on IRC since the mid 90s and never seen anywhere so friendly, welcoming, and tolerant.