user=> (defn hello [] "hello")
#'user/hello
user=> (defn goodbye [] "goodbye")
#'user/goodbye
user=> (let [f hello]
(with-redefs [hello goodbye]
(f)))
"hello"
user=> (with-redefs [hello goodbye]
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
(defmacro and-> | |
"(and-> 1 int? odd?) | |
;;=> (and (int? 1) (odd? 1))" | |
[expr & tests] | |
`(and ~@(for [t# tests] | |
`(~t# ~expr)))) | |
(defmacro and-> [x & forms] ;; 1, (int? odd?) |
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
;; From tbaldridge on Slack | |
(defn map [f coll] | |
(reduce (fn [acc i] | |
(conj acc (f i))) | |
[] | |
coll)) | |
(map inc [1 2 3]) ;;=> [2 3 4] |
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
Verifying that "bostonaholic.id" is my Blockstack ID. https://onename.com/bostonaholic |
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
select(...) | |
.where(...) | |
.group(...) | |
.order(...) | |
# can't comment a line in a chain | |
select(...) | |
# .where(...) | |
.group(...) | |
.order(...) |
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
user=> (s/def ::name string?) | |
:user/name | |
user=> (s/def ::id int?) | |
:user/id | |
user=> (s/conform ::name "bob ross") | |
"bob ross" | |
user=> (s/conform ::id 42) | |
42 | |
user=> (s/def ::name-or-id (s/or ::name2 string? ::id2 int?)) | |
:user/name-or-id |
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
(defn- untrace [v] | |
(alter-var-root v (fn [new] | |
(if-let [untraced (:trace/untraced (meta new))] | |
untraced | |
(throw (Exception. "Wasn't traced.")))))) | |
(defn- maybe-disable [state n] | |
(if (< (:calls state) n) | |
(update-in state [:calls] inc) | |
(assoc state :done true))) |
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
# frozen_string_literal: true | |
source 'https://rubygems.org' | |
ruby '2.7.1' | |
gem 'builder' | |
gem 'kramdown' | |
gem 'middleman' | |
gem 'middleman-autoprefixer' |
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
I am attesting that this GitHub handle bostonaholic is linked to the Tezos account tz1fPZ5sL92KuvaQfBfAs7mJ8SEgi3ttgiHP for tzprofiles | |
sig:edsigtpv2K4cVz4mAEChH8HYGFCn87aJ2tYYXHMCMaHYdUJ9vyRnqg7vi6eryigujzohuHDQjTCy2GNf6TFqnKwMZ8GRRd3ZyL7 |
Our system needs to handle high-throughput and low-latency data streams from multiple sources, and provide real-time processing and analytics capabilities. We need to choose a suitable event-driven streaming platform that can handle this workload and integrate with other systems in our architecture.
We will use Apache Kafka as our event-driven streaming platform.
OlderNewer