aboutsummaryrefslogtreecommitdiff
path: root/challenge-080
diff options
context:
space:
mode:
authorTyler Wardhaugh <tyler.wardhaugh@gmail.com>2020-09-28 11:16:34 -0700
committerTyler Wardhaugh <tyler.wardhaugh@gmail.com>2020-09-28 11:23:20 -0700
commit5150537e4ba1196c1f10f76e726a8f3a2fcd8598 (patch)
tree13c036b88b968993dab93e70e8f07a16595a3e45 /challenge-080
parent53ff2f5e958dce78188f9fcb10c6944c997b474d (diff)
downloadperlweeklychallenge-club-5150537e4ba1196c1f10f76e726a8f3a2fcd8598.tar.gz
perlweeklychallenge-club-5150537e4ba1196c1f10f76e726a8f3a2fcd8598.tar.bz2
perlweeklychallenge-club-5150537e4ba1196c1f10f76e726a8f3a2fcd8598.zip
Ch80: prep files for new challenge
Diffstat (limited to 'challenge-080')
-rw-r--r--challenge-080/tyler-wardhaugh/clojure/README.md21
-rw-r--r--challenge-080/tyler-wardhaugh/clojure/deps.edn7
-rw-r--r--challenge-080/tyler-wardhaugh/clojure/pom.xml23
-rw-r--r--challenge-080/tyler-wardhaugh/clojure/src/tw/weekly/c80/core.clj12
-rw-r--r--challenge-080/tyler-wardhaugh/lua/README.md6
5 files changed, 30 insertions, 39 deletions
diff --git a/challenge-080/tyler-wardhaugh/clojure/README.md b/challenge-080/tyler-wardhaugh/clojure/README.md
index 37d274beb5..57a8bbe6c2 100644
--- a/challenge-080/tyler-wardhaugh/clojure/README.md
+++ b/challenge-080/tyler-wardhaugh/clojure/README.md
@@ -1,13 +1,13 @@
-# tw.weekly.c79
+# tw.weekly.c80
-The Weekly Challenge - #079 - Tyler Wardhaugh
+The Weekly Challenge - #080 - Tyler Wardhaugh
## Usage
Run the project directly (shows default output from both tasks):
- $ clojure -m tw.weekly.c79.core
+ $ clojure -m tw.weekly.c80.core
Run the project's tests (which are samples from the task descriptions):
@@ -15,22 +15,11 @@ Run the project's tests (which are samples from the task descriptions):
Run Task #1 with input
- $ clojure -m tw.weekly.c79.t1 N
+ $ clojure -m tw.weekly.c80.t1 A1 A2 A3 [...]
Run Task #2 with input:
- $ clojure -m tw.weekly.c79.t2 A1 A2 A3 [...]
-
-See SVG files in the `resources` directory for the histograms drawn for each of the tests for Task 2:
-
-![2 1 4 1 2 5](resources/t2.test1.svg "[2 1 4 1 2 5]")
-
-![3 1 3 1 1 5](resources/t2.test2.svg "[3 1 3 1 1 5]")
-
-![1 2 3 4 5 4 3 2 1](resources/t2.test3.svg "[1 2 3 4 5 4 3 2 1]")
-
-![4 1 3 1 2 5 10 5 7](resources/t2.test4.svg "[4 1 3 1 2 5 10 5 7]")
-
+ $ clojure -m tw.weekly.c80.t2 A1 A2 A3 [...]
## Project Template
diff --git a/challenge-080/tyler-wardhaugh/clojure/deps.edn b/challenge-080/tyler-wardhaugh/clojure/deps.edn
index 988d683304..35e57a9092 100644
--- a/challenge-080/tyler-wardhaugh/clojure/deps.edn
+++ b/challenge-080/tyler-wardhaugh/clojure/deps.edn
@@ -1,6 +1,5 @@
{:paths ["src" "resources"]
- :deps {org.clojure/clojure {:mvn/version "1.10.1"}
- metasoarous/oz {:mvn/version "1.6.0-alpha26"}}
+ :deps {org.clojure/clojure {:mvn/version "1.10.1"}}
:aliases
{:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.0.0"}}}
@@ -11,5 +10,5 @@
:main-opts ["-m" "cognitect.test-runner"
"-d" "test"]}
:uberjar {:extra-deps {seancorfield/depstar {:mvn/version "1.0.94"}}
- :main-opts ["-m" "hf.depstar.uberjar" "tw.weekly.c79.jar"
- "-C" "-m" "tw.weekly.c79"]}}}
+ :main-opts ["-m" "hf.depstar.uberjar" "tw.weekly.c80.jar"
+ "-C" "-m" "tw.weekly.c80"]}}}
diff --git a/challenge-080/tyler-wardhaugh/clojure/pom.xml b/challenge-080/tyler-wardhaugh/clojure/pom.xml
index a5ef0fbd29..525b004ca8 100644
--- a/challenge-080/tyler-wardhaugh/clojure/pom.xml
+++ b/challenge-080/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.c79</artifactId>
+ <artifactId>tw.weekly.c80</artifactId>
<version>0.1.0-SNAPSHOT</version>
- <name>tw.weekly.c79</name>
- <description>FIXME: my new application.</description>
- <url>https://github.com/tw.weekly/tw.weekly.c79</url>
+ <name>tw.weekly.c80</name>
+ <description>Challenge #080</description>
+ <url>https://github.com/tw.weekly/tw.weekly.c80</url>
<licenses>
<license>
<name>Eclipse Public License</name>
@@ -19,9 +19,9 @@
</developer>
</developers>
<scm>
- <url>https://github.com/tw.weekly/tw.weekly.c79</url>
- <connection>scm:git:git://github.com/tw.weekly/tw.weekly.c79.git</connection>
- <developerConnection>scm:git:ssh://git@github.com/tw.weekly/tw.weekly.c79.git</developerConnection>
+ <url>https://github.com/tw.weekly/tw.weekly.c80</url>
+ <connection>scm:git:git://github.com/tw.weekly/tw.weekly.c80.git</connection>
+ <developerConnection>scm:git:ssh://git@github.com/tw.weekly/tw.weekly.c80.git</developerConnection>
<tag>HEAD</tag>
</scm>
<dependencies>
@@ -30,11 +30,6 @@
<artifactId>clojure</artifactId>
<version>1.10.1</version>
</dependency>
- <dependency>
- <groupId>metasoarous</groupId>
- <artifactId>oz</artifactId>
- <version>1.6.0-alpha26</version>
- </dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
@@ -44,10 +39,6 @@
<id>clojars</id>
<url>https://repo.clojars.org/</url>
</repository>
- <repository>
- <id>sonatype</id>
- <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
- </repository>
</repositories>
<distributionManagement>
<repository>
diff --git a/challenge-080/tyler-wardhaugh/clojure/src/tw/weekly/c80/core.clj b/challenge-080/tyler-wardhaugh/clojure/src/tw/weekly/c80/core.clj
new file mode 100644
index 0000000000..d43bc8641e
--- /dev/null
+++ b/challenge-080/tyler-wardhaugh/clojure/src/tw/weekly/c80/core.clj
@@ -0,0 +1,12 @@
+(ns tw.weekly.c80.core
+ (:require [tw.weekly.c80.t1 :as t1])
+ (:require [tw.weekly.c80.t2 :as t2])
+ (:gen-class))
+
+(defn -main
+ "Run all tasks"
+ [& _]
+ (println "Task #1")
+ (t1/-main)
+ (println "\n\nTask #2")
+ (t2/-main))
diff --git a/challenge-080/tyler-wardhaugh/lua/README.md b/challenge-080/tyler-wardhaugh/lua/README.md
index 91e2f8575d..db3ed46069 100644
--- a/challenge-080/tyler-wardhaugh/lua/README.md
+++ b/challenge-080/tyler-wardhaugh/lua/README.md
@@ -1,17 +1,17 @@
# The Weekly Challenge
-The Weekly Challenge - #078 - Tyler Wardhaugh
+The Weekly Challenge - #080 - Tyler Wardhaugh
## Usage
Run Task 1:
- $ lua -e 'require"ch-1".run({9, 10, 7, 5, 6, 1})'
+ $
Run Task 2:
- $ lua -e 'require"ch-2".run({10, 20, 30, 40, 50}, {3, 4})'
+ $
Run the project's tests (which are samples from the task descriptions):