Since I get bored or lazy easily to create those passion projects, here is a repo of me solving the problems in Advent of Code using different programming languages for practice!
- Just uses
npm
for now. vitest
is used as testing tool.- To run tests:
npm test
- To run benchmark:
npm run bench
tinybench
integrated in vitest is handy.
gotest
is used for colorized go tests.- To run tests:
gotest -v
- To run benchmark:
gotest -bench=.
- Conventionally capital case for function names.
- No optional parameters for functions.
- Find a way for go folder to run all tests without accessing specific folders.
- Used
cargo
to setup folder. - to run test
cargo test
criterion
is used for benchmarking.- to run benchmark:
cargo bench
- Created the folder as a library crate for now.
- Read that the unit tests for each module is included within its own file.
- & - only a reference!
- * - deferencing the borrow to get the value!
rspec
is used as testing tool.- To run tests:
rspec
- To run benchmark:
ruby [dayx_bench.rb]
each_
is handy for readability in looping strings (as an array)- returning on a function without the return keyword is amazing! haha
- Benchmark is shitty, no colors, and I need to check first how to best implement the benchmark inside rspec.
pytest
is used as testing tool.- To run tests:
pytest
. The benchmark is included in the result logs.
- Easy to setup and adapt since types are defined by values.
- I'm liking no braces for a change!
- Used
mix
for setup. espec
is used as testing framework to have that context, describe, and it blocks.- To run tests:
mix espec
- Pattern matching and pipe is a breath of fresh air. Gotta check back the other languages' implem to try really utilizing what each of the language can do or shines.
- To run tests:
zig test test.zig
- How to properly use hash maps, and loops?
- Make vscode lsp work.
- Run all tests in single command with right number of tests.
- To run tests:
./run_tests.escript
- Explore
rebar3
. - Learn more about variables and pipe returns.
- Maybe possible to not need creating beam file, and utilize escript.
- Might try putting my personalized puzzle inputs on a text file. Then maybe also practice file access on each programming languages, but who knows when.
- Add programming language installation maybe. But I'm basically using
asdf
. See.tool-versions
- Learnings are not comprehensive, only the notable things I observe at the time of practicing and current skill.
- Go to a specific language directory to be able to run the commands properly.