Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.98 KB | None | 0 0
  1. Rust has come a long way
  2. - 1.0
  3. - Traits / Associated types
  4. - Borrow checker rewrite
  5. - NLLs
  6. - Async Await
  7. - And much more
  8.  
  9. Rustaceans have come a long way
  10. - An inclusive community
  11. - Awesome people at its core
  12. - Come for the tech, stay for the people
  13.  
  14. Most new Rustaceans I tend to interact with have two well distinguishable backgrounds, and a different set of goals. (I do not have any statistics on that, but I would love to get more insights though).
  15.  
  16. Low level programmers:
  17. Who they are:
  18.  
  19. Low level programmers are system programmers who have been coding in (struggling with ?) C and C++ for a while, and got to know about Rust (and Go for that matter) as a potential way to have less fear and cognitive load while programming.
  20. From the conversations I have with people switching from say C++ to Rust, the memory model Rust enforces at compile time actually fits their mental model. It’s a way to explicitly enforce what they’ve been implicitly doing for a while, and catching some mistakes because well, you might not like to hear that, but developers are humans after all, and even the best developers make mistakes.
  21.  
  22. To sum it up they’re looking for two things:
  23. - Memory safety
  24. - Performance
  25.  
  26. What they are looking for:
  27.  
  28. They would use Rust and enjoy Rust once convinced of the memory safety with no overhead guarantees. Less error prone code would mean memory safety, which would lead to less time, energy and budget spent on debugging. It would also allow them to be fearless when programming, which would make programming more enjoyable overall, which sounds like a Win-Win situation to me.
  29.  
  30. High level programmers:
  31.  
  32. High level programmers are coming from an other environment. They have a pretty good knowledge of some domains (Web, Frontend, APIs, scripting etc.) and have probably used very intuitive, batteries included languages such as Javascript, Python, PHP and this kind of things.
  33. By intuitive and batteries included I mean programming in these languages just works. The learning curve is not too steep, they can copy/paste their way to something that might not reach the best performance they could ever dream of, but just does the job.
  34. They’ve heard there are two new kids on the block (Go and Rustlang) and that Rustlang seems to be an awesome language, with an awesome community, and they “wish they had more time to learn the language”.
  35.  
  36. To sum it up they’re looking for two things:
  37. - Try out a new programming language with promising features
  38. - Get things done.
  39.  
  40. While the needs of the former group seem to be addressed (which totally makes sense given Rust is being always more used in production, and there are lots of incentives on satisfying their needs, the latter groups needs could use some love.
  41. And by that I’m not denying the role of the rust content team, or the devrel / evangelists out there. I would even love to use this blogpost opportunity to give a massive shoutout to the (unfortunately too few) contributors to Rust docs, who are doing an amazing job despite constrained resources.
  42.  
  43.  
  44. New Rustaceans asked me questions and told me how hard it is at first and I used to tell them something like “well it actually is hard, but once you get the right mindset everything will come together, and you will write elegant code that will run really fast, and have no bugs, and life will be awesome”.
  45. They would look at me and all of the Rustaceans as if they had reached enlightenment.
  46. They would then ask me how long it took me to figure it out, and I replied “oh more than 6 months, and to be honest I’m still sure I haven’t figured it all out…” which was basically the point where they would decide to keep Rustlang in their mind like “This awesome language that would require so long to learn that they swear they will try to learn eventually…”
  47.  
  48. As a friend of mine was asking for feedback after 3 weeks writing Go at work, I was joking telling them “Well the best thing about Go IMO was its learning curve, which is actually a line… a flat one.” And then it hit me. How could we flatten the learning curve ?
  49.  
  50. What if, as a new Rustacean, I absolutely didn’t care about lifetimes and generics all-together at first?
  51. What if Cloning everything around was fine at first, in order to get something up and running and we would come back and fix the performance issues later ?
  52. What if as a new Rustacean I was actually fine with the ugly / slow running code I would write passing String.clone() around instead of a &’a str or a T where T: AsyncRead + AsyncWrite or whatever ?
  53. What if new Rustacean could actually use a couple of quick wins, and hack together something fun and useful in a couple of hours to brag about with their colleagues and start a conversation about Rust ?
  54.  
  55. That would of course come with a disclaimer:
  56. THIS LIBRARY IS UGLY AND PROVIDED AS IS AND YOU SHOULD DEFINITELY LEARN ABOUT BORROWING AND LIFETIMES AND GENERICS AND COME BACK TO FIX YOUR CODE IN ORDER TO SEE IT PERFORM MUCH BETTER AND SEE HOW FAR YOU VE COME SINCE THIS PROTOTYPE
  57.  
  58. What if we could create a toy library and a set of tutorials on how to do cool stuff, in a non-idiomatic way, and progressively improve it until we reach “Rust enlightenment” ? (It sounds catchy, I might stick with that.)
  59.  
  60. What if we could create a toy-rs crate, which would be an opinionated set of toys that would allow new Rustaceans build cool stuff quickly, and ask for feature gated “borrowing” “lifetimes”, “threads”, “channels”, “async”, “generics” functions later on, once they built cool applications already, and are willing to optimise their code?
  61.  
  62. It might even come with a set of resources, blog posts, youtube videos, podcasts, explaining how to do cool things with the crate.
  63.  
  64. Rust has one of the most amazing communities, and a lot of people would really love to hop on the Rust train, and be part of it. This might be a way to help them take their first steps and let them know we care for them and we would love to have them come and build cool things using Rust.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement