Rust
11 TopicsRust Learners - Matchmaking
Hey Everyone, Thanks for joining the Getting Started with Rust workshops! The interest in Rust is incredible. In order to help learners find other learners that are at the same skill level, geographic area and maybe even previous programming experience, I have created this thread. Feel free to post and contact others that you would like to learn Rust with. I will start with my own: Name: Korey Experience with Rust: Advanced Beginner Previous Programming Experience: Python (AI/ML), Javascript Where to Contact Me: Twitter - @koreyspace LinkedIn: /koreyspace3.2KViews0likes20CommentsGetting Started with Rust: Getting Your First Rust Job AMA
Hey Everyone, We will have Marcus Grass speak at the Reactor on Wednesday, Nov. 2nd! He will talk about his journey working as a Java Developer to working now as a full-time Rust Developer at Embark Studios in Stockholm. He will share his tips and advice of moving from using Rust just as a "hobby" language to working with it professionally. If you have any questions for Marcus, please ask them here and we will make sure they get answered during the stream!1.6KViews0likes5CommentsRust Learners LATAM - Matchmaking
Buenas, ¡Gracias por unirse a los talleres Primeros Pasos con Rust! El interĂ©s en Rust es increĂble. Con el fin de ayudar a los estudiantes a encontrar otros estudiantes que tengan el mismo nivel de habilidad, área geográfica y tal vez incluso experiencia previa en programaciĂłn, he creado este hilo. SiĂ©ntete libre de publicar y contactar a otras personas con las que te gustarĂa aprender Rust. Voy a empezar con la mĂa: Nombre: Bruno Capuano Experiencia con Rust: Principiante Avanzado Experiencia previa en programaciĂłn: Python (AI/ML), C#, C++ DĂłnde contactarme: General - aka.ms/elbruno Twitter - @elbruno LinkedIn: /elbruno1.3KViews4likes3CommentsUn programa RUST de ejemplo
Primeros Pasos con Rust Hola programadores Rust, ¿Qué cambios necesita este programa en Rust para ejecutarse exitosamente? struct Person { name: String, age: u8, genre: char, } fn main() { // Vector of family members let family: Vec<Person> = Vec::new(); family.push(Person { name: "Frank".to_string(), age: 23, genre: 'M', }); family.push(Person { name: "Carol".to_string(), age: 25, genre: 'F', }); family.push(Person { name: "Edwin".to_string(), age: 34, genre: 'M', }); // Show current info println!("-".repeat(50)); for individual in family { println!("{:?}", individual); } // Add family lastname for member in family { member.name = member.name + "Thompson"; } // Increase age by 2 for adult in family { adult.age += 2; } // Show updated info println!("-".repeat(50)); for individual in family { match individual { 'M' => { println!("{} is a man {} years old", individual.name, individual.age); } 'F' => { println!( "{} is a woman {} years old", individual.name, individual.age ); } } } } #rustlang #programming1.1KViews1like2CommentsGetting Started With Rust: Rust Basics Recap and Discussion
Hey Everyone, Thanks for joining the Rust Basics session earlier! Listed below are all the Rust resources we shared in the session. Let us know if you have any questions and please feel free to share your own resources you have found helpful on your own Rust learning journey! Session Links Session Recording Building Your First Rust Project Course Rust with VS Code Crates.Io What Can You Do With Rust Build a CLI App Tutorial Create a Rust function in Azure using Visual Studio Code Bevy Game Engine Rust and WASM wasm-pack wasmtime Learning Materials The Rust Book Rust Playground Rust User Forum Feel free to share any other great resources here and share any questions and challenges you have had on your Rust learning journey!1KViews4likes0CommentsEjercicio: Dibujar cĂrculos con macroquad
Primeros Pasos con Rust Hola compañeros, si tienen un tiempo libre podrĂan ayudarme a terminar este corto programa con macroquad. El objetivo es dibujar en varios cĂrculos de radio aleatorio en filas sin exceder las dimensiones de la pantalla. Para esto estoy creando un iterator personalizado que tiene en cuenta los Ăşltimos valores de radio y posiciones x e y generadas, y que trata de verificar que el cĂrculo se pueda dibujar dentro del ancho y el alto de la ventana. Por el momento, mi programa dibuja los cĂrculos en una diagonal. Creo que debo corregir el mĂ©todo next(). Gracias por su ayuda. cargo new shapes --vcs none [package] name = "shapes" version = "0.1.0" rust-version = "1.67" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] macroquad = "0.3" rand = "0.8" main.rs: use ::rand as ra; use macroquad::{color, prelude::*}; use ra::Rng; //use macroquad::rand::rand::prelude::*; /// Representa un objeto para ubicar un cĂrculo en la pantalla. struct Posicionador { ultimo_r: f32, ultimo_x: f32, ultimo_y: f32, aleatorio: ra::rngs::ThreadRng, } impl Posicionador { /// Crea un nuevo objeto. fn new() -> Self { Self { ultimo_r: 0.0, ultimo_x: 0.0, ultimo_y: 0.0, aleatorio: ra::thread_rng(), } } } // Un iterador para crear varios cĂrculos impl Iterator for Posicionador { type Item = Circulo; fn next(&mut self) -> Option<Self::Item> { // Espacio entre los cĂrculos let espacio: f32 = 15.0; // Crear un radio aleatorio let nuevo_radio: f32 = self.aleatorio.gen_range(20..101) as f32; // Verificar que las dimensiones del cĂrculo no sobrepasen las dimensiones de la ventana if (nuevo_radio + self.ultimo_x > screen_width()) || (nuevo_radio + self.ultimo_y > screen_height()) { // AquĂ un cĂrculo ya no cabe en la pantalla, por lo que terminamos el iterador return None; } // Actualizar los valores para el reciĂ©n cĂrculo creado self.ultimo_r = nuevo_radio; self.ultimo_x += nuevo_radio + espacio; self.ultimo_y += nuevo_radio + espacio; // Retornar el cĂrculo pedido Some(Circulo { radio: self.ultimo_r, color: color::GOLD, posicion: Punto { x: self.ultimo_x, y: self.ultimo_y, }, }) } } /// Representa la ubicaciĂłn x e y de un cĂrculo. #[derive(Debug, Clone)] struct Punto { x: f32, y: f32, } /// Representa un cĂrculo geomĂ©trico. struct Circulo { radio: f32, color: macroquad::color::Color, posicion: Punto, } impl Circulo { /// Dibuja el cĂrculo en la pantalla fn dibujar(&self) { draw_circle(self.posicion.x, self.posicion.y, self.radio, self.color); } } #[macroquad::main("Figuras")] async fn main() { // Iterador para crear los cĂrculos let mut posicionador = Posicionador::new(); // Vector de cĂrculos let mut circulos: Vec<Circulo> = vec![]; // Crear tantos cĂrculos como el iterador permita. while let Some(circulo) = posicionador.next() { circulos.push(circulo); } loop { clear_background(LIGHTGRAY); // Dibujar los cĂrculos generados for circulo in &circulos { circulo.dibujar(); } next_frame().await } }731Views2likes2CommentsUnderstanding Rust Compile Errors AMA
Hey Everyone, We will have Ryan Levick, Principal of Rust Developer Advocate at Microsoft, guide us through some through different levels of Rust Compile Errors tomorrow. If you have any questions for Ryan, please ask them here and we will make sure they get answered during the stream!403Views0likes0Comments