The goal of me making this was to make something that can easily turn videos into collages. I was inspired by the idea of Steamed Hams within Steamed Hams (See below video) I wanted to program something up quickly to enact it. I eventually made a modification where you can make
I considered using python as I had previously made image manipulating software with it but I remembered it being extremely slow (This may have just been due to my inexperience) so decided to take a punt at something new and use rust.
Rust
This was the first program I ever wrote in rust. My immediate impression was of a language which takes the best attributes of both C like languages and more high level languages like python. “Compilable Typescript” was my inspiration. And I still for the large part stand behind that.
For the positives:
- Its package manager Cargo (Please god I want a C++ package manager as good as this) is very intuitive and seemingly efficient. Id say it beats most if not all package managers for other programing languages ive used purely based on its simplicity.
- Its high level-esque style makes it very familiar for someone who has programmed in languages that are high level. It still compiles however giving that blazing fast machine code advantage compared to interpreted languages.
- Its type inferations are next level. It seems it can even look how a variable is used in the future to be able to tell what a type should be.
For the negatives:
- This may seem crazy but rust seems too “safe” to me. Every single function call that could possibly needs an error needs a
.unwrap()
or a.expect("What does this string even do")
While this may not seem like a big deal it can lead to some insanely unwieldy code for examplelet mut frame_path_strs: Vec<PathBuf> = frame_paths.map(|a| a.unwrap().path().to_owned() ).collect();
Which is what I had to do in order to extract the list of files in a directory. I get the feeling this is a part of rust which I’m just not understanding properly, or at least thats my hope. - The file structure. As this was a relatively small project contained to 3 files I didn’t find this too annoying. However if you want to import a dependency into your code you have to have it in a folder which has the same name as the file you are working on. e.g
-bob
--person.rs
|
-bob.rs
Which compared to C’s solution of
#include "the file you want"
and then letting the compiler figure out in which order the dependencies should go feel like a genius move. Of course you could always just pull a WarSim and put all your functions in a singular file you maniac.
For my purposes rust has great image processing features which I will be definitely using again. And I look forward to implementing whatever crazy idea I have next Steamed Hams or otherwise.
Examples
You can alternatively use it to create videos as a collage