Skip to content

valbaca/advent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

advent

Solving Advent of Code problems in Clojure and Java to get hands-on fun experience with the language.

Each day I write down a "Today I Learned" (TIL) so I don't just solve the problem, but also keep track of what I've learned, tricks I found, or just problems I liked.

λ🎄.(λ🎅.🎄(🎅🎅))(λ🎅.🎄(🎅🎅))

Top References/Tools

Usage

Prerequisites:

  1. Install Java
  2. Install Clojure
  3. Install Leiningen

Highly Recommended:

  1. IntelliJ: the best Java IDE
    • Note: IntelliJ has a free Community Edition
  2. Cursive: IntelliJ plugin that adds Clojure support
    • Note: Cursive has a free license for non-commercial

Start REPL (Most recommended)

$ lein repl

# repl starts. use -main as a sanity check

advent-clj.core=> (-main)
λ🎄.(λ🎅.🎄(🎅🎅))(λ🎅.🎄(🎅🎅))

Just run core.clj and exit

$ lein run

Build uberjar, a jar with Clojure & deps

$ lein uberjar

# The resulting standalone can be run by java, from anywhere, and executes core.clj 
$ java -jar target/uberjar/advent-clj-0.1.0-SNAPSHOT-standalone.jar

Compile only .java files

$ lein javac

# Howdy is a basic hello world example
$ java -cp target/default/classes/ com.valbaca.advent.Howdy

IntelliJ / Cursive notes

If you get ClassNotFound when running a method in Clojure in IntelliJ, configure the following:

  • How to run it
    • Run with Leiningen
      • Profiles: dev

Progress

Advent of Clojure Progress

What I've completed in Clojure, within this repo

  • Year 2015: 🎄 All in Clojure!
  • Year 2016: 🎁 IN PROGRESS
  • Years 2016 - 2020: ❄️ NOT STARTED in Clojure

Overall Personal Advent Account Progress

What I've completed in any language

License

Copyright © 2021 Valentin Baca

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

About

Solving Advent of Code problems. See https://adventofcode.com/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published