#Rust ๐Ÿฆ€ – Learning HTTP GET and POST requests in Rust, and yes this is a “๐ŸŒWhat’s my IP” demo ๐Ÿ˜„

Hi ! Yes, I’m starting to use OpenAI services in with Rust. However, before getting here, I spent some time learning how to work with HTTP Requests in Rust. There seems to be several libraries that can help. I found several examples using [https://docs.rs/reqwest/0.6.2/reqwest/], so I decided to use this one. A classic example to…… Continue reading #Rust ๐Ÿฆ€ – Learning HTTP GET and POST requests in Rust, and yes this is a “๐ŸŒWhat’s my IP” demo ๐Ÿ˜„

Event – ๐Ÿง  OpenAI, ChatGPT and #PowerPlatform … Yes, and without coding !

Photo by Tara Winstead on Pexels.com Hi ! Are you ready to tap into the endless possibilities of ChatGPT? With the recent release of new OpenAI services on Azure, the potential for building innovative applications has never been greater. I think it’s time explore the amazing capabilities of ChatGPT and how we can harness them…… Continue reading Event – ๐Ÿง  OpenAI, ChatGPT and #PowerPlatform … Yes, and without coding !

#Rust ๐Ÿฆ€ – Working with hashmaps is cool. And a little C# experience ๐Ÿ˜„

Hi ! During today’s Rust lession in the “First Steps with Rust” (in Spanish), we reviewed the Hashmaps in Rust. We talk about the behavior when we access a non existing item, and it was nice to get a NONE return instead of an error or an exception. In example this code: use std::collections::HashMap; fn…… Continue reading #Rust ๐Ÿฆ€ – Working with hashmaps is cool. And a little C# experience ๐Ÿ˜„

#Rust ๐Ÿฆ€ – Working with arrays, vectors and println! macro in Debug mode ๐Ÿ›

Hi ! It’s time to learn a little about arrays and vectors. And sure, using println! is a great way to check how this elements works. However, there is a little something extra to learn here. Let me start with a simple scenario. Defining a vector with weekdays, and print the content. Something like this…… Continue reading #Rust ๐Ÿฆ€ – Working with arrays, vectors and println! macro in Debug mode ๐Ÿ›

#Rust ๐Ÿฆ€ – ๐Ÿงต String Interpolation in Rust (as usual, super fun ๐Ÿ˜„)

Hi ! Working with string is always a nice topic to learn. It’s nice to understand how a specific language process strings, sometimes small changes can have big performance improvements ! String Interpolation So let’s start (via Wikipedia) with some basic concepts. In computer programming, string interpolation (or variable interpolation, variable substitution, or variable expansion)…… Continue reading #Rust ๐Ÿฆ€ – ๐Ÿงต String Interpolation in Rust (as usual, super fun ๐Ÿ˜„)

#Rust ๐Ÿฆ€ – Time for Ferris says ! ๐Ÿ˜‹

Hi ! Ferris the crab, is the unofficial mascot for Rust. If you want to create a cool console app with Ferris holding a banner with a custom message, there is a super cool library that may help. We need to search in the Rust communityโ€™s crate registry for ferris-says, and there it is ferris-says:…… Continue reading #Rust ๐Ÿฆ€ – Time for Ferris says ! ๐Ÿ˜‹

#Rust ๐Ÿฆ€ – Let’s create a Generic log() Function๐Ÿ‘

Hi ! Let’s create a generic log function. This will not make a lot of sense, since the println! function already support lots of data types. However, this is a nice way to understand how generics works. Here is the log function. use std::fmt::Display; // Generic Function to print data to the console fn console_log<T:…… Continue reading #Rust ๐Ÿฆ€ – Let’s create a Generic log() Function๐Ÿ‘

#Rust ๐Ÿฆ€ – Working with Generics and Types ๐Ÿ‘

Hi ! I first used Generics back in the old C# days. It’s a super cool feature. Let’s ask ChatGPT for a definition: Generics in programming are a way to create classes and methods that work with multiple data types. They allow the programmer to define type parameters, which can be passed as arguments to…… Continue reading #Rust ๐Ÿฆ€ – Working with Generics and Types ๐Ÿ‘

#Rust ๐Ÿฆ€ – Accesing external vars in threads ๐Ÿงต

Hi ! In order to access external variables in a thread, we must use the move closure with the move keyword in the thread creation. In example, these 2 lines will define and create a mutable variable and then a new thread where we can access the var. let mut new_var = “hey!”; let handle…… Continue reading #Rust ๐Ÿฆ€ – Accesing external vars in threads ๐Ÿงต

#Rust ๐Ÿฆ€ – Working with threads ๐Ÿงต and joining thread handles

Hi ! Let’s take a look at the following code. The main thread will run a loop for ~5 seconds, displaying a message every 1 second. The 2nd thread with display a message, wait 5 seconds and display a 2nd message. https://gist.github.com/elbruno/5b116361ed0a9931b52ae59f678e2516 The code output shows that the app is closed before finishing the execution…… Continue reading #Rust ๐Ÿฆ€ – Working with threads ๐Ÿงต and joining thread handles