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 experiments.datomic | |
(:require | |
[datomic.api :as d])) | |
(comment | |
(def db-uri "datomic:mem://hello") | |
(d/create-database db-uri) | |
(def conn (d/connect db-uri)) |
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 pool | |
(:import | |
(org.apache.commons.pool2 ObjectPool BasePooledObjectFactory PooledObjectFactory) | |
(org.apache.commons.pool2.impl DefaultPooledObject GenericObjectPool GenericObjectPoolConfig))) | |
(set! *warn-on-reflection* true) | |
;; таймаут? W | |
;; как останавливать? W | |
;; как плавно расти? |
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 experiments.str | |
(:import | |
(java.lang.reflect Field) | |
(java.io PushbackReader Reader) | |
(clojure.lang LispReader IFn))) | |
(set! *warn-on-reflection* true) | |
(def ^IFn/1 dispatchMacros | |
(let [field (.getDeclaredField LispReader "dispatchMacros")] |
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 example.core | |
(:require | |
[darkleaf.di.core :as di]) | |
(:import | |
(io.helidon.http Method) | |
(io.helidon.http.sse SseEvent) | |
(io.helidon.webserver WebServer WebServerConfig$Builder) | |
(io.helidon.webserver.http | |
HttpRouting$Builder Handler | |
ServerRequest ServerResponse) |
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 experiments.exceptions) | |
(comment | |
(require '[criterium.core :as c]) | |
(c/quick-bench | |
(Object.)) | |
;; Execution time mean : 5,429811 ns | |
(c/quick-bench |
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
(eval-after-load 'clojure-mode | |
'(setq clojure--prettify-symbols-alist | |
'(("\\\"" . ?״)))) | |
(use-package clojure-mode | |
:init | |
(add-hook 'clojure-mode-hook #'prettify-symbols-mode)) |
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
package gmonit; | |
import com.newrelic.api.agent.NewRelic; | |
import com.newrelic.api.agent.Trace; | |
import clojure.lang.IFn; | |
import clojure.lang.ISeq; | |
public final class TracedFn implements IFn { | |
IFn fn; |
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
projectile | |
magit | |
parinfer | |
cider | |
числа | |
строки | |
кейворды | |
символы |
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
Вводная про монады, монадическое значение, монадическая функция, композер | |
примеры монад - Promice, Optional, Completable Future, async/await | |
Do notation | |
Вводная про континуации, через исключения. | |
Вводная про генераторы, без стека, со стеком, показать стейт-машину | |
project loom | |
Next, return, throw | |
Цветные функции. |
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
function* getFullPost(id) { | |
const post = yield ['getPost', id] | |
const [author, comments] = yield* all([ | |
getFullUser(post.authorId), | |
all(post.commentIds.map(id => getFullComment(id))), | |
]) | |
return { | |
...post, | |
author, | |
comments, |
NewerOlder