DEV Community

Cover image for My Review of 2020
Swastik Baranwal
Swastik Baranwal

Posted on • Updated on

My Review of 2020

The 2020 year has been hard almost for everyone due to the pandemic. My year was almost alright, but then my family also got infected with COVID-19 recently. However, we luckily fought through it and now we are safe.

I hope everyone's safe and I pray for those who are going through this tough time. Since I was always at home, I was over-productive this year as I had a lot of time to learn and make stuff. I believed that such an opportunity to improve will never come again, so I made the best use of it.

And as 2020 is about to end soon, these are the things I accomplished this year:

Accomplished

  • My Dev.to account articles have passed more than 100K views in less than one year of creation!
  • I made small 5 projects and learned a lot of things and met a lot of people who helped me to implement those features! I would like to thank them very much ^-^
  • My GoLang library: Box Cli Maker has 100+ stars in just 8 months!!
  • V By Example has also 100+ stars :)
  • I have done a total of 200 Pull Requests in my whole life.
  • I have completed Hacktoberfest 2020 and I did around 7 PRs this time during October because I was busy that time with other things!
  • I learnt more about V's internal compiler and started to implement small features and fix bugs and issues slowly and step by step!
  • I had started taking part in discussions of Python's Pattern Matching syntax and was against the favour of using _ for denoting else case in match syntax as it would be inconsistent and wouldn't make it Pythonic anymore. I tried giving some issues and I got acknowledged from them. Though my proposal was rejected as I wasn't a part of them.
  • I got some "job offers" but I feel those were scams so I rejected them as who can hire someone like that? I think it's still an achievement as people are coming to me xD
  • I made a Github Profile README.md in such a unique style that others liked and copied it.
  • Opened several issues in Golang, V and Deno etc.
  • Became a collaborator of Bhupesh-V/30-seconds-of-cpp.
  • Got 90+ followers on GitHub.
  • My proposal for Windows Terminal got accepted!

Projects made

  • Box CLI Maker

GitHub logo Delta456 / box-cli-maker

Make Highly Customized Boxes for CLI


logo


Go Reference godocs.io CI Go Report Card GolangCI GitHub release Mentioned in Awesome Go

Features

  • Make a Terminal Box in 8️⃣ inbuilt different styles
  • 16 Inbuilt Colors and True Color Support 🎨
  • Custom Title Positions 📏
  • Make your Terminal Box style 📦
  • Support for ANSI, Tabbed, Multi-line and Line Wrapping boxes 📑
  • Align the text according to your needs 📐
  • Unicode, Emoji and Windows Console Support 😋
  • Written in 🇬 🇴

Installation

 go get github.com/Delta456/box-cli-maker/v2

Usage

In main.go

package main
import "github.com/Delta456/box-cli-maker/v2"

func main() {
 Box := box.New(box.Config{Px: 2, Py: 5, Type: "Single", Color: "Cyan"})
 Box.Print("Box CLI Maker", "Highly Customized Terminal Box Maker")
}
Enter fullscreen mode Exit fullscreen mode

box.New(config Config) takes Box Config and returns a Box from the given Config.

  • Parameters
    • Px : Horizontal Padding
    • Py : Vertical Padding
    • ContentAlign : Content Alignment inside Box i.e. Center, Left and Right
    • Type: Box Type
    • …
  • random

GitHub logo Delta456 / random

An all purpose random library written in V.

THIS MODULE HAS BEEN DEPRECATED AND V'S RAND MODULE SHOULD BE USED INSTEAD!

random

An all purpose random library written in V.

Features

  • All variate functions possible.
  • Generate random int and string with ease.
  • range functions for int and f32.
  • Array functions like shuffle, choose, sample etc.
  • Makes life easier sorta
  • Many more features coming soon!

Installation

  • Via git clone
    • git clone https://github.com/Delta456/random
  • Via v install
    • v install random
  • Via vpkg
    • vpkg install random

Docs

// struct for `triangular()`
struct Triangular {
mut
        low  f32 = 1.0
        high f32 = 1.0
        mode int = 1
}

// struct for `int_range()`
struct IntRange {
        start int
        stop  int
        step  int = 1
}

