Rust Simplified is a series aimed at making Rust much more simple for others to learn. In this episode we cover functions, type information, traits, generics, ownerships, and different various usages of each of these.
Rust Simplified is a series aimed at making Rust much more simple for others to learn. In this episode we cover pattern matching; which is the basis for creating organized data structures and how to use those in simple conditional/destructuring ways. This episode does cover a little bit into other areas, but the main focus here is on pattern matching and those other areas shall be covered in another video.
Some months ago a friend gave me his old Hackintosh computer to work with. So I have wiped the computer clean and installed ProxMox onto it. ProxMox is a headless Linux distribution which lets you install as many operating systems as you want in the space available. It can run Windows, Mac, Linux, and other…
When a Rubyist learns about Elixir’s pipe operator and how it behaves similarly to Linux/Unix command line piping he, or she, very likely envies that feature and wishes to have it in Ruby. How can I say that or how could I know that? Well it’s a reasonable deduction when I see others, as well…
This past weekend I got to spend 4 days at the Ruby for Good event. This is an event where programmers get together and volunteer their efforts in charitable programming for many needs in our communities. The team I joined up with consisted of 10 developers and most of the team grouped together in about…
Hashes have been optimized for symbols and strings in Ruby which technically are objects but this article is for revealing how much of a difference this makes when using other objects as hash keys. There are some cases where this makes a big difference but many times you won’t notice much of a difference. I…
One thing I’ve learned over and over from working on the Raspberry Pi is that it’s most likely going to take a chunk of time to get things set up just the way you want. And this display is no different. I’ve written in the past about How to Play HD Video on a Raspberry…
I’ve received an email from a fellow software developer inquiring about a bit of code where I use Ruby’s splat operator in two different ways. In my Ruby gem cards_lib I wrote a “macro” to take a list of strings and generate card instances from them. You don’t really hear of macros in the Ruby community…
For a long time I’ve been looking for a way to use Ruby’s refinements without building a class & method setup and then instantiating an instance of the class just to use it. And now I’ve finally found a solution. module Moo refine Fixnum do def to_s “moo” end end end # begin/end blocks allow…
As I’ve described in my blog post “Rails Polymorphic Associations” I’ve stated that polymorphic relations in Rails are best for scenarios where a model may “belong to” one of many other kinds of model. So a Comment model with the polymorphic commentable relationship can belong to any other record in your Rails app. This is…