Advent of Code solutions

final tweaks

+6 -6
+1 -1
2022/11/p1.scala
··· 7 7 ) { 8 8 var inspected = 0 9 9 10 - def receive(item: Int) = { 10 + infix def receive(item: Int) = { 11 11 items = items :+ item 12 12 } 13 13
+1 -1
2022/11/p2.scala
··· 7 7 ) { 8 8 var inspected: Long = 0 9 9 10 - def receive(item: Long) = { 10 + infix def receive(item: Long) = { 11 11 items = items :+ item 12 12 } 13 13
+4 -4
all.rb
··· 419 419 `kotlinc p#{part}.kt` 420 420 return :kotlinc_error unless $?.success? 421 421 report "p#{part}.kt" do 422 - `timeout 1m kotlin ./P#{part}kt.class < input` 422 + `timeout 1m kotlin ./P#{part}Kt.class < input` 423 423 end 424 424 end 425 425 end ··· 434 434 end 435 435 436 436 def self.run(part) 437 - `scala compile p#{part}.scala` 437 + `scala compile p#{part}.scala 2> /dev/null` 438 438 return :scala_error unless $?.success? 439 439 report "p#{part}.scala" do 440 - `timeout 1m scala -M P#{part} p#{part}.scala < input` 440 + `timeout 1m scala -M P#{part} p#{part}.scala < input 2> /dev/null` 441 441 end 442 442 end 443 443 end ··· 496 496 end 497 497 end 498 498 499 - languages = [Haskell, Rust, Trilogy, C, Cpp, Swift, Python, Ruby, TypeScript, Erlang, Elixir, Gleam, Prolog, Php, Perl, Bash, Fish, Go, Sql, Clojure, Kotlin, Scala, Crystal] 499 + languages = [Haskell, Rust, Trilogy, C, Cpp, Swift, Python, Ruby, TypeScript, Erlang, Elixir, Gleam, Prolog, Php, Perl, Bash, Fish, Go, Sql, Clojure, Kotlin, Scala, Crystal, Nim, Zig] 500 500 .filter { |lang| lang.available? } 501 501 502 502 root = Dir.pwd