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 system total real | |
Direct Result 3.250000 0.260000 3.510000 ( 3.255143) | |
Threads Result 13.980000 0.040000 14.020000 ( 1.773047) |
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 monads) | |
(defn- ensure-instance [class val constructor] | |
(if (instance? class val) | |
val | |
(constructor val))) | |
(defprotocol IMonad | |
(bind [this f])) |
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 binarytrees) | |
(defn bottom-up-tree [item depth] | |
(if (> depth 0) | |
[(bottom-up-tree (dec (* 2 item)) (dec depth)) | |
(bottom-up-tree (* 2 item) (dec depth)) | |
item] | |
[nil nil item])) | |
(defn item-check [i] |
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
#Clojerl | |
./bin/clje \ | |
-e "(do (require 'clojure.core.server) \ | |
(clojure.core.server/start-server \ | |
{:name \"socket-repl\" \ | |
:port 4444 \ | |
:accept 'clojure.main/repl \ | |
:address \"localhost\"}))" -r | |
#CLR |
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 graphql-test.core | |
(:require [malli.core :as m] | |
[clojure.string :as str] | |
[com.wsscode.misc.coll :as coll] | |
[com.wsscode.pathom3.interface.eql :as p.eql] | |
[com.wsscode.pathom3.connect.operation :as connect] | |
[com.wsscode.pathom3.connect.indexes :as indexes] | |
[com.walmartlabs.lacinia :as lacinia] | |
[com.walmartlabs.lacinia.util :as lacinia-util] | |
[edn-query-language.core :as eql] |
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
╰─>$ git checkout -b feature-branch | |
Switched to a new branch 'feature-branch' | |
╰─>$ git commit -a -m 'Commit 2' | |
[feature-branch 1f16b96] Commit 2 | |
1 file changed, 1 insertion(+) | |
╰─>$ git commit -a -m 'Commit 3' | |
[feature-branch f7c9f08] Commit 3 | |
1 file changed, 1 insertion(+) |
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
[io.confluent.parallelconsumer/parallel-consumer-core "0.3.0.2"] | |
[fundingcircle/jackdaw "0.8.0"] |
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- get-resolver-for-keyword [k] | |
(p/let [{:keys [text]} (editor/get-namespace) | |
namespace (str/replace text #"(.*?\.).*" "$1") | |
res (editor/run-feature :eql [{(list :repl/namespaces {:filter namespace}) | |
[:repl/namespace {:namespace/vars [:var/fqn]}]}]) | |
vars (for [{:namespace/keys [vars]} (:repl/namespaces res) | |
{:var/keys [fqn]} vars] | |
fqn) | |
code (str "(->> " (vec vars) | |
" (filter (fn [r] (-> r :com.wsscode.pathom.connect/output set (contains? " k "))))" |
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- wrap-in-tap [code] | |
(str "(let [value " code | |
" rr (try (resolve 'requiring-resolve) (catch Throwable _))]" | |
" (if-let [rs (try (rr 'cognitect.rebl/submit) (catch Throwable _))]" | |
" (rs '" code " value)" | |
" (tap> value))" | |
" value)")) | |
(defn tap-top-block [] | |
(p/let [block (editor/get-top-block)] |
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
INSERT INTO tree (id, parent_id, description) | |
VALUES | |
(6, 6, 'Im Recursive'); | |
WITH RECURSIVE parents as ( | |
select id, | |
description, | |
parent_id | |
from tree | |
where parent_id = 6 |
NewerOlder