This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns pez.aoc2020.day-4 | |
| (:require [clojure.string] | |
| [clojure.spec.alpha :as s] | |
| [pez.aoc2020.util :as util])) | |
| (defn parse [card] | |
| (->> (clojure.string/replace card #"\s" " ") | |
| (re-seq #"(\S+):(\S+)") | |
| (map rest) | |
| (reduce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error 09:59:45.583077+0100 tccd identifier=com.obsproject.obs-studio, pid=4507, auid=501, euid=501, binary_path=/Applications/OBS.app/Contents/MacOS/obs attempted to call TCCAccessRequest for kTCCServiceAccessibility without the recommended com.apple.private.tcc.manager.check-by-audit-token entitlement | |
| default 09:59:45.583406+0100 tccd AUTHREQ_ATTRIBUTION: msgID=4507.4, attribution={accessing={identifier=com.crowdcafe.windowmagnet, pid=2122, auid=501, euid=501, binary_path=/Applications/Magnet.app/Contents/MacOS/Magnet}, requesting={identifier=com.obsproject.obs-studio, pid=4507, auid=501, euid=501, binary_path=/Applications/OBS.app/Contents/MacOS/obs}, }, | |
| default 09:59:45.605627+0100 runningboardd Acquiring assertion targeting [app<application.com.obsproject.obs-studio.36873184.36873740(501)>:4507] from originator [daemon<com.apple.coreservices.launchservicesd>:101] with description <RBSAssertionDescriptor| "frontmost:4507" ID:177-101-1605 target:4507 attributes:[ | |
| <RBSDomainAttribute| domain:"com.apple.laun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.easy.problem-118 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Re-implement Map = | |
| ;; By 4Clojure user: semisight | |
| ;; Difficulty: Easy | |
| ;; Tags: [core-seqs] | |
| ;; | |
| ;; Map is one of the core elements of a functional | |
| ;; programming language. Given a function f and an input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.elementary.problem-001 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Nothing but the Truth = | |
| ;; By 4Clojure user: dbyrne | |
| ;; Difficulty: Elementary | |
| ;; | |
| ;; Define `__` or replace the `__` in the `(tests ...)` | |
| ;; form with a value which will make the test pass. | |
| ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.elementary.problem-002 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Simple Math = | |
| ;; By 4Clojure user: dbyrne | |
| ;; Difficulty: Elementary | |
| ;; | |
| ;; If you are not familiar with polish (prefix) notation, | |
| ;; simple arithmetic might seem confusing. | |
| ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.easy.problem-039 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Interleave Two Seqs = | |
| ;; By 4Clojure user: dbyrne | |
| ;; Difficulty: Easy | |
| ;; Tags: [seqs core-functions] | |
| ;; | |
| ;; Write a function which takes two sequences and returns | |
| ;; the first item from each, then the second item from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.hard.problem-178 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Best Hand = | |
| ;; By 4Clojure user: toolkit | |
| ;; Difficulty: Hard | |
| ;; Tags: [strings game] | |
| ;; | |
| ;; Following on from Recognize Playing Cards, determine | |
| ;; the best poker hand that can be made with five cards. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.elementary.problem-003 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Intro to Strings = | |
| ;; By 4Clojure user: dbyrne | |
| ;; Difficulty: Elementary | |
| ;; | |
| ;; Clojure strings are Java strings. This means that you | |
| ;; can use any of the Java string methods on Clojure | |
| ;; strings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.elementary.problem-004 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Intro to Lists = | |
| ;; By 4Clojure user: dbyrne | |
| ;; Difficulty: Elementary | |
| ;; | |
| ;; Lists can be constructed with either a function or a | |
| ;; quoted form. | |
| ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.elementary.problem-006 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Intro to Vectors = | |
| ;; By 4Clojure user: dbyrne | |
| ;; Difficulty: Elementary | |
| ;; | |
| ;; Vectors can be constructed several ways. You can | |
| ;; compare them with lists. | |
| ;; |