Advent of Code solutions

final tweaks

+6 -6
+1 -1
2022/11/p1.scala
··· 7 ) { 8 var inspected = 0 9 10 - def receive(item: Int) = { 11 items = items :+ item 12 } 13
··· 7 ) { 8 var inspected = 0 9 10 + infix def receive(item: Int) = { 11 items = items :+ item 12 } 13
+1 -1
2022/11/p2.scala
··· 7 ) { 8 var inspected: Long = 0 9 10 - def receive(item: Long) = { 11 items = items :+ item 12 } 13
··· 7 ) { 8 var inspected: Long = 0 9 10 + infix def receive(item: Long) = { 11 items = items :+ item 12 } 13
+4 -4
all.rb
··· 419 `kotlinc p#{part}.kt` 420 return :kotlinc_error unless $?.success? 421 report "p#{part}.kt" do 422 - `timeout 1m kotlin ./P#{part}kt.class < input` 423 end 424 end 425 end ··· 434 end 435 436 def self.run(part) 437 - `scala compile p#{part}.scala` 438 return :scala_error unless $?.success? 439 report "p#{part}.scala" do 440 - `timeout 1m scala -M P#{part} p#{part}.scala < input` 441 end 442 end 443 end ··· 496 end 497 end 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] 500 .filter { |lang| lang.available? } 501 502 root = Dir.pwd
··· 419 `kotlinc p#{part}.kt` 420 return :kotlinc_error unless $?.success? 421 report "p#{part}.kt" do 422 + `timeout 1m kotlin ./P#{part}Kt.class < input` 423 end 424 end 425 end ··· 434 end 435 436 def self.run(part) 437 + `scala compile p#{part}.scala 2> /dev/null` 438 return :scala_error unless $?.success? 439 report "p#{part}.scala" do 440 + `timeout 1m scala -M P#{part} p#{part}.scala < input 2> /dev/null` 441 end 442 end 443 end ··· 496 end 497 end 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, Nim, Zig] 500 .filter { |lang| lang.available? } 501 502 root = Dir.pwd