8000 GitHub - rshest/advent-2015: Solutions to the "Advent of code 2015" puzzles, one language for each day (matching the corresponding 2016 one).
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Solutions to the "Advent of code 2015" puzzles, one language for each day (matching the corresponding 2016 one).

Notifications You must be signed in to change notification settings

rshest/advent-2015

Repository files navigation

My solutions to Advent of Code 2015 problems.

The goal is to use a different programming language for every problem:

  1. Python

    $ python solution.py < input.txt
  2. C++

    $ g++ -std=c++11 solution.cpp -o solution
    $ ./solution < input.txt
  3. Factor

    In the listener:

    IN: scratchpad "<path>/<to>/<parent>/<folder>" add-vocab-root
    IN: scratchpad USE: dec03-factor
    IN: scratchpad main
  4. Nim

    $ nim c --opt:speed solution.nim && ./solution < input.txt
  5. TypeScript

    $ npm install @types/node
    $ tsc solution.ts && node solution.js < input.txt
  6. Julia

    $ julia solution.jl input.txt
  7. F#

    $ fsharpi solution.fsx input.txt
  8. Lua

    $ lua5.1 solution.lua input.txt
  9. Kotlin

    $ kotlinc -script solution.kts input.txt
  10. Elm

    $ elm-reactor

    Then, open http://localhost:8000/solution.elm in a browser.

  11. Scala

    $ scala src/solution.scala input.txt
  12. Dart

    $ dart solution.dart input.txt
  13. Java

    $ cd src && javac solution.java && java solution ../input.txt
  14. Ruby

    $ ruby solution.rb input.txt
  15. Haskell

    $ ghc solution.hs && ./solution input1.txt && ./solution input2.txt
  16. Go

    $ go run solution.go input1.txt
    $ go run solution.go input2.txt
  17. Clojure

    $ lein run input.txt
  18. Elixir

    $ elixir solution.exs
  19. Crystal

    $ crystal solution.cr
  20. C#

    $ mcs Solution.cs && mono Solution.exe
  21. Ada

    $ gnatmake -gnata solution.adb && ./solution
  22. Rust

    $ rustc solution.rs && ./solution input.txt
  23. D

    $ rdmd solution input.txt
  24. Ceylon

    $ ceylon run --compile=force solution
  25. Swift

    $ swift solution.swift input.txt

About

Solutions to the "Advent of code 2015" puzzles, one language for each day (matching the corresponding 2016 one).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0