aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Wardhaugh <twardhaugh@cap-rx.com>2021-09-29 09:41:07 -0700
committerTyler Wardhaugh <twardhaugh@cap-rx.com>2021-09-29 09:41:07 -0700
commitea13d0f250000d70f987cec5e94c3c0e6fddce42 (patch)
tree3ea98eee00da1f5c5bd71ba3458950d6c5592ca2
parent882a3ad1db63c62ede71b5c135e586f2bdf3794e (diff)
downloadperlweeklychallenge-club-ea13d0f250000d70f987cec5e94c3c0e6fddce42.tar.gz
perlweeklychallenge-club-ea13d0f250000d70f987cec5e94c3c0e6fddce42.tar.bz2
perlweeklychallenge-club-ea13d0f250000d70f987cec5e94c3c0e6fddce42.zip
Ch132 (Clojure): prep for challenge
-rw-r--r--challenge-132/tyler-wardhaugh/clojure/README.md14
-rw-r--r--challenge-132/tyler-wardhaugh/clojure/pom.xml8
-rw-r--r--challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/core.clj12
-rw-r--r--challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/t1.clj14
-rw-r--r--challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/t2.clj14
-rw-r--r--challenge-132/tyler-wardhaugh/clojure/test/tw/weekly/c132_test.clj12
6 files changed, 62 insertions, 12 deletions
diff --git a/challenge-132/tyler-wardhaugh/clojure/README.md b/challenge-132/tyler-wardhaugh/clojure/README.md
index 064e23e11f..74b8669aa3 100644
--- a/challenge-132/tyler-wardhaugh/clojure/README.md
+++ b/challenge-132/tyler-wardhaugh/clojure/README.md
@@ -1,7 +1,7 @@
-# tw.weekly.c130
+# tw.weekly.c132
-The Weekly Challenge - #130 - Tyler Wardhaugh
+The Weekly Challenge - #132 - Tyler Wardhaugh
## Usage
@@ -9,7 +9,7 @@ Clojure ([installation instructions](https://clojure.org/guides/getting_started#
Run the project directly (shows default output from both tasks):
- $ clojure -M -m tw.weekly.c130.core
+ $ clojure -M -m tw.weekly.c132.core
# ... or ...
$ bb run both
@@ -21,15 +21,13 @@ Run the project's tests (which are samples from the task descriptions):
Run Task #1 with input
- $ clojure -M -m tw.weekly.c130.t1 N
- # ... or ...
- $ bb run task-1 N
+ $ clojure -M -m tw.weekly.c132.t1 D
Run Task #2 with input:
- $ clojure -M -m tw.weekly.c130.t2 D S
+ $ clojure -M -m tw.weekly.c132.t2 H1 H2 I1 I2
# ... or ...
- $ bb run task-2 D S
+ $ bb run task-2 H1 H2 I1 I2
View available tasks Babashka can run:
diff --git a/challenge-132/tyler-wardhaugh/clojure/pom.xml b/challenge-132/tyler-wardhaugh/clojure/pom.xml
index b1039ce744..b3edb199c9 100644
--- a/challenge-132/tyler-wardhaugh/clojure/pom.xml
+++ b/challenge-132/tyler-wardhaugh/clojure/pom.xml
@@ -2,11 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>tw.weekly</groupId>
- <artifactId>tw.weekly.c131</artifactId>
+ <artifactId>tw.weekly.c132</artifactId>
<version>0.1.0-SNAPSHOT</version>
- <name>tw.weekly.c131</name>
- <description>Challenge #131</description>
- <url>https://github.com/tw.weekly/tw.weekly.c131</url>
+ <name>tw.weekly.c132</name>
+ <description>Challenge #132</description>
+ <url>https://github.com/tw.weekly/tw.weekly.c132</url>
<licenses>
<license>
<name>Eclipse Public License</name>
diff --git a/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/core.clj b/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/core.clj
new file mode 100644
index 0000000000..4115f99d9b
--- /dev/null
+++ b/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/core.clj
@@ -0,0 +1,12 @@
+(ns tw.weekly.c132.core
+ (:require [tw.weekly.c132.t1 :as t1])
+ (:require [tw.weekly.c132.t2 :as t2])
+ (:gen-class))
+
+(defn -main
+ "Run all tasks"
+ [& _]
+ (println "Task #1:")
+ (t1/-main)
+ (println "\nTask #2:")
+ (t2/-main))
diff --git a/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/t1.clj b/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/t1.clj
new file mode 100644
index 0000000000..007e4b2067
--- /dev/null
+++ b/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/t1.clj
@@ -0,0 +1,14 @@
+(ns tw.weekly.c132.t1
+ (:require [clojure.edn :as edn]))
+
+;;;
+; Task description for TASK #1 › Mirror Dates
+;;;
+(def DEFAULT-INPUT [])
+
+(defn -main
+ "Run Task 1 with a given input N, defaulting to the first example from the
+ task description."
+ [& args]
+ (let [[D] (or args DEFAULT-INPUT)]
+ ))
diff --git a/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/t2.clj b/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/t2.clj
new file mode 100644
index 0000000000..8d237772b6
--- /dev/null
+++ b/challenge-132/tyler-wardhaugh/clojure/src/tw/weekly/c132/t2.clj
@@ -0,0 +1,14 @@
+(ns tw.weekly.c132.t2
+ (:require [clojure.edn :as :edn))
+
+;;;
+; Task description for TASK #2, Hash Join
+;;;
+(def DEFAULT-INPUT [])
+
+(defn -main
+ "Run Task 1 with a given input D and S, defaulting to the first example from
+ the task description."
+ [& args]
+ (let [[H1 H2] (or (some->> args (map edn/read-string)) DEFAULT-INPUT)]
+ ))
diff --git a/challenge-132/tyler-wardhaugh/clojure/test/tw/weekly/c132_test.clj b/challenge-132/tyler-wardhaugh/clojure/test/tw/weekly/c132_test.clj
new file mode 100644
index 0000000000..e4ff9454a9
--- /dev/null
+++ b/challenge-132/tyler-wardhaugh/clojure/test/tw/weekly/c132_test.clj
@@ -0,0 +1,12 @@
+(ns tw.weekly.c132-test
+ (:require [clojure.test :refer [deftest is testing]]
+ #_[tw.weekly.c132.t1 :refer []]
+ #_[tw.weekly.c132.t2 :refer []]))
+
+(deftest task-1
+ (testing "Task 1, Mirror Dates"
+ ))
+
+(deftest task-2
+ (testing "Task 2, Hash Join"
+ ))