This file contains 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
;; The deps.edn file describes the information needed to build a classpath. | |
;; | |
;; When using the `clojure` or `clj` script, there are several deps.edn files | |
;; that are combined: | |
;; - install-level | |
;; - user level (this file) | |
;; - project level (current directory when invoked) | |
;; | |
;; For all attributes other than :paths, these config files are merged left to right. | |
;; Only the last :paths is kept and others are dropped. |
This file contains 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 lib.clojure.exception | |
(:require [clojure.test :as test] | |
[lib.clojure-string.core :as string'] | |
[lib.clojure.lang :as lang]) | |
(:import (clojure.lang Associative ExceptionInfo))) | |
(set! *warn-on-reflection* true) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
This file contains 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 map-entries | |
(:import (clojure.lang MapEntry))) | |
(defn map-entries | |
"Returns transducer collecting map-entries from the sequence of keys/values. | |
Map key is `(kf k)` or just key if `kf` is nil. Map value is `(vf k v)` or | |
just value if `vf` is nil. Raises exception in case of odd amount of elements | |
in the input sequence." | |
([] (map-entries nil nil)) | |
([kf] (map-entries kf nil)) |
This file contains 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 user.flexiana-test-task | |
"https://twitter.com/itunderhood/status/1475580051571757065 | |
https://github.com/Terbiy/flexiana-test-task/blob/main/test/flexiana_test_task/core_test.clj" | |
(:require [clojure.test :refer :all])) | |
(set! *warn-on-reflection* true) | |
;;•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• | |
(defn scramble? [a b] |
This file contains 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 dev.env.cljs-repl.browser | |
"CLJS REPL in browser. See https://clojurescript.org/reference/repl. | |
Run local clojure.main REPL with `-m dev.env.cljs-repl.browser` parameters to work from Cursive." | |
(:require [cljs.repl :as repl] | |
[cljs.repl.browser :as browser])) | |
;••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• | |
(def ^:private output-dir "out/repl/browser") |
This file contains 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 edn-benchmark | |
"For https://twitter.com/GirlGameDev/status/1299153999057375237 | |
https://github.com/naomijub/edn-duration-benchmark" | |
(:require [clojure.edn :as edn])) | |
(set! *warn-on-reflection* true) | |
;;;; tested in REPL with `criterium.core/quick-bench` | |
;;;; windows 10, CPU 3.30 GHz, RAM 16 GB | |
;;;; clojure "1.10.1", java 11 |
This file contains 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 app.database.core | |
(:require | |
[app.database.sql-array :as sql-array])) | |
(set! *warn-on-reflection* true) | |
; SQL Helper functions | |
(defn text-array |
This file contains 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 app.lib.util.integrant | |
"Adapted integrant functionality. | |
Features: | |
- system rollback on failures; | |
- futures in `init-key` and `halt-key!` for parallel initialization." | |
(:require | |
[app.lib.util.exec :as exec] | |
[clojure.tools.logging :as log] | |
[integrant.core :as ig] | |
[vonstierlitz.online.util.logging-context :as logging-context])) |
This file contains 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 task.armstrong | |
"Task description: create function to check if integer is an | |
armstrong number https://en.wikipedia.org/wiki/Narcissistic_number. | |
For https://t.me/clojure_ru/103457." | |
(:require | |
[clojure.test :as t])) | |
(set! *warn-on-reflection* true) |
This file contains 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 app.lib.util.cljs-logging | |
#?(:cljs | |
(:require-macros app.lib.util.cljs-logging))) | |
#?(:clj (set! *warn-on-reflection* true) :cljs (set! *warn-on-infer* true)) | |
#?(:cljs | |
(do | |
(def console-fns |
NewerOlder