My solutions to Advent of Code 2015 problems.
The goal is to use a different programming language for every problem:
-
Python
$ python solution.py < input.txt
-
C++
$ g++ -std=c++11 solution.cpp -o solution $ ./solution < input.txt
-
Factor
In the listener:
IN: scratchpad "<path>/<to>/<parent>/<folder>" add-vocab-root IN: scratchpad USE: dec03-factor IN: scratchpad main
-
Nim
$ nim c --opt:speed solution.nim && ./solution < input.txt
-
TypeScript
$ npm install @types/node $ tsc solution.ts && node solution.js < input.txt
-
Julia
$ julia solution.jl input.txt
-
F#
$ fsharpi solution.fsx input.txt
-
Lua
$ lua5.1 solution.lua input.txt
-
Kotlin
$ kotlinc -script solution.kts input.txt
-
Elm
$ elm-reactor
Then, open http://localhost:8000/solution.elm in a browser.
-
Scala
$ scala src/solution.scala input.txt
-
Dart
$ dart solution.dart input.txt
-
Java
$ cd src && javac solution.java && java solution ../input.txt
-
Ruby
$ ruby solution.rb input.txt
-
Haskell
$ ghc solution.hs && ./solution input1.txt && ./solution input2.txt
-
Go
$ go run solution.go input1.txt $ go run solution.go input2.txt
-
Clojure
$ lein run input.txt
-
Elixir
$ elixir solution.exs
-
Crystal
$ crystal solution.cr
-
C#
$ mcs Solution.cs && mono Solution.exe
-
Ada
$ gnatmake -gnata solution.adb && ./solution
-
Rust
$ rustc solution.rs && ./solution input.txt
-
D
$ rdmd solution input.txt
-
Ceylon
$ ceylon run --compile=force solution
-
Swift
$ swift solution.swift input.txt