Call me crazy, but I decided to have a look at using in this the year of our lord and saviour 2022. NeoVim is a minimal fork of VIM which supports LUA as a scripting engine. In this post, I will show you how to install and configure NeoVim with some fancy plugins and a smattering of TMUX...continue reading
Recently, I was working with a customer that wanted to extract the TCP SYN unanswered in/out metric captured by Extrahop for a group of web servers and send that data to Splunk so their application team could view the data in a Splunk dashboard. It was an interesting problem to solve...continue reading
A closure in Rust is an anonymous function. An anonymous function is a function without a name. A closure is defined with parameters between two pipes and expressions between curly braces || By default, closures borrow a reference to the parameters that are passed into it. ...continue reading
A closure in Rust is an anonymous function. An anonymous function is a function without a name. A closure is defined with parameters between two pipes and expressions between curly braces || Unlike functions, closures CAN capture variables from their enclosing scope. By...continue reading
Prelude This post is nothing more than a collection of links to resources that I have found usefull for the Rust programming language. Documentation Coding Style Repositories continue reading
Prelude This post is acollection of links to resources that I have found useful for the Rust programming language. Blogs Books Coding Style Documentation Repositories Video Tutorials YouTube drop(_) Learn Rust, it's fn. continue reading
This post is a collection of links to resources that I have found useful for the Rust programming language. Blogs Books Coding Style Documentation Repositories Video Tutorials Talks drop(_) Learn Rust, it's fn. continue reading
This post is a collection of links to resources that I have found useful for the Rust programming language. Blogs Books Coding Style Documentation Repositories Talks Video Tutorials Written Tutorials drop(_) Learn Rust, it's fn. continue reading
https://codingpackets.com/blog/rust-useful-links
https://codingpackets.com/blog/rust-useful-links
https://codingpackets.com/blog/rust-useful-links
Good Morro Crusty ones 😘. In todays episode of learning Rust, I will show you how to load a TOML file in Rust and additionally handle any possible errors. Software The following software was used in this post. Rust - 1.57.0 toml crate - 0.5.2 serde crate - 1.0.136 ...continue reading
An enum is a type which can be ONE of a FEW different variants. // Create an instance of the enum variants with the double colon. let blah = StuffAndThings::Blah; let bleh = StuffAndThings::Bleh(42); let stuff = StuffAndThings::Stuff(String::from("Stuff"), true); let things =...continue reading
A HashMap is a generic collection of key/value pairs. All of the keys must have the same type, and all of the values must have the same type. HashMap Considerations A hash maps data is stored on the heap. A hash maps size is not known at compile time, they can grow or shrink at run...continue reading
A vector is a collection of items of the same type. Vector Considerations When an empty vector is created with Vec::new it is un-allocated until elements are pushed into it. A vector with elements has allocated memory and lives on the heap. A vector is represented as a pointer to the...continue reading
A trait in Rust is similar to an interface in other languages. Traits define the required behaviour a type MUST implement to satisfy the trait (interface). // Structs that implement the `Greeter` trait. struct Person struct Dog } // Implement the `Greeter` trait for the...continue reading
A struct in Rust is used to encapsulate data. structs can have fields, associated functions and methods. // Instantiate an immutable struct. let sat = StuffAndThings Associated Function Associated functions are tied to an instance of a struct and are usually used as...continue reading
A trait in Rust is similar to an interface in other languages. Traits define the required behaviour a type MUST implement to satisfy the trait (interface). // Structs that implement the `Greeter` trait. struct Person struct Dog } // Implement the `Greeter` trait for the...continue reading
There are two "mainly used" string types in Rust. The str slice, which is mostly seen as a borrowed &str slice. And the errm ... String. Wait ... Wut? String Considerations The data in a borrowed &str slice CANNOT be modified. The data in a String CAN be modified. A &str has a...continue reading
For Loop A for expression extracts values from an iterator until the iterator is empty. for loops in Rust use a similar syntax to Python with the in keyword. } } // => i: blah j: blah' ) }} For Loop Considerations For loops can iterate over anything that implements the...continue reading