The Wayback Machine - https://web.archive.org/web/20211217055039/https://github.com/ItsTheGuy
Skip to content
Avatar
👽
👽
Block or Report

Block or report ItsTheGuy

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
ItsTheGuy/README.md

Hello world! 👽

Something about me 🚀

struct Myself {
    name: String,
    objectives: String,
    motivation_level: String
}

mod beautify {
    pub enum Frame {X(usize), Y}
    pub fn print_beautifuly(longest_line: usize, string_list: &[String]) {
        for line in string_list {
            print_fancy_border(Frame::Y); print!("{}{}", line, {
                if line.chars().count() != longest_line {" ".repeat(longest_line - line.chars().count())} else {String::from("")}
            }); print_fancy_border(Frame::Y); println!();
        }
    }
    pub fn check_longest(string_list: &[String]) -> usize {
        let mut longest: usize = 0;
        for line in string_list {
            if longest < line.chars().count() {
                longest = line.chars().count();
            }
        } 
        longest + 1
    }
    pub fn print_fancy_border(position: Frame) {
        match position {
            Frame::X(max_repeat) => {print!(" {}", {"-".repeat(max_repeat)});},
            Frame::Y => {print!("|");}
        }
    }
}

fn main() {
    // Define my name
    let name: String = String::from("ItsTheGuy");
    // Define my objectives
    let objectives: String = String::from("I want to contribute to make this world a better place.");
    // Define my motivation
    let motivation_level: String = String::from("∞");
    // Define myself
    let myself: &Myself = &Myself{name, objectives, motivation_level};
    // Show on screen
    {
        let to_display = [
            {String::from(format!(" Hey! My name is {}.", {&myself.name}))},
            {String::from(format!(" {}", &myself.objectives))},
            {String::from(format!(" My motivation level is {}.", {&myself.motivation_level}))}
        ];
        let line_long: usize = {beautify::check_longest(&to_display)};
        println!(); beautify::print_fancy_border(beautify::Frame::X(line_long)); println!();
        beautify::print_beautifuly(line_long, &to_display);
        beautify::print_fancy_border(beautify::Frame::X(line_long)); println!();
    }
}

What languages I speak? 👨‍💻

  • Native speaker In Python 🥷
  • A little bit of Swift 🦉
  • I defend myself in C, C++ and Rust, but I'm not a good speaker in those languages 😂

What I want to learn? 🙇‍♂️

  • A little bit of Golang 💨

Communities 🙋‍♂️

ItsTheGuy's DEV Community Profile

Pinned Loading

  1. Mars Public

    Save and load variables magically 🪄

    Python 2

  2. Singular Public

    A unique blockchain made by humanity for humanity 🧑‍🚀

    Python 3

  3. SuperPrinter is pretty much like print(), but with superpowers 🚀

    Python 1

  4. A Fibonacci sequence calculator

    C++ 1

108 contributions in the last year

Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Mon Wed Fri

Contribution activity

December 2021

Created 1 commit in 1 repository
Created 1 repository