https://adventofcode.com/2022/
day | challenge | language |
---|---|---|
2022-12-01 | Day 1: Calorie Counting | Python 3 |
2022-12-02 | Day 2: Rock Paper Scissors | Kotlin |
2022-12-03 | Day 3: Rucksack Reorganization | Go |
2022-12-04 | Day 4: Camp Cleanup | Rust |
2022-12-05 | Day 5: Supply Stacks | C++ |
2022-12-06 | Day 6: Tuning Trouble | Scala 2.13 |
2022-12-07 | Day 7: No Space Left On Device | Ruby |
2022-12-08 | Day 8: Treetop Tree House | Node.js |
2022-12-09 | Day 9: Rope Bridge | Elixir |
2022-12-10 | Day 10: Cathode-Ray Tube | Java 19 |
2022-12-11 | Day 11: | PHP |
2022-12-12 | Day 12: | Haskell |
2022-12-13 | Day 13: | Bash |
2022-12-14 | Day 14: | Groovy |
2022-12-15 | Day 15: | C# |
2022-12-16 | Day 16: | R |
2022-12-17 | Day 17: | Swift |
2022-12-18 | Day 18: | Perl |
2022-12-19 | Day 19: | Fortran |
2022-12-20 | Day 20: | Lua |
2022-12-21 | Day 21: | Vala |
2022-12-22 | Day 22: | OCaml |
2022-12-23 | Day 23: | Matlab |
2022-12-24 | Day 24: | LISP |
2022-12-25 | Day 25: | clojure |
# Install Python 3 on Arch Linux
sudo pacman -S python
# Run program
python myProgram.py
- Used as Kotlin Script
- https://kotlinlang.org/docs/home.html
- https://selfformat.com/blog/2022/09/15/how-to-quickly-write-and-run-kotlin-script/
# Install Kotlin on Arch Linux
sudo pacman -S kotlin
# Run program
kotlinc -script myProgram.main.kts
# Install Go on Arch Linux
sudo pacman -S go
# Run program
go run myProgram.go
# Install Rust on Arch Linux
sudo pacman -S rust
# Compile and run program
rustc myProgram.rs
./myProgram
# Use cargo as runner in separate folder
cd myProgram
cargo run
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
- Scala 3 was released in May 2021, but is incompatible with code written in Scala 2.x
- https://docs.scala-lang.org/tutorials/scala-for-java-programmers.html
- https://www.baeldung.com/scala/file-io#reading-from-a-file
# Install Scala on Arch Linux
sudo pacman -S scala
# Compile and run program
scalac MyProgram.scala
scala MyProgram
# Run program as script
scala MyProgram.scala
# Install Ruby on Arch Linux
sudo pacman -S ruby
# Run program
ruby myProgram.rb
# Install Node.js on Arch Linux
sudo pacman -S nodejs
# Run program
node myProgram.js
- https://elixir-lang.org/getting-started/introduction.html
- https://hexdocs.pm/elixir/1.13.4/MapSet.html
- https://blixtdev.com/how-to-use-enum-map-enum-reduce-in-elixir/
- https://programming-idioms.org/idiom/7/iterate-over-list-indexes-and-values
# Install Elixir and Erlang VM on Arch Linux
sudo pacman -S elixir
# Run program
elixir myProgram.exs
- https://www.w3schools.com/java/java_intro.asp
- https://code.visualstudio.com/docs/java/java-project#_configure-runtime-for-projects
- https://www.baeldung.com/java-collections
- https://www.baeldung.com/java-streams
- https://www.happycoders.eu/java/java-19-features/
- https://ondro.inginea.eu/index.php/new-features-in-java-versions-since-java-8/
# Install latest headless OpenJDK (Java Development Kit) on Arch Linux
sudo pacman -S jre-openjdk-headless openjdk-doc openjdk-src
# Configure Java on Arch Linux
archlinux-java status
sudo archlinux-java set java-19-openjdk
# 'Compile' program to Java byte code and run it in the JVM (Java Virtual Machine)
javac MyProgram.java
java MyProgram
# New since Java 11: Run Java code directly as script
java MyProgram.java
- https://www.php.net/manual/en/langref.php
- https://www.php.net/manual/en/features.commandline.php
- https://www.w3schools.com/php/php_examples.asp
- https://www.freecodecamp.org/news/the-best-php-examples/
# Install PHP interpreter on Arch Linux
sudo pacman -S php
# Run program
php myProgram.php
- https://www.haskell.org/
- https://www.schoolofhaskell.com/user/eriks/Simple%20examples
- https://www.haskellforall.com/2015/10/basic-haskell-examples.html
- https://wiki.haskell.org/Learn_Haskell_in_10_minutes
# Install the Glasgow Haskell Compiler on Arch Linux
sudo pacman -S ghc
# Compile program
ghc -dynamic MyProgram.hs
# Run program
./MyProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
# Install LLVM toolchain on Arch Linux
sudo pacman -S clang lld lldb libc++
# Compile program
clang++ -Wall -std=c++20 myProgram.cpp -o myProgram
# Run program
./myProgram
- https://www.99-bottles-of-beer.net for finding new programming languages and examples
- https://programming-idioms.org/ for translating knowledge from one language to another