I’ve started doing introductory Codeforces and CSES problems recently. The language I picked is C++. The typical workflow is to write the script, compile it, run it with the example input file and check the output. I wanted to make this whole process more automatic.
Hence the following shell script:
#!/bin/bash# make sure we have two arguments
if [ “$#” -ne 2 ]; then
echo “Need 2 parameters, got $#”
# get the file path
in_file_path=”$PWD/$2"if [ ! -f “$src_file_path” ]; then
echo “$src_file_path does not exist”
fiif [ …
I’ve been learning vim for quite some time now. I had vim set up on my Mac and tried to use it as much as possible. I did all of my AOC 2020 puzzles in my tmux + vim set up running in Alacritty.
I heard many good things about Neovim and decided to give it a shot. Setting up Neovim is relatively easy considering I already had experience with .vimrc and vim-plug. Here is a breakdown of all the steps, in case I forget about them in the future.
I finished all 25 puzzles in AOC 2020 just before the new year. It was an enjoyable and informative experience. I had great fun solving/learning from others on how to solve these puzzles. Here is a short summary from me about AOC 2020.