// struct for `float_range()`
struct FloatRange {
        start f32
        stop  f32
        step  f32 = 1.0
}

// normal_variate is the normal distribution where mu is the 
// mean, and stigma is the standard deviation
…
Enter fullscreen mode Exit fullscreen mode
  • CLI Badges

GitHub logo Delta456 / cli_badges

Generate Badges for your CLI written in 🦕 Deno and TS

CLI Badges

Generate Badges for your CLI.

deno land deno version GitHub release CI

NOTE: It is recommended to update pre-exisiting versions of this module to ^v0.1.0 as there are many breaking changes from this release in the API.

Features

  • Make Beautiful Badges for CLI 🤩
  • Works across all terminals 🦄
  • Link support 🔗
  • Variety of colors to choose from 🎨
  • Written in TS with Deno 🦕

Warning ⚠️: If your terminal has a custom theme then the colors will blend according to your configuration which can cause unwanted results.

Usage

Simple Example

Showcases failed, success and skipped badge on the terminal

import { badge } from "https://deno.land/x/cli_badges@v0.1.1/mod.ts";
console.log(badge("failed", "2", { msgBg: "red" }));

console.log(badge("success", "2", { msgBg: "green" }));

console.log(badge("skipped", "2"
…
Enter fullscreen mode Exit fullscreen mode
  • range

GitHub logo Delta456 / range

Functionality of Python's range() in V

range

Numeric ranges in V.

Why

  • a..b in V can only be in increasing order and not in negative order.
  • Lacks inbuilt step which most people need or want.
  • No support for float type.
  • Solution for vlang/v#5944.

Features

  • Make range easily
  • Make ranges for int and f32
  • Positive as well as negative support!
  • No need to write the whole for loop! (this maybe slower than the normal one)
  • Use range for functional programming
  • Support iterators. Long ranges without high memory allocation.
  • Half open-open ranges [from,to]

Installation

  • Via git clone
    • git clone https://github.com/Delta456/range
  • Via v install
    • v install Delta456.range
  • Via vpkg
    • vpkg install range

Usage

Use an iterator if you need a large range but don't want to allocate space in memory for all numbers in the range.

import delta456.range
mut iter := range.to_iterator(from: 0, to: 1000000, step: 2)
for v in iter
…
Enter fullscreen mode Exit fullscreen mode
  • ASCII Robot

GitHub logo Delta456 / ascii_robot

ASCII Robot Generator in V

ascii robot

ASCII Robot Generator in V

Installation:

  • Via git clone
    • git clone https://github.com/Delta456/ascii_robot
  • Via v install
    • v install ascii_robot
  • Via vpkg
    • vpkg install ascii_robot

Usage

  • random_id() returns a random 5 digit hex number in string.

  • generate(string) returns a string optional. string returns random made ASCII bot depending upon the 5 digit number.

  • must_generate(string) is same as generate() but returns an empty string if the hex number provided is not valid.

  • random_robot() returns a random ASCII robot.

In main.v

import delta456.ascii_robot as robot
import rand
fn main() {
    rand.seed([u32(42), 0]) // or use your seeder
    println(robot.must_generate('1f35a'))

    for i := 0; i < 5; i++ {
        println(robot.random_robot())
    }
}
Enter fullscreen mode Exit fullscreen mode

Bot Types

Total ASCII Robot Types possible:

   _ _,_,_ _
   \( q p )/   
     \_#_/     
  .==|>o<|==:=L
  '=c|___|     
     ]| |[     
    [_| |_]     




     ,_,_,     
     \O
…

Hacktoberfest 2020 Stats

stats

GitHub Stats

stats

Dev.to Dashboard

dashboard

Hacktoberfest 2020 Swags

swags

Dev.to Badges Earned

badges

Conclusion

I think this will be my last article for now as I have to study for the next 1.5 years for preparation! I hope you all liked this article and wish me to achieve more!!

I thank all of the people who I have met and taught me a lot of things, especially people from V Community!!

Happy New Year's Eve to All! I hope everyone achieves what they want to :)

Top comments (2)

Collapse
 
delta456 profile image
Swastik Baranwal

Thank you so much 🥰